mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 00:43:56 -05:00
switched to zfs on gerg-desktop
This commit is contained in:
parent
4d860b5d7a
commit
c9a3886cd5
4 changed files with 242 additions and 25 deletions
|
|
@ -1,10 +1,11 @@
|
|||
inputs: {
|
||||
pkgs,
|
||||
settings,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(import ../imports/boot.nix inputs)
|
||||
# (import ../imports/boot.nix inputs)
|
||||
(import ../imports/dwm.nix inputs)
|
||||
(import ../imports/fonts.nix inputs)
|
||||
(import ../imports/git.nix inputs)
|
||||
|
|
@ -27,8 +28,10 @@ inputs: {
|
|||
networkmanagerapplet #gui connection control
|
||||
vlc #play stuff
|
||||
];
|
||||
networking.hostName = settings.hostname;
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
networking = {
|
||||
hostName = settings.hostname;
|
||||
hostId = "288b56db";
|
||||
};
|
||||
hardware.cpu.amd.updateMicrocode = true;
|
||||
#user managment
|
||||
users = {
|
||||
|
|
@ -39,30 +42,120 @@ inputs: {
|
|||
};
|
||||
};
|
||||
boot = {
|
||||
zfs.devNodes = "/dev/disk/by-id/";
|
||||
kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
|
||||
kernelParams = ["nohibernate" "zfs.zfs_arc_max=17179869184"];
|
||||
supportedFilesystems = ["zfs" "vfat"];
|
||||
initrd = {
|
||||
kernelModules = ["amdgpu"];
|
||||
availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "sd_mod"];
|
||||
supportedFilesystems = ["ext4" "vfat"];
|
||||
availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "sd_mod" "hid_generic"];
|
||||
includeDefaultModules = false;
|
||||
};
|
||||
loader = {
|
||||
efi = {
|
||||
canTouchEfiVariables = false;
|
||||
};
|
||||
generationsDir.copyKernels = true;
|
||||
systemd-boot.enable = false;
|
||||
grub = {
|
||||
enable = true;
|
||||
efiInstallAsRemovable = true;
|
||||
version = 2;
|
||||
copyKernels = true;
|
||||
efiSupport = true;
|
||||
zfsSupport = true;
|
||||
mirroredBoots = [
|
||||
{
|
||||
path = "/boot/efis/nvme-SHPP41-500GM_SSB4N6719101A4N0E";
|
||||
devices = ["/dev/disk/by-id/nvme-SHPP41-500GM_SSB4N6719101A4N0E"];
|
||||
}
|
||||
{
|
||||
path = "/boot/efis/nvme-SHPP41-500GM_SSB4N6719101A4N22";
|
||||
devices = ["/dev/disk/by-id/nvme-SHPP41-500GM_SSB4N6719101A4N22"];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
systemd.services.zfs-mount.enable = false;
|
||||
services.zfs = {
|
||||
autoScrub.enable = true;
|
||||
trim.enable = true;
|
||||
};
|
||||
fileSystems."/" = {
|
||||
device = "rpool/nixos/root";
|
||||
fsType = "zfs";
|
||||
options = ["X-mount.mkdir"];
|
||||
};
|
||||
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "/dev/disk/by-uuid/9e5c0a74-753a-4ebe-b8f1-5c7bdde21deb";
|
||||
fsType = "ext4";
|
||||
label = "nixos";
|
||||
noCheck = false;
|
||||
mountPoint = "/";
|
||||
neededForBoot = true;
|
||||
};
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-uuid/79C3-9AB6";
|
||||
fsType = "vfat";
|
||||
label = "BOOT";
|
||||
noCheck = false;
|
||||
mountPoint = "/boot";
|
||||
neededForBoot = true;
|
||||
};
|
||||
fileSystems."/home" = {
|
||||
device = "rpool/nixos/home";
|
||||
fsType = "zfs";
|
||||
options = ["X-mount.mkdir"];
|
||||
};
|
||||
|
||||
fileSystems."/var" = {
|
||||
device = "rpool/nixos/var";
|
||||
fsType = "zfs";
|
||||
options = ["X-mount.mkdir"];
|
||||
};
|
||||
|
||||
fileSystems."/var/lib" = {
|
||||
device = "rpool/nixos/var/lib";
|
||||
fsType = "zfs";
|
||||
options = ["X-mount.mkdir"];
|
||||
};
|
||||
|
||||
fileSystems."/var/log" = {
|
||||
device = "rpool/nixos/var/log";
|
||||
fsType = "zfs";
|
||||
options = ["X-mount.mkdir"];
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "bpool/nixos/root";
|
||||
fsType = "zfs";
|
||||
options = ["X-mount.mkdir"];
|
||||
};
|
||||
|
||||
fileSystems."/boot/efis/nvme-SHPP41-500GM_SSSB4N6719101A4N0E" = {
|
||||
device = "/dev/disk/by-id/nvme-SHPP41-500GM_SSB4N6719101A4N0E-part2";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"X-mount.mkdir"
|
||||
"x-systemd.idle-timout=1min"
|
||||
"x-systemd.automount"
|
||||
"noauto"
|
||||
"nofail"
|
||||
];
|
||||
};
|
||||
fileSystems."/boot/efis/nvme-SHPP41-500GM_SSB4N6719101A4N22" = {
|
||||
device = "/dev/disk/by-id/nvme-SHPP41-500GM_SSB4N6719101A4N22-part2";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"X-mount.mkdir"
|
||||
"x-systemd.idle-timout=1min"
|
||||
"x-systemd.automount"
|
||||
"noauto"
|
||||
"nofail"
|
||||
];
|
||||
};
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/dev/disk/by-id/nvme-SHPP41-500GM_SSB4N6719101A4N0E-part4";
|
||||
discardPolicy = "both";
|
||||
randomEncryption = {
|
||||
enable = true;
|
||||
allowDiscards = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
device = "/dev/disk/by-id/nvme-SHPP41-500GM_SSB4N6719101A4N22-part4";
|
||||
discardPolicy = "both";
|
||||
randomEncryption = {
|
||||
enable = true;
|
||||
allowDiscards = true;
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue