diff options
| author | David Morgan <djm_uk@protonmail.com> | 2025-08-02 15:57:53 +0000 |
|---|---|---|
| committer | David Morgan <djm_uk@protonmail.com> | 2025-08-02 17:02:12 +0100 |
| commit | be1fe44af900bb19e6d5b0b8e104e44535fb0b31 (patch) | |
| tree | 276a09a807088ee81f8e08321e829c7393b19345 | |
| parent | a601ed0fd96243a73ccfee3ad068978fd85decff (diff) | |
| download | dotfiles-be1fe44af900bb19e6d5b0b8e104e44535fb0b31.tar.gz | |
Move services.openiscsi.name to private.nix
| -rw-r--r-- | .gitattributes | 1 | ||||
| -rw-r--r-- | nix-conf/machines/djmuk2/configuration.nix | 11 | ||||
| -rw-r--r-- | nix-conf/machines/djmuk2/private.nix | bin | 0 -> 138 bytes |
3 files changed, 6 insertions, 6 deletions
diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..4887f4a --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +private.nix filter=git-crypt diff=git-crypt diff --git a/nix-conf/machines/djmuk2/configuration.nix b/nix-conf/machines/djmuk2/configuration.nix index 0b31a01..b988dac 100644 --- a/nix-conf/machines/djmuk2/configuration.nix +++ b/nix-conf/machines/djmuk2/configuration.nix @@ -1,6 +1,9 @@ { config, pkgs, ... }: { - imports = [ ./hardware-configuration.nix ]; + imports = [ + ./hardware-configuration.nix + ./private.nix + ]; boot.tmp.cleanOnBoot = true; zramSwap.enable = true; @@ -32,12 +35,8 @@ services.locate.enable = true; - # Emulate nix-sops. Technically an anti-pattern, but this isn't a real secret, and this has to be embedded here, as we cannot set a file path to read it from. - # Populate/update with: - # SOPS_AGE_KEY=$(doas ssh-to-age -private-key -i /etc/ssh/ssh_host_ed25519_key) sops -d --extract '["openiscsi_name"]' machines/djmuk2/secrets.yaml | doas tee /root/.config/secrets/openiscsi_name + # services.openiscsi.name is in ./private.nix (encrypted with git-agecrypt) services.openiscsi.enable = true; - services.openiscsi.name = builtins.readFile "/root/.config/secrets/openiscsi_name"; - #services.openiscsi.enableAutoLoginOut = true; users.users.djm = { isNormalUser = true; diff --git a/nix-conf/machines/djmuk2/private.nix b/nix-conf/machines/djmuk2/private.nix Binary files differnew file mode 100644 index 0000000..74e244a --- /dev/null +++ b/nix-conf/machines/djmuk2/private.nix |