This commit is contained in:
陈浩南 2023-07-27 00:07:20 +08:00
parent 2f22dbe27b
commit 77c878894d
3 changed files with 6 additions and 3 deletions

View File

@ -254,6 +254,7 @@
share.path = "/home/chn/share";
};
};
sshd.enable = true;
};
};
systemd.sleep.extraConfig = localLib.stripeTabs
@ -265,7 +266,6 @@
[ ./modules/hardware/nvidia-prime.nix { intelBusId = "PCI:0:2:0"; nvidiaBusId = "PCI:1:0:0"; } ]
./modules/hardware/chn-PC.nix
./modules/networking/ssh.nix
./modules/networking/wall_client.nix
./modules/networking/xmunet.nix
./modules/networking/chn-PC.nix

View File

@ -1 +0,0 @@
{ config.services.openssh.enable = true; }

View File

@ -36,6 +36,7 @@ inputs:
default = {};
};
};
sshd.enable = mkOption { type = types.bool; default = false; };
};
config =
let
@ -140,7 +141,7 @@ inputs:
defaultSopsFile = ../../secrets/${inputs.config.networking.hostName}.yaml;
# sops start before impermanence, so we need to use the absolute path
age.sshKeyPaths = [ "${services.sops.keyPathPrefix}/etc/ssh/ssh_host_ed25519_key" ];
gnupg.sshKeyPaths = [ "${services.sops.keyPathPrefix}/nix/persistent/etc/ssh/ssh_host_rsa_key" ];
gnupg.sshKeyPaths = [ "${services.sops.keyPathPrefix}/etc/ssh/ssh_host_rsa_key" ];
};
}
)
@ -187,5 +188,8 @@ inputs:
};
}
)
(
mkIf services.sshd.enable { services.openssh.enable = true; }
)
];
}