a dotfile but it's really big
1{ lib, config, ... }:
2{
3 options.my.username = lib.mkOption {
4 type = lib.types.str;
5 description = "The username for the current user.";
6 };
7
8 config = lib.mkMerge [
9 { my.username = lib.mkDefault "kar"; }
10 (lib.mkIf (config.my.username != "root") {
11 users.users.${config.my.username} = {
12 home = "/home/${config.my.username}";
13 initialPassword = "";
14 isNormalUser = true;
15 extraGroups = [
16 "networkmanager"
17 "docker"
18 "wheel"
19 ];
20 };
21 })
22 ];
23}