Migrate to Snowfall (#1)

Reviewed-on: #1
Co-authored-by: Evan Reichard <evan@reichard.io>
Co-committed-by: Evan Reichard <evan@reichard.io>
This commit was merged in pull request #1.
This commit is contained in:
2025-04-21 00:56:53 +00:00
committed by evan
parent 72ba8ddf59
commit cf0fa75058
118 changed files with 3590 additions and 1571 deletions

View File

@@ -0,0 +1,30 @@
{ config, lib, pkgs, namespace, ... }:
let
inherit (lib) types;
inherit (lib.${namespace}) mkOpt;
cfg = config.${namespace}.user;
in
{
options.${namespace}.user = with types; {
email = mkOpt str "evan@reichard.io" "The email of the user.";
extraGroups = mkOpt (listOf str) [ ] "Groups for the user to be assigned.";
extraOptions = mkOpt attrs { } "Extra options passed to <option>users.users.<name></option>.";
fullName = mkOpt str "Evan Reichard" "The full name of the user.";
initialPassword = mkOpt str "changeMe2025!" "The initial password to use when the user is first created.";
name = mkOpt str "evanreichard" "The name to use for the user account.";
};
config = {
users.users.${cfg.name} = {
inherit (cfg) name initialPassword;
group = "users";
home = "/home/${cfg.name}";
extraGroups = [ "wheel" ] ++ cfg.extraGroups;
isNormalUser = true;
shell = pkgs.bashInteractive;
uid = 1000;
} // cfg.extraOptions;
};
}