From 4a53612a74e56a4372b8a03bed21938cfab2d10b Mon Sep 17 00:00:00 2001 From: Felix Albrigtsen Date: Sat, 18 Apr 2026 22:51:57 +0200 Subject: [PATCH] bicep: start revival --- hosts/bicep/configuration.nix | 52 +++++++++++++++++++------- hosts/bicep/hardware-configuration.nix | 37 ++++++------------ 2 files changed, 50 insertions(+), 39 deletions(-) diff --git a/hosts/bicep/configuration.nix b/hosts/bicep/configuration.nix index ecca68e..1bc0742 100644 --- a/hosts/bicep/configuration.nix +++ b/hosts/bicep/configuration.nix @@ -1,32 +1,56 @@ -{ fp, pkgs, values, ... }: +{ fp, pkgs, values, lib, ... }: { imports = [ ./hardware-configuration.nix (fp /base) - ./services/nginx + #./services/nginx - ./services/calendar-bot.nix + #./services/calendar-bot.nix #./services/git-mirrors - ./services/minecraft-heatmap.nix - ./services/mysql - ./services/postgresql + #./services/minecraft-heatmap.nix + #./services/mysql + #./services/postgresql - ./services/matrix + #./services/matrix ]; - #systemd.network.networks."30-enp6s0f0" = values.defaultNetworkConfig // { - systemd.network.networks."30-ens18" = values.defaultNetworkConfig // { - #matchConfig.Name = "enp6s0f0"; - matchConfig.Name = "ens18"; - address = with values.hosts.bicep; [ (ipv4 + "/25") (ipv6 + "/64") ] - ++ (with values.services.turn; [ (ipv4 + "/25") (ipv6 + "/64") ]); + boot.loader = { + systemd-boot.enable = false; # no uefi support on this device + grub.device = "/dev/disk/by-id/scsi-3600508b1001ca9cf1c96afea40d5451d"; + grub.enable = true; + }; + + boot = { + zfs = { + extraPools = [ "bicepdata" ]; + requestEncryptionCredentials = false; + }; + supportedFilesystems.zfs = true; + + kernelPackages = pkgs.linuxPackages; + }; + + services.zfs.autoScrub = { + enable = true; + interval = "Wed *-*-8..14 00:00:00"; + }; + + networking.hostId = "3b4bf6a5"; + systemd.network.networks."30-ens10f3" = values.defaultNetworkConfig // { + matchConfig.Name = "ens10f3"; + # IPs belong to guest1.pvv.ntnu.no + address = [ "129.241.210.248/25" "2001:700:300:1900::248/63" ]; }; systemd.network.wait-online = { anyInterface = true; }; - services.qemuGuest.enable = true; + # local overrides + services.smartd.enable = lib.mkForce false; + system.autoUpgrade.enable = lib.mkForce false; + #services.userborn.enable = lib.mkForce false; + #services.userdbd.enable = lib.mkForce false; # Don't change (even during upgrades) unless you know what you are doing. # See https://search.nixos.org/options?show=system.stateVersion diff --git a/hosts/bicep/hardware-configuration.nix b/hosts/bicep/hardware-configuration.nix index a5fa9e9..45e1764 100644 --- a/hosts/bicep/hardware-configuration.nix +++ b/hosts/bicep/hardware-configuration.nix @@ -5,39 +5,26 @@ { imports = - [ (modulesPath + "/profiles/qemu-guest.nix") + [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "ahci" "sd_mod" "sr_mod" ]; + boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "hpsa" "ohci_pci" "usbhid" "sd_mod" ]; boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/20e06202-7a09-47cc-8ef6-5e7afe19453a"; - fsType = "ext4"; + { device = "/dev/disk/by-uuid/ec4ab82a-f31e-4f02-a988-99c18160d04a"; + fsType = "btrfs"; }; - # temp data disk, only 128gb not enough until we can add another disk to the system. - fileSystems."/data" = - { device = "/dev/disk/by-uuid/c81af266-0781-4084-b8eb-c2587cbcf1ba"; - fsType = "ext4"; - }; - - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/198B-E363"; - fsType = "vfat"; - options = [ "fmask=0022" "dmask=0022" ]; - }; - - swapDevices = [ ]; - - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking - # (the default) this is the recommended approach. When using systemd-networkd it's - # still possible to use this option, but it's recommended to use it in conjunction - # with explicit per-interface declarations with `networking.interfaces..useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.ens18.useDHCP = lib.mkDefault true; + swapDevices = [ + { + device = "/var/lib/swapfile"; + size = 8 * 1024; + } + ]; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; }