mirror of
https://github.com/nix-community/home-manager.git
synced 2026-06-05 21:02:51 +00:00
awww: remove blank space after awww-daemon when extraArgs is empty
awww: split graphical-session-target test into awww-default and awww-extraArgs
This commit is contained in:
committed by
Austin Horstman
parent
5b6f55b784
commit
5ee3b3ef63
@@ -57,7 +57,12 @@ in
|
||||
};
|
||||
|
||||
Service = {
|
||||
ExecStart = "${lib.getExe' cfg.package "${cfg.package.meta.mainProgram}-daemon"} ${lib.escapeShellArgs cfg.extraArgs}";
|
||||
ExecStart = lib.escapeShellArgs (
|
||||
[
|
||||
(lib.getExe' cfg.package "${cfg.package.meta.mainProgram}-daemon")
|
||||
]
|
||||
++ cfg.extraArgs
|
||||
);
|
||||
Environment = [
|
||||
"PATH=$PATH:${lib.makeBinPath [ cfg.package ]}"
|
||||
];
|
||||
|
||||
16
tests/modules/services/awww/awww-default.nix
Normal file
16
tests/modules/services/awww/awww-default.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
{ config, ... }:
|
||||
{
|
||||
services.awww = {
|
||||
enable = true;
|
||||
package = config.lib.test.mkStubPackage {
|
||||
name = "awww";
|
||||
outPath = "@awww@";
|
||||
};
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
serviceFile=home-files/.config/systemd/user/awww.service
|
||||
assertFileExists $serviceFile
|
||||
assertFileContent $serviceFile ${./awww-default.service}
|
||||
'';
|
||||
}
|
||||
@@ -3,7 +3,7 @@ WantedBy=graphical-session.target
|
||||
|
||||
[Service]
|
||||
Environment=PATH=$PATH:@awww@/bin
|
||||
ExecStart=@awww@/bin/awww-daemon --no-cache --layer bottom
|
||||
ExecStart=@awww@/bin/awww-daemon
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
|
||||
nmt.script = ''
|
||||
serviceFile=home-files/.config/systemd/user/awww.service
|
||||
assertFileContent $serviceFile ${./awww-graphical-session-target.service}
|
||||
assertFileExists $serviceFile
|
||||
assertFileContains $serviceFile "ExecStart=@awww@/bin/awww-daemon --no-cache --layer bottom";
|
||||
'';
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
lib.optionalAttrs pkgs.stdenv.hostPlatform.isLinux {
|
||||
awww-graphical-session-target = ./awww-graphical-session-target.nix;
|
||||
awww-default = ./awww-default.nix;
|
||||
awww-extraArgs = ./awww-extraArgs.nix;
|
||||
awww-swww-package = ./awww-swww-package.nix;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user