2024-05-16 11:55:24 +01:00
|
|
|
{ inputs, config, lib, pkgs, outputs,... }:
|
2024-05-27 16:19:00 +01:00
|
|
|
let
|
|
|
|
# Disko setup
|
|
|
|
fsType = "btrfs"; # one of ext4 or btrfs. Use btrfs if using impermanence
|
2024-05-28 20:19:30 +01:00
|
|
|
dev = "/dev/sda"; # depends on target hardware
|
2024-05-27 16:19:00 +01:00
|
|
|
encrypted = false; # currrently only applies to btrfs
|
|
|
|
btrfsMountDevice = if encrypted then "/dev/mapper/crypted" else "/dev/root_vg/root";
|
|
|
|
in
|
2024-05-16 11:55:24 +01:00
|
|
|
{
|
|
|
|
imports =
|
2024-05-26 13:23:35 +01:00
|
|
|
[
|
2024-05-23 00:10:58 +01:00
|
|
|
# Create users for this host
|
|
|
|
../common/users/media
|
|
|
|
|
2024-05-27 16:19:00 +01:00
|
|
|
# Disk configuration
|
|
|
|
inputs.disko.nixosModules.disko
|
|
|
|
(import ../common/disks { device = dev; fsType = fsType; encrypted = encrypted; })
|
|
|
|
|
|
|
|
# Impermanence
|
|
|
|
inputs.impermanence.nixosModules.impermanence
|
|
|
|
(import ../common/disks/btrfs-impermanence.nix { btrfsMountDevice = btrfsMountDevice; lib = lib; })
|
|
|
|
|
2024-05-16 11:55:24 +01:00
|
|
|
# Import core options
|
|
|
|
./hardware-configuration.nix
|
|
|
|
../common/core
|
|
|
|
|
2024-05-21 19:11:23 +01:00
|
|
|
# Import optional options
|
|
|
|
../common/optional/openssh.nix
|
2024-05-25 20:48:50 +01:00
|
|
|
../common/optional/persistence.nix
|
2024-05-21 19:11:23 +01:00
|
|
|
|
2024-05-16 11:55:24 +01:00
|
|
|
];
|
|
|
|
|
2024-05-16 20:19:01 +01:00
|
|
|
boot = {
|
|
|
|
loader = {
|
|
|
|
systemd-boot.enable = true;
|
|
|
|
efi.canTouchEfiVariables = true;
|
|
|
|
timeout = 3;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
networking = {
|
2024-05-17 20:17:53 +01:00
|
|
|
hostName = "sparky";
|
2024-05-16 20:19:01 +01:00
|
|
|
networkmanager.enable = true;
|
|
|
|
enableIPv6 = false;
|
|
|
|
};
|
|
|
|
|
2024-05-23 19:41:54 +01:00
|
|
|
services.libinput.enable = true;
|
|
|
|
services.displayManager.defaultSession = "cinnamon";
|
|
|
|
|
2024-05-24 14:32:18 +01:00
|
|
|
services.xserver = {
|
|
|
|
enable = true;
|
|
|
|
displayManager.lightdm.enable = true;
|
|
|
|
desktopManager = {
|
|
|
|
cinnamon.enable = true;
|
|
|
|
};
|
|
|
|
};
|
2024-05-16 20:19:01 +01:00
|
|
|
}
|