From c5fea8b61b48c4145c6df505aa2c2ade17e7ac67 Mon Sep 17 00:00:00 2001 From: notohh Date: Sun, 14 May 2023 05:57:15 -0400 Subject: [PATCH] feat: init sops modules --- hosts/default.nix | 23 +++++++++++++++++++---- modules/default.nix | 1 + modules/sops.nix | 11 +++++++++++ 3 files changed, 31 insertions(+), 4 deletions(-) create mode 100644 modules/sops.nix diff --git a/hosts/default.nix b/hosts/default.nix index 3f1dd5e..0a44f80 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -4,8 +4,10 @@ inputs: let in { tsuki = nixosSystem { inherit system; + specialArgs = {inherit inputs;}; modules = [ ./tsuki + inputs.sops-nix.nixosModules.sops inputs.home-manager.nixosModules.home-manager { home-manager = { @@ -14,8 +16,8 @@ in { extraSpecialArgs = {inherit inputs;}; users.notoh = { imports = [ - inputs.hyprland.homeManagerModules.default ./tsuki/home.nix + inputs.hyprland.homeManagerModules.default ]; }; }; @@ -26,12 +28,18 @@ in { inherit system; modules = [ ./hime + inputs.sops-nix.nixosModules.sops inputs.home-manager.nixosModules.home-manager { home-manager = { useGlobalPkgs = true; useUserPackages = true; - users.oh = {imports = [./hime/home.nix];}; + extraSpecialArgs = {inherit inputs;}; + users.oh = { + imports = [ + ./hime/home.nix + ]; + }; }; } ]; @@ -40,13 +48,16 @@ in { inherit system; modules = [ ./sutakku + inputs.sops-nix.nixosModules.sops inputs.home-manager.nixosModules.home-manager { home-manager = { useGlobalPkgs = true; useUserPackages = true; users.oh = { - imports = [./sutakku/home.nix]; + imports = [ + ./sutakku/home.nix + ]; }; }; } @@ -54,15 +65,19 @@ in { }; sakura = nixosSystem { inherit system; + specialArgs = {inherit inputs;}; modules = [ ./sakura + inputs.sops-nix.nixosModules.sops inputs.home-manager.nixosModules.home-manager { home-manager = { useGlobalPkgs = true; useUserPackages = true; users.notoh = { - imports = [./sakura/home.nix]; + imports = [ + ./sakura/home.nix + ]; }; }; } diff --git a/modules/default.nix b/modules/default.nix index 74b8690..319164d 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -6,5 +6,6 @@ ./system.nix ./openssh.nix ./virtualisation.nix + ./sops.nix ]; } diff --git a/modules/sops.nix b/modules/sops.nix new file mode 100644 index 0000000..31318d2 --- /dev/null +++ b/modules/sops.nix @@ -0,0 +1,11 @@ +{ + config, + ... +}: { + sops = { + defaultSopsFile = ../secrets/secrets.yaml; + age.keyFile = "/home/notoh/.config/sops/age/keys.txt"; + secrets.foundry-username = {}; + secrets.foundry-password = {}; + }; +}