move openssh to baseline

This commit is contained in:
Sean Buckley 2022-09-02 22:53:25 -04:00
parent 8bee7a3992
commit 889c9db162
6 changed files with 10 additions and 21 deletions

View file

@ -9,12 +9,9 @@
environment.etc.machine-id.source = "/var/lib/nixos/machine-id"; environment.etc.machine-id.source = "/var/lib/nixos/machine-id";
services.openssh = { services.openssh.hostKeys = [
enable = true;
hostKeys = [
{ type = "ed25519"; path = "/var/lib/nixos/ssh_host_ed25519_key"; } { type = "ed25519"; path = "/var/lib/nixos/ssh_host_ed25519_key"; }
]; ];
};
users.mutableUsers = false; users.mutableUsers = false;
users.users.sean.passwordFile = "/var/lib/nixos/shadow_sean"; users.users.sean.passwordFile = "/var/lib/nixos/shadow_sean";

View file

@ -12,12 +12,9 @@
environment.etc."NetworkManager/system-connections".source = environment.etc."NetworkManager/system-connections".source =
"/var/lib/nixos/nm-connections"; "/var/lib/nixos/nm-connections";
services.openssh = { services.openssh.hostKeys = [
enable = true;
hostKeys = [
{ type = "ed25519"; path = "/var/lib/nixos/ssh_host_ed25519_key"; } { type = "ed25519"; path = "/var/lib/nixos/ssh_host_ed25519_key"; }
]; ];
};
users.mutableUsers = false; users.mutableUsers = false;
users.users.sean.passwordFile = "/var/lib/nixos/shadow_sean"; users.users.sean.passwordFile = "/var/lib/nixos/shadow_sean";

View file

@ -10,12 +10,9 @@
systemd.tmpfiles.rules = [ "d /var/lib/nixos/network-connections 0700" ]; systemd.tmpfiles.rules = [ "d /var/lib/nixos/network-connections 0700" ];
services.openssh = { services.openssh.hostKeys = [
enable = true;
hostKeys = [
{ type = "ed25519"; path = "/var/lib/nixos/ssh_host_ed25519_key"; } { type = "ed25519"; path = "/var/lib/nixos/ssh_host_ed25519_key"; }
]; ];
};
users.mutableUsers = false; users.mutableUsers = false;
users.users.root.passwordFile = "/nix/persist/shadow_sean"; users.users.root.passwordFile = "/nix/persist/shadow_sean";

View file

@ -11,8 +11,6 @@
services.qemuGuest.enable = true; services.qemuGuest.enable = true;
services.openssh.enable = true;
users.mutableUsers = false; users.mutableUsers = false;
users.users.root.passwordFile = "/nix/persist/shadow_sean"; users.users.root.passwordFile = "/nix/persist/shadow_sean";
users.users.sean.passwordFile = "/nix/persist/shadow_sean"; users.users.sean.passwordFile = "/nix/persist/shadow_sean";

View file

@ -41,6 +41,7 @@
}; };
services = { services = {
openssh.enable = true;
openssh.startWhenNeeded = true; openssh.startWhenNeeded = true;
earlyoom.enable = true; earlyoom.enable = true;

View file

@ -3,7 +3,6 @@ with lib;
{ {
config = mkIf (config.sconfig.profile == "server") { config = mkIf (config.sconfig.profile == "server") {
services.logind.lidSwitch = "ignore"; services.logind.lidSwitch = "ignore";
services.openssh.enable = true;
documentation.nixos.enable = false; documentation.nixos.enable = false;
nix.gc = { nix.gc = {
automatic = true; automatic = true;