diff --git a/modules/services/misc/nixos-manual.nix b/modules/services/misc/nixos-manual.nix index 84c39101bb6c..2e98d50b0ced 100644 --- a/modules/services/misc/nixos-manual.nix +++ b/modules/services/misc/nixos-manual.nix @@ -73,19 +73,19 @@ in boot.extraTTYs = mkIf cfg.showManual ["tty${cfg.ttyNumber}"]; - jobs = mkIf cfg.showManual - { nixosManual = - { name = "nixos-manual"; - - description = "NixOS manual"; - - startOn = "started udev"; - - exec = - '' - ${cfg.browser} ${manual.manual}/share/doc/nixos/manual.html \ - < /dev/tty${toString cfg.ttyNumber} > /dev/tty${toString cfg.ttyNumber} 2>&1 - ''; + boot.systemd.services = optionalAttrs cfg.showManual + { "nixos-manual" = + { description = "NixOS Manual"; + wantedBy = [ "multi-user.target" ]; + serviceConfig = + { ExecStart = "${cfg.browser} ${manual.manual}/share/doc/nixos/manual.html"; + StandardInput = "tty"; + StandardOutput = "tty"; + TTYPath = "/dev/tty${cfg.ttyNumber}"; + TTYReset = true; + TTYVTDisallocate = true; + Restart = "always"; + }; }; }; diff --git a/modules/services/misc/rogue.nix b/modules/services/misc/rogue.nix index 059b39cad5e8..12d61a8ea9fd 100644 --- a/modules/services/misc/rogue.nix +++ b/modules/services/misc/rogue.nix @@ -50,6 +50,7 @@ in TTYPath = "/dev/${cfg.tty}"; TTYReset = true; TTYVTDisallocate = true; + Restart = "always"; }; };