From ebfbca482724adb1eae537c74c59b64d92cf0cc3 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Tue, 3 Feb 2026 20:30:39 -0800 Subject: [PATCH] nixos: remove forEachUser helper --- nixos/base.nix | 2 +- nixos/bootstrap/flake.nix | 2 - nixos/configuration.nix | 2 +- nixos/desktop.nix | 2 + nixos/electron.nix | 34 +-- nixos/flake.nix | 2 - nixos/home-manager.nix | 16 -- nixos/hyprland.nix | 113 ++++++++ nixos/keybase.nix | 8 +- nixos/machines/adell.nix | 10 +- nixos/machines/bencbox.nix | 10 +- nixos/machines/biskcomp.nix | 10 +- nixos/machines/david-blade.nix | 10 +- nixos/machines/dean-zephyrus.nix | 10 +- nixos/machines/jay-lenovo-wsl.nix | 10 +- nixos/machines/jay-lenovo.nix | 10 +- nixos/machines/jimi-hendnix.nix | 10 +- nixos/machines/justin-bieber-creek.nix | 10 +- nixos/machines/nixquick.nix | 10 +- nixos/machines/railbird-sf.nix | 10 +- nixos/machines/ryzen-shine-original.nix | 10 +- nixos/machines/ryzen-shine-wsl.nix | 10 +- nixos/machines/ryzen-shine.nix | 10 +- nixos/machines/strixi-minaj-wsl.nix | 10 +- nixos/machines/strixi-minaj.nix | 10 +- nixos/nix.nix | 3 +- nixos/vscode.nix | 10 +- nixos/xmonad.nix | 356 ++++++++++++------------ 28 files changed, 421 insertions(+), 289 deletions(-) diff --git a/nixos/base.nix b/nixos/base.nix index 982eb93a..36641a90 100644 --- a/nixos/base.nix +++ b/nixos/base.nix @@ -1,4 +1,4 @@ -{ config, pkgs, forEachUser, makeEnable, realUsers, ... }: +{ config, pkgs, makeEnable, realUsers, ... }: makeEnable config "myModules.base" true { nixpkgs.config.permittedInsecurePackages = [ "electron-12.2.3" diff --git a/nixos/bootstrap/flake.nix b/nixos/bootstrap/flake.nix index 8c329744..4d3d0d8c 100644 --- a/nixos/bootstrap/flake.nix +++ b/nixos/bootstrap/flake.nix @@ -97,9 +97,7 @@ specialArgs = rec { inherit inputs machineNames; makeEnable = (import ../make-enable.nix) nixpkgs.lib; - mapValueToKeys = keys: value: builtins.listToAttrs (map (name: { inherit name value; }) keys); realUsers = [ "root" "imalison" "kat" "dean" "alex" "ben"]; - forEachUser = mapValueToKeys realUsers; } // specialArgs // (import ../keys.nix); }); in diff --git a/nixos/configuration.nix b/nixos/configuration.nix index c2af38af..2c56f95e 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -1,4 +1,4 @@ -{ config, lib, forEachUser, ... }: +{ config, lib, ... }: { imports = [ ./android.nix diff --git a/nixos/desktop.nix b/nixos/desktop.nix index 856ce732..3a729c9a 100644 --- a/nixos/desktop.nix +++ b/nixos/desktop.nix @@ -4,6 +4,7 @@ makeEnable config "myModules.desktop" true { imports = [ ./fonts.nix ./hyprland.nix + ./keyd.nix ]; services.xserver = { @@ -47,6 +48,7 @@ makeEnable config "myModules.desktop" true { # XOrg autorandr + keyd wmctrl xclip xdotool diff --git a/nixos/electron.nix b/nixos/electron.nix index 58a3ee0a..70fcca04 100644 --- a/nixos/electron.nix +++ b/nixos/electron.nix @@ -1,4 +1,4 @@ -{ pkgs, config, makeEnable, forEachUser, ... }: +{ pkgs, config, makeEnable, ... }: makeEnable config "myModules.electron" false { environment.systemPackages = with pkgs; [ element-desktop @@ -8,21 +8,23 @@ makeEnable config "myModules.electron" false { # keybase-gui zoom-us ]; - home-manager.users = forEachUser (if pkgs.stdenv.hostPlatform.system == "x86_64-linux" then { - # systemd.user.services.bitwarden = { - # Unit = { - # Description = "Bitwarden"; - # After = [ "graphical-session-pre.target" "tray.target" ]; - # PartOf = [ "graphical-session.target" ]; - # }; + home-manager.sharedModules = [ + (if pkgs.stdenv.hostPlatform.system == "x86_64-linux" then { + # systemd.user.services.bitwarden = { + # Unit = { + # Description = "Bitwarden"; + # After = [ "graphical-session-pre.target" "tray.target" ]; + # PartOf = [ "graphical-session.target" ]; + # }; - # Install = { WantedBy = [ "graphical-session.target" ]; }; + # Install = { WantedBy = [ "graphical-session.target" ]; }; - # Service = { - # ExecStart = "${pkgs.bitwarden}/bin/bitwarden"; - # Restart = "always"; - # RestartSec = 3; - # }; - # }; - } else {}); + # Service = { + # ExecStart = "${pkgs.bitwarden}/bin/bitwarden"; + # Restart = "always"; + # RestartSec = 3; + # }; + # }; + } else {}) + ]; } diff --git a/nixos/flake.nix b/nixos/flake.nix index f7a736d3..87faddc7 100644 --- a/nixos/flake.nix +++ b/nixos/flake.nix @@ -342,8 +342,6 @@ (_: value: (builtins.elem "isNormalUser" (builtins.attrNames value)) && value.isNormalUser) usersInfo.users.users) ); - mapAllKeysToValue = keys: value: builtins.listToAttrs (map (name: {inherit name value;}) keys); - forEachUser = mapAllKeysToValue realUsers; } // specialArgs; }; diff --git a/nixos/home-manager.nix b/nixos/home-manager.nix index b8393356..adef61f8 100644 --- a/nixos/home-manager.nix +++ b/nixos/home-manager.nix @@ -60,22 +60,6 @@ ''; }; - systemd.user.services.setxkbmap = { - Unit = { - Description = "Set up keyboard in X"; - After = [ "graphical-session-pre.target" ]; - PartOf = [ "graphical-session.target" ]; - }; - - Install = { WantedBy = [ "graphical-session.target" ]; }; - - Service = { - Type = "oneshot"; - RemainAfterExit = true; - ExecStart = "/usr/bin/env load_xkb_map"; - }; - }; - gtk = { enable = true; iconTheme = { diff --git a/nixos/hyprland.nix b/nixos/hyprland.nix index 2288ce82..a3aabb97 100644 --- a/nixos/hyprland.nix +++ b/nixos/hyprland.nix @@ -6,6 +6,119 @@ makeEnable config "myModules.hyprland" true { package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland; }; + home-manager.sharedModules = [ + { + # Wire the Hyprland config from dotfiles into ~/.config/hypr + xdg.configFile."hypr" = { + source = ../dotfiles/config/hypr; + recursive = true; + force = true; + }; + + programs.waybar = { + enable = true; + systemd.enable = true; + settings = [ + { + layer = "top"; + position = "top"; + height = 30; + "modules-left" = [ "hyprland/workspaces" ]; + "modules-center" = [ "hyprland/window" ]; + "modules-right" = [ "tray" "clock" ]; + + "hyprland/workspaces" = { + format = "{id}:{windows}"; + "format-window-separator" = " "; + "window-rewrite-default" = ""; + "window-rewrite" = { + "class" = ""; + "class" = ""; + "class" = ""; + "class" = ""; + "class" = ""; + "class" = ""; + "class" = ""; + "class" = ""; + "class" = ""; + }; + "persistent-workspaces" = { "*" = 10; }; + "all-outputs" = true; + "on-click" = "activate"; + }; + + "hyprland/window" = { + format = "{class}: {title}"; + "separate-outputs" = true; + }; + + tray = { + spacing = 8; + }; + + clock = { + format = "{:%a %b %d %I:%M:%S %p}"; + }; + } + ]; + style = '' + * { + border: none; + border-radius: 0; + font-family: "Roboto", "JetBrainsMono Nerd Font"; + font-size: 11pt; + min-height: 0; + } + + window#waybar { + background: rgba(24, 24, 24, 0.92); + color: #e6e6e6; + } + + #workspaces { + margin-left: 6px; + } + + #workspaces button { + padding: 0 8px; + margin: 4px 4px; + border-radius: 6px; + background: transparent; + color: #bfbfbf; + } + + #workspaces button.active { + background: #e0b45a; + color: #1c1c1c; + } + + #workspaces button.visible { + background: #3a3a3a; + color: #e6e6e6; + } + + #workspaces button.urgent { + background: #e06060; + color: #1c1c1c; + } + + #workspaces button.empty { + color: #777777; + } + + #window { + padding: 0 10px; + } + + #tray, + #clock { + padding: 0 10px; + } + ''; + }; + } + ]; + # Hyprland-specific packages environment.systemPackages = with pkgs; [ # Hyprland utilities diff --git a/nixos/keybase.nix b/nixos/keybase.nix index d7725ff4..3cac6f59 100644 --- a/nixos/keybase.nix +++ b/nixos/keybase.nix @@ -1,5 +1,5 @@ -{ forEachUser, ... }: { - home-manager.users = forEachUser { - services.kbfs.enable = true; - }; +{ ... }: { + home-manager.sharedModules = [ + { services.kbfs.enable = true; } + ]; } diff --git a/nixos/machines/adell.nix b/nixos/machines/adell.nix index f474a303..9980c3b8 100644 --- a/nixos/machines/adell.nix +++ b/nixos/machines/adell.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, inputs, forEachUser, ... }: +{ lib, pkgs, inputs, ... }: { imports = [ @@ -71,9 +71,11 @@ powerManagement.cpuFreqGovernor = lib.mkDefault "performance"; - home-manager.users = forEachUser { - home.stateVersion = "23.05"; - }; + home-manager.sharedModules = [ + { + home.stateVersion = "23.05"; + } + ]; system.stateVersion = "23.05"; } diff --git a/nixos/machines/bencbox.nix b/nixos/machines/bencbox.nix index 8aec1471..ed8a7e35 100644 --- a/nixos/machines/bencbox.nix +++ b/nixos/machines/bencbox.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, config, inputs, forEachUser, ... }: +{ lib, pkgs, config, inputs, ... }: { imports = [ ../configuration.nix @@ -18,9 +18,11 @@ wsl.defaultUser = "ben"; system.stateVersion = "22.05"; - home-manager.users = forEachUser { - home.stateVersion = "22.05"; - }; + home-manager.sharedModules = [ + { + home.stateVersion = "22.05"; + } + ]; users.users.ben = { extraGroups = [ diff --git a/nixos/machines/biskcomp.nix b/nixos/machines/biskcomp.nix index 0815a85c..509ad954 100644 --- a/nixos/machines/biskcomp.nix +++ b/nixos/machines/biskcomp.nix @@ -1,4 +1,4 @@ -{ pkgs, lib, forEachUser, config, ... }: +{ pkgs, lib, config, ... }: let biskcomp-nginx-hostnames = "192.168.1.44 railbird.ai 1896Folsom.duckdns.org biskcomp.local 0.0.0.0 67.162.131.71"; in { @@ -157,7 +157,9 @@ in networking.hostName = "biskcomp"; system.stateVersion = "23.11"; - home-manager.users = forEachUser { - home.stateVersion = "23.11"; - }; + home-manager.sharedModules = [ + { + home.stateVersion = "23.11"; + } + ]; } diff --git a/nixos/machines/david-blade.nix b/nixos/machines/david-blade.nix index 6a1871f3..4d091bd7 100644 --- a/nixos/machines/david-blade.nix +++ b/nixos/machines/david-blade.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, forEachUser, ... }: +{ config, lib, pkgs, ... }: { imports = [ @@ -53,9 +53,11 @@ networking.hostName = "david-blade"; - home-manager.users = forEachUser { - home.stateVersion = "24.05"; - }; + home-manager.sharedModules = [ + { + home.stateVersion = "24.05"; + } + ]; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; system.stateVersion = "24.05"; diff --git a/nixos/machines/dean-zephyrus.nix b/nixos/machines/dean-zephyrus.nix index fc417fe8..56e152e0 100644 --- a/nixos/machines/dean-zephyrus.nix +++ b/nixos/machines/dean-zephyrus.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, config, inputs, forEachUser, ... }: +{ lib, pkgs, config, inputs, ... }: { imports = [ ../configuration.nix @@ -15,7 +15,9 @@ wsl.defaultUser = "dean"; system.stateVersion = "22.05"; - home-manager.users = forEachUser { - home.stateVersion = "22.05"; - }; + home-manager.sharedModules = [ + { + home.stateVersion = "22.05"; + } + ]; } diff --git a/nixos/machines/jay-lenovo-wsl.nix b/nixos/machines/jay-lenovo-wsl.nix index 3b028a88..36d76b5d 100644 --- a/nixos/machines/jay-lenovo-wsl.nix +++ b/nixos/machines/jay-lenovo-wsl.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, config, inputs, forEachUser, ... }: +{ lib, pkgs, config, inputs, ... }: { imports = [ ../configuration.nix @@ -12,7 +12,9 @@ wsl.defaultUser = "kat"; system.stateVersion = "22.05"; - home-manager.users = forEachUser { - home.stateVersion = "22.05"; - }; + home-manager.sharedModules = [ + { + home.stateVersion = "22.05"; + } + ]; } diff --git a/nixos/machines/jay-lenovo.nix b/nixos/machines/jay-lenovo.nix index 1593ad65..6e5f082c 100644 --- a/nixos/machines/jay-lenovo.nix +++ b/nixos/machines/jay-lenovo.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, forEachUser, ... }: +{ config, lib, pkgs, ... }: { imports = [ @@ -55,7 +55,9 @@ system.stateVersion = "23.05"; - home-manager.users = forEachUser { - home.stateVersion = "23.05"; - }; + home-manager.sharedModules = [ + { + home.stateVersion = "23.05"; + } + ]; } diff --git a/nixos/machines/jimi-hendnix.nix b/nixos/machines/jimi-hendnix.nix index d7529a19..ed6582fe 100644 --- a/nixos/machines/jimi-hendnix.nix +++ b/nixos/machines/jimi-hendnix.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, forEachUser, ... }: +{ config, lib, pkgs, ... }: { imports = [ @@ -106,9 +106,11 @@ { device = "/dev/disk/by-uuid/598e9aa1-4940-4410-a2fa-3dfd8b7d2c0d"; } ]; - home-manager.users = forEachUser { - home.stateVersion = "23.11"; - }; + home-manager.sharedModules = [ + { + home.stateVersion = "23.11"; + } + ]; networking.hostName = "jimi-hendnix"; diff --git a/nixos/machines/justin-bieber-creek.nix b/nixos/machines/justin-bieber-creek.nix index 999231ec..9aa3c3f0 100644 --- a/nixos/machines/justin-bieber-creek.nix +++ b/nixos/machines/justin-bieber-creek.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, forEachUser, ... }: +{ config, lib, pkgs, ... }: { imports = [ @@ -201,7 +201,9 @@ system.stateVersion = "23.05"; - home-manager.users = forEachUser { - home.stateVersion = "23.05"; - }; + home-manager.sharedModules = [ + { + home.stateVersion = "23.05"; + } + ]; } diff --git a/nixos/machines/nixquick.nix b/nixos/machines/nixquick.nix index 62e57989..bc7bc25f 100644 --- a/nixos/machines/nixquick.nix +++ b/nixos/machines/nixquick.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, inputs, forEachUser, ... }: +{ config, lib, pkgs, inputs, ... }: { imports = [ ../configuration.nix @@ -62,9 +62,11 @@ services.xrdp.defaultWindowManager = "startplasma-x11"; services.xrdp.openFirewall = true; - home-manager.users = forEachUser { - home.stateVersion = "23.11"; - }; + home-manager.sharedModules = [ + { + home.stateVersion = "23.11"; + } + ]; system.stateVersion = "23.11"; } diff --git a/nixos/machines/railbird-sf.nix b/nixos/machines/railbird-sf.nix index 5b8bd902..a2b1b6f0 100644 --- a/nixos/machines/railbird-sf.nix +++ b/nixos/machines/railbird-sf.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, forEachUser, inputs, orgAgendaApiContainer ? null, orgAgendaApiImageName ? "org-agenda-api", ... }: +{ config, lib, pkgs, inputs, orgAgendaApiContainer ? null, orgAgendaApiImageName ? "org-agenda-api", ... }: { imports = [ ../configuration.nix @@ -86,9 +86,11 @@ powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; - home-manager.users = forEachUser { - home.stateVersion = "23.11"; - }; + home-manager.sharedModules = [ + { + home.stateVersion = "23.11"; + } + ]; system.stateVersion = "23.11"; } diff --git a/nixos/machines/ryzen-shine-original.nix b/nixos/machines/ryzen-shine-original.nix index 6aca1ed0..65b129c8 100644 --- a/nixos/machines/ryzen-shine-original.nix +++ b/nixos/machines/ryzen-shine-original.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, forEachUser, ... }: +{ lib, pkgs, ... }: { imports = [ @@ -93,9 +93,11 @@ # services.xrdp.openFirewall = true; system.stateVersion = "20.03"; - home-manager.users = forEachUser { - home.stateVersion = "21.05"; - }; + home-manager.sharedModules = [ + { + home.stateVersion = "21.05"; + } + ]; # users.extraUsers.dean.home = "/shared/dean"; } diff --git a/nixos/machines/ryzen-shine-wsl.nix b/nixos/machines/ryzen-shine-wsl.nix index 23cb09a5..c0b85f4a 100644 --- a/nixos/machines/ryzen-shine-wsl.nix +++ b/nixos/machines/ryzen-shine-wsl.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, config, inputs, forEachUser, ... }: +{ lib, pkgs, config, inputs, ... }: { imports = [ ../configuration.nix @@ -18,7 +18,9 @@ wsl.defaultUser = "imalison"; system.stateVersion = "22.05"; - home-manager.users = forEachUser { - home.stateVersion = "22.05"; - }; + home-manager.sharedModules = [ + { + home.stateVersion = "22.05"; + } + ]; } diff --git a/nixos/machines/ryzen-shine.nix b/nixos/machines/ryzen-shine.nix index 039c3700..f6888e9e 100644 --- a/nixos/machines/ryzen-shine.nix +++ b/nixos/machines/ryzen-shine.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, forEachUser, ... }: +{ lib, pkgs, ... }: { imports = [ @@ -83,9 +83,11 @@ # services.xrdp.openFirewall = true; system.stateVersion = "20.03"; - home-manager.users = forEachUser { - home.stateVersion = "21.05"; - }; + home-manager.sharedModules = [ + { + home.stateVersion = "21.05"; + } + ]; # users.extraUsers.dean.home = "/shared/dean"; } diff --git a/nixos/machines/strixi-minaj-wsl.nix b/nixos/machines/strixi-minaj-wsl.nix index 927cd938..e039becc 100644 --- a/nixos/machines/strixi-minaj-wsl.nix +++ b/nixos/machines/strixi-minaj-wsl.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, config, inputs, forEachUser, ... }: +{ lib, pkgs, config, inputs, ... }: { imports = [ ../configuration.nix @@ -11,9 +11,11 @@ wsl.defaultUser = "imalison"; system.stateVersion = "23.11"; # Did you read the comment? - home-manager.users = forEachUser { - home.stateVersion = "23.11"; - }; + home-manager.sharedModules = [ + { + home.stateVersion = "23.11"; + } + ]; programs.gnupg = { agent = { diff --git a/nixos/machines/strixi-minaj.nix b/nixos/machines/strixi-minaj.nix index debab6d5..ca25657a 100644 --- a/nixos/machines/strixi-minaj.nix +++ b/nixos/machines/strixi-minaj.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, inputs, forEachUser, ... }: +{ config, lib, pkgs, inputs, ... }: { imports = [ @@ -83,9 +83,11 @@ powerManagement.cpuFreqGovernor = lib.mkDefault "performance"; hardware.cpu.intel.updateMicrocode = lib.mkDefault true; - home-manager.users = forEachUser { - home.stateVersion = "23.05"; - }; + home-manager.sharedModules = [ + { + home.stateVersion = "23.05"; + } + ]; system.stateVersion = "23.05"; } diff --git a/nixos/nix.nix b/nixos/nix.nix index 680a8c8c..91169245 100644 --- a/nixos/nix.nix +++ b/nixos/nix.nix @@ -1,4 +1,4 @@ -{ inputs, specialArgs, config, lib, ... }: +{ inputs, specialArgs, config, lib, realUsers, ... }: { imports = [ inputs.home-manager.nixosModules.home-manager @@ -11,6 +11,7 @@ }; }; config = { + home-manager.users = lib.genAttrs realUsers (_: {}); home-manager.extraSpecialArgs = { nixos = { inherit specialArgs config; diff --git a/nixos/vscode.nix b/nixos/vscode.nix index c32e17a0..5f009b94 100644 --- a/nixos/vscode.nix +++ b/nixos/vscode.nix @@ -1,7 +1,7 @@ -{ inputs, config, makeEnable, forEachUser, ... }: +{ inputs, config, makeEnable, ... }: makeEnable config "myModules.vscode" true { - home-manager.users = forEachUser { - imports = [inputs.vscode-server.homeModules.default]; - services.vscode-server.enable = true; - }; + home-manager.sharedModules = [ + inputs.vscode-server.homeModules.default + { services.vscode-server.enable = true; } + ]; } diff --git a/nixos/xmonad.nix b/nixos/xmonad.nix index a1d7f8f5..f19e347d 100644 --- a/nixos/xmonad.nix +++ b/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; # }; # }; - }; + } + ]; }