From 1024b428ac6b3fa358b19fe1007debf57b55b2ea Mon Sep 17 00:00:00 2001 From: Adrian G L Date: Tue, 19 May 2026 12:16:39 +0200 Subject: [PATCH] feat: ildkule disco config --- flake.nix | 6 ++++- hosts/ildkule/configuration.nix | 2 +- hosts/ildkule/disks.nix | 27 +++++++++++++++++++ hosts/ildkule/hardware-configuration.nix | 34 +++++++++++++++--------- 4 files changed, 54 insertions(+), 15 deletions(-) create mode 100644 hosts/ildkule/disks.nix diff --git a/flake.nix b/flake.nix index 9fcdf9d..2013a5f 100644 --- a/flake.nix +++ b/flake.nix @@ -181,7 +181,11 @@ inputs.qotd.nixosModules.default ]; }; - ildkule = stableNixosConfig "ildkule" { }; + ildkule = stableNixosConfig "ildkule" { + modules = [ + inputs.disko.nixosModules.disko + ]; + }; #ildkule-unstable = unstableNixosConfig "ildkule" { }; skrot = stableNixosConfig "skrot" { modules = [ diff --git a/hosts/ildkule/configuration.nix b/hosts/ildkule/configuration.nix index 210c797..ada47bf 100644 --- a/hosts/ildkule/configuration.nix +++ b/hosts/ildkule/configuration.nix @@ -1,8 +1,8 @@ { config, fp, pkgs, lib, values, ... }: { imports = [ - # Include the results of the hardware scan. ./hardware-configuration.nix + ./disks.nix (fp /base) ./services/monitoring diff --git a/hosts/ildkule/disks.nix b/hosts/ildkule/disks.nix new file mode 100644 index 0000000..62641fc --- /dev/null +++ b/hosts/ildkule/disks.nix @@ -0,0 +1,27 @@ +{ + disko.devices = { + disk = { + sda = { + device = "/dev/sda"; + type = "disk"; + content = { + type = "gpt"; + partitions = { + bios = { + size = "1M"; + type = "EF02"; + }; + root = { + size = "100%"; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; + }; + }; + }; + }; + }; + }; + }; +} diff --git a/hosts/ildkule/hardware-configuration.nix b/hosts/ildkule/hardware-configuration.nix index ccc6737..2a79775 100644 --- a/hosts/ildkule/hardware-configuration.nix +++ b/hosts/ildkule/hardware-configuration.nix @@ -1,16 +1,24 @@ -{ modulesPath, lib, ... }: -{ - imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; - boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "xen_blkfront" "vmw_pvscsi" ]; - boot.initrd.kernelModules = [ "nvme" ]; - fileSystems."/" = { - device = "/dev/disk/by-uuid/e35eb4ce-aac3-4f91-8383-6e7cd8bbf942"; - fsType = "ext4"; - }; - fileSystems."/data" = { - device = "/dev/disk/by-uuid/0a4c1234-02d3-4b53-aeca-d95c4c8d534b"; - fsType = "ext4"; - }; +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: +{ + imports = + [ (modulesPath + "/profiles/qemu-guest.nix") + ]; + + boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + # 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.ens3.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; }