feat: heheehee

This commit is contained in:
Kat Inskip 2025-07-14 09:33:32 -07:00
parent 6a1dce4b4e
commit a16524d215
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
6 changed files with 133 additions and 125 deletions

42
modules/home/konawall.nix Normal file
View file

@ -0,0 +1,42 @@
{ inputs, lib, pkgs, config, ... }: let
inherit (lib.options) mkOption mkEnableOption mkPackageOption;
inherit (lib.types) submodule path nullOr;
inherit (lib.modules) mkIf;
cfg = config.programs.konawall-py;
in {
options.programs.konawall-py = {
enable = mkEnableOption "konawall, the wallpaper manager";
package = mkPackageOption inputs.konawall-py.packages.${pkgs.system} "konawall-py" {};
settings = mkOption {
type = submodule {
freeformType = (pkgs.formats.toml {}).type;
};
default = {};
};
environmentFile = mkOption {
type = nullOr path;
default = null;
};
};
config = mkIf cfg.enable {
home.packages = [
cfg.package
];
xdg.configFile."konawall/config.toml".source = (pkgs.formats.toml {}).generate "konawall-config" cfg.settings;
systemd.user.services.konawall-py = {
Unit = {
Description = "konawall-py";
X-Restart-Triggers = [(toString config.xdg.configFile."konawall/config.toml".source)];
After = ["graphical-session.target" "network-online.target"];
};
Service = {
ExecStart = "${cfg.package}/bin/konawall";
Restart = "on-failure";
RestartSec = "1s";
EnvironmentFile = cfg.environmentFile;
};
Install = {WantedBy = ["graphical-session.target"];};
};
};
}