mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 17:17:22 +01:00
22 lines
952 B
Nix
22 lines
952 B
Nix
{ self, pkgs, config, lib, 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."${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; [ ];
|
|
};
|
|
};
|
|
};
|
|
}
|