diff --git a/.github/labeler.yml b/.github/labeler.yml index 857c4c403..c1499a6fd 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -655,6 +655,7 @@ - any-glob-to-any-file: - modules/programs/ashell.nix - modules/programs/anyrun.nix + - modules/services/awww.nix - modules/programs/bemenu.nix - modules/programs/fuzzel.nix - modules/programs/hyprlock.nix @@ -688,7 +689,6 @@ - modules/services/swayidle.nix - modules/services/swaync.nix - modules/services/swayosd.nix - - modules/services/swww.nix - modules/services/walker.nix - modules/services/way-displays.nix - modules/services/wlsunset.nix diff --git a/modules/services/swww.nix b/modules/services/awww.nix similarity index 58% rename from modules/services/swww.nix rename to modules/services/awww.nix index 9da9b0f9c..e267921ed 100644 --- a/modules/services/swww.nix +++ b/modules/services/awww.nix @@ -5,14 +5,22 @@ ... }: let - cfg = config.services.swww; + cfg = config.services.awww; in { meta.maintainers = with lib.maintainers; [ hey2022 ]; - options.services.swww = { - enable = lib.mkEnableOption "swww, a Solution to your Wayland Wallpaper Woes"; - package = lib.mkPackageOption pkgs "swww" { }; + imports = ( + map (x: lib.mkRenamedOptionModule [ "services" "swww" x ] [ "services" "awww" x ]) [ + "enable" + "package" + "extraArgs" + ] + ); + + options.services.awww = { + enable = lib.mkEnableOption "awww, An Answer to your Wayland Wallpaper Woes"; + package = lib.mkPackageOption pkgs "awww" { }; extraArgs = lib.mkOption { type = lib.types.listOf lib.types.str; default = [ ]; @@ -22,34 +30,34 @@ in "bottom" ]; description = '' - Options given to swww-daemon when the service is run. + Options given to awww-daemon when the service is run. - See `swww-daemon --help` for more information. + See `awww-daemon --help` for more information. ''; }; }; config = lib.mkIf cfg.enable { assertions = [ - (lib.hm.assertions.assertPlatform "services.swww" pkgs lib.platforms.linux) + (lib.hm.assertions.assertPlatform "services.awww" pkgs lib.platforms.linux) ]; home.packages = [ cfg.package ]; - systemd.user.services.swww = { + systemd.user.services.awww = { Install = { WantedBy = [ config.wayland.systemd.target ]; }; Unit = { ConditionEnvironment = "WAYLAND_DISPLAY"; - Description = "swww-daemon"; + Description = "awww-daemon"; After = [ config.wayland.systemd.target ]; PartOf = [ config.wayland.systemd.target ]; }; Service = { - ExecStart = "${lib.getExe' cfg.package "swww-daemon"} ${lib.escapeShellArgs cfg.extraArgs}"; + ExecStart = "${lib.getExe' cfg.package "awww-daemon"} ${lib.escapeShellArgs cfg.extraArgs}"; Environment = [ "PATH=$PATH:${lib.makeBinPath [ cfg.package ]}" ]; diff --git a/tests/modules/services/awww/awww-graphical-session-target.nix b/tests/modules/services/awww/awww-graphical-session-target.nix new file mode 100644 index 000000000..e8f38b3dd --- /dev/null +++ b/tests/modules/services/awww/awww-graphical-session-target.nix @@ -0,0 +1,17 @@ +{ config, ... }: +{ + services.awww = { + enable = true; + package = config.lib.test.mkStubPackage { outPath = "@awww@"; }; + extraArgs = [ + "--no-cache" + "--layer" + "bottom" + ]; + }; + + nmt.script = '' + serviceFile=home-files/.config/systemd/user/awww.service + assertFileContent $serviceFile ${./awww-graphical-session-target.service} + ''; +} diff --git a/tests/modules/services/swww/swww-graphical-session-target.service b/tests/modules/services/awww/awww-graphical-session-target.service similarity index 62% rename from tests/modules/services/swww/swww-graphical-session-target.service rename to tests/modules/services/awww/awww-graphical-session-target.service index d4f664d6a..b2e32a72d 100644 --- a/tests/modules/services/swww/swww-graphical-session-target.service +++ b/tests/modules/services/awww/awww-graphical-session-target.service @@ -2,13 +2,13 @@ WantedBy=graphical-session.target [Service] -Environment=PATH=$PATH:@swww@/bin -ExecStart=@swww@/bin/swww-daemon --no-cache --layer bottom +Environment=PATH=$PATH:@awww@/bin +ExecStart=@awww@/bin/awww-daemon --no-cache --layer bottom Restart=always RestartSec=10 [Unit] After=graphical-session.target ConditionEnvironment=WAYLAND_DISPLAY -Description=swww-daemon +Description=awww-daemon PartOf=graphical-session.target diff --git a/tests/modules/services/swww/default.nix b/tests/modules/services/awww/default.nix similarity index 56% rename from tests/modules/services/swww/default.nix rename to tests/modules/services/awww/default.nix index abd39783a..916a7dccc 100644 --- a/tests/modules/services/swww/default.nix +++ b/tests/modules/services/awww/default.nix @@ -1,5 +1,5 @@ { lib, pkgs, ... }: lib.optionalAttrs pkgs.stdenv.hostPlatform.isLinux { - swww-graphical-session-target = ./swww-graphical-session-target.nix; + awww-graphical-session-target = ./awww-graphical-session-target.nix; } diff --git a/tests/modules/services/swww/swww-graphical-session-target.nix b/tests/modules/services/swww/swww-graphical-session-target.nix deleted file mode 100644 index c7bd2efa8..000000000 --- a/tests/modules/services/swww/swww-graphical-session-target.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ config, ... }: -{ - services.swww = { - enable = true; - package = config.lib.test.mkStubPackage { outPath = "@swww@"; }; - extraArgs = [ - "--no-cache" - "--layer" - "bottom" - ]; - }; - - nmt.script = '' - serviceFile=home-files/.config/systemd/user/swww.service - assertFileContent $serviceFile ${./swww-graphical-session-target.service} - ''; -}