summaryrefslogtreecommitdiff
path: root/modules/nixos/traits/host-user.nix
diff options
context:
space:
mode:
authorseth <[email protected]>2024-02-28 07:31:21 -0500
committerseth <[email protected]>2024-02-28 07:31:21 -0500
commit4caa14d0416c8ac14e0ac617a1eec22b9df830f6 (patch)
treeab2a295461a046118841c046fc1d6a3b6bbf7c38 /modules/nixos/traits/host-user.nix
parented23d606f190aa20e620063ab65e78caf613b67c (diff)
nixos: remove root password
Diffstat (limited to 'modules/nixos/traits/host-user.nix')
-rw-r--r--modules/nixos/traits/host-user.nix40
1 files changed, 0 insertions, 40 deletions
diff --git a/modules/nixos/traits/host-user.nix b/modules/nixos/traits/host-user.nix
deleted file mode 100644
index 2da91d6..0000000
--- a/modules/nixos/traits/host-user.nix
+++ /dev/null
@@ -1,40 +0,0 @@
-{
- config,
- lib,
- pkgs,
- secretsDir,
- ...
-}: let
- cfg = config.traits.users.hostUser;
- inherit (config.networking) hostName;
-in {
- options.traits.users.hostUser = {
- enable = lib.mkEnableOption "${hostName} user configuration";
- manageSecrets =
- lib.mkEnableOption "automatic secrets management"
- // {
- default = config.traits.secrets.enable;
- };
- };
-
- config = lib.mkIf cfg.enable (
- lib.mkMerge [
- {
- users.users.${hostName} = {
- isNormalUser = true;
- shell = pkgs.bash;
- };
- }
-
- (lib.mkIf cfg.manageSecrets {
- age.secrets = {
- userPassword.file = secretsDir + "/userPassword.age";
- };
-
- users.users.${hostName} = {
- hashedPasswordFile = config.age.secrets.userPassword.path;
- };
- })
- ]
- );
-}