modules: users: add systemType and isGraphical options

systemType describes the type of a system, e.g. a laptop,
desktop or server. 

isGraphical takes this to determine whether a system needs
programs such as a compositor, graphical applications etc.
This commit is contained in:
Bloxx12 2025-06-12 20:10:52 +02:00
commit 8f19e283d8
Signed by: faukah
SSH key fingerprint: SHA256:Uj2AXqvtdCA4hn5Hq0ZonhIAyUqI1q4w2sMG3Z1TH7E
2 changed files with 45 additions and 12 deletions

View file

@ -7,7 +7,7 @@
}: let
inherit (builtins) elemAt;
inherit (lib.options) mkOption;
inherit (lib.types) listOf str;
inherit (lib.types) listOf str package;
inherit (config.meta.mainUser) username;
in {
@ -27,6 +27,7 @@ in {
The main user for each system. This is the first element of the list of users by default.
'';
};
gitSigningKey = mkOption {
type = str;
description = ''
@ -36,9 +37,28 @@ in {
ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBAAWEDj/Yib6Mqs016jx7rtecWpytwfVl28eoHtPYCM9TVLq81VIHJSN37lbkc/JjiXCdIJy2Ta3A3CVV5k3Z37NbgAu23oKA2OcHQNaRTLtqWlcBf9fk9suOkP1A3NzAqzivFpBnZm3ytaXwU8LBJqxOtNqZcFVruO6fZxJtg2uE34mAw==
'';
};
# TODO: clean this up and move it somewhere else.
defaultShell = {
name = mkOption {
type = str;
default = "nushell";
description = ''
The default shell of a user. This is not the main system shell, but the shell used in terminals.
'';
};
package = mkOption {
type = package;
default = pkgs.nushell;
};
};
};
};
config = {
programs.zsh = {
enable = true;
enableBashCompletion = true;
};
users = {
mutableUsers = true;
users = {
@ -53,6 +73,7 @@ in {
"nix"
"docker"
];
# shell = self.packages.${pkgs.stdenv.system}.fish;
shell = pkgs.zsh;
# hashedPasswordFile = "/etc/passwords/cr";
};