nixos/hosts/sparky/default.nix

71 lines
1.6 KiB
Nix

{
lib,
configVars,
outputs,
pkgs,
...
}: let
btrfsMountDevice = "/dev/root_vg/root";
merlinIp = configVars.networking.addresses.merlin.ip;
piholeIp = configVars.networking.addresses.pihole.ip;
gatewayIp = configVars.networking.addresses.gateway.ip;
in {
imports = [
# Create users for this host
../common/users/media
./hardware-configuration.nix
# Impermanence
(import ../common/disks/btrfs/impermanence.nix {
btrfsMountDevice = btrfsMountDevice;
lib = lib;
})
# Import core options
./hardware-configuration.nix
../common/core
# Import optional options
../common/optional/openssh.nix
../common/optional/persistence.nix
../common/optional/fileserver/nfs-client/media.nix
# ../common/optional/printing.nix
../common/optional/distributed-builds/local-machine.nix
outputs.nixosModules.nixosAutoUpgrade
];
networking = {
hostName = "sparky";
networkmanager.enable = true;
enableIPv6 = false;
nameservers = ["${piholeIp}" "${gatewayIp}" "8.8.8.8"];
};
services.displayManager.defaultSession = "cinnamon";
services.libinput.enable = true;
system.services.nixosAutoUpgrade = {
enable = true;
persistent = true;
remote = "remotebuild@${merlinIp}";
reboot = false;
pushUpdates = false;
configDir = "/etc/nixos";
onCalendar = "*-*-* 06:00:00";
user = "root";
};
services.xserver = {
enable = true;
videoDrivers = ["modesetting"];
displayManager.lightdm.enable = true;
exportConfiguration = true;
deviceSection = ''
'';
desktopManager = {
cinnamon.enable = true;
};
};
}