From 7d543709005b418e4377af3ee9bb05c735e620af Mon Sep 17 00:00:00 2001 From: Alexander Heldt Date: Wed, 27 Sep 2023 15:30:37 +0200 Subject: [PATCH] pinwheel: Extract work related config to `work` module --- hosts/pinwheel/configuration.nix | 2 ++ hosts/pinwheel/home.nix | 9 ------- hosts/pinwheel/modules/git/default.nix | 4 --- hosts/pinwheel/modules/work/default.nix | 26 +++++++++++++++++++ .../modules/{git => work}/work-gitconfig | 0 5 files changed, 28 insertions(+), 13 deletions(-) create mode 100644 hosts/pinwheel/modules/work/default.nix rename hosts/pinwheel/modules/{git => work}/work-gitconfig (100%) diff --git a/hosts/pinwheel/configuration.nix b/hosts/pinwheel/configuration.nix index 0dec871..80a88ee 100644 --- a/hosts/pinwheel/configuration.nix +++ b/hosts/pinwheel/configuration.nix @@ -35,6 +35,8 @@ ./modules/spotify ./modules/podman ./modules/k8s + + ./modules/work ]; nix.settings.experimental-features = [ "nix-command" "flakes" ]; diff --git a/hosts/pinwheel/home.nix b/hosts/pinwheel/home.nix index 145e99a..a7f0ea4 100644 --- a/hosts/pinwheel/home.nix +++ b/hosts/pinwheel/home.nix @@ -19,13 +19,4 @@ home.stateVersion = "23.05"; }; }; - - age.secrets = { - "netrc" = { - file = ../../secrets/pinwheel/netrc.age; - path = "/home/alex/.netrc"; - owner = "alex"; - group = "users"; - }; - }; } diff --git a/hosts/pinwheel/modules/git/default.nix b/hosts/pinwheel/modules/git/default.nix index 0d0b724..9e5206e 100644 --- a/hosts/pinwheel/modules/git/default.nix +++ b/hosts/pinwheel/modules/git/default.nix @@ -6,10 +6,6 @@ includes = [ { path = ./gitconfig; } - { - path = ./work-gitconfig; - condition = "gitdir:~/code/work/"; - } ]; }; }; diff --git a/hosts/pinwheel/modules/work/default.nix b/hosts/pinwheel/modules/work/default.nix new file mode 100644 index 0000000..79551f0 --- /dev/null +++ b/hosts/pinwheel/modules/work/default.nix @@ -0,0 +1,26 @@ +{ ... }: +{ + home-manager.users.alex = { + programs.git = { + includes = [ + { + path = ./work-gitconfig; + condition = "gitdir:~/code/work/"; + } + ]; + }; + + programs.go = { + goPrivate = [ "gitlab.com/zebware/*" ]; + }; + }; + + age.secrets = { + "netrc" = { + file = ../../../../secrets/pinwheel/netrc.age; + path = "/home/alex/.netrc"; + owner = "alex"; + group = "users"; + }; + }; +} diff --git a/hosts/pinwheel/modules/git/work-gitconfig b/hosts/pinwheel/modules/work/work-gitconfig similarity index 100% rename from hosts/pinwheel/modules/git/work-gitconfig rename to hosts/pinwheel/modules/work/work-gitconfig