From 1ead5ea6138cfb94940524cc90f96a633b77d940 Mon Sep 17 00:00:00 2001 From: mir Date: Mon, 26 Feb 2024 17:28:29 -0900 Subject: [PATCH] add knockout machine; does this work? --- flake.nix | 14 ++++++++++++++ hardware/knockout-hw.nix | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 hardware/knockout-hw.nix diff --git a/flake.nix b/flake.nix index 3cab172..a4cb141 100644 --- a/flake.nix +++ b/flake.nix @@ -23,6 +23,20 @@ } ]; }; + knockout = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + ./configuration.nix + ./hardware/knockout-hw.nix + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.mir = import ./home.nix; + # Optionally, use home-manager.extraSpecialArgs to pass arguments to home.nix + } + ]; + }; }; }; } diff --git a/hardware/knockout-hw.nix b/hardware/knockout-hw.nix new file mode 100644 index 0000000..0b89f0a --- /dev/null +++ b/hardware/knockout-hw.nix @@ -0,0 +1,37 @@ +# 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" "thunderbolt" "nvme" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/44f83d76-68bd-4b07-bf5c-f72e7981e640"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/EE44-46F8"; + fsType = "vfat"; + }; + + 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.wlp0s20f3.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}