Nix configurations for my personal machines (Linux & macOS)
1{
2 delib,
3 lib,
4 pkgs,
5 ...
6}: let
7 platform = "x86_64-linux";
8 stateVersion = "24.05";
9in
10 delib.host {
11 name = "wallsocket";
12
13 homeManagerSystem = platform;
14 home.home.stateVersion = stateVersion;
15
16 nixos = {
17 nixpkgs.hostPlatform = platform;
18 system.stateVersion = stateVersion;
19
20 hardware.enableAllFirmware = true;
21 hardware.cpu.amd.updateMicrocode = true;
22
23 # Kernel
24 boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod"];
25 boot.initrd.kernelModules = [];
26 boot.kernelModules = ["kvm-amd"];
27 boot.extraModulePackages = [];
28 boot.kernelPackages = pkgs.linuxPackages_latest;
29
30 # Bootloader
31 boot.loader.systemd-boot.enable = true;
32 boot.loader.systemd-boot.configurationLimit = 10;
33 boot.loader.systemd-boot.consoleMode = "max";
34 boot.loader.efi.canTouchEfiVariables = true;
35
36 # Disks
37 fileSystems."/" = {
38 device = "/dev/disk/by-uuid/1b08f109-17e9-40f4-a7fd-6e5943ce7d5e";
39 fsType = "ext4";
40 };
41
42 fileSystems."/boot" = {
43 device = "/dev/disk/by-uuid/CF5D-B9DB";
44 fsType = "vfat";
45 options = ["fmask=0022" "dmask=0022"];
46 };
47
48 fileSystems."/home" = {
49 device = "/dev/disk/by-uuid/31974b72-eca5-4758-bd66-63ae57c1b4b0";
50 fsType = "ext4";
51 };
52
53 fileSystems."/mnt/misc" = {
54 device = "/dev/disk/by-uuid/bbc7adf8-475a-4bec-843f-77d4b904c42e";
55 fsType = "ext4";
56 };
57
58 fileSystems."/mnt/games" = {
59 device = "/dev/disk/by-uuid/e61763de-753c-42f0-ba9b-5ac6b6ffdf08";
60 fsType = "ext4";
61 };
62
63 swapDevices = [];
64
65 # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
66 # (the default) this is the recommended approach. When using systemd-networkd it's
67 # still possible to use this option, but it's recommended to use it in conjunction
68 # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
69 networking.useDHCP = lib.mkDefault true;
70 };
71 }