Make ensurePrinters more lenient
This commit is contained in:
parent
3758df0b3f
commit
83b848d56d
|
@ -31,23 +31,26 @@ in
|
||||||
machine-id.source = "/disk/persist/machine-id";
|
machine-id.source = "/disk/persist/machine-id";
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services."activate-home-manager" = {
|
systemd.services = {
|
||||||
path = [ pkgs.nix pkgs.dbus ];
|
ensure-printers.serviceConfig.SuccessExitStatus = "0 1";
|
||||||
script = ''
|
activate-home-manager = {
|
||||||
if [[ -e /home/maralorn/.mode ]]; then
|
path = [ pkgs.nix pkgs.dbus ];
|
||||||
MODE="$(cat /home/maralorn/.mode)"
|
script = ''
|
||||||
else
|
if [[ -e /home/maralorn/.mode ]]; then
|
||||||
MODE="default"
|
MODE="$(cat /home/maralorn/.mode)"
|
||||||
fi
|
else
|
||||||
/disk/volatile/maralorn/modes/$MODE/activate
|
MODE="default"
|
||||||
'';
|
fi
|
||||||
serviceConfig = {
|
/disk/volatile/maralorn/modes/$MODE/activate
|
||||||
Type = "oneshot";
|
'';
|
||||||
User = "maralorn";
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
User = "maralorn";
|
||||||
|
};
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
# Try to avoid race conditions, when the user get’s logged in before activation was completed.
|
||||||
|
before = [ "display-manager.service" ];
|
||||||
};
|
};
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
# Try to avoid race conditions, when the user get’s logged in before activation was completed.
|
|
||||||
before = [ "display-manager.service" ];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.tmpfiles.rules = [
|
systemd.tmpfiles.rules = [
|
||||||
|
@ -59,9 +62,7 @@ in
|
||||||
"z / 755 - - - -"
|
"z / 755 - - - -"
|
||||||
"Z /home/maralorn - maralorn users - -"
|
"Z /home/maralorn - maralorn users - -"
|
||||||
"d /disk/volatile/maralorn 700 maralorn users - -"
|
"d /disk/volatile/maralorn 700 maralorn users - -"
|
||||||
"d /disk/persist/cups - - - - -"
|
|
||||||
"d /tmp/scans/scans 777 ftp ftp - -"
|
"d /tmp/scans/scans 777 ftp ftp - -"
|
||||||
"L+ /var/lib/cups - - - - /disk/persist/cups"
|
|
||||||
"L+ /root/.ssh - - - - /disk/persist/root/.ssh"
|
"L+ /root/.ssh - - - - /disk/persist/root/.ssh"
|
||||||
"L+ /etc/ssh - - - - /disk/persist/etc/ssh"
|
"L+ /etc/ssh - - - - /disk/persist/etc/ssh"
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in a new issue