From 8c6671c18392eb13d0fbd57a90bcb1a7f3c63889 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Tue, 17 Dec 2024 09:38:54 -0800 Subject: install some tools only on work machine --- nix/lib/mkSystem.nix | 1 + nix/users/fcuny/home-manager.nix | 15 +++++---------- nix/users/fcuny/work.nix | 13 +++++++++++++ 3 files changed, 19 insertions(+), 10 deletions(-) create mode 100644 nix/users/fcuny/work.nix diff --git a/nix/lib/mkSystem.nix b/nix/lib/mkSystem.nix index 2375adf..cb581c7 100644 --- a/nix/lib/mkSystem.nix +++ b/nix/lib/mkSystem.nix @@ -36,6 +36,7 @@ systemFunc rec { home-manager.users.${user} = import userHMConfig { inputs = inputs; darwin = darwin; + systemName = name; }; } diff --git a/nix/users/fcuny/home-manager.nix b/nix/users/fcuny/home-manager.nix index ca11b80..e975c37 100644 --- a/nix/users/fcuny/home-manager.nix +++ b/nix/users/fcuny/home-manager.nix @@ -1,12 +1,13 @@ -{ darwin, ... }: +{ darwin, systemName, ... }: -{ config, lib, pkgs, ... }: { +{ lib, pkgs, ... }: { home.stateVersion = "23.05"; xdg.enable = true; imports = [ ./shell.nix ./ssh.nix ./git.nix ] - ++ lib.optionals darwin [ ./1password.nix ./go.nix ./k8s.nix ]; + ++ lib.optionals darwin [ ./1password.nix ./go.nix ] + ++ lib.optionals (systemName == "hq-c02fk3q7md6t") [ ./work.nix ]; home.packages = with pkgs; [ @@ -14,18 +15,12 @@ age # nix - nil + nil # nix lsp nix-direnv nixd nixfmt-classic nixpkgs-fmt - nil # nix lsp ] ++ (lib.optionals (darwin) [ - # hashicorp - boundary - nomad-pack - tfswitch - # media mpv ffmpeg diff --git a/nix/users/fcuny/work.nix b/nix/users/fcuny/work.nix new file mode 100644 index 0000000..cc80104 --- /dev/null +++ b/nix/users/fcuny/work.nix @@ -0,0 +1,13 @@ +{ pkgs, ... }: { + imports = [ ./k8s.nix ]; + + home.packages = with pkgs; [ + # hashicorp + boundary + nomad-pack + tfswitch + + # for ssh + sapi + ]; +} -- cgit 1.4.1