nichts/modules/other/system.nix

34 lines
680 B
Nix
Raw Normal View History

2024-04-10 17:39:26 +02:00
{
config,
lib,
...
}: with lib; let
2024-04-12 22:03:29 +02:00
cfg = config.modules.other.system;
2024-04-10 17:39:26 +02:00
in {
2024-04-12 22:03:29 +02:00
options.modules.other.system = {
2024-04-10 17:39:26 +02:00
hostname = mkOption {
description = "hostname for this system";
type = types.str;
};
username = mkOption {
description = "username for this system";
type = types.str;
};
2024-04-12 14:33:18 +02:00
gitPath = mkOption {
description = "path to the flake directory";
type = types.str;
};
2024-04-10 17:39:26 +02:00
};
config = {
networking.hostName = cfg.hostname;
users.users.${cfg.username} = {
isNormalUser = true;
extraGroups = [ "wheel" ];
};
};
}