File tree 2 files changed +12
-7
lines changed
tests/modules/services/swaync
2 files changed +12
-7
lines changed Original file line number Diff line number Diff line change 82
82
home . packages = [ cfg . package pkgs . at-spi2-core ] ;
83
83
84
84
xdg . configFile = {
85
- "swaync/config.json" = {
86
- source = jsonFormat . generate "config.json" cfg . settings ;
87
- onChange = "${ lib . getExe' cfg . package "swaync-client" } --reload-config" ;
88
- } ;
85
+ "swaync/config.json" . source =
86
+ jsonFormat . generate "config.json" cfg . settings ;
89
87
"swaync/style.css" = lib . mkIf ( cfg . style != null ) {
90
-
91
88
source = if builtins . isPath cfg . style || lib . isStorePath cfg . style then
92
89
cfg . style
93
90
else
94
91
pkgs . writeText "swaync/style.css" cfg . style ;
95
- onChange = "${ lib . getExe' cfg . package "swaync-client" } --reload-css" ;
96
92
} ;
97
93
} ;
98
94
103
99
PartOf = [ config . wayland . systemd . target ] ;
104
100
After = [ config . wayland . systemd . target ] ;
105
101
ConditionEnvironment = "WAYLAND_DISPLAY" ;
102
+ X-Restart-Triggers = lib . mkMerge [
103
+ [ config . xdg . configFile . "swaync/config.json" . source ]
104
+ ( lib . mkIf ( cfg . style != null )
105
+ [ config . xdg . configFile . "swaync/style.css" . source ] )
106
+ ] ;
106
107
} ;
107
108
108
109
Service = {
Original file line number Diff line number Diff line change 10
10
} ;
11
11
12
12
nmt . script = ''
13
+ serviceFile=home-files/.config/systemd/user/swaync.service
14
+ serviceFile=$(normalizeStorePaths $serviceFile)
15
+
13
16
assertFileContent \
14
- home-files/.config/systemd/user/swaync.service \
17
+ $serviceFile \
15
18
${
16
19
builtins . toFile "swaync.service" ''
17
20
[Install]
29
32
Description=Swaync notification daemon
30
33
Documentation=https://github.com/ErikReider/SwayNotificationCenter
31
34
PartOf=graphical-session.target
35
+ X-Restart-Triggers=/nix/store/00000000000000000000000000000000-config.json
32
36
''
33
37
}
34
38
'' ;
You can’t perform that action at this time.
0 commit comments