summaryrefslogtreecommitdiff
path: root/hosts/vidhar/default.nix
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2021-08-03 17:12:41 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2021-08-03 17:12:41 +0200
commit02a0b57551a6a5f9ebccff226c12b8f671a7c149 (patch)
tree17aacfdc9a7572b56c0bda2cd2eee6e46e950616 /hosts/vidhar/default.nix
parentf06a55f31684b546734a4efb761a649225bb61a5 (diff)
downloadnixos-02a0b57551a6a5f9ebccff226c12b8f671a7c149.tar
nixos-02a0b57551a6a5f9ebccff226c12b8f671a7c149.tar.gz
nixos-02a0b57551a6a5f9ebccff226c12b8f671a7c149.tar.bz2
nixos-02a0b57551a6a5f9ebccff226c12b8f671a7c149.tar.xz
nixos-02a0b57551a6a5f9ebccff226c12b8f671a7c149.zip
vidhar: initrd ssh
Diffstat (limited to 'hosts/vidhar/default.nix')
-rw-r--r--hosts/vidhar/default.nix21
1 files changed, 1 insertions, 20 deletions
diff --git a/hosts/vidhar/default.nix b/hosts/vidhar/default.nix
index 4d7830e8..25f37133 100644
--- a/hosts/vidhar/default.nix
+++ b/hosts/vidhar/default.nix
@@ -3,6 +3,7 @@
3 imports = with flake.nixosModules.systemProfiles; [ 3 imports = with flake.nixosModules.systemProfiles; [
4 ./zfs.nix 4 ./zfs.nix
5 initrd-all-crypto-modules default-locale openssh rebuild-machines 5 initrd-all-crypto-modules default-locale openssh rebuild-machines
6 initrd-ssh
6 ]; 7 ];
7 8
8 config = { 9 config = {
@@ -41,15 +42,6 @@
41 hdd4.device = "/dev/disk/by-label/${hostName}-hdd4"; 42 hdd4.device = "/dev/disk/by-label/${hostName}-hdd4";
42 hdd5.device = "/dev/disk/by-label/${hostName}-hdd5"; 43 hdd5.device = "/dev/disk/by-label/${hostName}-hdd5";
43 }; 44 };
44
45 network = {
46 enable = true;
47 ssh = {
48 enable = true;
49 hostKeys = with config.sops.secrets; [ initrd_ssh_host_rsa_key.path initrd_ssh_host_ed25519_key.path ];
50 authorizedKeys = config.users.users.root.openssh.authorizedKeys.keys ++ map (kF: builtins.readFile kF) config.users.users.root.openssh.authorizedKeys.keyFiles;
51 };
52 };
53 }; 45 };
54 46
55 supportedFilesystems = [ "zfs" ]; 47 supportedFilesystems = [ "zfs" ];
@@ -58,17 +50,6 @@
58 }; 50 };
59 }; 51 };
60 52
61 sops.secrets = {
62 initrd_ssh_host_rsa_key = {
63 key = "rsa";
64 sopsFile = ./initrd-host-keys/private.yaml;
65 };
66 initrd_ssh_host_ed25519_key = {
67 key = "ed25519";
68 sopsFile = ./initrd-host-keys/private.yaml;
69 };
70 };
71
72 fileSystems = { 53 fileSystems = {
73 "/" = { 54 "/" = {
74 fsType = "tmpfs"; 55 fsType = "tmpfs";