From bd7e575868b0991a60f40a6410a207e9e18f4e75 Mon Sep 17 00:00:00 2001 From: Leyla Becker Date: Mon, 23 Sep 2024 20:27:38 -0500 Subject: [PATCH] changed env var for sops files --- enviroments/common/default.nix | 29 +++++++++++++++-------------- install.sh | 4 ++-- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/enviroments/common/default.nix b/enviroments/common/default.nix index 5236a8b..397799f 100644 --- a/enviroments/common/default.nix +++ b/enviroments/common/default.nix @@ -63,11 +63,11 @@ isSystemUser = true; }; - # pihole = { - # uid = 2003; - # group = "forgejo"; - # isSystemUser = true; - # }; + pihole = { + uid = 2003; + group = "pihole"; + isSystemUser = true; + }; }; groups = { @@ -88,7 +88,7 @@ users = { gid = 100; - members = ["lelya" "ester" "eve"]; + members = ["leyla" "ester" "eve"]; }; jellyfin = { @@ -106,10 +106,10 @@ members = ["forgejo" "leyla"]; }; - # pihole = { - # gid = 2003; - # members = ["pihole" "leyla"]; - # }; + pihole = { + gid = 2003; + members = ["pihole" "leyla"]; + }; }; }; @@ -126,6 +126,11 @@ }; }; + environment.sessionVariables = rec { + AGE_KEY_DIRECTORY = "/var/lib/sops-nix"; + AGE_KEY_FILE = "${AGE_KEY_DIRECTORY}/key.txt"; + }; + sops = { defaultSopsFormat = "yaml"; gnupg.sshKeyPaths = []; @@ -136,10 +141,6 @@ # generateKey = true; }; }; - environment.sessionVariables = { - AGE_KEY_FILE_LOCATION = "/var/lib/sops-nix/"; - }; - # List packages installed in system profile. environment.systemPackages = with pkgs; [ wget diff --git a/install.sh b/install.sh index 0718998..b0a01ef 100755 --- a/install.sh +++ b/install.sh @@ -47,8 +47,8 @@ cleanup() { trap cleanup EXIT # copy key file to temp folder to copy over to target -mkdir -p $temp$AGE_KEY_FILE_LOCATION -cp -r $AGE_KEY_FILE_LOCATION/* $temp$AGE_KEY_FILE_LOCATION +mkdir -p $temp$AGE_KEY_DIRECTORY +cp -r $AGE_KEY_DIRECTORY/* $temp$AGE_KEY_DIRECTORY # commit number in this is because the main branch of nixos-anywhere is broken right now nix run github:nix-community/nixos-anywhere/b3b6bfebba35d55fba485ceda588984dec74c54f -- --extra-files $temp --flake ".#$flake" ${user:-nixos}@$target