From dfbecb4e136d8bd2b994f71f9cffa2a7816f511c Mon Sep 17 00:00:00 2001 From: Wroclaw Date: Sat, 17 May 2025 11:23:59 +0200 Subject: [PATCH 1/3] update-list: auto generate inputs list --- update-list.nix | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/update-list.nix b/update-list.nix index dd007cf..ce8c49b 100644 --- a/update-list.nix +++ b/update-list.nix @@ -5,13 +5,10 @@ self: inputsWithPackages = import self.inputsPath { pkgs = self.packagesForSystem builtins.currentSystem; }; -in { - "inputs/nixpkgs" = inputsWithPackages.nixpkgs; - "inputs/nixpkgs-unstable" = inputsWithPackages.nixpkgs-unstable; - "inputs/nix-bitcoin" = inputsWithPackages.nix-bitcoin; - "inputs/cosmic-modules" = inputsWithPackages.cosmic-modules; - "inputs/nixos-vscode-server" = inputsWithPackages.nixos-vscode-server; -}) +in self.lib.concatMapAttrs (name: value: { + "inputs/${name}" = value; +}) inputsWithPackages +) # MARK: NixOS modules // ( let From 2f88baa90f652acfbb17f49e5bda3968766efb84 Mon Sep 17 00:00:00 2001 From: Wroclaw Date: Sun, 18 May 2025 16:23:00 +0200 Subject: [PATCH 2/3] nixos/shell: use concatStrings for staship prompt format --- nix-os/shell.nix | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/nix-os/shell.nix b/nix-os/shell.nix index 73476af..6d04613 100644 --- a/nix-os/shell.nix +++ b/nix-os/shell.nix @@ -131,7 +131,19 @@ in programs.starship = { enable = true; settings = { - format = "$all$line_break\${custom.ranger}$jobs$battery$time$status$os$container$shell$character"; + format = lib.concatStrings [ + "$all" + "$line_break" + "\${custom.ranger}" + "$jobs" + "$battery" + "$time" + "$status" + "$os" + "$container" + "$shell" + "$character" + ]; directory = { truncation_length = 5; truncation_symbol = "…/"; From be46e02c611fe5769523d2233af7c69963a38837 Mon Sep 17 00:00:00 2001 From: Wroclaw Date: Sun, 18 May 2025 16:23:53 +0200 Subject: [PATCH 3/3] nixos/shell: provide prompt information when SSH_AUTH_SOCK exists --- nix-os/shell.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/nix-os/shell.nix b/nix-os/shell.nix index 6d04613..891e3b9 100644 --- a/nix-os/shell.nix +++ b/nix-os/shell.nix @@ -133,6 +133,7 @@ in settings = { format = lib.concatStrings [ "$all" + "\${custom.sshAuthSocket}" "$line_break" "\${custom.ranger}" "$jobs" @@ -160,6 +161,12 @@ in command = "echo \"✦\""; style = "bold 208"; }; + custom.sshAuthSocket = { + when = "test -S \"$SSH_AUTH_SOCK\""; + command = "echo -e \"SSH Auth Agent\""; + style = "124"; + format = "with [$output]($style) "; + }; }; }; };