From 14ec612c9cb1ad2b24bf249c685d268edfab1c02 Mon Sep 17 00:00:00 2001 From: "Simen A. W. Olsen" Date: Sat, 21 Mar 2026 18:59:32 +0100 Subject: feat: add nixbox configs --- flake.nix | 1 + hosts/nixbox/hardware-configuration.nix | 29 +++++++++++++++++++++++++++++ modules/nixos/default.nix | 2 +- 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 hosts/nixbox/hardware-configuration.nix diff --git a/flake.nix b/flake.nix index 4748a3d..479e958 100644 --- a/flake.nix +++ b/flake.nix @@ -55,6 +55,7 @@ nixosConfigurations."nixbox" = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ + ./hosts/nixbox/hardware-configuration.nix ./modules/nixos home-manager.nixosModules.home-manager { diff --git a/hosts/nixbox/hardware-configuration.nix b/hosts/nixbox/hardware-configuration.nix new file mode 100644 index 0000000..2c91a21 --- /dev/null +++ b/hosts/nixbox/hardware-configuration.nix @@ -0,0 +1,29 @@ +# Generated by 'nixos-generate-config' for nixbox (QEMU/KVM guest). +# Regenerate with: nixos-generate-config --show-hardware-config +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/profiles/qemu-guest.nix") + ]; + + boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ahci" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/096adbf8-2498-4f70-b661-c699dbc4f257"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/AE22-C56D"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + swapDevices = [ ]; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; +} diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index 13fddbb..1b46b94 100644 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -1,7 +1,7 @@ { pkgs, lib, ... }: { - imports = [ /etc/nixos/hardware-configuration.nix ]; + imports = [ ]; # Enable experimental Nix features nix.settings.experimental-features = "nix-command flakes"; -- cgit v1.2.3