2024-06-13 14:36:34 +01:00
|
|
|
{ inputs, config, lib, pkgs, outputs, ... }:
|
2024-05-30 21:20:39 +01:00
|
|
|
let
|
|
|
|
# Disko setup
|
|
|
|
fsType = "btrfs"; # one of ext4 or btrfs. Use btrfs if using impermanence
|
2024-05-31 22:18:40 +01:00
|
|
|
dev = "/dev/nvme0n1"; # depends on target hardware
|
2024-05-30 21:20:39 +01:00
|
|
|
encrypted = true; # currrently only applies to btrfs
|
|
|
|
btrfsMountDevice = if encrypted then "/dev/mapper/crypted" else "/dev/root_vg/root";
|
2024-05-31 00:17:16 +01:00
|
|
|
user = "sam";
|
2024-06-28 20:21:27 +01:00
|
|
|
impermanence = true;
|
2024-05-30 21:20:39 +01:00
|
|
|
in
|
|
|
|
{
|
|
|
|
imports =
|
|
|
|
[
|
|
|
|
# Create users for this host
|
2024-05-31 00:17:16 +01:00
|
|
|
../common/users/${user}
|
2024-05-30 21:20:39 +01:00
|
|
|
|
|
|
|
# Disk configuration
|
|
|
|
inputs.disko.nixosModules.disko
|
2024-06-28 20:21:27 +01:00
|
|
|
(import ../common/disks { device = dev; impermanence = impermanence; fsType = fsType; encrypted = encrypted; })
|
2024-05-30 21:20:39 +01:00
|
|
|
|
|
|
|
# Impermanence
|
2024-06-28 20:21:27 +01:00
|
|
|
(import ../common/disks/btrfs/impermanence.nix { btrfsMountDevice = btrfsMountDevice; lib = lib; })
|
2024-05-30 21:20:39 +01:00
|
|
|
|
|
|
|
# Import core options
|
|
|
|
./hardware-configuration.nix
|
|
|
|
../common/core
|
|
|
|
|
|
|
|
# Import optional options
|
2024-06-28 18:16:15 +01:00
|
|
|
../common/optional/persistence.nix
|
2024-05-30 21:20:39 +01:00
|
|
|
../common/optional/pipewire.nix
|
|
|
|
../common/optional/openssh.nix
|
2024-06-13 14:36:34 +01:00
|
|
|
../common/optional/dwm.nix
|
2024-07-04 17:18:55 +01:00
|
|
|
../common/optional/nfs-mounts/music.nix
|
2024-07-19 13:09:20 +01:00
|
|
|
../common/optional/printing.nix
|
2024-05-30 21:20:39 +01:00
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
boot = {
|
2024-06-01 16:39:14 +01:00
|
|
|
blacklistedKernelModules = [ "snd_hda_intel" "snd_soc_skl" ];
|
|
|
|
kernelPackages = pkgs.linuxPackagesFor pkgs.linux_latest;
|
2024-05-30 21:20:39 +01:00
|
|
|
loader = {
|
|
|
|
systemd-boot.enable = true;
|
|
|
|
efi.canTouchEfiVariables = true;
|
|
|
|
timeout = 3;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-06-01 16:39:14 +01:00
|
|
|
hardware.firmware = [
|
|
|
|
pkgs.sof-firmware
|
|
|
|
];
|
|
|
|
|
2024-05-30 21:20:39 +01:00
|
|
|
networking = {
|
|
|
|
hostName = "semita";
|
|
|
|
networkmanager.enable = true;
|
|
|
|
enableIPv6 = false;
|
2024-07-14 19:51:09 +01:00
|
|
|
nameservers = [ "10.0.10.60" "8.8.8.8" ];
|
2024-05-30 21:20:39 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
services.libinput.enable = true;
|
|
|
|
}
|