feat: ask-password as shell

Signed-off-by: Lander Van den Bulcke <landervandenbulcke@gmail.com>
This commit is contained in:
Lander Van den Bulcke 2025-11-04 13:38:51 +01:00
parent 5cd943d3e5
commit 5d68fbf0a1
Signed by: lander
GPG key ID: 0142722B4B0C536F

View file

@ -1,4 +1,9 @@
{ config, lib, ... }: {
config,
lib,
pkgs,
...
}:
{ {
options = { options = {
networking.hyp-01.ipv4.address = lib.mkOption { networking.hyp-01.ipv4.address = lib.mkOption {
@ -44,6 +49,18 @@
boot.initrd = { boot.initrd = {
availableKernelModules = [ "e1000e" ]; availableKernelModules = [ "e1000e" ];
systemd =
let
askPass = pkgs.writeShellScriptBin "zfs-askpass" ''
systemd-tty-ask-password-agent --watch
'';
in
{
enable = true;
storePaths = [ "${askPass}/bin/zfs-askpass" ];
users.root.shell = "${askPass}/bin/zfs-askpass";
};
network = { network = {
enable = true; enable = true;