From 2e5167de1560ad0d7b8e294c72e1913f694160c2 Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 7 Sep 2023 12:26:31 +0200 Subject: lass: migrate away --- lass/1systems/hilum/physical.nix | 53 ---------------------------------------- 1 file changed, 53 deletions(-) delete mode 100644 lass/1systems/hilum/physical.nix (limited to 'lass/1systems/hilum/physical.nix') diff --git a/lass/1systems/hilum/physical.nix b/lass/1systems/hilum/physical.nix deleted file mode 100644 index 9caf8e53..00000000 --- a/lass/1systems/hilum/physical.nix +++ /dev/null @@ -1,53 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - imports = [ - ./config.nix - - { - # nice hack to carry around state passed impurely at the beginning - options.mainDisk = let - tryFile = path: default: - if lib.elem (builtins.baseNameOf path) (lib.attrNames (builtins.readDir (builtins.dirOf path))) then - builtins.readFile path - else - default - ; - in lib.mkOption { - type = lib.types.str; - default = tryFile "/etc/hilum-disk" (tryFile "/tmp/hilum-disk" "/dev/sdz"); - }; - config.environment.etc.hilum-disk.text = config.mainDisk; - } - { - options.luksPassFile = lib.mkOption { - type = lib.types.nullOr lib.types.str; - default = null; - }; - } - ]; - - disko.devices = import ./disk.nix { - inherit lib; - disk = config.mainDisk; - keyFile = config.luksPassFile; - }; - - boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "xhci_pci" "usb_storage" "sd_mod" "sdhci_pci" ]; - boot.initrd.kernelModules = [ "dm-snapshot" ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; - - boot.loader.grub.enable = true; - boot.loader.grub.efiSupport = true; - boot.loader.grub.device = config.mainDisk; - boot.loader.grub.efiInstallAsRemovable = true; - - swapDevices = [ ]; - - nix.maxJobs = lib.mkDefault 4; - powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; - - #weird bug with nixos-enter - services.logrotate.enable = false; -} -- cgit v1.2.3