nixos/hosts/sparky/default.nix

71 lines
1.6 KiB
Nix
Raw Normal View History

{
lib,
configVars,
2025-01-17 09:40:29 +00:00
outputs,
2025-01-24 11:55:11 +00:00
pkgs,
...
}: let
2025-01-24 11:55:11 +00:00
btrfsMountDevice = "/dev/root_vg/root";
merlinIp = configVars.networking.addresses.merlin.ip;
2025-01-15 23:59:48 +00:00
piholeIp = configVars.networking.addresses.pihole.ip;
gatewayIp = configVars.networking.addresses.gateway.ip;
in {
imports = [
# Create users for this host
../common/users/media
2025-01-24 11:55:11 +00:00
./hardware-configuration.nix
2024-05-27 16:19:00 +01:00
# Impermanence
(import ../common/disks/btrfs/impermanence.nix {
btrfsMountDevice = btrfsMountDevice;
lib = lib;
})
2024-05-27 16:19:00 +01:00
# Import core options
./hardware-configuration.nix
../common/core
2024-05-16 11:55:24 +01:00
# 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
2025-01-17 09:40:29 +00:00
outputs.nixosModules.nixosAutoUpgrade
];
2024-05-16 11:55:24 +01:00
2024-05-16 20:19:01 +01:00
networking = {
2024-05-17 20:17:53 +01:00
hostName = "sparky";
2024-05-16 20:19:01 +01:00
networkmanager.enable = true;
enableIPv6 = false;
2025-01-15 23:59:48 +00:00
nameservers = ["${piholeIp}" "${gatewayIp}" "8.8.8.8"];
2024-05-16 20:19:01 +01:00
};
2024-05-23 19:41:54 +01:00
services.displayManager.defaultSession = "cinnamon";
2024-05-29 19:49:31 +01:00
services.libinput.enable = true;
2024-05-23 19:41:54 +01:00
2025-01-17 09:35:16 +00:00
system.services.nixosAutoUpgrade = {
enable = true;
persistent = true;
remote = "remotebuild@${merlinIp}";
2025-01-17 09:35:16 +00:00
reboot = false;
pushUpdates = false;
configDir = "/etc/nixos";
onCalendar = "*-*-* 06:00:00";
2025-01-24 11:55:11 +00:00
user = "root";
2025-01-17 09:35:16 +00:00
};
2024-05-24 14:32:18 +01:00
services.xserver = {
enable = true;
2025-01-24 11:55:11 +00:00
videoDrivers = ["modesetting"];
2024-05-24 14:32:18 +01:00
displayManager.lightdm.enable = true;
2024-05-29 19:49:31 +01:00
exportConfiguration = true;
deviceSection = ''
'';
2024-05-24 14:32:18 +01:00
desktopManager = {
cinnamon.enable = true;
2024-06-10 14:05:06 +01:00
};
2024-05-24 14:32:18 +01:00
};
2024-05-29 20:14:20 +01:00
2024-05-16 20:19:01 +01:00
}