Fix persist

This commit is contained in:
muon 2025-07-31 20:20:55 +00:00
parent aba1da6c1f
commit 41ae205f6a
5 changed files with 72 additions and 53 deletions

View file

@ -6,6 +6,11 @@ in {
imports = [
./hardware-configuration.nix
inputs.impermanence.nixosModules.impermanence
"${
builtins.fetchTarball
"https://github.com/nix-community/disko/archive/master.tar.gz"
}/module.nix"
./disk-config.nix
# (inputs.nixpkgs
# + "/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix")
];
@ -19,9 +24,12 @@ in {
networking.hostId = "a2309090";
mods.home.file = ./home.nix;
boot.loader.grub.enable = true;
boot.loader.grub.efiSupport = true;
boot.loader.grub.efiInstallAsRemovable = true;
# Modules
mods.desktop.enable = true;
mods.boot.enable = true;
mods.theme.enable = true;
mods.theme.scheme = "woodland";

View file

@ -4,61 +4,64 @@
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
boot.initrd.availableKernelModules =
[ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/mapper/crypted";
fsType = "btrfs";
options = [ "subvol=root" ];
};
fileSystems."/" = {
device = "/dev/mapper/crypted";
fsType = "btrfs";
options = [ "subvol=root" ];
};
boot.initrd.luks.devices."crypted".device = "/dev/disk/by-uuid/1ca0c5f6-3cb3-4f86-94a5-4376461da227";
boot.initrd.luks.devices."crypted".device =
"/dev/disk/by-uuid/1ca0c5f6-3cb3-4f86-94a5-4376461da227";
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/4BD8-A887";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/4BD8-A887";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
fileSystems."/home" =
{ device = "/dev/mapper/crypted";
fsType = "btrfs";
options = [ "subvol=home" ];
};
fileSystems."/home" = {
device = "/dev/mapper/crypted";
fsType = "btrfs";
options = [ "subvol=home" "compress=zstd" "noatime" ];
};
fileSystems."/nix" =
{ device = "/dev/mapper/crypted";
fsType = "btrfs";
options = [ "subvol=nix" ];
};
fileSystems."/nix" = {
device = "/dev/mapper/crypted";
fsType = "btrfs";
options = [ "subvol=nix" "compress=zstd" "noatime" ];
};
fileSystems."/persist" =
{ device = "/dev/mapper/crypted";
fsType = "btrfs";
options = [ "subvol=persist" ];
};
fileSystems."/persist" = {
device = "/dev/mapper/crypted";
fsType = "btrfs";
options = [ "subvol=persist" "compress=zstd" "noatime" ];
neededForBoot = true;
};
fileSystems."/swap" =
{ device = "/dev/mapper/crypted";
fsType = "btrfs";
options = [ "subvol=swap" ];
};
fileSystems."/swap" = {
device = "/dev/mapper/crypted";
fsType = "btrfs";
options = [ "subvol=swap" ];
};
fileSystems."/var/log" =
{ device = "/dev/mapper/crypted";
fsType = "btrfs";
options = [ "subvol=log" ];
};
fileSystems."/var/log" = {
device = "/dev/mapper/crypted";
fsType = "btrfs";
options = [ "subvol=log" "compress=zstd" "noatime" ];
neededForBoot = true;
};
swapDevices = [ ];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.cpu.intel.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
}