nixos/hosts/citadel/default.nix

61 lines
1.6 KiB
Nix
Raw Normal View History

2024-07-20 12:38:57 +01:00
{ inputs, lib, pkgs, ... }:
let
# Disko setup
fsType = "btrfs"; # one of ext4 or btrfs. Use btrfs if using impermanence
dev = "/dev/nvme0n1"; # depends on target hardware
encrypted = true; # currrently only applies to btrfs
btrfsMountDevice = if encrypted then "/dev/mapper/crypted" else "/dev/root_vg/root";
user = "sam";
impermanence = true;
in
{
imports =
[
# Create users for this host
../common/users/${user}
# Disk configuration
inputs.disko.nixosModules.disko
(import ../common/disks { device = dev; impermanence = impermanence; fsType = fsType; encrypted = encrypted; })
# Impermanence
(import ../common/disks/btrfs/impermanence.nix { btrfsMountDevice = btrfsMountDevice; lib = lib; })
# Import core options
./hardware-configuration.nix
../common/core
# Import optional options
../common/optional/persistence.nix
../common/optional/pipewire.nix
../common/optional/openssh.nix
../common/optional/dwm.nix
../common/optional/nfs-mounts/music.nix
../common/optional/printing.nix
];
boot = {
blacklistedKernelModules = [ "snd_hda_intel" "snd_soc_skl" ];
kernelPackages = pkgs.linuxPackagesFor pkgs.linux_latest;
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
timeout = 3;
};
};
hardware.firmware = [
pkgs.sof-firmware
];
networking = {
hostName = "citadel";
networkmanager.enable = true;
enableIPv6 = false;
nameservers = [ "10.0.10.60" "8.8.8.8" ];
};
services.libinput.enable = true;
}