From 8688fecb4272c2ebeab72cab1627f5790058e669 Mon Sep 17 00:00:00 2001 From: ulic-youthlic Date: Sun, 19 Jan 2025 23:59:14 +0800 Subject: [PATCH] change sops key file location --- home/modules/sops.nix | 2 +- nixos/modules/sops.nix | 15 +++++---------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/home/modules/sops.nix b/home/modules/sops.nix index 90f84d4..452f640 100644 --- a/home/modules/sops.nix +++ b/home/modules/sops.nix @@ -18,7 +18,7 @@ }; keyFile = lib.mkOption { type = lib.types.nonEmptyStr; - default = "${config.home.homeDirectory}/.config/sops/age/keys.txt"; + default = "/var/sops/key.txt"; description = '' path to age key file ''; diff --git a/nixos/modules/sops.nix b/nixos/modules/sops.nix index 8728615..664bf65 100644 --- a/nixos/modules/sops.nix +++ b/nixos/modules/sops.nix @@ -6,15 +6,10 @@ { config = { sops.defaultSopsFile = rootPath + "/secrets/general.yaml"; - sops.age = - let - unixName = config.youthlic.home-manager.unixName; - cfg = config.users.users."${unixName}"; - in - { - keyFile = "${cfg.home}/.config/sops/age/keys.txt"; - sshKeyPaths = [ ]; - generateKey = false; - }; + sops.age = { + keyFile = "/var/sops/key.txt"; + sshKeyPaths = [ ]; + generateKey = false; + }; }; }