From 662e8b5caf7785707e53e4359bbd2c406d2366d2 Mon Sep 17 00:00:00 2001 From: Erik Simon Date: Wed, 21 Oct 2026 11:36:35 +0200 Subject: [PATCH] feat(terra): hyprchrome-claude and hyprchrome-files from local checkouts Both are flake inputs on their local checkouts, like tbctl (commit there, then `nix flake update ` here). hyprchrome-claude is the HyprChrome desktop app around the claude CLI. hyprchrome-files becomes the default file manager (inode/directory, SUPER+E via the new homelab.desktop.fileManager) and the FileChooser portal. Both defaults are set system-wide rather than through its home-manager module, which would take over mimeapps.list and write a hyprland-portals.conf that shadows portals.conf for every other portal. Co-Authored-By: Claude Opus 5.5 --- flake.lock | 42 +++++++++++++++++++++++++++++++++++ flake.nix | 15 +++++++++++++ home/desktop/hyprland.nix | 2 +- home/desktop/options.nix | 5 +++++ hosts/terra/configuration.nix | 27 ++++++++++++++++++++++ 5 files changed, 90 insertions(+), 1 deletion(-) diff --git a/flake.lock b/flake.lock index a0f2e28..12c3310 100644 --- a/flake.lock +++ b/flake.lock @@ -196,6 +196,46 @@ "url": "https://git.mgaction.town/darman/hypr-chrome.git" } }, + "hyprchrome-claude": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1792568604, + "narHash": "sha256-40PabARRs++ptuCotyOi/i6P3ji2Qfr+uEtoD874iGU=", + "ref": "refs/heads/main", + "rev": "44047fe73352e452766898f825c999f1dba12eff", + "revCount": 12, + "type": "git", + "url": "file:///mnt/hdd_01/data/Dev/repos/hyprchrome-claude" + }, + "original": { + "type": "git", + "url": "file:///mnt/hdd_01/data/Dev/repos/hyprchrome-claude" + } + }, + "hyprchrome-files": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1792519848, + "narHash": "sha256-nMIiq5qAJoEYdR4RKVWOBMyi7iHPs+TyNz7DdbhEjmw=", + "ref": "refs/heads/m5-polish", + "rev": "b2408c0789ca34949db15c861318ceac360963bc", + "revCount": 7, + "type": "git", + "url": "file:///mnt/hdd_01/data/Dev/repos/hyprchrome-files" + }, + "original": { + "type": "git", + "url": "file:///mnt/hdd_01/data/Dev/repos/hyprchrome-files" + } + }, "livesync-bridge": { "flake": false, "locked": { @@ -527,6 +567,8 @@ "home-manager": "home-manager", "honcho-console": "honcho-console", "hypr-chrome": "hypr-chrome", + "hyprchrome-claude": "hyprchrome-claude", + "hyprchrome-files": "hyprchrome-files", "livesync-bridge": "livesync-bridge", "mediamanager-nix": "mediamanager-nix", "nix-flatpak": "nix-flatpak", diff --git a/flake.nix b/flake.nix index b2b4d01..cd02c4b 100644 --- a/flake.nix +++ b/flake.nix @@ -80,6 +80,21 @@ url = "git+file:///mnt/hdd_01/data/Dev/repos/openbeach"; inputs.nixpkgs.follows = "nixpkgs"; }; + # hyprchrome-claude: the HyprChrome desktop app around the claude CLI + # (terra). Dev version from the local checkout, like tbctl: it builds the + # checkout's last commit, so commit there, then + # `nix flake update hyprchrome-claude` here. + hyprchrome-claude = { + url = "git+file:///mnt/hdd_01/data/Dev/repos/hyprchrome-claude"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + # hyprchrome-files: keyboard-first HyprChrome file manager (terra's + # default). Local checkout like hyprchrome-claude: commit there, then + # `nix flake update hyprchrome-files` here. + hyprchrome-files = { + url = "git+file:///mnt/hdd_01/data/Dev/repos/hyprchrome-files"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = { self, nixpkgs, disko, nixos-anywhere, sops-nix, nixos-images, home-manager, mediamanager-nix, authentik-nix, ... }@inputs: diff --git a/home/desktop/hyprland.nix b/home/desktop/hyprland.nix index 8f5aaa1..95d823c 100644 --- a/home/desktop/hyprland.nix +++ b/home/desktop/hyprland.nix @@ -197,7 +197,7 @@ in (bind "SUPER + V" (dsp.exec "luna-voice toggle")) ++ [ (bind "SUPER + B" (dsp.exec "vivaldi")) - (bind "SUPER + E" (dsp.exec "cosmic-files")) + (bind "SUPER + E" (dsp.exec cfg.fileManager)) (bind "SUPER + SHIFT + G" (dsp.workspaceRef "game")) (bind "SUPER + S" (dsp.exec "grim -o ${cfg.primaryOutput} ~/screenshot.png")) (bind "SUPER + SHIFT + S" (dsp.exec "grimblast copy area --freeze")) diff --git a/home/desktop/options.nix b/home/desktop/options.nix index 4d76604..f25ce2f 100644 --- a/home/desktop/options.nix +++ b/home/desktop/options.nix @@ -17,6 +17,11 @@ default = ""; description = "Connector for the debug widget stage; empty = last screen."; }; + fileManager = lib.mkOption { + type = lib.types.str; + default = "cosmic-files"; + description = "Command SUPER+E runs."; + }; wallpaper = lib.mkOption { type = lib.types.nullOr lib.types.str; default = null; diff --git a/hosts/terra/configuration.nix b/hosts/terra/configuration.nix index 1786644..0f3c708 100644 --- a/hosts/terra/configuration.nix +++ b/hosts/terra/configuration.nix @@ -26,6 +26,32 @@ agent.enable = true; }; + # hyprchrome-claude (dev): HyprChrome desktop app around the claude CLI, + # built from the local checkout (see the flake input). Needs `claude` on + # PATH, which home/desktop already provides. + environment.systemPackages = [ + inputs.hyprchrome-claude.packages.${pkgs.stdenv.hostPlatform.system}.default + ]; + + # hyprchrome-files (dev): the default file manager and file picker, built + # from the local checkout (see the flake input). Its home-manager module + # installs it with its fonts. Both defaults are set system-wide instead of + # through the module: its defaultFileManager would make home-manager own + # ~/.config/mimeapps.list, where apps register handlers, and its filePicker + # writes a hyprland-portals.conf, which xdg-desktop-portal reads INSTEAD of + # portals.conf, dropping default=hyprland;cosmic for every other portal. + # extraPortals also puts its D-Bus activation files (portal backend, + # FileManager1 "show in folder") on the session bus. + home-manager.users.darman = { + imports = [ inputs.hyprchrome-files.homeManagerModules.default ]; + programs.hyprchrome-files.enable = true; + }; + xdg.mime.defaultApplications."inode/directory" = "town.mgaction.HyprchromeFiles.desktop"; + xdg.portal.extraPortals = [ + inputs.hyprchrome-files.packages.${pkgs.stdenv.hostPlatform.system}.default + ]; + xdg.portal.config.common."org.freedesktop.impl.portal.FileChooser" = [ "hyprchromefiles" ]; + # Talk to luna (Hermes Agent on mars) with SUPER+V — see # home/desktop/hyprland.nix for the push-to-talk binds. homelab.lunaVoice = { @@ -78,6 +104,7 @@ ]; primaryOutput = "DP-2"; secondaryOutput = "HDMI-A-1"; + fileManager = "hyprchrome-files"; # Not checked into this repo (binaries) — from the Wallhaven library on # /mnt/hdd_01. hyprpaper has no "random" mode, so it's picked here. wallpaper = "/mnt/hdd_01/data/Pictures/Wallhaven/wallhaven-mlwz78.png";