From 6d574b9a6e08257beb41ae5cef9dda1dbd79c9be Mon Sep 17 00:00:00 2001 From: Nettika Date: Sat, 13 Jul 2024 11:36:38 -0700 Subject: [PATCH] Add tools.secrets option --- common/default.nix | 11 +++++++++++ flake.nix | 10 ++++++++-- marauder/default.nix | 7 ++++--- monolith/default.nix | 4 ++++ 4 files changed, 27 insertions(+), 5 deletions(-) create mode 100644 common/default.nix diff --git a/common/default.nix b/common/default.nix new file mode 100644 index 0000000..e0518bc --- /dev/null +++ b/common/default.nix @@ -0,0 +1,11 @@ +{ pkgs, lib, config, ... }: +with lib; +{ + options.tools.secrets = { + enable = mkEnableOption "Enable secret-management tools"; + }; + + config = mkIf config.tools.secrets.enable { + environment.systemPackages = [ pkgs.git-crypt ]; + }; +} diff --git a/flake.nix b/flake.nix index a916373..aaa37be 100755 --- a/flake.nix +++ b/flake.nix @@ -12,12 +12,18 @@ nixosConfigurations = { marauder = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; - modules = [ ./marauder ]; + modules = [ + ./marauder + ./common + ]; specialArgs = { inherit inputs secrets; }; }; monolith = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; - modules = [ ./monolith ]; + modules = [ + ./monolith + ./common + ]; specialArgs = { inherit inputs secrets; }; }; }; diff --git a/marauder/default.nix b/marauder/default.nix index 43ab414..8e170dd 100755 --- a/marauder/default.nix +++ b/marauder/default.nix @@ -65,6 +65,10 @@ nix.settings.experimental-features = [ "nix-command" "flakes" ]; + tools.secrets = { + enable = true; + }; + environment.systemPackages = with pkgs; [ # Chat clients discord @@ -87,9 +91,6 @@ # Productivity obsidian - - # Utilities - git-crypt ]; programs.git = { diff --git a/monolith/default.nix b/monolith/default.nix index ca3edb2..dcdc009 100755 --- a/monolith/default.nix +++ b/monolith/default.nix @@ -37,6 +37,10 @@ nix.settings.experimental-features = [ "nix-command" "flakes" ]; + tools.secrets = { + enable = true; + }; + programs.git = { enable = true; lfs.enable = true;