From 393c2e72bd0508ecbf2fa6cad31d5a58612de01e Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 19 Apr 2026 11:17:14 +0000 Subject: [PATCH 1/3] Switch default shell from zsh to fish with starship prompt Replace programs.zsh (powerlevel10k theme) with programs.fish and starship prompt integration. Fish provides autosuggestions and syntax highlighting out of the box, eliminating the need for separate plugins. https://claude.ai/code/session_01NS2hpapno51a1Ng7hWaQKy --- configuration.nix | 2 +- home.nix | 15 +++++++-------- shell.nix | 2 +- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/configuration.nix b/configuration.nix index 0bd6310..061c8bb 100644 --- a/configuration.nix +++ b/configuration.nix @@ -77,7 +77,7 @@ users.users.chexit = { isNormalUser = true; description = "chexit"; - shell = pkgs.zsh; + shell = pkgs.fish; extraGroups = [ "networkmanager" "wheel" "docker" ]; }; diff --git a/home.nix b/home.nix index b6d3cd1..182493b 100644 --- a/home.nix +++ b/home.nix @@ -1,22 +1,21 @@ -{ pkgs, ... }: +{ ... }: { home.username = "chexit"; home.homeDirectory = "/home/chexit"; home.stateVersion = "25.11"; - programs.zsh = { + programs.fish = { enable = true; - enableCompletion = true; - autosuggestion.enable = true; - syntaxHighlighting.enable = true; - initContent = '' - source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme - ''; shellAliases = { rebuild = "sudo nixos-rebuild switch --flake ~/nixos-config#chexit"; }; }; + programs.starship = { + enable = true; + enableFishIntegration = true; + }; + programs.home-manager.enable = true; } diff --git a/shell.nix b/shell.nix index b27c8ca..d81c197 100644 --- a/shell.nix +++ b/shell.nix @@ -1,5 +1,5 @@ { ... }: { - programs.zsh.enable = true; + programs.fish.enable = true; } -- 2.52.0 From 11f8ed08e99dfcf4766d39fe8e790e17f8e5b764 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 19 Apr 2026 11:24:46 +0000 Subject: [PATCH 2/3] Add 1Password GUI and CLI via NixOS programs module Enables programs._1password (CLI) and programs._1password-gui with polkit authorization for user chexit. allowUnfree is already set, so packages install without additional config. https://claude.ai/code/session_01NS2hpapno51a1Ng7hWaQKy --- configuration.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/configuration.nix b/configuration.nix index 061c8bb..0f13d6c 100644 --- a/configuration.nix +++ b/configuration.nix @@ -81,6 +81,12 @@ extraGroups = [ "networkmanager" "wheel" "docker" ]; }; + programs._1password.enable = true; + programs._1password-gui = { + enable = true; + polkitPolicyOwners = [ "chexit" ]; + }; + programs.throne = { enable = true; tunMode.enable = true; -- 2.52.0 From 6775a88ca8415e9f620ff53574d03e6b404ad0e6 Mon Sep 17 00:00:00 2001 From: chexit Date: Sun, 19 Apr 2026 18:54:28 +0300 Subject: [PATCH 3/3] feat(yami): add dataDir option for storing stack state on separate disk - Bind-mounts /var/lib/{gitea,postgresql} under configurable dataDir - gitea-runner intentionally excluded: its DynamicUser + StateDirectory conflicts with pre-existing mount points ("File exists") - Runner token moved to /var/lib/gitea-runner-secret/ to avoid the same symlink/StateDirectory conflict inside /var/lib/gitea-runner - Enable the stack on this host with dataDir = /mnt/ssd_110/yami --- configuration.nix | 8 ++++++- yami-dev-stack.nix | 54 ++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 55 insertions(+), 7 deletions(-) diff --git a/configuration.nix b/configuration.nix index 0bd6310..fd4f84b 100644 --- a/configuration.nix +++ b/configuration.nix @@ -7,7 +7,7 @@ ./desktop.nix ./nvidia.nix ./shell.nix - # ./yami-dev-stack.nix # uncomment to enable Yami dev stack, then set services.yami-dev-stack below + ./yami-dev-stack.nix ]; nix = { @@ -98,5 +98,11 @@ # Docker is now managed by yami-dev-stack.nix when that module is enabled. # services.yami-dev-stack = { enable = true; user = "chexit"; }; + services.yami-dev-stack = { + enable = true; + user = "chexit"; + dataDir = "/mnt/ssd_110/yami"; + }; + system.stateVersion = "25.11"; } diff --git a/yami-dev-stack.nix b/yami-dev-stack.nix index f1777ad..77b0f0e 100644 --- a/yami-dev-stack.nix +++ b/yami-dev-stack.nix @@ -13,9 +13,20 @@ in type = types.str; description = "User that will own runner token and be added to docker group"; }; + + dataDir = mkOption { + type = types.nullOr types.path; + default = null; + example = "/mnt/ssd_110/yami"; + description = '' + If set, bind-mounts /var/lib/{gitea,postgresql,gitea-runner} under this + path so all stack data lives on a separate disk. Directories are created + automatically; existing data must be rsync'd manually before enabling. + ''; + }; }; - config = mkIf cfg.enable { + config = mkIf cfg.enable (mkMerge [ { # ── Systemd target ───────────────────────────────────────────────────────── # Manual-only: nothing in wantedBy, so it never starts on boot. @@ -128,7 +139,11 @@ in enable = true; name = "home-runner"; url = "http://localhost:3000"; - tokenFile = "/var/lib/gitea-runner/token"; + # NOT under /var/lib/gitea-runner — that path is systemd-managed for the + # service (DynamicUser + StateDirectory means it becomes a symlink to + # /var/lib/private/gitea-runner). Pre-creating it ourselves breaks the + # service with "Failed to set up special execution directory: File exists". + tokenFile = "/var/lib/gitea-runner-secret/token"; labels = [ "ubuntu-latest:docker://node:20" "native:host" @@ -143,12 +158,13 @@ in }; # Runner uses DynamicUser, so there's no static gitea-runner user/group. - # tokenFile is loaded via systemd EnvironmentFile, so the file MUST be in - # env-file format, not a raw token: + # Token lives in a sibling dir (not /var/lib/gitea-runner — that's systemd's + # StateDirectory and pre-creating it breaks DynamicUser bind setup). + # The file MUST be in env-file format, not a raw token: # TOKEN= # Get the token from Site Administration → Actions → Runners → Create new Runner. systemd.tmpfiles.rules = [ - "d /var/lib/gitea-runner 0700 root root -" + "d /var/lib/gitea-runner-secret 0700 root root -" ]; # ── Shell aliases ────────────────────────────────────────────────────────── @@ -162,5 +178,31 @@ in # ── Firewall ─────────────────────────────────────────────────────────────── # Merged with existing rules (Steam etc.); does not overwrite them. networking.firewall.allowedTCPPorts = [ 3000 2222 ]; - }; + } + + # ── Optional: move all stack data to a separate disk via bind-mounts ───────── + (mkIf (cfg.dataDir != null) ( + let + # gitea-runner intentionally NOT bind-mounted: its service uses + # DynamicUser + StateDirectory, which refuses to adopt an existing + # mount point ("Failed to set up special execution directory: File exists"). + # Its data is tiny (token + .runner state) so it stays on the system disk. + subs = [ "gitea" "postgresql" ]; + mkBind = name: { + name = "/var/lib/${name}"; + value = { + device = "${cfg.dataDir}/${name}"; + fsType = "none"; + options = [ "bind" ]; + }; + }; + in { + # Ensure target dirs exist on the data disk before mounts happen. + systemd.tmpfiles.rules = map (n: "d ${cfg.dataDir}/${n} 0755 root root -") subs + ++ [ "d ${cfg.dataDir} 0755 root root -" ]; + + fileSystems = listToAttrs (map mkBind subs); + } + )) + ]); } -- 2.52.0