From d2b62c9d6f30a0ea88b2a235cde120cd10ba332b Mon Sep 17 00:00:00 2001 From: Ryan Schanzenbacher Date: Sat, 11 Jul 2026 22:14:43 -0400 Subject: Sketchybar now, got tired of the battery issue --- modules/darwin/random-wallpaper/default.nix | 29 +++++++++++++++++++++++++++++ modules/darwin/random-wallpaper/module.nix | 29 ----------------------------- 2 files changed, 29 insertions(+), 29 deletions(-) create mode 100644 modules/darwin/random-wallpaper/default.nix delete mode 100644 modules/darwin/random-wallpaper/module.nix (limited to 'modules/darwin') diff --git a/modules/darwin/random-wallpaper/default.nix b/modules/darwin/random-wallpaper/default.nix new file mode 100644 index 0000000..b20ce88 --- /dev/null +++ b/modules/darwin/random-wallpaper/default.nix @@ -0,0 +1,29 @@ +{ config, lib, pkgs, ... }: +let + cfg = config.local.randomWallpaper; + wallpaper-agent-src = ./wallpaper-daemon.swift; +in +{ + options.local.randomWallpaper = { + enable = lib.mkEnableOption "Random Rotating Wallpaper"; + directory = lib.mkOption { + type = lib.types.str; + description = "Folder containing images"; + }; + interval = lib.mkOption { + type = lib.types.int; + default = 1800; + description = "Seconds between wallpaper changes"; + }; + }; + + config = lib.mkIf cfg.enable { + launchd.user.agents.random-wallpaper.serviceConfig = { + Label = "org.rschanz.wallpaperDaemon"; + ProgramArguments = [ "/usr/bin/swift" "${wallpaper-agent-src}" "${cfg.directory}" "${builtins.toString cfg.interval}" ]; + RunAtLoad = true; + KeepAlive = true; + ProcessType = "Background"; + }; + }; +} diff --git a/modules/darwin/random-wallpaper/module.nix b/modules/darwin/random-wallpaper/module.nix deleted file mode 100644 index b20ce88..0000000 --- a/modules/darwin/random-wallpaper/module.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ config, lib, pkgs, ... }: -let - cfg = config.local.randomWallpaper; - wallpaper-agent-src = ./wallpaper-daemon.swift; -in -{ - options.local.randomWallpaper = { - enable = lib.mkEnableOption "Random Rotating Wallpaper"; - directory = lib.mkOption { - type = lib.types.str; - description = "Folder containing images"; - }; - interval = lib.mkOption { - type = lib.types.int; - default = 1800; - description = "Seconds between wallpaper changes"; - }; - }; - - config = lib.mkIf cfg.enable { - launchd.user.agents.random-wallpaper.serviceConfig = { - Label = "org.rschanz.wallpaperDaemon"; - ProgramArguments = [ "/usr/bin/swift" "${wallpaper-agent-src}" "${cfg.directory}" "${builtins.toString cfg.interval}" ]; - RunAtLoad = true; - KeepAlive = true; - ProcessType = "Background"; - }; - }; -} -- cgit v1.3