From 539465abf4eea10d3bbb0b005c007cc9f517dfbf Mon Sep 17 00:00:00 2001 From: lucy Date: Fri, 2 Oct 2026 23:59:05 +0200 Subject: [PATCH] restructure hosts --- flake.nix | 29 ++++++++++++---- .../desktop/hardware-configuration.nix | 0 hosts/laptop/hardware-configuration.nix | 33 +++++++++++++++++++ 3 files changed, 56 insertions(+), 6 deletions(-) rename hardware-configuration.nix => hosts/desktop/hardware-configuration.nix (100%) create mode 100644 hosts/laptop/hardware-configuration.nix diff --git a/flake.nix b/flake.nix index 4e061cd..8230f55 100755 --- a/flake.nix +++ b/flake.nix @@ -24,17 +24,34 @@ nix-maid, mangowm, }: + let + mods = [ + nixcord.nixosModules.nixcord + mangowm.nixosModules.mango + ./configuration.nix + ./maid.nix + ]; + in { nixosConfigurations.nerv = nixpkgs.lib.nixosSystem { specialArgs = { inherit inputs; }; system = "x86_64-linux"; modules = [ - nixcord.nixosModules.nixcord - nix-maid.nixosModules.default - mangowm.nixosModules.mango - ./configuration.nix - ./maid.nix - ]; + ./hosts/desktop/hardware-configuration.nix + ] ++ mods; + ({ config, ...}: { + networking.hostname = "nerv"; + }); }; }; + nixosConfigurations.seele = nixpkgs.lib.nixosSystem { + specialArgs = { inherit inputs; }; + system = "x86_64-linux"; + modules = [ + ./hosts/laptop/hardware-configuration.nix + ] ++ mods; + ({ config, ...}: { + networking.hostname = "seele"; + }); + } } diff --git a/hardware-configuration.nix b/hosts/desktop/hardware-configuration.nix similarity index 100% rename from hardware-configuration.nix rename to hosts/desktop/hardware-configuration.nix diff --git a/hosts/laptop/hardware-configuration.nix b/hosts/laptop/hardware-configuration.nix new file mode 100644 index 0000000..3b021ca --- /dev/null +++ b/hosts/laptop/hardware-configuration.nix @@ -0,0 +1,33 @@ +# 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 + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "sdhci_pci" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/629196f0-60e9-476e-b294-0d22fd7279c4"; + fsType = "xfs"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/2474-C1E6"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/166d1fb4-527f-4fda-a6bf-85aad4a4f917"; } + ]; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}