diff --git a/flake.lock b/flake.lock index 918250c..ed3b358 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,37 @@ { "nodes": { + "cachyos-kernel": { + "flake": false, + "locked": { + "lastModified": 1773036026, + "narHash": "sha256-hRDSqn5jL0cq4aYTcAS61Jsw2DEqxHkAb01Cyu7jIDc=", + "owner": "CachyOS", + "repo": "linux-cachyos", + "rev": "dd72b90988e22422548f65e1ec8e2b52c8c7e35f", + "type": "github" + }, + "original": { + "owner": "CachyOS", + "repo": "linux-cachyos", + "type": "github" + } + }, + "cachyos-kernel-patches": { + "flake": false, + "locked": { + "lastModified": 1773035489, + "narHash": "sha256-qsniqHnVIZdhGO6tYyugtWpOtdYofnUcpJAj6YAAvM4=", + "owner": "CachyOS", + "repo": "kernel-patches", + "rev": "d60f37176775b87d3300b333b39ae974adbda381", + "type": "github" + }, + "original": { + "owner": "CachyOS", + "repo": "kernel-patches", + "type": "github" + } + }, "darwin": { "inputs": { "nixpkgs": [ @@ -22,6 +54,22 @@ } }, "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1767039857, + "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=", + "owner": "NixOS", + "repo": "flake-compat", + "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_2": { "flake": false, "locked": { "lastModified": 1747046372, @@ -55,6 +103,24 @@ "type": "github" } }, + "flake-parts_2": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib_2" + }, + "locked": { + "lastModified": 1772408722, + "narHash": "sha256-rHuJtdcOjK7rAHpHphUb1iCvgkU3GpfvicLMwwnfMT0=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "f20dc5d9b8027381c474144ecabc9034d6a839a3", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "hjem": { "inputs": { "nix-darwin": "nix-darwin", @@ -64,11 +130,11 @@ "smfh": "smfh" }, "locked": { - "lastModified": 1771212460, - "narHash": "sha256-1RfmXbDIxgwP2/SrYSYd9zdArUaJEm6C3FXpdRlmeso=", + "lastModified": 1773176535, + "narHash": "sha256-SxJl+VllncXrqOv045TulgPHZSEiow7ItsA7GLcJq48=", "owner": "feel-co", "repo": "hjem", - "rev": "7f2880d705edf541955d98f56cb78f9507384423", + "rev": "0290776d1418a475b785c1eacc91f655d11f331b", "type": "github" }, "original": { @@ -77,6 +143,29 @@ "type": "github" } }, + "nix-cachyos-kernel": { + "inputs": { + "cachyos-kernel": "cachyos-kernel", + "cachyos-kernel-patches": "cachyos-kernel-patches", + "flake-compat": "flake-compat", + "flake-parts": "flake-parts_2", + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1773166308, + "narHash": "sha256-fkJEQ1rbt/lqsA0+D3+LWtCok9Ofsz8dKDCnbt1MvOs=", + "owner": "xddxdd", + "repo": "nix-cachyos-kernel", + "rev": "2396c36f247f4c1e08f3ffd953b7b958d044e224", + "type": "github" + }, + "original": { + "owner": "xddxdd", + "ref": "release", + "repo": "nix-cachyos-kernel", + "type": "github" + } + }, "nix-darwin": { "inputs": { "nixpkgs": [ @@ -100,16 +189,16 @@ }, "nix-minecraft": { "inputs": { - "flake-compat": "flake-compat", - "nixpkgs": "nixpkgs", + "flake-compat": "flake-compat_2", + "nixpkgs": "nixpkgs_2", "systems": "systems_2" }, "locked": { - "lastModified": 1772592046, - "narHash": "sha256-+Lyl+mGVd0t2nlR6ODK/gvUHzMtF5qLlbTK+x5tCenU=", + "lastModified": 1773196765, + "narHash": "sha256-GvveRb/AiCb/dKXculKiNiAMW4CXMPwpeyi6c/S/a7o=", "owner": "Infinidoge", "repo": "nix-minecraft", - "rev": "483abf9ad6aeac1d61f2a5419ded2879f0c4795e", + "rev": "4d744dff3d8e0d9e7f85e06244ad353bdcf424ff", "type": "github" }, "original": { @@ -120,11 +209,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1771969195, - "narHash": "sha256-qwcDBtrRvJbrrnv1lf/pREQi8t2hWZxVAyeMo7/E9sw=", + "lastModified": 1772972630, + "narHash": "sha256-mUJxsNOrBMNOUJzN0pfdVJ1r2pxeqm9gI/yIKXzVVbk=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "41c6b421bdc301b2624486e11905c9af7b8ec68e", + "rev": "3966ce987e1a9a164205ac8259a5fe8a64528f72", "type": "github" }, "original": { @@ -136,27 +225,27 @@ }, "nixpkgs": { "locked": { - "lastModified": 1769461804, - "narHash": "sha256-msG8SU5WsBUfVVa/9RPLaymvi5bI8edTavbIq3vRlhI=", - "owner": "nixos", + "lastModified": 1773148319, + "narHash": "sha256-Yr9ej3uSDycQZHWB5HslVgryLkdSBN2fODAqURv/1wQ=", + "owner": "NixOS", "repo": "nixpkgs", - "rev": "bfc1b8a4574108ceef22f02bafcf6611380c100d", + "rev": "8da79c289ee165139257335eab0733d98c4ad458", "type": "github" }, "original": { - "owner": "nixos", - "ref": "nixos-unstable", + "owner": "NixOS", + "ref": "nixos-unstable-small", "repo": "nixpkgs", "type": "github" } }, "nixpkgs-darwin": { "locked": { - "lastModified": 1772598333, - "narHash": "sha256-YaHht/C35INEX3DeJQNWjNaTcPjYmBwwjFJ2jdtr+5U=", + "lastModified": 1773050225, + "narHash": "sha256-P2iGJwvzj031ZJA7cgbehYC+21fLJjkB7NG42VJ1CYw=", "owner": "nixos", "repo": "nixpkgs", - "rev": "fabb8c9deee281e50b1065002c9828f2cf7b2239", + "rev": "397b2b93739ce0944a5dd912894ec51c3b090d3d", "type": "github" }, "original": { @@ -181,13 +270,28 @@ "type": "github" } }, + "nixpkgs-lib_2": { + "locked": { + "lastModified": 1772328832, + "narHash": "sha256-e+/T/pmEkLP6BHhYjx6GmwP5ivonQQn0bJdH9YrRB+Q=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "c185c7a5e5dd8f9add5b2f8ebeff00888b070742", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, "nixpkgs-unstable": { "locked": { - "lastModified": 1772674223, - "narHash": "sha256-/suKbHSaSmuC9UY7G0VRQ3aO+QKqxAQPQ19wG7QNkF8=", + "lastModified": 1773110118, + "narHash": "sha256-mPAG8phMbCReKSiKAijjjd3v7uVcJOQ75gSjGJjt/Rk=", "owner": "nixos", "repo": "nixpkgs", - "rev": "66d9241e3dc2296726dc522e62dbfe89c7b449f3", + "rev": "e607cb5360ff1234862ac9f8839522becb853bb9", "type": "github" }, "original": { @@ -199,11 +303,27 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1772598333, - "narHash": "sha256-YaHht/C35INEX3DeJQNWjNaTcPjYmBwwjFJ2jdtr+5U=", + "lastModified": 1769461804, + "narHash": "sha256-msG8SU5WsBUfVVa/9RPLaymvi5bI8edTavbIq3vRlhI=", "owner": "nixos", "repo": "nixpkgs", - "rev": "fabb8c9deee281e50b1065002c9828f2cf7b2239", + "rev": "bfc1b8a4574108ceef22f02bafcf6611380c100d", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1773068389, + "narHash": "sha256-vMrm7Pk2hjBRPnCSjhq1pH0bg350Z+pXhqZ9ICiqqCs=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "44bae273f9f82d480273bab26f5c50de3724f52f", "type": "github" }, "original": { @@ -218,9 +338,10 @@ "darwin": "darwin", "flake-parts": "flake-parts", "hjem": "hjem", + "nix-cachyos-kernel": "nix-cachyos-kernel", "nix-minecraft": "nix-minecraft", "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_3", "nixpkgs-darwin": "nixpkgs-darwin", "nixpkgs-unstable": "nixpkgs-unstable" } diff --git a/flake.nix b/flake.nix index d16acf8..196957a 100644 --- a/flake.nix +++ b/flake.nix @@ -21,6 +21,9 @@ # Hardware specific nixos-hardware.url = "github:NixOS/nixos-hardware/master"; + + # CachyOS kernel + nix-cachyos-kernel.url = "github:xddxdd/nix-cachyos-kernel/release"; }; outputs = inputs@{ flake-parts, ... }: diff --git a/modules/features/gaming.nix b/modules/features/gaming.nix new file mode 100644 index 0000000..888f1f4 --- /dev/null +++ b/modules/features/gaming.nix @@ -0,0 +1,24 @@ +{ inputs, ... }: +{ + flake.nixosModules.gaming = { pkgs, ... }: { + # User CachyOS kernel patches specically mades for gaming + nix.settings.substituters = [ "https://attic.xuyh0120.win/lantian" ]; + nix.settings.trusted-public-keys = [ "lantian:EeAUQ+W+6r7EtwnmYjeVwx5kOGEBpjlBfPlzGlTNvHc=" ]; + nixpkgs.overlays = [ inputs.nix-cachyos-kernel.overlays.pinned ]; + boot.kernelPackages = pkgs.cachyosKernels.linuxPackages-cachyos-latest; + + # Steam configuration + hardware.graphics.enable32Bit = true; + programs.steam = { + enable = true; + gamescopeSession.enable = true; + }; + + # Additionnal packages + environment.systemPackages = with pkgs; [ + faugus-launcher # Alternative launcher for multiple games platform + mangohud + prismlauncher # Minecraft launcher + ]; + }; +} diff --git a/modules/hosts/loki/configuration.nix b/modules/hosts/loki/configuration.nix index 3ccb15c..ecaa1cf 100644 --- a/modules/hosts/loki/configuration.nix +++ b/modules/hosts/loki/configuration.nix @@ -10,10 +10,11 @@ systemd-boot audio nvidia-gpu - cinnamon-desktop + budgie-desktop cosmeak screen-recording - # (autoLogin "cosmeak") + (autoLogin "cosmeak") + gaming ]; nixpkgs.overlays = [ inputs.self.overlays.unstable ]; @@ -28,12 +29,6 @@ networking.networkmanager.enable = true; services.printing.enable = false; - # Steam - programs.steam = { - enable = true; - gamescopeSession.enable = true; - }; - networking.firewall = { enable = true; # Open ports for minecraft LAN diff --git a/modules/hosts/nanna/configuration.nix b/modules/hosts/nanna/configuration.nix index f66f6c4..68fc183 100644 --- a/modules/hosts/nanna/configuration.nix +++ b/modules/hosts/nanna/configuration.nix @@ -10,6 +10,7 @@ cinnamon-desktop auto-upgrade juliette + gaming ]; # Activate network configuration @@ -20,7 +21,6 @@ services.flatpak.enable = true; # System wide programs and applications - programs.steam.enable = true; programs.firefox.enable = true; environment.systemPackages = with pkgs; [ git