summary refs log tree commit diff
path: root/nixos/modules/services/ttys
diff options
context:
space:
mode:
authorPierre Bourdon <delroth@gmail.com>2020-08-05 07:19:18 +0200
committerJonathan Ringer <jonringer@users.noreply.github.com>2021-07-19 16:02:46 -0700
commitcbe99c7facdbb7b82a8f69cc174f2e6db1baa47b (patch)
tree75dfe9435e8ac4fd7067686d472ab4b4c0de5690 /nixos/modules/services/ttys
parent83994d9ffeb507ff3ded74c92ac3aad7e7923b17 (diff)
downloadnixpkgs-cbe99c7facdbb7b82a8f69cc174f2e6db1baa47b.tar
nixpkgs-cbe99c7facdbb7b82a8f69cc174f2e6db1baa47b.tar.gz
nixpkgs-cbe99c7facdbb7b82a8f69cc174f2e6db1baa47b.tar.bz2
nixpkgs-cbe99c7facdbb7b82a8f69cc174f2e6db1baa47b.tar.lz
nixpkgs-cbe99c7facdbb7b82a8f69cc174f2e6db1baa47b.tar.xz
nixpkgs-cbe99c7facdbb7b82a8f69cc174f2e6db1baa47b.tar.zst
nixpkgs-cbe99c7facdbb7b82a8f69cc174f2e6db1baa47b.zip
nixos/agetty: allow overriding the login program
Diffstat (limited to 'nixos/modules/services/ttys')
-rw-r--r--nixos/modules/services/ttys/getty.nix10
1 files changed, 9 insertions, 1 deletions
diff --git a/nixos/modules/services/ttys/getty.nix b/nixos/modules/services/ttys/getty.nix
index 8345dfabeb7..7cf2ff87da2 100644
--- a/nixos/modules/services/ttys/getty.nix
+++ b/nixos/modules/services/ttys/getty.nix
@@ -6,7 +6,7 @@ let
   cfg = config.services.getty;
 
   baseArgs = [
-    "--login-program" "${pkgs.shadow}/bin/login"
+    "--login-program" "${cfg.loginProgram}"
   ] ++ optionals (cfg.autologinUser != null) [
     "--autologin" cfg.autologinUser
   ] ++ optionals (cfg.loginOptions != null) [
@@ -39,6 +39,14 @@ in
         '';
       };
 
+      loginProgram = mkOption {
+        type = types.path;
+        default = "${pkgs.shadow}/bin/login";
+        description = ''
+          Path to the login binary executed by agetty.
+        '';
+      };
+
       loginOptions = mkOption {
         type = types.nullOr types.str;
         default = null;