diff options
Diffstat (limited to 'share/hm-modules')
| -rw-r--r-- | share/hm-modules/default.nix | 1 | ||||
| -rw-r--r-- | share/hm-modules/wpaperd.nix | 77 |
2 files changed, 0 insertions, 78 deletions
diff --git a/share/hm-modules/default.nix b/share/hm-modules/default.nix index c4ddc87..cc04898 100644 --- a/share/hm-modules/default.nix +++ b/share/hm-modules/default.nix @@ -2,6 +2,5 @@ { imports = [ ./hyprdesktop.nix - ./wpaperd.nix ]; } diff --git a/share/hm-modules/wpaperd.nix b/share/hm-modules/wpaperd.nix deleted file mode 100644 index 82aacb5..0000000 --- a/share/hm-modules/wpaperd.nix +++ /dev/null @@ -1,77 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -with lib; -let - cfg = config.services.wpaperd; - tomlFormat = pkgs.formats.toml { }; -in -{ - options.services.wpaperd = { - enable = mkEnableOption "enable wpaperd"; - - package = mkOption { - default = pkgs.wpaperd; - defaultText = literalExpression "pkgs.wpaperd"; - type = types.package; - example = literalExpression "pkgs.wpaperd"; - description = "The package to use for the wpaperd binary."; - }; - - settings = mkOption { - type = tomlFormat.type; - description = '' - Configuration for wpaperd. Options are specified on: - https://github.com/danyspin97/wpaperd#wallpaper-configuration - ''; - example = literalExpression '' - { - default = { - path = "/home/myusername/Pictures/Wallpapers/"; - duration = "10m" - sorting = "random"; - }; - } - ''; - }; - - systemdTarget = mkOption { - type = types.str; - default = "hyprland-session.target"; - description = '' - Systemd target to bind to. - Note: if you're using home-manager to configure hyprland, you want to - have `wayland.windowManager.hyprland.systemdIntegration` enabled. - ''; - }; - }; - - config = mkIf cfg.enable { - assertions = [ (hm.assertions.assertPlatform "services.wpaperd" pkgs platforms.linux) ]; - - home.packages = [ cfg.package ]; - - xdg.configFile = { - "wpaperd/wallpaper.toml" = mkIf (cfg.settings != { }) { - source = tomlFormat.generate "wpaperd-config" cfg.settings; - }; - }; - - systemd.user.services.wpaperd = { - Unit = { - Description = "Wallpaper daemon for Wayland"; - BindsTo = [ cfg.systemdTarget ]; - }; - - Service = { - Type = "simple"; - ExecStart = "${cfg.package}/bin/wpaperd"; - }; - - Install.WantedBy = [ cfg.systemdTarget ]; - }; - }; -} |
