2023-03-18 22:41:29 +00:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
|
2024-02-07 21:54:26 +00:00
|
|
|
let
|
|
|
|
cfg = config.custom.users;
|
|
|
|
in
|
2023-03-18 22:41:29 +00:00
|
|
|
{
|
2024-02-07 21:54:26 +00:00
|
|
|
options.custom.users = {
|
|
|
|
jake = {
|
|
|
|
password = lib.mkOption {
|
|
|
|
description = "Enable an interactive password.";
|
|
|
|
type = lib.types.bool;
|
|
|
|
default = false;
|
|
|
|
};
|
2023-03-18 22:41:29 +00:00
|
|
|
};
|
2024-02-07 21:54:26 +00:00
|
|
|
};
|
2023-03-18 22:41:29 +00:00
|
|
|
|
2024-02-07 21:54:26 +00:00
|
|
|
config = lib.mkIf cfg.jake.password {
|
|
|
|
age.secrets."passwords/jake".file = ../secrets/passwords/jake.age;
|
2024-02-04 10:29:07 +00:00
|
|
|
users.users.jake.hashedPasswordFile = config.age.secrets."passwords/jake".path;
|
2023-03-18 22:41:29 +00:00
|
|
|
};
|
|
|
|
}
|