diff --git a/flake.lock b/flake.lock index 365867f..ba5fdc0 100644 --- a/flake.lock +++ b/flake.lock @@ -372,6 +372,38 @@ } }, "flake-compat_2": { + "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_3": { + "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_4": { "flake": false, "locked": { "lastModified": 1777699697, @@ -442,6 +474,24 @@ } }, "flake-parts_4": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib_4" + }, + "locked": { + "lastModified": 1778716662, + "narHash": "sha256-m1Yf0wZ8j1OHjTc2UwHwyQRSnNeSgLJOd7q5Y45hzi4=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "f7c1a2d347e4c52d5fb8d10cb4d94b5884e546fb", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_5": { "inputs": { "nixpkgs-lib": [ "nvf", @@ -462,7 +512,7 @@ "type": "github" } }, - "flake-parts_5": { + "flake-parts_6": { "inputs": { "nixpkgs-lib": [ "stylix", @@ -499,6 +549,32 @@ "type": "github" } }, + "git-hooks": { + "inputs": { + "flake-compat": [ + "nix-gaming", + "flake-compat" + ], + "gitignore": "gitignore_2", + "nixpkgs": [ + "nix-gaming", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1781733627, + "narHash": "sha256-U3yTuGBnmXvXoQI3qkpfEDsn9RovQPAjN7ndRco+3u0=", + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "3bbec39bc90eadfa031e6f3b77272f3f60803e39", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "git-hooks.nix", + "type": "github" + } + }, "gitignore": { "inputs": { "nixpkgs": [ @@ -521,6 +597,28 @@ "type": "github" } }, + "gitignore_2": { + "inputs": { + "nixpkgs": [ + "nix-gaming", + "git-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, "gnome-shell": { "flake": false, "locked": { @@ -999,6 +1097,50 @@ "type": "github" } }, + "nix-citizen": { + "inputs": { + "flake-compat": "flake-compat_2", + "nix-gaming": [ + "nix-gaming" + ], + "nixpkgs": "nixpkgs_7", + "treefmt-nix": "treefmt-nix_4" + }, + "locked": { + "lastModified": 1782345817, + "narHash": "sha256-HfMMa51hKi6KPrGGerg6vrdKdJcSEmhEbCM1hCCQNX8=", + "owner": "LovingMelody", + "repo": "nix-citizen", + "rev": "9d93df2ace0c1c2f83b7d03bfee81441d63ec5e0", + "type": "github" + }, + "original": { + "owner": "LovingMelody", + "repo": "nix-citizen", + "type": "github" + } + }, + "nix-gaming": { + "inputs": { + "flake-compat": "flake-compat_3", + "flake-parts": "flake-parts_4", + "git-hooks": "git-hooks", + "nixpkgs": "nixpkgs_8" + }, + "locked": { + "lastModified": 1782619847, + "narHash": "sha256-13XsPDHTG3vkNjagqQvFRG0zZK0yrDwfcU5ou/KtIFM=", + "owner": "fufexan", + "repo": "nix-gaming", + "rev": "55d03bdd91952ff6fd0b0779efe79da67323b6c5", + "type": "github" + }, + "original": { + "owner": "fufexan", + "repo": "nix-gaming", + "type": "github" + } + }, "nix-index-database": { "inputs": { "nixpkgs": [ @@ -1021,8 +1163,8 @@ }, "nixarr": { "inputs": { - "nixpkgs": "nixpkgs_7", - "treefmt-nix": "treefmt-nix_4", + "nixpkgs": "nixpkgs_9", + "treefmt-nix": "treefmt-nix_5", "vpnconfinement": "vpnconfinement", "website-builder": "website-builder" }, @@ -1042,7 +1184,7 @@ }, "nixos-hardware": { "inputs": { - "nixpkgs": "nixpkgs_8" + "nixpkgs": "nixpkgs_10" }, "locked": { "lastModified": 1780310866, @@ -1120,6 +1262,21 @@ "type": "github" } }, + "nixpkgs-lib_4": { + "locked": { + "lastModified": 1777168982, + "narHash": "sha256-GOkGPcboWE9BmGCRMLX3worL4EMnsnG8MyKmXNeYuhQ=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "f5901329dade4a6ea039af1433fb087bd9c1fe14", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, "nixpkgs-stable": { "locked": { "lastModified": 1779796641, @@ -1137,6 +1294,35 @@ } }, "nixpkgs_10": { + "locked": { + "lastModified": 1767892417, + "narHash": "sha256-8bW3q88CEg2u4hSP66Vf4lpbLonHz7hqDNBMcCY7E9U=", + "rev": "3497aa5c9457a9d88d71fa93a4a8368816fbeeba", + "type": "tarball", + "url": "https://releases.nixos.org/nixos/unstable/nixos-26.05pre924538.3497aa5c9457/nixexprs.tar.xz" + }, + "original": { + "type": "tarball", + "url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz" + } + }, + "nixpkgs_11": { + "locked": { + "lastModified": 1780243769, + "narHash": "sha256-x5UQuRsH3MqI0U9afaXSNqzTPSeZlRLvFAav2Ux1pNw=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "331800de5053fcebacf6813adb5db9c9dca22a0c", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_12": { "locked": { "lastModified": 1778869304, "narHash": "sha256-30sZNZoA1cqF5JNO9fVX+wgiQYjB7HJqqJ4ztCDeBZE=", @@ -1152,7 +1338,7 @@ "type": "github" } }, - "nixpkgs_11": { + "nixpkgs_13": { "locked": { "lastModified": 1780749050, "narHash": "sha256-3av0pIjlOWQ6rDbNOmpUSvbNnJkGORQKKjb4LtCZsIY=", @@ -1168,7 +1354,7 @@ "type": "github" } }, - "nixpkgs_12": { + "nixpkgs_14": { "locked": { "lastModified": 1778869304, "narHash": "sha256-30sZNZoA1cqF5JNO9fVX+wgiQYjB7HJqqJ4ztCDeBZE=", @@ -1184,7 +1370,7 @@ "type": "github" } }, - "nixpkgs_13": { + "nixpkgs_15": { "locked": { "lastModified": 1775888245, "narHash": "sha256-nwASzrRDD1JBEu/o8ekKYEXm/oJW6EMCzCRdrwcLe90=", @@ -1200,7 +1386,7 @@ "type": "github" } }, - "nixpkgs_14": { + "nixpkgs_16": { "locked": { "lastModified": 1780243769, "narHash": "sha256-x5UQuRsH3MqI0U9afaXSNqzTPSeZlRLvFAav2Ux1pNw=", @@ -1297,6 +1483,38 @@ } }, "nixpkgs_7": { + "locked": { + "lastModified": 1781577229, + "narHash": "sha256-lrp67w8AulE9Ks53n27I45ADSzbOCn4H+CNW1Ck8B+8=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "567a49d1913ce81ac6e9582e3553dd90a955875f", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_8": { + "locked": { + "lastModified": 1782175435, + "narHash": "sha256-EMzXKmnOtBQ2MnvpiNOm7E+kOMvdPrIKaeg52Tip2Uk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "89570f24e97e614aa34aa9ab1c927b6578a43775", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_9": { "locked": { "lastModified": 1775595990, "narHash": "sha256-OEf7YqhF9IjJFYZJyuhAypgU+VsRB5lD4DuiMws5Ltc=", @@ -1312,39 +1530,10 @@ "type": "github" } }, - "nixpkgs_8": { - "locked": { - "lastModified": 1767892417, - "narHash": "sha256-8bW3q88CEg2u4hSP66Vf4lpbLonHz7hqDNBMcCY7E9U=", - "rev": "3497aa5c9457a9d88d71fa93a4a8368816fbeeba", - "type": "tarball", - "url": "https://releases.nixos.org/nixos/unstable/nixos-26.05pre924538.3497aa5c9457/nixexprs.tar.xz" - }, - "original": { - "type": "tarball", - "url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz" - } - }, - "nixpkgs_9": { - "locked": { - "lastModified": 1780243769, - "narHash": "sha256-x5UQuRsH3MqI0U9afaXSNqzTPSeZlRLvFAav2Ux1pNw=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "331800de5053fcebacf6813adb5db9c9dca22a0c", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "notashelf-tuigreet": { "inputs": { "crane": "crane", - "nixpkgs": "nixpkgs_10", + "nixpkgs": "nixpkgs_12", "rust-overlay": "rust-overlay" }, "locked": { @@ -1388,7 +1577,7 @@ }, "nur-anotherhadi": { "inputs": { - "nixpkgs": "nixpkgs_11" + "nixpkgs": "nixpkgs_13" }, "locked": { "lastModified": 1781028989, @@ -1427,11 +1616,11 @@ }, "nvf": { "inputs": { - "flake-compat": "flake-compat_2", - "flake-parts": "flake-parts_4", + "flake-compat": "flake-compat_4", + "flake-parts": "flake-parts_5", "mnw": "mnw", "ndg": "ndg", - "nixpkgs": "nixpkgs_12", + "nixpkgs": "nixpkgs_14", "systems": "systems_5" }, "locked": { @@ -1525,10 +1714,12 @@ "home-manager": "home-manager", "hyprland": "hyprland", "iknowyou": "iknowyou", + "nix-citizen": "nix-citizen", + "nix-gaming": "nix-gaming", "nix-index-database": "nix-index-database", "nixarr": "nixarr", "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs_9", + "nixpkgs": "nixpkgs_11", "nixpkgs-stable": "nixpkgs-stable", "notashelf-tuigreet": "notashelf-tuigreet", "nur-anotherhadi": "nur-anotherhadi", @@ -1560,7 +1751,7 @@ }, "sops-nix": { "inputs": { - "nixpkgs": "nixpkgs_13" + "nixpkgs": "nixpkgs_15" }, "locked": { "lastModified": 1780547341, @@ -1583,9 +1774,9 @@ "base16-helix": "base16-helix", "base16-vim": "base16-vim", "firefox-gnome-theme": "firefox-gnome-theme", - "flake-parts": "flake-parts_5", + "flake-parts": "flake-parts_6", "gnome-shell": "gnome-shell", - "nixpkgs": "nixpkgs_14", + "nixpkgs": "nixpkgs_16", "nur": "nur", "systems": "systems_6", "tinted-kitty": "tinted-kitty", @@ -1828,6 +2019,27 @@ } }, "treefmt-nix_4": { + "inputs": { + "nixpkgs": [ + "nix-citizen", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1780220602, + "narHash": "sha256-eynAfOmbmxJnkp7YewvCEbShNnnYJ9gLLqkzsYtBPeM=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "db947814a175b7ca6ded66e21383d938df01c227", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, + "treefmt-nix_5": { "inputs": { "nixpkgs": [ "nixarr", diff --git a/flake.nix b/flake.nix index 03dec01..5041027 100644 --- a/flake.nix +++ b/flake.nix @@ -16,6 +16,9 @@ notashelf-tuigreet.url = "github:NotAShelf/tuigreet"; helium-browser.url = "github:oxcl/nix-flake-helium-browser"; nur-anotherhadi.url = "github:anotherhadi/nur-packages"; + nix-citizen.url = "github:LovingMelody/nix-citizen"; + nix-gaming.url = "github:fufexan/nix-gaming"; + nix-citizen.inputs.nix-gaming.follows = "nix-gaming"; nix-index-database = { url = "github:nix-community/nix-index-database"; diff --git a/home/programs/star-citizen/default.nix b/home/programs/star-citizen/default.nix new file mode 100644 index 0000000..0979d2a --- /dev/null +++ b/home/programs/star-citizen/default.nix @@ -0,0 +1,35 @@ +{ + config, + inputs, + lib, + pkgs, + ... +}: +let + cfg = config.programs.star-citizen; + system = pkgs.stdenv.hostPlatform.system; +in { + options.programs.star-citizen = { + enable = lib.mkEnableOption "Star Citizen via nix-citizen"; + + package = lib.mkOption { + type = lib.types.enum [ + "rsi-launcher" + "rsi-launcher-git" + "rsi-launcher-umu" + "star-citizen" + "star-citizen-git" + "star-citizen-umu" + "lug-helper" + ]; + default = "rsi-launcher"; + description = "Package from nix-citizen to install when Star Citizen is enabled."; + }; + }; + + config = lib.mkIf cfg.enable { + home.packages = [ + inputs.nix-citizen.packages.${system}.${cfg.package} + ]; + }; +} diff --git a/hosts/home-pc/configuration.nix b/hosts/home-pc/configuration.nix index 8ac5152..0c4513d 100644 --- a/hosts/home-pc/configuration.nix +++ b/hosts/home-pc/configuration.nix @@ -1,6 +1,8 @@ {config, ...}: { imports = [ - # Mostly system related configuration + # ───────────────────────────────────────────────────────────── + # System configuration + # ───────────────────────────────────────────────────────────── ../../nixos/audio.nix ../../nixos/bluetooth.nix ../../nixos/fonts.nix @@ -13,8 +15,14 @@ ../../nixos/utils.nix ../../nixos/hyprland.nix + # ───────────────────────────────────────────────────────────── + # Graphics Card + # ───────────────────────────────────────────────────────────── ../../nixos/amd-graphics.nix + # ───────────────────────────────────────────────────────────── + # System integration for Steam + # ───────────────────────────────────────────────────────────── ../../nixos/steam.nix # You should let those lines as is diff --git a/hosts/home-pc/flake.nix b/hosts/home-pc/flake.nix index 963a5c2..28da1a5 100644 --- a/hosts/home-pc/flake.nix +++ b/hosts/home-pc/flake.nix @@ -3,16 +3,35 @@ nixpkgs, ... }: + nixpkgs.lib.nixosSystem { modules = [ { nixpkgs.overlays = []; - _module.args = {inherit inputs;}; + _module.args = { + inherit inputs; + }; } + + ({ config, pkgs, lib, ... }: { + # ───────────────────────────────────────────────────────────── + # AMD Microcode + # ───────────────────────────────────────────────────────────── + hardware.cpu.amd.updateMicrocode = true; + + # ───────────────────────────────────────────────────────────── + # Hardware accelaration + # ───────────────────────────────────────────────────────────── + hardware.graphics = { + enable = true; + enable32Bit = true; + }; + }) + inputs.home-manager.nixosModules.home-manager inputs.stylix.nixosModules.stylix inputs.nix-index-database.nixosModules.default - inputs.helium-browser.nixosModules.default + ./configuration.nix ]; } diff --git a/hosts/home-pc/home.nix b/hosts/home-pc/home.nix index 8a7e836..24621cc 100644 --- a/hosts/home-pc/home.nix +++ b/hosts/home-pc/home.nix @@ -1,6 +1,8 @@ {config, ...}: { imports = [ + # ───────────────────────────────────────────────────────────── # Programs + # ───────────────────────────────────────────────────────────── ../../home/programs/ghostty ../../home/programs/nvf ../../home/programs/shell @@ -12,14 +14,24 @@ ../../home/programs/nix-utils ../../home/programs/spotatui ../../home/programs/yazi - ../../home/programs/steam + # ───────────────────────────────────────────────────────────── + # Gaming + # ───────────────────────────────────────────────────────────── + ../../home/programs/steam + ../../home/programs/star-citizen + + # ───────────────────────────────────────────────────────────── + # Groups + # ───────────────────────────────────────────────────────────── ../../home/programs/group/basic-apps.nix ../../home/programs/group/dev.nix ../../home/programs/group/misc.nix ../../home/programs/group/gaming-apps.nix - # System (Desktop environment like stuff) + # ───────────────────────────────────────────────────────────── + # System + # ───────────────────────────────────────────────────────────── ../../home/system/hyprland ../../home/system/caelestia-shell ../../home/system/hyprpaper @@ -27,7 +39,6 @@ ../../home/system/udiskie ./variables.nix # Mostly user-specific configuration - #./secrets # CHANGEME: You should probably remove this line, this is where I store my secrets ]; home = { diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index b7e5f18..cb5a9d0 100644 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -1,29 +1,32 @@ -{ config, ... }: +{ config, ... }: { + imports = [ + # ───────────────────────────────────────────────────────────── + # System configuration + # ───────────────────────────────────────────────────────────── + ../../nixos/audio.nix + ../../nixos/bluetooth.nix + ../../nixos/fonts.nix + ../../nixos/home-manager.nix + ../../nixos/nix.nix + ../../nixos/systemd-boot.nix + ../../nixos/tuigreet.nix + ../../nixos/users.nix + ../../nixos/utils.nix + ../../nixos/hyprland.nix -{ -imports = [ -# System configuration -../../nixos/audio.nix -../../nixos/bluetooth.nix -../../nixos/fonts.nix -../../nixos/home-manager.nix -../../nixos/nix.nix -../../nixos/systemd-boot.nix -../../nixos/tuigreet.nix -../../nixos/users.nix -../../nixos/utils.nix -../../nixos/hyprland.nix + # ───────────────────────────────────────────────────────────── + # System integration for Steam + # ───────────────────────────────────────────────────────────── + ../../nixos/steam.nix -../../nixos/steam.nix + # You should let those lines as is + ./hardware-configuration.nix + ./variables.nix -# Machine-specific files -./hardware-configuration.nix -./variables.nix + ]; -]; - -home-manager.users."${config.var.username}" = import ./home.nix; -services.flatpak.enable = true; - -system.stateVersion = "24.05"; + home-manager.users."${config.var.username}" = import ./home.nix; + services.flatpak.enable = true; + # Don't touch this + system.stateVersion = "24.05"; } diff --git a/hosts/laptop/flake.nix b/hosts/laptop/flake.nix index 1e74f53..272f7d4 100644 --- a/hosts/laptop/flake.nix +++ b/hosts/laptop/flake.nix @@ -14,21 +14,29 @@ nixpkgs.lib.nixosSystem { } ({ config, pkgs, lib, ... }: { - # Intel microcode + # ───────────────────────────────────────────────────────────── + # Intel Microcode + # ───────────────────────────────────────────────────────────── hardware.cpu.intel.updateMicrocode = true; - # Graphics support + # ───────────────────────────────────────────────────────────── + # Hardware accelaration + # ───────────────────────────────────────────────────────────── hardware.graphics = { enable = true; enable32Bit = true; }; - # Power management + # ───────────────────────────────────────────────────────────── + # Power management + # ───────────────────────────────────────────────────────────── powerManagement.cpuFreqGovernor = "powersave"; services.tlp.enable = true; services.power-profiles-daemon.enable = false; - # Kernel modules commonly needed on ThinkPads + # ───────────────────────────────────────────────────────────── + # Kernel modules commonly needed on ThinkPads + # ───────────────────────────────────────────────────────────── boot.kernelModules = [ "i915" "snd_hda_intel" @@ -39,7 +47,6 @@ nixpkgs.lib.nixosSystem { inputs.home-manager.nixosModules.home-manager inputs.stylix.nixosModules.stylix inputs.nix-index-database.nixosModules.default - inputs.helium-browser.nixosModules.default ./configuration.nix ]; diff --git a/hosts/laptop/home.nix b/hosts/laptop/home.nix index 7b53a2b..c2c4860 100644 --- a/hosts/laptop/home.nix +++ b/hosts/laptop/home.nix @@ -1,6 +1,8 @@ {config, ...}: { imports = [ + # ───────────────────────────────────────────────────────────── # Programs + # ───────────────────────────────────────────────────────────── ../../home/programs/ghostty ../../home/programs/nvf ../../home/programs/shell @@ -12,13 +14,22 @@ ../../home/programs/nix-utils ../../home/programs/spotatui ../../home/programs/yazi + + # ───────────────────────────────────────────────────────────── + # Gaming + # ───────────────────────────────────────────────────────────── ../../home/programs/steam + # ───────────────────────────────────────────────────────────── + # Groups + # ───────────────────────────────────────────────────────────── ../../home/programs/group/basic-apps.nix ../../home/programs/group/dev.nix ../../home/programs/group/misc.nix - # System (Desktop environment like stuff) + # ───────────────────────────────────────────────────────────── + # System + # ───────────────────────────────────────────────────────────── ../../home/system/hyprland ../../home/system/caelestia-shell ../../home/system/hyprpaper diff --git a/nixos/nix.nix b/nixos/nix.nix index 5ee8294..11c24a9 100644 --- a/nixos/nix.nix +++ b/nixos/nix.nix @@ -44,11 +44,13 @@ in { "https://cache.nixos.org?priority=10" "https://hyprland.cachix.org" + "https://nix-citizen.cachix.org" "https://nix-community.cachix.org" "https://numtide.cachix.org" ]; trusted-public-keys = [ "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" + "nix-citizen.cachix.org-1:lPMkWc2X8XD4/7YPEEwXKKBg+SVbYTVrAaLA2wQTKCo=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" "numtide.cachix.org-1:2ps1kLBUWjxIneOy1Ik6cQjb41X0iXVXeHigGmycPPE=" ];