From 76f4b51c79aa0f88fd9a27b098cd7eb0875ba6a1 Mon Sep 17 00:00:00 2001 From: mir Date: Mon, 15 Apr 2024 15:22:43 -0800 Subject: [PATCH] add device: ravage --- flake.nix | 27 +++++++++++++++++++++++++++ hardware/ravage-hw.nix | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 hardware/ravage-hw.nix diff --git a/flake.nix b/flake.nix index 96db788..5e8be4c 100644 --- a/flake.nix +++ b/flake.nix @@ -172,6 +172,33 @@ ]; # end of modules in inputs.nixpkgs-unstable.lib.nixosSystem {inherit system modules specialArgs; }; # }}} + + ravage = # {{{ + let + system = "x86_64-linux"; + specialArgs = { inherit inputs; }; + modules = [ + ./configuration.nix { + services.xserver.videoDrivers = [ "modesetting" "displaylink" ]; + networking = { + hostName = "ravage"; + hostId = "c53d3e32"; + }; + boot.loader.efi.canTouchEfiVariables = true; + sound.enable = true; + } + ./hardware/ravage-hw.nix + ./modules/sound/pipewire.nix + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.mir = import ./home.nix; + home-manager.extraSpecialArgs = specialArgs; + } + ]; # end of modules + in + nixpkgs.lib.nixosSystem {inherit system modules specialArgs; }; # }}} }; }; } diff --git a/hardware/ravage-hw.nix b/hardware/ravage-hw.nix new file mode 100644 index 0000000..1d9b628 --- /dev/null +++ b/hardware/ravage-hw.nix @@ -0,0 +1,40 @@ +# 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" "usb_storage" "sd_mod" "sdhci_pci" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/e0cdd1f0-2923-4bfa-89d2-e0c2ce2db226"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/7C28-7235"; + fsType = "vfat"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/0e218e1e-5321-4a90-9b7d-f54b60cca3de"; } + ]; + + # 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.enp0s21f0u2c2.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}