diff options
Diffstat (limited to 'nix-conf/machines')
-rw-r--r-- | nix-conf/machines/djmuk2/configuration.nix | 11 | ||||
-rw-r--r-- | nix-conf/machines/djmuk2/private.nix | bin | 0 -> 138 bytes | |||
-rw-r--r-- | nix-conf/machines/edrahil/configuration.nix | 3 | ||||
-rw-r--r-- | nix-conf/machines/edrahil/network-configuration.nix | 23 | ||||
-rw-r--r-- | nix-conf/machines/edrahil/private.nix | bin | 0 -> 173 bytes | |||
-rw-r--r-- | nix-conf/machines/egalmoth/configuration.nix | 12 |
6 files changed, 14 insertions, 35 deletions
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 new file mode 100644 index 0000000..74e244a --- /dev/null +++ b/nix-conf/machines/djmuk2/private.nix Binary files differdiff --git a/nix-conf/machines/edrahil/configuration.nix b/nix-conf/machines/edrahil/configuration.nix index a1bc8e3..68593aa 100644 --- a/nix-conf/machines/edrahil/configuration.nix +++ b/nix-conf/machines/edrahil/configuration.nix @@ -3,7 +3,6 @@ imports = [ ./hardware-configuration.nix ./network-configuration.nix - <sops-nix/modules/sops> ]; boot.tmp.cleanOnBoot = true; @@ -20,7 +19,7 @@ sops = { defaultSopsFile = builtins.path { - path = /etc/nixos/secrets.yaml; + path = ./secrets.yaml; name = "edrahil-secrets.yaml"; }; secrets.restic_password = { diff --git a/nix-conf/machines/edrahil/network-configuration.nix b/nix-conf/machines/edrahil/network-configuration.nix index 4b85912..16df081 100644 --- a/nix-conf/machines/edrahil/network-configuration.nix +++ b/nix-conf/machines/edrahil/network-configuration.nix @@ -1,19 +1,12 @@ { ... }: { - networking = { - interfaces.ens3.ipv6.addresses = [ - { - # Emulate nix-sops. Technically an anti-pattern, but IP addresses aren't real secrets, 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 '["ipv6_address"]' machines/edrahil/secrets.yaml | doas tee /root/.config/secrets/ipv6_address - address = builtins.readFile "/root/.config/secrets/ipv6_address"; - prefixLength = 64; - } - ]; - defaultGateway6 = { - address = "fe80::1"; - interface = "ens3"; - }; + imports = [ + ./private.nix + ]; + + # networking.interfaces.ens3.ipv6.addresses configured in private.nix + networking.defaultGateway6 = { + address = "fe80::1"; + interface = "ens3"; }; } diff --git a/nix-conf/machines/edrahil/private.nix b/nix-conf/machines/edrahil/private.nix new file mode 100644 index 0000000..c5941c6 --- /dev/null +++ b/nix-conf/machines/edrahil/private.nix Binary files differdiff --git a/nix-conf/machines/egalmoth/configuration.nix b/nix-conf/machines/egalmoth/configuration.nix index 0da134b..d1fdd56 100644 --- a/nix-conf/machines/egalmoth/configuration.nix +++ b/nix-conf/machines/egalmoth/configuration.nix @@ -159,18 +159,6 @@ services.locate.enable = true; - nix = { - settings = { - substituters = [ - "https://nix-community.cachix.org" - "https://cache.nixos.org/" - ]; - trusted-public-keys = [ - "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" - ]; - }; - }; - environment.systemPackages = with pkgs; [ acpi acpitool |