nixos/hosts/FredOS-Gaming.nix

62 lines
1.8 KiB
Nix
Raw Normal View History

2025-12-02 21:21:42 +00:00
{ config, pkgs, lib, ... }:
2025-12-09 15:50:12 +00:00
2025-12-09 15:51:15 +00:00
# The outer curly braces define the attribute set returned by the module.
# Since we are using lib.mkIf, we'll use lib.mkMerge to allow the attribute set
# to be merged with any other configuration (if you had other files).
# The simplest approach is often to wrap the *entire* definition in lib.mkIf.
2025-12-09 15:50:12 +00:00
(lib.mkIf (config.networking.hostName == "FredOS-Gaming") {
2025-12-09 15:18:11 +00:00
2025-12-09 15:51:15 +00:00
    # 1. Define the 32-bit package set (lib32)
2025-12-09 15:48:18 +00:00
    nixpkgs.config.packageOverrides = pkgs: {
      pkgs = pkgs // {
        lib32 = pkgs.pkgsi686Linux.pkgs;
      };
    };
2025-12-09 15:50:46 +00:00
    
2025-12-09 15:51:15 +00:00
    # 2. Use the packages
2025-12-09 15:48:18 +00:00
    environment.systemPackages = with pkgs; [
      lutris
      adwaita-icon-theme
      nix-index
      libdecor
2025-12-09 15:51:15 +00:00
      pkgs.lib32.libdecor # <--- CORRECT: Access via pkgs.lib32
2025-12-09 15:48:18 +00:00
    ];
2025-12-09 13:00:24 +00:00
2025-12-09 15:51:15 +00:00
    # 3. Graphics configuration
2025-12-09 15:48:18 +00:00
    hardware.graphics = {
      enable = true;
      enable32Bit = true;
    };
2025-12-09 15:18:11 +00:00
2025-12-09 15:51:15 +00:00
    # 4. Steam configuration
2025-12-09 15:48:18 +00:00
    programs.steam = {
      enable = true;
      remotePlay.openFirewall = true;
      package = pkgs.steam.override {
        extraPkgs = pkgs: with pkgs; [
          kdePackages.breeze
        ];
      };
    };
2025-12-09 13:00:24 +00:00
2025-12-09 15:51:15 +00:00
    # 5. Environment Variables
2025-12-09 15:48:18 +00:00
    environment.sessionVariables = {
      LIBDECOR_PLUGIN_DIR = "${pkgs.libdecor}/lib/libdecor/plugins-1";
      GTK_PATH = "${pkgs.gtk3}/lib/gtk-3.0:${pkgs.gtk4}/lib/gtk-4.0";
    };
2025-12-09 13:14:16 +00:00
2025-12-09 15:51:15 +00:00
    # 6. Auto-Upgrade configuration
2025-12-09 15:48:18 +00:00
    system.autoUpgrade = {
      enable = true;
      dates = "daily";
      persistent = true;
      allowReboot = false;
      flags = [
        "--upgrade"
        "--option" "tarball-ttl" "0"
      ];
    };
2025-12-09 15:51:15 +00:00
# This closing brace and parenthesis ends the attribute set and the lib.mkIf function call
2025-12-09 15:50:46 +00:00
})