From 4ea08b3976188eb01a74548d68b227a7794b4caa Mon Sep 17 00:00:00 2001 From: Simon Parri Date: Fri, 9 May 2025 17:54:45 -0500 Subject: Add current configuration --- users/default.nix | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 users/default.nix (limited to 'users/default.nix') diff --git a/users/default.nix b/users/default.nix new file mode 100644 index 0000000..5c1a272 --- /dev/null +++ b/users/default.nix @@ -0,0 +1,41 @@ +{ lib, config, pkgs, ... }: + +let inherit (lib) types; + cfg = config.this.users; + userP = (name: builtins.elem name cfg.enabled); +in +{ + options.this.users = { + enabled = lib.mkOption { + type = types.listOf types.str; + default = []; + }; + }; + + config = lib.mkMerge [ + (lib.mkIf (userP "simon") { + users.groups.simon = { + gid = 1000; + + }; + users.users.simon = { + description = "Simon Parri"; + group = "simon"; + isNormalUser = true; + uid = 1000; + shell = pkgs.zsh; + homeMode = "755"; + extraGroups = [ + "users" + "adm" + "kvm" + "disk" "cdrpm" + "audio" "video" + "input" + "lp" + "networkmanager" + ]; + }; + }) + ]; +} -- cgit v1.2.3