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