nixos/modules/users.nix
Jake Hillion d7398e38df
All checks were successful
continuous-integration/drone/push Build is passing
flake: update to nixpkgs 2311
2024-02-10 15:34:54 +00:00

22 lines
476 B
Nix

{ config, pkgs, lib, ... }:
let
cfg = config.custom.users;
in
{
options.custom.users = {
jake = {
password = lib.mkOption {
description = "Enable an interactive password.";
type = lib.types.bool;
default = false;
};
};
};
config = lib.mkIf cfg.jake.password {
age.secrets."passwords/jake".file = ../secrets/passwords/jake.age;
users.users.jake.hashedPasswordFile = config.age.secrets."passwords/jake".path;
};
}