diff --git a/hardware/disko.nix b/hardware/disko.nix index 127dedb..e5de915 100644 --- a/hardware/disko.nix +++ b/hardware/disko.nix @@ -1,4 +1,4 @@ -{ disko, ... }: +{ disko, hostname, ... }: let mkDisk = { hostname, drive }: { @@ -54,8 +54,10 @@ in imports = [ disko.nixosModules.disko ]; disko.devices = { disk = { - station = mkDisk { hostname = "station"; drive = "/dev/nvme0n1"; }; - stationette= mkDisk { hostname = "stationette"; drive = "/dev/sda"; }; + "${hostname}" = mkDisk { + inherit hostname; + drive = if hostname == "station" then "/dev/nvme0n1" else "/dev/sda"; + }; }; }; } diff --git a/hardware/filesystem.nix b/hardware/filesystem.nix index af08655..1ab6a3a 100644 --- a/hardware/filesystem.nix +++ b/hardware/filesystem.nix @@ -31,33 +31,36 @@ in umount /btrfs_tmp ''; - fileSystems."/" = { - device = rootDisk; - fsType = "btrfs"; - options = [ "subvol=root" ]; - }; + # fileSystems."/" = { + # device = rootDisk; + # fsType = "btrfs"; + # options = [ "subvol=root" ]; + # }; + # + # fileSystems."/persist" = { + # device = rootDisk; + # neededForBoot = true; + # fsType = "btrfs"; + # options = [ "subvol=persist" ]; + # }; + # + # fileSystems."/nix" = { + # device = rootDisk; + # neededForBoot = true; + # fsType = "btrfs"; + # options = [ "subvol=nix" ]; + # }; + # + # fileSystems."/boot" = { + # device = bootDisk; + # fsType = "vfat"; + # options = [ "fmask=0022" "dmask=0022" "umask=0077" ]; + # }; + # + # swapDevices = [ { + # device = "/.swapvol/swapfile"; + # } ]; - fileSystems."/persist" = { - device = rootDisk; - neededForBoot = true; - fsType = "btrfs"; - options = [ "subvol=persist" ]; - }; - - fileSystems."/nix" = { - device = rootDisk; - neededForBoot = true; - fsType = "btrfs"; - options = [ "subvol=nix" ]; - }; - - fileSystems."/boot" = { - device = bootDisk; - fsType = "vfat"; - options = [ "fmask=0022" "dmask=0022" "umask=0077" ]; - }; - - swapDevices = [ { - device = "/.swapvol/swapfile"; - } ]; + fileSystems."/persist".neededForBoot = true; + fileSystems."/nix".neededForBoot = true; } diff --git a/hardware/station-hardware-configuration.nix b/hardware/station-hardware-configuration.nix new file mode 100644 index 0000000..c665a4c --- /dev/null +++ b/hardware/station-hardware-configuration.nix @@ -0,0 +1,8 @@ +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/system/boot.nix b/system/boot.nix index 7abc75d..3cbdfcd 100644 --- a/system/boot.nix +++ b/system/boot.nix @@ -50,7 +50,7 @@ in initrd.verbose = false; kernelParams = [ - "resume_offset=${hibernateBootOffset}" + "resume_offset=${resumeOffset}" "quiet" "udev.log_level=3" "systemd.show_status=auto"