From 40539758569759c36757faf76b70231d7cffefbe Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Sun, 15 Jun 2025 21:52:27 +0200 Subject: [PATCH] woot, got it building, on to the next step --- flake.lock | 44 +++++++++++++++++++++ flake.nix | 2 +- hosts/tulkas/default.nix | 2 +- hosts/tulkas/users/chris/default.nix | 9 ----- lib/nixos.nix | 4 +- modules/home/desktop/applications/steam.nix | 8 ++-- modules/home/desktop/default.nix | 15 ++----- modules/home/themes/default.nix | 4 +- modules/system/desktop/gaming.nix | 13 ++++-- 9 files changed, 66 insertions(+), 35 deletions(-) diff --git a/flake.lock b/flake.lock index e8c6d88..86648e1 100644 --- a/flake.lock +++ b/flake.lock @@ -478,6 +478,27 @@ "type": "github" } }, + "jovian": { + "inputs": { + "nix-github-actions": "nix-github-actions", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1749627191, + "narHash": "sha256-bUv8CDE6Uyxak4UkOvRjx5xj6+msEHSpYGeAjkuTnTs=", + "owner": "Jovian-Experiments", + "repo": "Jovian-NixOS", + "rev": "f31df4cb6b2eeef6cf0113edb687297be72a69df", + "type": "github" + }, + "original": { + "owner": "Jovian-Experiments", + "repo": "Jovian-NixOS", + "type": "github" + } + }, "lib-aggregate": { "inputs": { "flake-utils": "flake-utils", @@ -533,6 +554,28 @@ "type": "github" } }, + "nix-github-actions": { + "inputs": { + "nixpkgs": [ + "jovian", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1729697500, + "narHash": "sha256-VFTWrbzDlZyFHHb1AlKRiD/qqCJIripXKiCSFS8fAOY=", + "owner": "zhaofengli", + "repo": "nix-github-actions", + "rev": "e418aeb728b6aa5ca8c5c71974e7159c2df1d8cf", + "type": "github" + }, + "original": { + "owner": "zhaofengli", + "ref": "matrix-name", + "repo": "nix-github-actions", + "type": "github" + } + }, "nix-minecraft": { "inputs": { "flake-compat": "flake-compat_3", @@ -822,6 +865,7 @@ "flux": "flux", "himmelblau": "himmelblau", "home-manager": "home-manager", + "jovian": "jovian", "nix-minecraft": "nix-minecraft", "nixos-boot": "nixos-boot", "nixpkgs": "nixpkgs_5", diff --git a/flake.nix b/flake.nix index a95bc4c..c200d0d 100644 --- a/flake.nix +++ b/flake.nix @@ -45,7 +45,7 @@ jovian = { url = "github:Jovian-Experiments/Jovian-NixOS"; - inputs.nixpkgs.follows = "nixpkgs-unstable"; + inputs.nixpkgs.follows = "nixpkgs"; }; }; diff --git a/hosts/tulkas/default.nix b/hosts/tulkas/default.nix index c93e25f..42187aa 100644 --- a/hosts/tulkas/default.nix +++ b/hosts/tulkas/default.nix @@ -3,7 +3,7 @@ modules = { system.audio.enable = true; - gaming.enable = true; + desktop.gaming.enable = true; root = { user = { diff --git a/hosts/tulkas/users/chris/default.nix b/hosts/tulkas/users/chris/default.nix index 2d0cfed..7c7e54e 100644 --- a/hosts/tulkas/users/chris/default.nix +++ b/hosts/tulkas/users/chris/default.nix @@ -13,15 +13,6 @@ }; desktop = { - plasma = { - enable = true; - autoLogin = true; - }; - - applications = { - steam.enable = true; - }; - terminal = { default = "ghostty"; ghostty.enable = true; diff --git a/lib/nixos.nix b/lib/nixos.nix index 610657f..b99ffaf 100644 --- a/lib/nixos.nix +++ b/lib/nixos.nix @@ -42,7 +42,7 @@ in rec }) (filterAttrs (n: v: !elem n ["system"]) attrs) (import path) - (args@{ ... }: { + (args@{ inputs, lib, pkgs, config, options, ... }: { imports = mapModulesRec' ../modules/home (file: (import file (args // { user = "root"; }))); }) ({...}: { @@ -61,7 +61,7 @@ in rec }; }) ] - ++ (map (user: (args@{ ... }: { + ++ (map (user: (args@{ inputs, lib, pkgs, config, options, ... }: { imports = mapModulesRec' ../modules/home (file: (import file (args // { inherit user; }))); config.modules.${user} = (import "${path}/users/${user}/default.nix" args); diff --git a/modules/home/desktop/applications/steam.nix b/modules/home/desktop/applications/steam.nix index f40ef0e..7f483e7 100644 --- a/modules/home/desktop/applications/steam.nix +++ b/modules/home/desktop/applications/steam.nix @@ -1,14 +1,12 @@ -{ options, config, lib, pkgs, user, ... }: +{ config, lib, pkgs, user, ... }: let - inherit (lib.modules) mkIf mkForce mkMerge; + inherit (lib) mkEnableOption mkIf mkForce mkMerge; cfg = config.modules.${user}.desktop.applications.steam; desktop = config.modules.${user}.desktop; in { - options.modules.${user}.desktop.applications.steam = let - inherit (lib.options) mkEnableOption; - in { + options.modules.${user}.desktop.applications.steam = { enable = mkEnableOption "Enable steam, the game/software store"; hardware.enable = mkEnableOption "Support for steam hardware"; }; diff --git a/modules/home/desktop/default.nix b/modules/home/desktop/default.nix index 718a5c7..d281f4e 100644 --- a/modules/home/desktop/default.nix +++ b/modules/home/desktop/default.nix @@ -1,17 +1,10 @@ -{ config, options, lib, pkgs, user, ... }: +{ lib, user, ... }: let - inherit (builtins) isAttrs; - inherit (lib.attrsets) attrValues; - inherit (lib.modules) mkIf mkMerge; - inherit (lib.my) anyAttrs countAttrs value; - - cfg = config.modules.${user}.desktop; + inherit (lib.types) either str; + inherit (lib.my) mkOpt; in { - options.modules.${user}.desktop = let - inherit (lib.types) either str; - inherit (lib.my) mkOpt; - in { + options.modules.${user}.desktop = { type = mkOpt (either str null) "wayland"; }; } diff --git a/modules/home/themes/default.nix b/modules/home/themes/default.nix index 50d8ac7..547856f 100644 --- a/modules/home/themes/default.nix +++ b/modules/home/themes/default.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, user, ... }: let - inherit (lib) mkIf; + inherit (lib) mkIf mkDefault; inherit (lib.options) mkOption mkEnableOption; inherit (lib.types) nullOr enum; @@ -31,7 +31,7 @@ in { base16Scheme = "${pkgs.base16-schemes}/share/themes/${cfg.theme}.yaml"; image = ./${cfg.theme}.jpg; polarity = cfg.polarity; - targets.qt.platform = "kde6"; + targets.qt.platform = mkDefault "kde6"; }; }; } diff --git a/modules/system/desktop/gaming.nix b/modules/system/desktop/gaming.nix index ea37d1f..b383dd4 100644 --- a/modules/system/desktop/gaming.nix +++ b/modules/system/desktop/gaming.nix @@ -11,10 +11,15 @@ in }; config = mkIf cfg.enable { - jovian.steam = { - enable = true; - autoStart = true; - + jovian = { + steam = { + enable = true; + autoStart = true; + user = "chris"; + updater.splash = "steamos"; + desktopSession = "gamescope-wayland"; + }; + steamos.useSteamOSConfig = true; }; }; }