mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2026-04-17 06:39:07 +02:00
wip: migrate client modules
This commit is contained in:
parent
f6d2ff1544
commit
7ce27d5d2f
245 changed files with 20254 additions and 188 deletions
46
aspects/users.nix
Normal file
46
aspects/users.nix
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{ den, ... }:
|
||||
let
|
||||
hostContext = { host, ... }: {
|
||||
nixos = { minimal, lib, config, ... }: {
|
||||
users.users.swarsel = {
|
||||
uid = 1000;
|
||||
autoSubUidGidRange = false;
|
||||
subUidRanges = [
|
||||
{
|
||||
count = 65534;
|
||||
startUid = 100001;
|
||||
}
|
||||
];
|
||||
subGidRanges = [
|
||||
{
|
||||
count = 999;
|
||||
startGid = 1001;
|
||||
}
|
||||
];
|
||||
description = "Leon S";
|
||||
password = lib.mkIf (minimal || host.isPublic) "setup";
|
||||
hashedPasswordFile = lib.mkIf (!minimal && !host.isPublic) config.sops.secrets.main-user-hashed-pw.path;
|
||||
extraGroups = lib.optionals (!minimal && !host.isMicroVM) [ "input" "syncthing" "docker" "lp" "audio" "video" "vboxusers" "libvirtd" "scanner" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
|
||||
den = {
|
||||
aspects.swarsel = {
|
||||
includes = [
|
||||
hostContext
|
||||
(den.provides.sops { class = "nixos"; name = "main-user-hashed-pw"; args = { neededForUsers = true; }; })
|
||||
den.provides.primary-user
|
||||
(den.provides.user-shell "zsh")
|
||||
];
|
||||
};
|
||||
aspects.root = { globals, ... }: {
|
||||
nixos = {
|
||||
users.users.root = globals.root.hashedPassword;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue