1
0
Fork 0
nix-configuration/hosts/Haven/default.nix

65 lines
1.1 KiB
Nix
Raw Normal View History

2024-02-29 09:53:34 -05:00
{ pkgs, home-manager, lib, config, ... }:
# Settings specific to Haven
let
2024-03-11 00:07:31 -04:00
start-haven = pkgs.writeShellScriptBin "start-haven" (builtins.readFile ./start-haven.sh);
2024-02-29 09:53:34 -05:00
in
{
imports = [
./hardware-configuration.nix
../common
];
system.stateVersion = "24.05";
host = {
role = "server";
2024-03-11 12:38:32 -04:00
apps.development.kubernetes.enable = true;
2024-02-29 09:53:34 -05:00
services = {
apcupsd.enable = true;
duplicacy-web = {
enable = true;
autostart = false;
environment = "${config.users.users.aires.home}";
};
k3s = {
enable = true;
role = "server";
};
msmtp.enable = true;
};
users = {
aires = {
enable = true;
services = {
syncthing = {
enable = true;
autostart = false;
};
};
};
media.enable = true;
};
};
# Enable SSH
services.openssh = {
enable = true;
ports = [ 33105 ];
settings = {
# require public key authentication for better security
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
PubkeyAuthentication = true;
PermitRootLogin = "without-password";
};
};
# Add script for booting Haven
2024-03-11 00:07:31 -04:00
environment.systemPackages = [
start-haven
2024-02-29 09:53:34 -05:00
];
}