nixos/hosts/cloudnix/default.nix

60 lines
1.0 KiB
Nix
Raw Normal View History

2025-01-25 13:53:42 +00:00
{
configVars,
outputs,
...
}: let
user = "admin";
merlinIp = configVars.networking.addresses.merlin.ip;
in {
imports = [
# Create users for this host
../common/users/${user}
# Import core options
./hardware-configuration.nix
../common/core
# Import optional options
../common/optional/openssh.nix
../common/optional/distributed-builds/local-machine.nix
outputs.nixosModules.nixosAutoUpgrade
];
boot = {
loader = {
2025-01-25 14:07:10 +00:00
grub = {
enable = true;
devices = ["/dev/sda1"];
};
2025-01-25 13:53:42 +00:00
};
};
services = {
earlyoom = {
enable = true;
freeMemThreshold = 5; # <%5 free
};
};
system.services.nixosAutoUpgrade = {
enable = true;
persistent = true;
remote = "remotebuild@${merlinIp}";
reboot = false;
pushUpdates = false;
configDir = "/etc/nixos";
onCalendar = "*-*-* 06:00:00";
user = "sam";
};
networking = {
hostName = "cloudnix";
nameservers = ["8.8.8.8"];
firewall.enable = true;
};
services.libinput.enable = true;
}