mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 09:07:21 +01:00
28 lines
1.1 KiB
Nix
28 lines
1.1 KiB
Nix
{ self, pkgs, config, lib, globals, minimal, ... }:
|
|
let
|
|
sopsFile = self + /secrets/general/secrets.yaml;
|
|
in
|
|
{
|
|
options.swarselmodules.users = lib.mkEnableOption "user config";
|
|
config = lib.mkIf config.swarselmodules.users {
|
|
sops.secrets.main-user-hashed-pw = lib.mkIf (!config.swarselsystems.isPublic) { inherit sopsFile; neededForUsers = true; };
|
|
|
|
users = {
|
|
mutableUsers = lib.mkIf (!minimal) false;
|
|
users = {
|
|
root = {
|
|
inherit (globals.root) hashedPassword;
|
|
# shell = pkgs.zsh;
|
|
};
|
|
"${config.swarselsystems.mainUser}" = {
|
|
isNormalUser = true;
|
|
description = "Leon S";
|
|
password = lib.mkIf (minimal || config.swarselsystems.isPublic) "setup";
|
|
hashedPasswordFile = lib.mkIf (!minimal && !config.swarselsystems.isPublic) config.sops.secrets.main-user-hashed-pw.path;
|
|
extraGroups = [ "wheel" ] ++ lib.optionals (!minimal) [ "networkmanager" "syncthing" "docker" "lp" "audio" "video" "vboxusers" "libvirtd" "scanner" ];
|
|
packages = with pkgs; [ ];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|