diff --git a/flake.nix b/flake.nix index 93fe587..5dce265 100644 --- a/flake.nix +++ b/flake.nix @@ -71,7 +71,9 @@ modules = [ ({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; }) - inputs.nixos-hardware.nixosModules.surface-go + inputs.nixos-hardware.nixosModules.microsoft-surface-go + nixos-cosmic.nixosModules.default + ./hosts/surface ]; }; diff --git a/hosts/surface/default.nix b/hosts/surface/default.nix index 37d6f32..f0ee371 100644 --- a/hosts/surface/default.nix +++ b/hosts/surface/default.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ lib, pkgs, ... }: { imports = [ @@ -73,7 +73,7 @@ enable = true; }; - boot.kernelPackages = pkgs.linuxPackages_latest; + boot.kernelPackages = lib.mkForce pkgs.linuxPackages_latest; system.stateVersion = "24.05"; diff --git a/hosts/surface/hardware-configuration.nix b/hosts/surface/hardware-configuration.nix new file mode 100644 index 0000000..620649d --- /dev/null +++ b/hosts/surface/hardware-configuration.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" "usbhid" "sd_mod" "sdhci_pci" "rtsx_pci_sdmmc" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/09e81450-2741-4218-a2e5-780515cd90b9"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/FC00-C9A3"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/30618725-d8ff-40c9-b218-6b1f7aaf9155"; } + ]; + + # 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.wlp1s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}