Nix Flakes configuration for MacOS, NixOS and WSL
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

wip: transformation of loki to a steam machine

cosmeak feead046 2f8ccbea

+141 -84
+45 -45
flake.lock
··· 3 3 "cachyos-kernel": { 4 4 "flake": false, 5 5 "locked": { 6 - "lastModified": 1776608760, 7 - "narHash": "sha256-ehDv8bF7k/2Kf4b8CCoSm51U/MOoFuLsRXqe5wZ57sE=", 6 + "lastModified": 1778227630, 7 + "narHash": "sha256-IZIpCvjTLn6dzgFa6vOB6rUkMp3gktQy8suVXkPfvSg=", 8 8 "owner": "CachyOS", 9 9 "repo": "linux-cachyos", 10 - "rev": "7e06e29005853bbaaa3b1c1067f915d6e0db728a", 10 + "rev": "24da68625ce48a4ea1b28996050f1229e7bc78a2", 11 11 "type": "github" 12 12 }, 13 13 "original": { ··· 19 19 "cachyos-kernel-patches": { 20 20 "flake": false, 21 21 "locked": { 22 - "lastModified": 1776792814, 23 - "narHash": "sha256-39dlIhz9KxUNQFxGpE9SvCviaOWAivdW0XJM8RnPNmg=", 22 + "lastModified": 1777876120, 23 + "narHash": "sha256-fdFgVCoua3rsQyyHkgxcnwi0hUktR8UtcI/suS8jcbg=", 24 24 "owner": "CachyOS", 25 25 "repo": "kernel-patches", 26 - "rev": "d7d558d0b2e239e27b40bcf1af6fe12e323aa391", 26 + "rev": "e80ce8172953b8c199daf6a2850974bb12731ae9", 27 27 "type": "github" 28 28 }, 29 29 "original": { ··· 90 90 "nixpkgs-lib": "nixpkgs-lib" 91 91 }, 92 92 "locked": { 93 - "lastModified": 1775087534, 94 - "narHash": "sha256-91qqW8lhL7TLwgQWijoGBbiD4t7/q75KTi8NxjVmSmA=", 93 + "lastModified": 1777988971, 94 + "narHash": "sha256-qIoWPDs+0/8JecyYgE3gpKQxW/4bLW/gp45vow9ioCQ=", 95 95 "owner": "hercules-ci", 96 96 "repo": "flake-parts", 97 - "rev": "3107b77cd68437b9a76194f0f7f9c55f2329ca5b", 97 + "rev": "0678d8986be1661af6bb555f3489f2fdfc31f6ff", 98 98 "type": "github" 99 99 }, 100 100 "original": { ··· 108 108 "nixpkgs-lib": "nixpkgs-lib_2" 109 109 }, 110 110 "locked": { 111 - "lastModified": 1775087534, 112 - "narHash": "sha256-91qqW8lhL7TLwgQWijoGBbiD4t7/q75KTi8NxjVmSmA=", 111 + "lastModified": 1777988971, 112 + "narHash": "sha256-qIoWPDs+0/8JecyYgE3gpKQxW/4bLW/gp45vow9ioCQ=", 113 113 "owner": "hercules-ci", 114 114 "repo": "flake-parts", 115 - "rev": "3107b77cd68437b9a76194f0f7f9c55f2329ca5b", 115 + "rev": "0678d8986be1661af6bb555f3489f2fdfc31f6ff", 116 116 "type": "github" 117 117 }, 118 118 "original": { ··· 129 129 ] 130 130 }, 131 131 "locked": { 132 - "lastModified": 1776684358, 133 - "narHash": "sha256-Nn42mX8ikB1hpLwceqe65yJx7/T87j1Cpyik2KL6/YY=", 132 + "lastModified": 1777732535, 133 + "narHash": "sha256-gaHRkPaGAAjc6D4sZ+/haEKMJGO79tu4ROBlyOjXuco=", 134 134 "owner": "feel-co", 135 135 "repo": "hjem", 136 - "rev": "fb7ee87a1e72b3b21723d5ec76c8ca395c02fbc6", 136 + "rev": "ab977051adce0bf9f7c1032327e72f0febda6f7b", 137 137 "type": "github" 138 138 }, 139 139 "original": { ··· 150 150 "spectrum": "spectrum" 151 151 }, 152 152 "locked": { 153 - "lastModified": 1776340739, 154 - "narHash": "sha256-s4FDictJlPtY6Shd6scG5hgrDMiHth09+svtvTA5NLA=", 153 + "lastModified": 1778369133, 154 + "narHash": "sha256-zfYJAAVau1dDlVo8PfA0oQFVwvRjpp8Zz+T61+ywogI=", 155 155 "owner": "microvm-nix", 156 156 "repo": "microvm.nix", 157 - "rev": "2f2f62fdfdca2750e3399f66bd03986ab967e5ca", 157 + "rev": "9ddb425679d44e6e1e5cd5df9db0c42ed99df4a4", 158 158 "type": "github" 159 159 }, 160 160 "original": { ··· 172 172 "nixpkgs": "nixpkgs" 173 173 }, 174 174 "locked": { 175 - "lastModified": 1776796985, 176 - "narHash": "sha256-cNFg3H09sBZl1v9ds6PDHfLCUTDJbefGMSv+WxFs+9c=", 175 + "lastModified": 1778438210, 176 + "narHash": "sha256-QFqKZ1PvbuXOJfH+QfhEAQW5TVrFBDMc6kRkii4l7uk=", 177 177 "owner": "xddxdd", 178 178 "repo": "nix-cachyos-kernel", 179 - "rev": "ac5956bbceb022998fc1dd0001322f10ef1e6dda", 179 + "rev": "fd9bda8a7986c9d35c4e5462f0be1d42ea529812", 180 180 "type": "github" 181 181 }, 182 182 "original": { ··· 214 214 "systems": "systems" 215 215 }, 216 216 "locked": { 217 - "lastModified": 1776828595, 218 - "narHash": "sha256-LkFpFnPTK6H0gwyfYezN3kEKHVxjSdPp/tBnrQRFP3E=", 217 + "lastModified": 1778039471, 218 + "narHash": "sha256-Arjg44jFcpSqOKK05EIxbKIjhfjou/EGF12COFU+9QA=", 219 219 "owner": "Infinidoge", 220 220 "repo": "nix-minecraft", 221 - "rev": "28f0f2369655a5910e810c35c698dfaa9ccec692", 221 + "rev": "87611ef4788116de05f851920c5958f0c37d5b05", 222 222 "type": "github" 223 223 }, 224 224 "original": { ··· 229 229 }, 230 230 "nixos-hardware": { 231 231 "locked": { 232 - "lastModified": 1776830795, 233 - "narHash": "sha256-PAfvLwuHc1VOvsLcpk6+HDKgMEibvZjCNvbM1BJOA7o=", 232 + "lastModified": 1778143761, 233 + "narHash": "sha256-lkesY6x2X2qxlqLM7CT2iM/0rP2JB7fruPN3h8POXmI=", 234 234 "owner": "NixOS", 235 235 "repo": "nixos-hardware", 236 - "rev": "72674a6b5599e844c045ae7449ba91f803d44ebc", 236 + "rev": "3bcaa367d4c550d687a17ac792fd5cda214ee871", 237 237 "type": "github" 238 238 }, 239 239 "original": { ··· 245 245 }, 246 246 "nixpkgs": { 247 247 "locked": { 248 - "lastModified": 1776750258, 249 - "narHash": "sha256-jab3OFEK7MpiAolaLBjvIxdf258UWvvusWxPJPE5ito=", 248 + "lastModified": 1778401622, 249 + "narHash": "sha256-+0rgLm/T6U2I/0KrgUOz5471i6nDVFMihe4Vy/eAmNk=", 250 250 "owner": "NixOS", 251 251 "repo": "nixpkgs", 252 - "rev": "8d73c2809cb39eecce6284c38100e69a6064e5d9", 252 + "rev": "eeac4f06ba6d4c5540c4838d13b31a2cbe0e104b", 253 253 "type": "github" 254 254 }, 255 255 "original": { ··· 261 261 }, 262 262 "nixpkgs-darwin": { 263 263 "locked": { 264 - "lastModified": 1776784345, 265 - "narHash": "sha256-IwBAqEljQ0WNVRRQf/ItWIHqIgi5ap+noM2unsLCa8Y=", 264 + "lastModified": 1778111371, 265 + "narHash": "sha256-L3LdhmeKcBrMVxqeEHwfwA1FFVf40DDCAOV8S0+PlLc=", 266 266 "owner": "nixos", 267 267 "repo": "nixpkgs", 268 - "rev": "377ba9abb3f416ee2786cb7eb6219bb1d29ce63f", 268 + "rev": "25b257cc037722030ae920bba7c167d4db554a10", 269 269 "type": "github" 270 270 }, 271 271 "original": { ··· 277 277 }, 278 278 "nixpkgs-lib": { 279 279 "locked": { 280 - "lastModified": 1774748309, 281 - "narHash": "sha256-+U7gF3qxzwD5TZuANzZPeJTZRHS29OFQgkQ2kiTJBIQ=", 280 + "lastModified": 1777168982, 281 + "narHash": "sha256-GOkGPcboWE9BmGCRMLX3worL4EMnsnG8MyKmXNeYuhQ=", 282 282 "owner": "nix-community", 283 283 "repo": "nixpkgs.lib", 284 - "rev": "333c4e0545a6da976206c74db8773a1645b5870a", 284 + "rev": "f5901329dade4a6ea039af1433fb087bd9c1fe14", 285 285 "type": "github" 286 286 }, 287 287 "original": { ··· 292 292 }, 293 293 "nixpkgs-lib_2": { 294 294 "locked": { 295 - "lastModified": 1774748309, 296 - "narHash": "sha256-+U7gF3qxzwD5TZuANzZPeJTZRHS29OFQgkQ2kiTJBIQ=", 295 + "lastModified": 1777168982, 296 + "narHash": "sha256-GOkGPcboWE9BmGCRMLX3worL4EMnsnG8MyKmXNeYuhQ=", 297 297 "owner": "nix-community", 298 298 "repo": "nixpkgs.lib", 299 - "rev": "333c4e0545a6da976206c74db8773a1645b5870a", 299 + "rev": "f5901329dade4a6ea039af1433fb087bd9c1fe14", 300 300 "type": "github" 301 301 }, 302 302 "original": { ··· 307 307 }, 308 308 "nixpkgs-unstable": { 309 309 "locked": { 310 - "lastModified": 1776329215, 311 - "narHash": "sha256-a8BYi3mzoJ/AcJP8UldOx8emoPRLeWqALZWu4ZvjPXw=", 310 + "lastModified": 1778274207, 311 + "narHash": "sha256-I4puXmX1iovcCHZlRmztO3vW0mAbbRvq4F8wgIMQ1MM=", 312 312 "owner": "nixos", 313 313 "repo": "nixpkgs", 314 - "rev": "b86751bc4085f48661017fa226dee99fab6c651b", 314 + "rev": "b3da656039dc7a6240f27b2ef8cc6a3ef3bccae7", 315 315 "type": "github" 316 316 }, 317 317 "original": { ··· 339 339 }, 340 340 "nixpkgs_3": { 341 341 "locked": { 342 - "lastModified": 1776560675, 343 - "narHash": "sha256-p68udKWWh7+V4ZPpcMDq0gTHWNZJnr4JPI+kHPPE40o=", 342 + "lastModified": 1778003029, 343 + "narHash": "sha256-q/nkKLDtHIyLjZpKhWk3cSK5IYsFqtMd6UtXF3ddjgA=", 344 344 "owner": "nixos", 345 345 "repo": "nixpkgs", 346 - "rev": "e07580dae39738e46609eaab8b154de2488133ce", 346 + "rev": "0c88e1f2bdb93d5999019e99cb0e61e1fe2af4c5", 347 347 "type": "github" 348 348 }, 349 349 "original": {
+18 -26
modules/features/gaming.nix
··· 2 2 { 3 3 allowedUnfreePackages = [ "steam" "steam-unwrapped" ]; 4 4 5 - flake.nixosModules.gaming = { pkgs, ... }: { 6 - # User CachyOS kernel patches specically mades for gaming 7 - nix.settings.substituters = [ "https://attic.xuyh0120.win/lantian" ]; 8 - nix.settings.trusted-public-keys = [ "lantian:EeAUQ+W+6r7EtwnmYjeVwx5kOGEBpjlBfPlzGlTNvHc=" ]; 9 - nixpkgs.overlays = [ inputs.nix-cachyos-kernel.overlays.pinned ]; 10 - boot.kernelPackages = pkgs.cachyosKernels.linuxPackages-cachyos-latest; 11 - 12 - # Use ananicy 13 - services.ananicy.enable = true; 14 - services.ananicy.package = pkgs.ananicy-cpp; 15 - services.ananicy.rulesProvider = pkgs.ananicy-rules-cachyos; 5 + flake.nixosModules.gaming = { pkgs, lib, config, ... }: { 6 + options.modules.gaming.enable = lib.mkEnableOption "gaming module" // { default = true; }; 16 7 17 - # Steam configuration 18 - hardware.graphics.enable32Bit = true; 19 - programs.steam = { 20 - enable = true; 21 - gamescopeSession.enable = true; 22 - }; 8 + config = lib.mkIf config.modules.gaming.enable { 9 + services.ananicy.enable = true; 10 + services.ananicy.package = pkgs.ananicy-cpp; 11 + services.ananicy.rulesProvider = pkgs.ananicy-rules-cachyos; 23 12 24 - # Additionnal packages 25 - environment.systemPackages = with pkgs; [ 26 - faugus-launcher # Alternative launcher for multiple games platform 27 - heroic 28 - mangohud 29 - prismlauncher # Minecraft launcher 30 - jdk25_headless # Needed for minecraft 26.1 since it's not included inside prismlauncher for the moment 13 + hardware.graphics.enable32Bit = true; 14 + programs.steam = { 15 + enable = true; 16 + gamescopeSession.enable = true; 17 + }; 31 18 32 - unstable.gale # Modding platform 33 - ]; 19 + environment.systemPackages = with pkgs; [ 20 + faugus-launcher 21 + heroic 22 + prismlauncher 23 + unstable.gale 24 + ]; 25 + }; 34 26 }; 35 27 }
+19
modules/features/minecraft-servers/cobblestone.nix
··· 1 + { inputs, ... }: { 2 + flake.nixosModules.mc-cobblestone = { pkgs, ... }: { 3 + imports = [ inputs.self.nixosModules.minecraft-servers ]; 4 + 5 + services.minecraft-servers.servers.cobblestone = { 6 + enable = true; 7 + autoStart = true; 8 + enableReload = true; 9 + package = pkgs.minecraftServers.vanilla-26_1; 10 + 11 + serverProperties = { 12 + motd = "Just the two of us!"; 13 + server-port = 25565; 14 + max-players = 20; 15 + difficulty = 3; 16 + }; 17 + }; 18 + }; 19 + }
+1 -1
modules/features/minecraft-servers/prismarine.nix
··· 3 3 imports = [ inputs.self.nixosModules.minecraft-servers ]; 4 4 5 5 services.minecraft-servers.servers.prismarine = { 6 - enable = false; 6 + enable = true; 7 7 autoStart = true; 8 8 enableReload = true; 9 9 package = pkgs.minecraftServers.vanilla-26_1;
+1 -2
modules/features/workstation-base.nix modules/features/bases/desktop.nix
··· 1 1 { inputs, ... }: 2 2 { 3 - flake.nixosModules.workstation-base = { pkgs, ... }: { 3 + flake.nixosModules.desktop-base = { pkgs, ... }: { 4 4 imports = with inputs.self.nixosModules; [ 5 5 bootloader 6 6 audio 7 - kde-desktop 8 7 ]; 9 8 10 9 environment.systemPackages = with pkgs; [
+27
modules/hosts/loki/_gamingstation.nix
··· 1 + { inputs, lib, config, pkgs, ... }: 2 + { 3 + imports = [ inputs.self.nixosModules.gaming ]; 4 + 5 + config = lib.mkIf (config.specialisation != {}) { 6 + # Autostart Steam Big Picture via systemd user service 7 + systemd.user.services.steam-big-picture = { 8 + description = "Steam Big Picture Mode"; 9 + wantedBy = [ "graphical-session.target" ]; 10 + after = [ "graphical-session.target" ]; 11 + wants = [ "graphical-session.target" ]; 12 + 13 + serviceConfig = { 14 + Type = "simple"; 15 + ExecStart = "${pkgs.steam}/bin/steam -tenfoot"; 16 + Restart = "on-failure"; 17 + RestartSec = 3; 18 + }; 19 + }; 20 + 21 + networking.firewall = { 22 + enable = true; 23 + allowedUDPPorts = [ 25565 ]; 24 + allowedTCPPorts = [ 25565 ]; 25 + }; 26 + }; 27 + }
+12
modules/hosts/loki/_workstation.nix
··· 1 + { inputs, ... }: 2 + { 3 + specialisation.workstation.configuration = { 4 + system.nixos.tags = [ "workstation" ]; 5 + 6 + imports = [ inputs.self.nixosModules.development ]; 7 + 8 + # Little workaround to disabled the default gaming station when in a 9 + # workstation specialisation. No distraction is allowed here! 10 + modules.gaming.enable = false; 11 + }; 12 + }
+17 -10
modules/hosts/loki/configuration.nix
··· 1 1 { inputs, ... }: 2 2 { 3 - flake.nixosModules.loki = { ... }: { 3 + flake.nixosModules.loki = { pkgs, ... }: { 4 4 imports = 5 5 with inputs.self.nixosModules; 6 6 with inputs.self.factory; 7 7 [ 8 - workstation-base 8 + desktop-base 9 9 nvidia-gpu 10 10 cosmeak 11 11 (autoLogin "cosmeak") 12 12 screen-recording 13 - gaming 14 13 flatpak 15 - development 14 + ./_gamingstation.nix 15 + ./_workstation.nix 16 16 ]; 17 17 18 18 nixpkgs.overlays = [ inputs.self.overlays.unstable ]; ··· 33 33 networking.networkmanager.enable = true; 34 34 services.printing.enable = false; 35 35 36 - networking.firewall = { 37 - enable = true; 38 - # Open ports for minecraft LAN 39 - allowedUDPPorts = [ 25565 ]; 40 - allowedTCPPorts = [ 25565 ]; 41 - }; 36 + # Gnone desktop - Temporary before transforming this PC into a gaming console with specializations 37 + services.displayManager.gdm.enable = true; 38 + services.desktopManager.gnome.enable = true; 39 + programs.xwayland.enable = true; 40 + environment.sessionVariables.NIXOS_OZONE_WL = "1"; 41 + qt.platformTheme = "gnome"; 42 + 43 + # We don't want extra packages, just the bare minimum 44 + services.gnome.games.enable = false; 45 + services.gnome.core-developer-tools.enable = false; 46 + services.gnome.core-apps.enable = true; 47 + environment.gnome.excludePackages = with pkgs; [ gnome-tour gnome-user-docs gnome-console gnome-software epiphany ]; 48 + environment.systemPackages = with pkgs; [ ghostty gnome-tweaks gnomeExtensions.no-overview ]; 42 49 }; 43 50 44 51 hosts.loki = {
+1
modules/hosts/nanna/configuration.nix
··· 52 52 53 53 # Enable printing 54 54 services.printing.enable = true; 55 + services.ipp-usb.enable = true; 55 56 56 57 # Localization 57 58 time.timeZone = "Europe/Paris";