Start porting nixy config, move some bootloader stuff into the common bootloader.nix.
This commit is contained in:
@@ -27,6 +27,7 @@
|
|||||||
./services/nix-flatpak.nix
|
./services/nix-flatpak.nix
|
||||||
./services/sound.nix
|
./services/sound.nix
|
||||||
./system/bluetooth.nix
|
./system/bluetooth.nix
|
||||||
|
./system/bootloader.nix
|
||||||
./system/environment.nix
|
./system/environment.nix
|
||||||
./system/locale.nix
|
./system/locale.nix
|
||||||
./system/networking.nix
|
./system/networking.nix
|
||||||
|
|||||||
10
nodes/hosts/common/system/bootloader.nix
Normal file
10
nodes/hosts/common/system/bootloader.nix
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{ pkgs, config, ... }: {
|
||||||
|
boot = {
|
||||||
|
loader = {
|
||||||
|
systemd-boot.enable = true;
|
||||||
|
efi.canTouchEfiVariables = true;
|
||||||
|
};
|
||||||
|
kernelPackages = pkgs.linuxPackages_xanmod_stable;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
@@ -4,11 +4,6 @@
|
|||||||
useTmpfs = true;
|
useTmpfs = true;
|
||||||
tmpfsSize = "50%";
|
tmpfsSize = "50%";
|
||||||
};
|
};
|
||||||
loader = {
|
|
||||||
systemd-boot.enable = true;
|
|
||||||
efi.canTouchEfiVariables = true;
|
|
||||||
};
|
|
||||||
kernelPackages = pkgs.linuxPackages_xanmod_stable;
|
|
||||||
kernelModules = [ "kvm-intel" ];
|
kernelModules = [ "kvm-intel" ];
|
||||||
extraModulePackages = with config.boot.kernelPackages; [ xpadneo ];
|
extraModulePackages = with config.boot.kernelPackages; [ xpadneo ];
|
||||||
extraModprobeConfig = '' options bluetooth disable_ertm=1 '';
|
extraModprobeConfig = '' options bluetooth disable_ertm=1 '';
|
||||||
|
|||||||
52
nodes/hosts/nixy/system/bootloader.nix
Normal file
52
nodes/hosts/nixy/system/bootloader.nix
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
{ pkgs, config, ... }: {
|
||||||
|
boot = {
|
||||||
|
kernelModules = [ "kvm-amd" ];
|
||||||
|
extraModulePackages = with config.boot.kernelPackages; [ xpadneo ];
|
||||||
|
|
||||||
|
initrd = {
|
||||||
|
|
||||||
|
# OLD CONFIG
|
||||||
|
# NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
|
||||||
|
# nvme0n1
|
||||||
|
# └─nvme0n1p1 crypto_LUKS 2 e174181f-828c-44fd-97c1-0e2fdc2322e5
|
||||||
|
# └─luks-e174181f-828c-44fd-97c1-0e2fdc2322e5 btrfs home f8ed950a-5cc9-4b87-901c-4cfece6daf6c 3.3T 9% /home
|
||||||
|
# luks.devices."luks-e174181f-828c-44fd-97c1-0e2fdc2322e5".device = "/dev/disk/by-uuid/e174181f-828c-44fd-97c1-0e2fdc2322e5";
|
||||||
|
# nvme1n1
|
||||||
|
# ├─nvme1n1p1 vfat FAT32 D19B-1967 4.3G 3% /boot
|
||||||
|
# ├─nvme1n1p2 crypto_LUKS 2 300fdb2a-d887-4e53-bc97-9fdc123856ce
|
||||||
|
# │ └─luks-300fdb2a-d887-4e53-bc97-9fdc123856ce swap 1 swap 66b9e1f6-1fc5-4c32-afc7-724880504495 [SWAP]
|
||||||
|
# luks.devices."luks-300fdb2a-d887-4e53-bc97-9fdc123856ce".device = "/dev/disk/by-uuid/300fdb2a-d887-4e53-bc97-9fdc123856ce";
|
||||||
|
# └─nvme1n1p3 crypto_LUKS 2 e69c5d63-f5a7-4cb1-a858-4e6396d8def7
|
||||||
|
# └─luks-e69c5d63-f5a7-4cb1-a858-4e6396d8def7 btrfs root f53b22d4-df74-4ee0-9f85-3fb0eb087150 /nix/store
|
||||||
|
# luks.devices."luks-e69c5d63-f5a7-4cb1-a858-4e6396d8def7".device = "/dev/disk/by-uuid/e69c5d63-f5a7-4cb1-a858-4e6396d8def7";
|
||||||
|
|
||||||
|
# NEW CONFIG
|
||||||
|
# nvme0n1
|
||||||
|
# └─nvme0n1p1 crypto_LUKS 2 1976c849-c317-46c0-af98-d2dfc455c489
|
||||||
|
# └─crypthome btrfs home c63ca365-e963-4ea4-bb71-ed1c7e1b6bc8 /mnt/home
|
||||||
|
# luks.devices."crypthome".device = "/dev/disk/by-uuid/1976c849-c317-46c0-af98-d2dfc455c489";
|
||||||
|
# nvme1n1
|
||||||
|
# ├─nvme1n1p1 vfat FAT32 CDA0-8838 4.4G 0% /mnt/boot
|
||||||
|
# └─nvme1n1p2 crypto_LUKS 2 e948662c-ae57-46aa-b7bf-cc09dbaa8cdb
|
||||||
|
# └─cryptroot btrfs nixos 77021dd1-9fa5-4e9f-9be2-ba943e6de77c 925.1G 0% /mnt/var/log
|
||||||
|
# /mnt/persist
|
||||||
|
# /mnt/nix
|
||||||
|
# /mnt
|
||||||
|
luks.devices."cryptroot" = {
|
||||||
|
device = "/dev/disk/by-partlabel/luks";
|
||||||
|
allowDiscards = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
luks.devices."crypthome" = {
|
||||||
|
device = "/dev/disk/by-partlabel/lukshome";
|
||||||
|
allowDiscards = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
kernelModules = [ "nvidia" "nvidia_modeset" "nvidia_drm" "nvidia_uvm" ];
|
||||||
|
|
||||||
|
availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "sd_mod" ];
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
48
nodes/hosts/nixy/system/filesystems.nix
Normal file
48
nodes/hosts/nixy/system/filesystems.nix
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
{ ... }: {
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/mapper/cryptroot";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=root" "compress=zstd" "noatime" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/nix" =
|
||||||
|
{ device = "/dev/mapper/cryptroot";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=nix" "compress=zstd" "noatime" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/var/log" =
|
||||||
|
{ device = "/dev/mapper/cryptroot";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=log" "compress=zstd" "noatime" ];
|
||||||
|
neededForBoot = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/nix/persist" =
|
||||||
|
{ device = "/dev/mapper/cryptroot";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=persist" "compress=zstd" "noatime" ];
|
||||||
|
neededForBoot = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-partlabel/boot";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = [ "fmask=0077" "dmask=0077" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/home" =
|
||||||
|
{ device = "/dev/mapper/cryptroot";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=home" "compress=zstd" "noatime" ];
|
||||||
|
neededForBoot = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [{
|
||||||
|
device = "/swapfile";
|
||||||
|
size = 16 * 1024;
|
||||||
|
}];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
4
nodes/hosts/nixy/system/networking.nix
Normal file
4
nodes/hosts/nixy/system/networking.nix
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{ config, ...}: {
|
||||||
|
networking.hostName = "nixy"; # Define your hostname.
|
||||||
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user