From 4f6d65316ada3e1d3711b83bcf0b065cb28964e9 Mon Sep 17 00:00:00 2001 From: John Ogle Date: Wed, 19 Nov 2025 19:41:34 -0800 Subject: [PATCH] Fixes for stable systems --- flake.nix | 2 +- machines/zix790prors/configuration.nix | 1 - roles/jovian-compat.nix | 53 ++++++++++++++++++-------- roles/remote-build/default.nix | 5 +++ 4 files changed, 43 insertions(+), 18 deletions(-) diff --git a/flake.nix b/flake.nix index 3d4d47c..55126df 100644 --- a/flake.nix +++ b/flake.nix @@ -48,8 +48,8 @@ nixosModules = [ ./roles ] ++ [ + ./roles/jovian-compat.nix inputs.home-manager.nixosModules.home-manager - inputs.jovian.nixosModules.jovian { nixpkgs.overlays = [ (final: prev: { diff --git a/machines/zix790prors/configuration.nix b/machines/zix790prors/configuration.nix index 30f26df..93c09d1 100644 --- a/machines/zix790prors/configuration.nix +++ b/machines/zix790prors/configuration.nix @@ -19,7 +19,6 @@ with lib; enable = true; gaming = { enable = true; - emulation = true; }; kde = true; sddm = true; diff --git a/roles/jovian-compat.nix b/roles/jovian-compat.nix index 89d8093..9cf85e1 100644 --- a/roles/jovian-compat.nix +++ b/roles/jovian-compat.nix @@ -1,8 +1,9 @@ { lib, config, ... }: -# Compatibility shim to provide services.logind.settings for NixOS 25.05 -# This allows Jovian-NixOS to work with stable NixOS -# REMOVE THIS FILE when upgrading to NixOS 25.11 or later +# Minimal Jovian compatibility layer for NixOS stable (25.05) +# Defines only the Jovian options used by roles/desktop/steamos.nix +# No actual implementation - just option definitions to prevent evaluation errors +# REMOVE THIS FILE when all systems are on NixOS 25.11+ or unstable with lib; @@ -11,10 +12,32 @@ let isCompatibleVersion = versionOlder nixosVersion "25.11"; in { - options.services.logind.settings = mkOption { - type = types.attrsOf (types.attrsOf types.anything); - default = {}; - description = "systemd-logind configuration. See logind.conf(5) for available options."; + options.jovian = { + steam = { + enable = mkEnableOption "Steam (jovian-compat stub)"; + + autoStart = mkOption { + type = types.bool; + default = false; + description = "Auto-start Steam (jovian-compat stub)"; + }; + + user = mkOption { + type = types.str; + default = "user"; + description = "Steam user (jovian-compat stub)"; + }; + + desktopSession = mkOption { + type = types.nullOr types.str; + default = null; + description = "Desktop session (jovian-compat stub)"; + }; + }; + + decky-loader = { + enable = mkEnableOption "Decky Loader (jovian-compat stub)"; + }; }; config = mkMerge [ @@ -25,19 +48,17 @@ in message = '' The Jovian compatibility shim (roles/jovian-compat.nix) is only needed for NixOS 25.05 and earlier. You are running NixOS ${nixosVersion}. - Please remove 'roles/jovian-compat.nix' from your flake.nix imports. + Please remove 'roles/jovian-compat.nix' from your flake.nix nixosModules list. ''; } ]; } - (mkIf (config.services.logind.settings != {}) { - # Convert the settings to extraConfig format for older NixOS - services.logind.extraConfig = let - mkSection = section: settings: - "[${section}]\n" + - (concatStringsSep "\n" (mapAttrsToList (k: v: "${k}=${toString v}") settings)); - in - concatStringsSep "\n\n" (mapAttrsToList mkSection config.services.logind.settings); + # No config implementation - these options do nothing on stable systems + # steamos role is only enabled on nix-deck which uses unstable anyway + (mkIf config.jovian.steam.enable { + warnings = [ + "Jovian is enabled but you're using the compatibility stub. This won't work correctly. Use NixOS unstable for Jovian support." + ]; }) ]; } diff --git a/roles/remote-build/default.nix b/roles/remote-build/default.nix index 146f5c1..0ae5600 100644 --- a/roles/remote-build/default.nix +++ b/roles/remote-build/default.nix @@ -91,6 +91,11 @@ in users.groups.${cfg.builderUser} = {}; + # Ensure home directory has correct permissions + systemd.tmpfiles.rules = [ + "d /var/lib/${cfg.builderUser} 0700 ${cfg.builderUser} ${cfg.builderUser} -" + ]; + # Allow builder user to perform builds nix.settings.trusted-users = [ cfg.builderUser ];