diff --git a/hosts/i15/default.nix b/hosts/i15/default.nix index 6518e66..ca7c217 100644 --- a/hosts/i15/default.nix +++ b/hosts/i15/default.nix @@ -1,10 +1,22 @@ -{ config, lib, pkgs, modulesPath, ... }: { +{ + config, + lib, + pkgs, + modulesPath, + ... +}: +{ networking.hostName = "i15"; # Define your hostname. imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = - [ "xhci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_usb_sdmmc" ]; + boot.initrd.availableKernelModules = [ + "xhci_pci" + "ahci" + "usb_storage" + "sd_mod" + "rtsx_usb_sdmmc" + ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; @@ -12,14 +24,15 @@ disko.devices = (import ./partitions.nix { disks = [ "/dev/sda" ]; }); boot.loader.efi.efiSysMountPoint = "/boot/efi"; - swapDevices = [{ - device = "/swap/swapfile"; - size = (1024 * 8) + (1024 * 2); # RAM size + 2 GB - }]; + swapDevices = [ + { + device = "/swap/swapfile"; + size = (1024 * 8) + (1024 * 2); # RAM size + 2 GB + } + ]; networking.useDHCP = lib.mkDefault true; powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand"; - hardware.cpu.intel.updateMicrocode = - lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/hosts/i15/partitions-test.nix b/hosts/i15/partitions-test.nix index 89f06b7..bb2c273 100644 --- a/hosts/i15/partitions-test.nix +++ b/hosts/i15/partitions-test.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: pkgs.makeDiskoTest { name = "test-disko-i15"; disko-config = ./partitions.nix; diff --git a/hosts/i15/partitions.nix b/hosts/i15/partitions.nix index ed7ff7e..7b69e0f 100644 --- a/hosts/i15/partitions.nix +++ b/hosts/i15/partitions.nix @@ -1,6 +1,12 @@ -{ disks ? [ "/dev/sda" ], ... }: +{ + disks ? [ "/dev/sda" ], + ... +}: let - btrfs_options = [ "compress=zstd:3" "noatime" ]; + btrfs_options = [ + "compress=zstd:3" + "noatime" + ]; in { disk.sda = { @@ -18,7 +24,10 @@ in bootable = true; content = { type = "filesystem"; - extraArgs = [ "-n" "BOOT_I15" ]; + extraArgs = [ + "-n" + "BOOT_I15" + ]; format = "vfat"; mountpoint = "/boot"; # options = [ "defaults" ]; @@ -35,15 +44,26 @@ in keyFile = "/tmp/secret.key"; content = { type = "btrfs"; - extraArgs = [ "--label" "ROOT_I15" ]; - subvolumes = let mountOptions = btrfs_options; in { - "/home" = { inherit mountOptions; }; - "/nixos" = { - inherit mountOptions; - mountpoint = "/"; + extraArgs = [ + "--label" + "ROOT_I15" + ]; + subvolumes = + let + mountOptions = btrfs_options; + in + { + "/home" = { + inherit mountOptions; + }; + "/nixos" = { + inherit mountOptions; + mountpoint = "/"; + }; + "/swap" = { + inherit mountOptions; + }; }; - "/swap" = { inherit mountOptions; }; - }; }; }; }