wip: migrate client modules

This commit is contained in:
Leon Schwarzäugl 2026-04-02 19:25:58 +02:00
parent f6d2ff1544
commit 7ce27d5d2f
Signed by: swarsel
GPG key ID: 26A54C31F2A4FD84
245 changed files with 20254 additions and 188 deletions

46
aspects/users.nix Normal file
View 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;
};
};
};
}