diff --git a/.gitignore b/.gitignore index 2bf06b8..2b8800b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ firmware -hardware-configuration.nix diff --git a/configuration.nix b/configuration.nix index 3ac1a30..b6d755b 100755 --- a/configuration.nix +++ b/configuration.nix @@ -7,7 +7,7 @@ { imports = [ # Include the results of the hardware scan. - ./hardware-configuration.nix + # ./hardware-configuration.nix #./apple-silicon-support ]; diff --git a/flake.nix b/flake.nix index 70d4d69..69be60a 100644 --- a/flake.nix +++ b/flake.nix @@ -59,6 +59,9 @@ name = "alien"; system = "x86_64-linux"; hostModule = ./hosts/alien.nix; + extraModules = [ + ./hardware/alien.nix + ]; }; }; diff --git a/hardware/alien.nix b/hardware/alien.nix new file mode 100755 index 0000000..7bcb7de --- /dev/null +++ b/hardware/alien.nix @@ -0,0 +1,53 @@ +# 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" "ahci" "nvme" "usbhid" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/d83ec136-df01-4b9e-a523-6d75726fb904"; + fsType = "btrfs"; + options = [ "subvol=@" ]; + }; + + fileSystems."/nix" = + { device = "/dev/disk/by-uuid/e369d905-a82b-45c5-838a-323169233583"; + fsType = "btrfs"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/6444-169A"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + fileSystems."/home" = + { device = "/dev/disk/by-uuid/881bdf55-1e43-4bfc-a1bf-3b2f72dbc122"; + fsType = "btrfs"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/056af100-9382-4cbd-b3d5-90df7da69585"; } + ]; + + # 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.enp4s0.useDHCP = lib.mkDefault true; + # networking.interfaces.tailscale0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlo1.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/hosts/alien.nix b/hosts/alien.nix index 2c80d0c..c55a473 100644 --- a/hosts/alien.nix +++ b/hosts/alien.nix @@ -31,8 +31,9 @@ hardware.nvidia = { modesetting.enable = true; powerManagement.enable = false; - nvidiaSettings = true; - package = pkgs.linuxPackages.nvidiaPackages.stable; + nvidiaSettings = false; + open = true; + # package = pkgs.linuxPackages.nvidiaPackages.stable; }; }