diff --git a/flake.lock b/flake.lock index c215502..87f45bf 100644 --- a/flake.lock +++ b/flake.lock @@ -384,6 +384,21 @@ "type": "github" } }, + "hardware": { + "locked": { + "lastModified": 1718265846, + "narHash": "sha256-h4MnTID6ciFxtTvtl+ibXMKaG6iLMezCtUvKIfFG7r0=", + "owner": "NixOS", + "repo": "nixos-hardware", + "rev": "d75003136c0fc94ee60e51806c2801ff572d06a6", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixos-hardware", + "type": "github" + } + }, "homeManager": { "inputs": { "nixpkgs": [ @@ -681,6 +696,7 @@ "ghostty": "ghostty", "ghosttyModule": "ghosttyModule", "github2forgejo": "github2forgejo", + "hardware": "hardware", "homeManager": "homeManager", "hyprland": "hyprland", "hyprpicker": "hyprpicker", diff --git a/flake.nix b/flake.nix index 945154e..ea537e3 100644 --- a/flake.nix +++ b/flake.nix @@ -20,6 +20,8 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + hardware.url = "github:NixOS/nixos-hardware"; + homeManager = { url = "github:nix-community/home-manager"; diff --git a/hosts/enka/default.nix b/hosts/enka/default.nix index 3fb2f47..d3c91da 100644 --- a/hosts/enka/default.nix +++ b/hosts/enka/default.nix @@ -1,7 +1,7 @@ { config, lib, ... }: with lib; merge (systemConfiguration { - system.stateVersion = "23.05"; + system.stateVersion = "24.11"; nixpkgs.hostPlatform = "x86_64-linux"; time.timeZone = "Europe/Istanbul"; @@ -27,5 +27,5 @@ }) (homeConfiguration { - home.stateVersion = "23.05"; + home.stateVersion = "24.11"; }) diff --git a/hosts/enka/hardware.nix b/hosts/enka/hardware.nix index fcadcd4..6530b8d 100644 --- a/hosts/enka/hardware.nix +++ b/hosts/enka/hardware.nix @@ -1,4 +1,4 @@ -{ config, lib, ... }: with lib; +{ hardware, config, lib, ... }: with lib; systemConfiguration { boot.loader = { @@ -19,6 +19,13 @@ systemConfiguration { boot.kernelModules = [ "kvm-intel" ]; + imports = [ hardware.nixosModules.common-gpu-nvidia ]; + + hardware.nvidia.prime = { + intelBusId = "PCI:0:2:0"; + nvidiaBusId = "PCI:1:0:0"; + }; + fileSystems."/" = { device = "/dev/disk/by-label/root"; fsType = "btrfs"; @@ -31,10 +38,6 @@ systemConfiguration { options = [ "noatime" ]; }; - swapDevices = [{ - device = "/dev/disk/by-label/swap"; - }]; - hardware.enableAllFirmware = true; hardware.cpu.intel.updateMicrocode = true; }