diff --git a/flake.lock b/flake.lock index b1f1728..dd23c79 100644 --- a/flake.lock +++ b/flake.lock @@ -65,6 +65,45 @@ } }, "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "nix-citizen", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1767609335, + "narHash": "sha256-feveD98mQpptwrAEggBQKJTYbvwwglSbOv53uCfH9PY=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "250481aafeb741edfe23d29195671c19b36b6dca", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_2": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1767609335, + "narHash": "sha256-feveD98mQpptwrAEggBQKJTYbvwwglSbOv53uCfH9PY=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "250481aafeb741edfe23d29195671c19b36b6dca", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_3": { "inputs": { "nixpkgs-lib": [ "nixvim", @@ -85,7 +124,7 @@ "type": "github" } }, - "flake-parts_2": { + "flake-parts_4": { "inputs": { "nixpkgs-lib": [ "nur", @@ -162,6 +201,71 @@ "type": "github" } }, + "nix-citizen": { + "inputs": { + "flake-parts": "flake-parts", + "nix-gaming": [ + "nix-gaming" + ], + "nix-github-actions": "nix-github-actions", + "nixpkgs": "nixpkgs_2", + "systems": "systems_2", + "treefmt-nix": "treefmt-nix" + }, + "locked": { + "lastModified": 1768085843, + "narHash": "sha256-fwh2ImVwwHWsUhem3xlscEM6n7q4rkeKXEv25QWdzjs=", + "owner": "LovingMelody", + "repo": "nix-citizen", + "rev": "7b5ad5f6593893cc70c30a5ce45028ea0cd97ab3", + "type": "github" + }, + "original": { + "owner": "LovingMelody", + "repo": "nix-citizen", + "type": "github" + } + }, + "nix-gaming": { + "inputs": { + "flake-parts": "flake-parts_2", + "nixpkgs": "nixpkgs_3" + }, + "locked": { + "lastModified": 1768269856, + "narHash": "sha256-O7Qy+w2fK4kBq2I70haCDJYpzbpPW58FscHpRzw9lfA=", + "owner": "fufexan", + "repo": "nix-gaming", + "rev": "c104472764fc9e8926e40ccc7e0e6d540d718458", + "type": "github" + }, + "original": { + "owner": "fufexan", + "repo": "nix-gaming", + "type": "github" + } + }, + "nix-github-actions": { + "inputs": { + "nixpkgs": [ + "nix-citizen", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1737420293, + "narHash": "sha256-F1G5ifvqTpJq7fdkT34e/Jy9VCyzd5XfJ9TO8fHhJWE=", + "owner": "nix-community", + "repo": "nix-github-actions", + "rev": "f4158fa080ef4503c8f4c820967d946c2af31ec9", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nix-github-actions", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1748162331, @@ -177,7 +281,54 @@ "type": "indirect" } }, + "nixpkgs-lib": { + "locked": { + "lastModified": 1765674936, + "narHash": "sha256-k00uTP4JNfmejrCLJOwdObYC9jHRrr/5M/a/8L2EIdo=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "2075416fcb47225d9b68ac469a5c4801a9c4dd85", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, "nixpkgs_2": { + "locked": { + "lastModified": 1767892417, + "narHash": "sha256-dhhvQY67aboBk8b0/u0XB6vwHdgbROZT3fJAjyNh5Ww=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "3497aa5c9457a9d88d71fa93a4a8368816fbeeba", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1768032153, + "narHash": "sha256-6kD1MdY9fsE6FgSwdnx29hdH2UcBKs3/+JJleMShuJg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "3146c6aa9995e7351a398e17470e15305e6e18ff", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { "locked": { "lastModified": 1768127708, "narHash": "sha256-1Sm77VfZh3mU0F5OqKABNLWxOuDeHIlcFjsXeeiPazs=", @@ -195,11 +346,11 @@ }, "nixvim": { "inputs": { - "flake-parts": "flake-parts", + "flake-parts": "flake-parts_3", "nixpkgs": [ "nixpkgs" ], - "systems": "systems_2" + "systems": "systems_3" }, "locked": { "lastModified": 1767906546, @@ -217,7 +368,7 @@ }, "nur": { "inputs": { - "flake-parts": "flake-parts_2", + "flake-parts": "flake-parts_4", "nixpkgs": [ "nixpkgs" ] @@ -241,7 +392,9 @@ "agenix": "agenix", "copyparty": "copyparty", "home-manager": "home-manager_2", - "nixpkgs": "nixpkgs_2", + "nix-citizen": "nix-citizen", + "nix-gaming": "nix-gaming", + "nixpkgs": "nixpkgs_4", "nixvim": "nixvim", "nur": "nur" } @@ -275,6 +428,42 @@ "repo": "default", "type": "github" } + }, + "systems_3": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "treefmt-nix": { + "inputs": { + "nixpkgs": [ + "nix-citizen", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1767801790, + "narHash": "sha256-QfX6g3Wj2vQe7oBJEbTf0npvC6sJoDbF9hb2+gM5tf8=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "778a1d691f1ef45dd68c661715c5bf8cbf131c80", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 16035c9..4ce9e45 100644 --- a/flake.nix +++ b/flake.nix @@ -12,6 +12,11 @@ url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; + nix-citizen = { + url = "github:LovingMelody/nix-citizen"; + inputs.nix-gaming.follows = "nix-gaming"; + }; + nix-gaming.url = "github:fufexan/nix-gaming"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixvim = { url = "github:nix-community/nixvim"; @@ -63,7 +68,13 @@ ]; backupFileExtension = "backup"; extraSpecialArgs = { - inherit userName hostName util; + inherit + inputs + hostName + userName + system + util + ; }; useGlobalPkgs = true; useUserPackages = true; diff --git a/hosts/desktop/configuration.nix b/hosts/desktop/configuration.nix index 6900948..16a3b7b 100644 --- a/hosts/desktop/configuration.nix +++ b/hosts/desktop/configuration.nix @@ -20,6 +20,7 @@ "link2c" "llm" "plasma" + "star-citizen" # keep-sorted end ]) ++ (util.toImports ../../modules/nixos/bundles [ diff --git a/modules/nixos/features/gaming.nix b/modules/nixos/features/gaming.nix index a33787d..381ede3 100644 --- a/modules/nixos/features/gaming.nix +++ b/modules/nixos/features/gaming.nix @@ -19,6 +19,7 @@ programs = { gamemode.enable = true; + gamescope.enable = true; steam = { enable = true; gamescopeSession.enable = true; diff --git a/modules/nixos/features/star-citizen.nix b/modules/nixos/features/star-citizen.nix new file mode 100644 index 0000000..e54f03a --- /dev/null +++ b/modules/nixos/features/star-citizen.nix @@ -0,0 +1,23 @@ +{ + # keep-sorted start + inputs, + system, + # keep-sorted end + ... +}: +{ + nix.settings = { + substituters = [ "https://nix-citizen.cachix.org" ]; + trusted-public-keys = [ "nix-citizen.cachix.org-1:lPMkWc2X8XD4/7YPEEwXKKBg+SVbYTVrAaLA2wQTKCo=" ]; + }; + + environment.systemPackages = [ + inputs.nix-citizen.packages.${system}.rsi-launcher + ]; + + zramSwap = { + enable = true; + memoryPercent = 100; + writebackDevice = "/dev/sda1"; + }; +}