Files
nixos-configs/roles/jovian-compat.nix
John Ogle 2283b0a6df Add Steam Deck (nix-deck) configuration with Jovian-NixOS and remote building
- Add Jovian-NixOS integration for Steam Deck hardware support
- Create nix-deck machine configuration with SteamOS role
- Add jovian-compat.nix for NixOS 25.05 compatibility (remove in 25.11+)
- Create remote-build role for distributed builds
- Configure zix790prors as build host
- Configure nix-book and nix-deck to use remote builder with fallback
- Add comprehensive setup documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 16:06:20 -08:00

44 lines
1.4 KiB
Nix

{ 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
with lib;
let
nixosVersion = config.system.nixos.release;
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.";
};
config = mkMerge [
{
assertions = [
{
assertion = isCompatibleVersion;
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.
'';
}
];
}
(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);
})
];
}