nixos/modules/user.nix

27 lines
663 B
Nix
Raw Permalink Normal View History

{ config, lib, ... }:
let
cfg = config.snowhawk.user;
in
{
options.snowhawk.user = {
enable = lib.mkEnableOption "user nixos module";
};
config = lib.mkIf cfg.enable {
snowhawk.sops.enable = lib.mkForce true;
# users sops setup
sops.secrets."passwords/ravenshade".neededForUsers = true;
users.mutableUsers = false;
# Define a user account. Don't forget to set a password with `passwd`.
users.users.ravenshade = {
isNormalUser = true;
description = "Zynh Ludwig";
hashedPasswordFile = config.sops.secrets."passwords/ravenshade".path;
extraGroups = [ "networkmanager" "wheel" "audio" ];
};
};
}