This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

superconfig / machines / hilum / physical.nix
1.6 kB 54 lines
1{ self, modulesPath, config, lib, pkgs, ... }: 2 3{ 4 imports = [ 5 ./config.nix 6 (modulesPath + "/installer/scan/not-detected.nix") 7 self.inputs.disko.nixosModules.disko 8 { 9 # nice hack to carry around state passed impurely at the beginning 10 options.mainDisk = let 11 tryFile = path: default: 12 if lib.elem (builtins.baseNameOf path) (lib.attrNames (builtins.readDir (builtins.dirOf path))) then 13 builtins.readFile path 14 else 15 default 16 ; 17 in lib.mkOption { 18 type = lib.types.str; 19 default = tryFile "/etc/hilum-disk" (tryFile "/tmp/hilum-disk" "/dev/sdz"); 20 }; 21 config.environment.etc.hilum-disk.text = config.mainDisk; 22 } 23 { 24 options.luksPassFile = lib.mkOption { 25 type = lib.types.nullOr lib.types.str; 26 default = null; 27 }; 28 } 29 ]; 30 31 disko.devices = import ./disk.nix { 32 inherit lib; 33 disk = config.mainDisk; 34 keyFile = config.luksPassFile; 35 }; 36 37 boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "xhci_pci" "usb_storage" "sd_mod" "sdhci_pci" ]; 38 boot.initrd.kernelModules = [ "dm-snapshot" ]; 39 boot.kernelModules = [ "kvm-intel" ]; 40 boot.extraModulePackages = [ ]; 41 42 boot.loader.grub.enable = true; 43 boot.loader.grub.efiSupport = true; 44 boot.loader.grub.device = config.mainDisk; 45 boot.loader.grub.efiInstallAsRemovable = true; 46 47 swapDevices = [ ]; 48 49 nix.maxJobs = lib.mkDefault 4; 50 powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; 51 52 #weird bug with nixos-enter 53 services.logrotate.enable = false; 54}