nixos: remove forEachUser helper
This commit is contained in:
356
nixos/xmonad.nix
356
nixos/xmonad.nix
@@ -1,4 +1,4 @@
|
||||
{ config, pkgs, inputs, forEachUser, makeEnable, ... }:
|
||||
{ config, pkgs, inputs, makeEnable, ... }:
|
||||
makeEnable config "myModules.xmonad" true {
|
||||
nixpkgs.overlays = with inputs; [
|
||||
xmonad.overlay
|
||||
@@ -34,190 +34,191 @@ makeEnable config "myModules.xmonad" true {
|
||||
inputs.imalison-taffybar.defaultPackage."${pkgs.stdenv.hostPlatform.system}"
|
||||
];
|
||||
|
||||
home-manager.users = forEachUser {
|
||||
imports = [ ./dunst.nix ];
|
||||
home-manager.sharedModules = [
|
||||
{
|
||||
imports = [ ./dunst.nix ];
|
||||
|
||||
services.blueman-applet = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
services.taffybar = {
|
||||
enable = true;
|
||||
package = inputs.imalison-taffybar.defaultPackage."${pkgs.stdenv.hostPlatform.system}";
|
||||
};
|
||||
|
||||
services.kdeconnect = {
|
||||
enable = true;
|
||||
indicator = true;
|
||||
};
|
||||
|
||||
services.network-manager-applet.enable = true;
|
||||
|
||||
# Disable the XDG autostart for nm-applet since we're managing it via systemd.
|
||||
# The XDG autostart races with the systemd service and doesn't use --indicator.
|
||||
xdg.configFile."autostart/nm-applet.desktop".text = ''
|
||||
[Desktop Entry]
|
||||
Hidden=true
|
||||
'';
|
||||
|
||||
services.udiskie = {
|
||||
enable = true;
|
||||
tray = "always";
|
||||
};
|
||||
|
||||
services.status-notifier-watcher = {
|
||||
enable = true;
|
||||
flags = ["--log-level" "DEBUG"];
|
||||
};
|
||||
|
||||
services.autorandr.enable = true;
|
||||
|
||||
services.random-background = {
|
||||
enable = true;
|
||||
display = "fill";
|
||||
interval = "1h";
|
||||
imageDirectory = "/var/lib/syncthing/sync/Wallpaper/";
|
||||
};
|
||||
|
||||
services.xsettingsd.enable = true;
|
||||
|
||||
services.pasystray.enable = true;
|
||||
|
||||
# services.parcellite = {
|
||||
# enable = true;
|
||||
# package = pkgs.clipit;
|
||||
# };
|
||||
|
||||
services.flameshot = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
# Completely disable home-manager's picom - we manage everything ourselves
|
||||
# to work around the libconfig list vs array syntax issue for animations
|
||||
services.picom.enable = false;
|
||||
|
||||
# Our own picom systemd service
|
||||
systemd.user.services.picom = {
|
||||
Unit = {
|
||||
Description = "Picom X11 compositor";
|
||||
After = [ "graphical-session.target" ];
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
services.blueman-applet = {
|
||||
enable = true;
|
||||
};
|
||||
Service = {
|
||||
# Debug logging to file for monitoring
|
||||
ExecStart = "${pkgs.picom}/bin/picom --config %h/.config/picom/picom.conf --log-level=debug --log-file=%h/.local/share/picom/debug.log";
|
||||
Restart = "always";
|
||||
RestartSec = 3;
|
||||
|
||||
services.taffybar = {
|
||||
enable = true;
|
||||
package = inputs.imalison-taffybar.defaultPackage."${pkgs.stdenv.hostPlatform.system}";
|
||||
};
|
||||
Install = {
|
||||
WantedBy = [ "graphical-session.target" ];
|
||||
|
||||
services.kdeconnect = {
|
||||
enable = true;
|
||||
indicator = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Ensure log directory exists
|
||||
xdg.dataFile."picom/.keep".text = "";
|
||||
services.network-manager-applet.enable = true;
|
||||
|
||||
# Write complete picom config directly to avoid home-manager's libconfig generator
|
||||
# which incorrectly uses [] instead of () for the animations list
|
||||
xdg.configFile."picom/picom.conf" = {
|
||||
force = true; # Override home-manager's generated config
|
||||
text = ''
|
||||
# Backend and basic settings
|
||||
backend = "glx";
|
||||
vsync = ${if config.myModules.xmonad.picom.vSync.enable then "true" else "false"};
|
||||
# Disable the XDG autostart for nm-applet since we're managing it via systemd.
|
||||
# The XDG autostart races with the systemd service and doesn't use --indicator.
|
||||
xdg.configFile."autostart/nm-applet.desktop".text = ''
|
||||
[Desktop Entry]
|
||||
Hidden=true
|
||||
'';
|
||||
|
||||
# Spring physics animations (mainline picom with spring-physics branch)
|
||||
# Syntax: spring(stiffness, dampening, mass) or spring(stiffness, dampening, mass, clamping)
|
||||
# Set clamping to false for bounce/overshoot effects
|
||||
animations = (
|
||||
# Window move/resize animation with spring physics
|
||||
# "geometry" is alias for "size" + "position" triggers
|
||||
# Suppress opacity changes so they don't interrupt geometry animations
|
||||
{
|
||||
triggers = ["geometry"];
|
||||
suppressions = ["decrease-opacity", "increase-opacity"];
|
||||
offset-x = {
|
||||
curve = "spring(150, 18, 1.5, false)";
|
||||
start = "window-x-before - window-x";
|
||||
end = 0;
|
||||
};
|
||||
offset-y = {
|
||||
curve = "spring(150, 18, 1.5, false)";
|
||||
start = "window-y-before - window-y";
|
||||
end = 0;
|
||||
};
|
||||
scale-x = {
|
||||
curve = "spring(150, 18, 1.5, false)";
|
||||
start = "window-width-before / window-width";
|
||||
end = 1;
|
||||
};
|
||||
scale-y = {
|
||||
curve = "spring(150, 18, 1.5, false)";
|
||||
start = "window-height-before / window-height";
|
||||
end = 1;
|
||||
};
|
||||
},
|
||||
# Window open/show animation with spring physics
|
||||
{
|
||||
triggers = ["open", "show"];
|
||||
# Opacity uses spring with clamping to prevent going above 1
|
||||
opacity = {
|
||||
curve = "spring(150, 18, 1.5, true)";
|
||||
start = 0;
|
||||
end = "window-raw-opacity";
|
||||
};
|
||||
# Scale uses spring with bounce for a nice "pop" effect
|
||||
scale-x = {
|
||||
curve = "spring(150, 18, 1.5, false)";
|
||||
start = 0.85;
|
||||
end = 1;
|
||||
};
|
||||
scale-y = {
|
||||
curve = "spring(150, 18, 1.5, false)";
|
||||
start = 0.85;
|
||||
end = 1;
|
||||
};
|
||||
# Center the scaling effect
|
||||
offset-x = "(1 - scale-x) / 2 * window-width";
|
||||
offset-y = "(1 - scale-y) / 2 * window-height";
|
||||
},
|
||||
# Window close/hide animation with spring physics
|
||||
{
|
||||
triggers = ["close", "hide"];
|
||||
opacity = {
|
||||
curve = "spring(150, 18, 1.5, true)";
|
||||
start = "window-raw-opacity";
|
||||
end = 0;
|
||||
};
|
||||
scale-x = {
|
||||
curve = "spring(150, 18, 1.5, true)";
|
||||
start = 1;
|
||||
end = 0.9;
|
||||
};
|
||||
scale-y = {
|
||||
curve = "spring(150, 18, 1.5, true)";
|
||||
start = 1;
|
||||
end = 0.9;
|
||||
};
|
||||
# Center the scaling effect
|
||||
offset-x = "(1 - scale-x) / 2 * window-width";
|
||||
offset-y = "(1 - scale-y) / 2 * window-height";
|
||||
}
|
||||
);
|
||||
services.udiskie = {
|
||||
enable = true;
|
||||
tray = "always";
|
||||
};
|
||||
|
||||
# Fading
|
||||
fading = true;
|
||||
fade-in-step = 0.028;
|
||||
fade-out-step = 0.028;
|
||||
services.status-notifier-watcher = {
|
||||
enable = true;
|
||||
flags = ["--log-level" "DEBUG"];
|
||||
};
|
||||
|
||||
# Corners
|
||||
corner-radius = 10;
|
||||
round-borders = 0;
|
||||
rounded-corners-exclude = [
|
||||
"! name~='''",
|
||||
"window_type = 'dock'",
|
||||
"window_type = 'desktop'",
|
||||
"class_g ?= 'Dunst'"
|
||||
services.autorandr.enable = true;
|
||||
|
||||
services.random-background = {
|
||||
enable = true;
|
||||
display = "fill";
|
||||
interval = "1h";
|
||||
imageDirectory = "/var/lib/syncthing/sync/Wallpaper/";
|
||||
};
|
||||
|
||||
services.xsettingsd.enable = true;
|
||||
|
||||
services.pasystray.enable = true;
|
||||
|
||||
# services.parcellite = {
|
||||
# enable = true;
|
||||
# package = pkgs.clipit;
|
||||
# };
|
||||
|
||||
services.flameshot = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
# Completely disable home-manager's picom - we manage everything ourselves
|
||||
# to work around the libconfig list vs array syntax issue for animations
|
||||
services.picom.enable = false;
|
||||
|
||||
# Our own picom systemd service
|
||||
systemd.user.services.picom = {
|
||||
Unit = {
|
||||
Description = "Picom X11 compositor";
|
||||
After = [ "graphical-session.target" ];
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
};
|
||||
Service = {
|
||||
# Debug logging to file for monitoring
|
||||
ExecStart = "${pkgs.picom}/bin/picom --config %h/.config/picom/picom.conf --log-level=debug --log-file=%h/.local/share/picom/debug.log";
|
||||
Restart = "always";
|
||||
RestartSec = 3;
|
||||
};
|
||||
Install = {
|
||||
WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
};
|
||||
|
||||
# Ensure log directory exists
|
||||
xdg.dataFile."picom/.keep".text = "";
|
||||
|
||||
# Write complete picom config directly to avoid home-manager's libconfig generator
|
||||
# which incorrectly uses [] instead of () for the animations list
|
||||
xdg.configFile."picom/picom.conf" = {
|
||||
force = true; # Override home-manager's generated config
|
||||
text = ''
|
||||
# Backend and basic settings
|
||||
backend = "glx";
|
||||
vsync = ${if config.myModules.xmonad.picom.vSync.enable then "true" else "false"};
|
||||
|
||||
# Spring physics animations (mainline picom with spring-physics branch)
|
||||
# Syntax: spring(stiffness, dampening, mass) or spring(stiffness, dampening, mass, clamping)
|
||||
# Set clamping to false for bounce/overshoot effects
|
||||
animations = (
|
||||
# Window move/resize animation with spring physics
|
||||
# "geometry" is alias for "size" + "position" triggers
|
||||
# Suppress opacity changes so they don't interrupt geometry animations
|
||||
{
|
||||
triggers = ["geometry"];
|
||||
suppressions = ["decrease-opacity", "increase-opacity"];
|
||||
offset-x = {
|
||||
curve = "spring(150, 18, 1.5, false)";
|
||||
start = "window-x-before - window-x";
|
||||
end = 0;
|
||||
};
|
||||
offset-y = {
|
||||
curve = "spring(150, 18, 1.5, false)";
|
||||
start = "window-y-before - window-y";
|
||||
end = 0;
|
||||
};
|
||||
scale-x = {
|
||||
curve = "spring(150, 18, 1.5, false)";
|
||||
start = "window-width-before / window-width";
|
||||
end = 1;
|
||||
};
|
||||
scale-y = {
|
||||
curve = "spring(150, 18, 1.5, false)";
|
||||
start = "window-height-before / window-height";
|
||||
end = 1;
|
||||
};
|
||||
},
|
||||
# Window open/show animation with spring physics
|
||||
{
|
||||
triggers = ["open", "show"];
|
||||
# Opacity uses spring with clamping to prevent going above 1
|
||||
opacity = {
|
||||
curve = "spring(150, 18, 1.5, true)";
|
||||
start = 0;
|
||||
end = "window-raw-opacity";
|
||||
};
|
||||
# Scale uses spring with bounce for a nice "pop" effect
|
||||
scale-x = {
|
||||
curve = "spring(150, 18, 1.5, false)";
|
||||
start = 0.85;
|
||||
end = 1;
|
||||
};
|
||||
scale-y = {
|
||||
curve = "spring(150, 18, 1.5, false)";
|
||||
start = 0.85;
|
||||
end = 1;
|
||||
};
|
||||
# Center the scaling effect
|
||||
offset-x = "(1 - scale-x) / 2 * window-width";
|
||||
offset-y = "(1 - scale-y) / 2 * window-height";
|
||||
},
|
||||
# Window close/hide animation with spring physics
|
||||
{
|
||||
triggers = ["close", "hide"];
|
||||
opacity = {
|
||||
curve = "spring(150, 18, 1.5, true)";
|
||||
start = "window-raw-opacity";
|
||||
end = 0;
|
||||
};
|
||||
scale-x = {
|
||||
curve = "spring(150, 18, 1.5, true)";
|
||||
start = 1;
|
||||
end = 0.9;
|
||||
};
|
||||
scale-y = {
|
||||
curve = "spring(150, 18, 1.5, true)";
|
||||
start = 1;
|
||||
end = 0.9;
|
||||
};
|
||||
# Center the scaling effect
|
||||
offset-x = "(1 - scale-x) / 2 * window-width";
|
||||
offset-y = "(1 - scale-y) / 2 * window-height";
|
||||
}
|
||||
);
|
||||
|
||||
# Fading
|
||||
fading = true;
|
||||
fade-in-step = 0.028;
|
||||
fade-out-step = 0.028;
|
||||
|
||||
# Corners
|
||||
corner-radius = 10;
|
||||
round-borders = 0;
|
||||
rounded-corners-exclude = [
|
||||
"! name~='''",
|
||||
"window_type = 'dock'",
|
||||
"window_type = 'desktop'",
|
||||
"class_g ?= 'Dunst'"
|
||||
];
|
||||
round-borders-exclude = [
|
||||
"! name~='''"
|
||||
@@ -260,5 +261,6 @@ makeEnable config "myModules.xmonad" true {
|
||||
# RestartSec = 3;
|
||||
# };
|
||||
# };
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user