Initial commit

This commit is contained in:
kirbara 2025-12-01 13:23:24 +07:00
commit cfcc57a8bd
Signed by: exp
GPG key ID: D7E63AD0019E75D9
353 changed files with 18756 additions and 0 deletions

View file

@ -0,0 +1,37 @@
{ lib, ... }:
let
description = ''
Sets user as *primary*.
On NixOS adds wheel and networkmanager groups.
On Darwin sets user as system.primaryUser
On WSL sets wsl.defaultUser if host has an `wsl` attribute.
## Usage
den.aspects.my-user.includes = [ den._.primary-user ];
'';
userToHostContext =
{ user, host, ... }:
let
on-wsl.nixos.wsl.defaultUser = user.userName;
in
{
inherit description;
includes = lib.optionals (host ? wsl) [ on-wsl ];
darwin.system.primaryUser = user.userName;
nixos.users.users.${user.userName} = {
isNormalUser = true;
extraGroups = [
"wheel"
"networkmanager"
];
};
};
in
{
den.provides.primary-user = userToHostContext;
}