From f36901b56af5dd258a56762b6bb9f660e0e357d1 Mon Sep 17 00:00:00 2001 From: cnst Date: Sat, 24 Aug 2024 14:57:06 +0200 Subject: [PATCH] refractoring modules without .enable --- home/modules/userd/sops/default.nix | 12 ++++++------ home/users/cnst/modules.nix | 2 +- hosts/cnix/modules.nix | 2 +- system/modules/sysd/sops/default.nix | 12 ++++++------ 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/home/modules/userd/sops/default.nix b/home/modules/userd/sops/default.nix index 96ce4b4f..aacfd9f4 100644 --- a/home/modules/userd/sops/default.nix +++ b/home/modules/userd/sops/default.nix @@ -15,17 +15,17 @@ in { options = { modules.userd.sops = { enable = mkEnableOption "Enables sops home environment"; - cnst = mkOption { + cnst.enable = mkOption { type = lib.types.bool; default = false; description = "Apply cnst sops settings"; }; - toothpick = mkOption { + toothpick.enable = mkOption { type = lib.types.bool; default = false; description = "Apply toothpick sops settings"; }; - adam = mkOption { + adam.enable = mkOption { type = lib.types.bool; default = false; description = "Apply adam sops settings"; @@ -41,7 +41,7 @@ in { sshKeyPaths = []; }; } - (mkIf cfg.cnst { + (mkIf cfg.cnst.enable { age = {sshKeyPaths = ["/home/cnst/.ssh/id_ed25519"];}; secrets = { openai_api_key = { @@ -54,7 +54,7 @@ in { }; }; }) - (mkIf cfg.toothpick { + (mkIf cfg.toothpick.enable { age = {sshKeyPaths = ["/home/toothpick/.ssh/id_ed25519"];}; secrets = { openai_api_key = { @@ -67,7 +67,7 @@ in { }; }; }) - (mkIf cfg.adam { + (mkIf cfg.adam.enable { age = {sshKeyPaths = ["/home/adam/.ssh/id_ed25519"];}; secrets = { openai_api_key = { diff --git a/home/users/cnst/modules.nix b/home/users/cnst/modules.nix index a70b5f87..ea4d172c 100644 --- a/home/users/cnst/modules.nix +++ b/home/users/cnst/modules.nix @@ -47,7 +47,7 @@ userd = { sops = { enable = true; - cnst = true; + cnst.enable = true; }; copyq.enable = true; mako.enable = true; diff --git a/hosts/cnix/modules.nix b/hosts/cnix/modules.nix index b2730583..275fbaf1 100644 --- a/hosts/cnix/modules.nix +++ b/hosts/cnix/modules.nix @@ -52,7 +52,7 @@ samba.enable = false; sops = { enable = true; - cnix = true; + cnix.enable = true; }; ssh.enable = true; udisks.enable = true; diff --git a/system/modules/sysd/sops/default.nix b/system/modules/sysd/sops/default.nix index a565ae1f..24c6c90a 100644 --- a/system/modules/sysd/sops/default.nix +++ b/system/modules/sysd/sops/default.nix @@ -11,17 +11,17 @@ in { options = { modules.sysd.sops = { enable = mkEnableOption "Enables sops system environment"; - cnix = mkOption { + cnix.enable = mkOption { type = lib.types.bool; default = false; description = "Apply cnix sops settings"; }; - toothpc = mkOption { + toothpc.enable = mkOption { type = lib.types.bool; default = false; description = "Apply toothpc sops settings"; }; - adampad = mkOption { + adampad.enable = mkOption { type = lib.types.bool; default = false; description = "Apply adampad sops settings"; @@ -38,7 +38,7 @@ in { sshKeyPaths = []; }; } - (mkIf cfg.cnix { + (mkIf cfg.cnix.enable { secrets = { openai_api_key = { format = "yaml"; @@ -50,7 +50,7 @@ in { }; }; }) - (mkIf cfg.toothpc { + (mkIf cfg.toothpc.enable { secrets = { openai_api_key = { format = "yaml"; @@ -62,7 +62,7 @@ in { }; }; }) - (mkIf cfg.adampad { + (mkIf cfg.adampad.enable { secrets = { openai_api_key = { format = "yaml";