flake.nix: restart pulseaudio after switching a config

This commit is contained in:
Dmitriy Pleshevskiy 2024-05-17 19:06:40 +03:00
parent 5def6f0b9e
commit da54985039
Signed by: pleshevskiy
GPG key ID: 17041163DA10A9A2

View file

@ -82,6 +82,9 @@
switch = lib.recurseIntoAttrs (lib.mapAttrs switch = lib.recurseIntoAttrs (lib.mapAttrs
(hostname: machine: pkgs.writeShellScript "switch/${hostname}" '' (hostname: machine: pkgs.writeShellScript "switch/${hostname}" ''
${nixos-rebuild}/bin/nixos-rebuild switch --flake .#${hostname} $@ ${nixos-rebuild}/bin/nixos-rebuild switch --flake .#${hostname} $@
${lib.optionalString machine.config.hardware.pulseaudio.systemWide ''
systemctl restart pulseaudio.service
''}
'') '')
localMachines); localMachines);
}); });