Compare commits
2 Commits
0b8e3bf527
...
nix-deck-s
| Author | SHA1 | Date | |
|---|---|---|---|
| a9772259f0 | |||
| 4f6d65316a |
@@ -48,8 +48,8 @@
|
|||||||
nixosModules = [
|
nixosModules = [
|
||||||
./roles
|
./roles
|
||||||
] ++ [
|
] ++ [
|
||||||
|
./roles/jovian-compat.nix
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
inputs.jovian.nixosModules.jovian
|
|
||||||
{
|
{
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
(final: prev: {
|
(final: prev: {
|
||||||
|
|||||||
@@ -87,8 +87,8 @@ let
|
|||||||
|
|
||||||
"${shared_config.modifier}+r" = "mode resize";
|
"${shared_config.modifier}+r" = "mode resize";
|
||||||
|
|
||||||
"XF86MonBrightnessUp" = "exec brightnessctl s +5%";
|
"XF86MonBrightnessUp" = "exec ddcutil setvcp 10 + 5";
|
||||||
"XF86MonBrightnessDown" = "exec brightnessctl s 5%-";
|
"XF86MonBrightnessDown" = "exec ddcutil setvcp 10 - 5";
|
||||||
};
|
};
|
||||||
} cfg.extraSharedConfig;
|
} cfg.extraSharedConfig;
|
||||||
in {
|
in {
|
||||||
@@ -149,11 +149,21 @@ in {
|
|||||||
|
|
||||||
[backlight]
|
[backlight]
|
||||||
command=${pkgs.writeShellScript "i3blocks-backlight" ''
|
command=${pkgs.writeShellScript "i3blocks-backlight" ''
|
||||||
if command -v brightnessctl &>/dev/null; then
|
if command -v ddcutil &>/dev/null; then
|
||||||
brightnessctl g | awk -v max=$(brightnessctl m) '{printf "☀️ %.0f%%\n", ($1/max)*100}'
|
# Handle mouse scroll events
|
||||||
|
case $BLOCK_BUTTON in
|
||||||
|
4) ddcutil setvcp 10 + 5 ;; # Scroll up - increase brightness
|
||||||
|
5) ddcutil setvcp 10 - 5 ;; # Scroll down - decrease brightness
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Display current brightness
|
||||||
|
brightness=$(ddcutil getvcp 10 2>/dev/null | grep -oP 'current value =\s*\K\d+')
|
||||||
|
if [ -n "$brightness" ]; then
|
||||||
|
echo "☀️ $brightness%"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
''}
|
''}
|
||||||
interval=1
|
interval=5
|
||||||
separator=true
|
separator=true
|
||||||
|
|
||||||
[network]
|
[network]
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ with lib;
|
|||||||
enable = true;
|
enable = true;
|
||||||
gaming = {
|
gaming = {
|
||||||
enable = true;
|
enable = true;
|
||||||
emulation = true;
|
|
||||||
};
|
};
|
||||||
kde = true;
|
kde = true;
|
||||||
sddm = true;
|
sddm = true;
|
||||||
|
|||||||
@@ -19,8 +19,20 @@ in
|
|||||||
polkit_gnome # GNOME polkit authentication agent (more stable with i3)
|
polkit_gnome # GNOME polkit authentication agent (more stable with i3)
|
||||||
picom # Compositor for smooth rendering (important for Nvidia)
|
picom # Compositor for smooth rendering (important for Nvidia)
|
||||||
networkmanagerapplet # NetworkManager system tray applet
|
networkmanagerapplet # NetworkManager system tray applet
|
||||||
|
ddcutil # DDC/CI monitor control for brightness
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Enable DDC/CI support for monitor brightness control
|
||||||
|
boot.kernelModules = [ "i2c-dev" ];
|
||||||
|
|
||||||
|
# Add ddcutil udev rules and user permissions
|
||||||
|
hardware.i2c.enable = true;
|
||||||
|
|
||||||
|
# Install ddcutil system-wide
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
ddcutil
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
{ lib, config, ... }:
|
{ lib, config, ... }:
|
||||||
|
|
||||||
# Compatibility shim to provide services.logind.settings for NixOS 25.05
|
# Minimal Jovian compatibility layer for NixOS stable (25.05)
|
||||||
# This allows Jovian-NixOS to work with stable NixOS
|
# Defines only the Jovian options used by roles/desktop/steamos.nix
|
||||||
# REMOVE THIS FILE when upgrading to NixOS 25.11 or later
|
# 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;
|
with lib;
|
||||||
|
|
||||||
@@ -11,10 +12,32 @@ let
|
|||||||
isCompatibleVersion = versionOlder nixosVersion "25.11";
|
isCompatibleVersion = versionOlder nixosVersion "25.11";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.services.logind.settings = mkOption {
|
options.jovian = {
|
||||||
type = types.attrsOf (types.attrsOf types.anything);
|
steam = {
|
||||||
default = {};
|
enable = mkEnableOption "Steam (jovian-compat stub)";
|
||||||
description = "systemd-logind configuration. See logind.conf(5) for available options.";
|
|
||||||
|
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 [
|
config = mkMerge [
|
||||||
@@ -25,19 +48,17 @@ in
|
|||||||
message = ''
|
message = ''
|
||||||
The Jovian compatibility shim (roles/jovian-compat.nix) is only needed for NixOS 25.05 and earlier.
|
The Jovian compatibility shim (roles/jovian-compat.nix) is only needed for NixOS 25.05 and earlier.
|
||||||
You are running NixOS ${nixosVersion}.
|
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 != {}) {
|
# No config implementation - these options do nothing on stable systems
|
||||||
# Convert the settings to extraConfig format for older NixOS
|
# steamos role is only enabled on nix-deck which uses unstable anyway
|
||||||
services.logind.extraConfig = let
|
(mkIf config.jovian.steam.enable {
|
||||||
mkSection = section: settings:
|
warnings = [
|
||||||
"[${section}]\n" +
|
"Jovian is enabled but you're using the compatibility stub. This won't work correctly. Use NixOS unstable for Jovian support."
|
||||||
(concatStringsSep "\n" (mapAttrsToList (k: v: "${k}=${toString v}") settings));
|
];
|
||||||
in
|
|
||||||
concatStringsSep "\n\n" (mapAttrsToList mkSection config.services.logind.settings);
|
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -91,6 +91,11 @@ in
|
|||||||
|
|
||||||
users.groups.${cfg.builderUser} = {};
|
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
|
# Allow builder user to perform builds
|
||||||
nix.settings.trusted-users = [ cfg.builderUser ];
|
nix.settings.trusted-users = [ cfg.builderUser ];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user