2024-02-29 00:29:56 +01:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
2024-05-05 12:38:40 +02:00
|
|
|
}: let
|
2024-07-15 23:18:25 +02:00
|
|
|
cfg = config.poz.other.system;
|
2024-05-05 12:38:40 +02:00
|
|
|
|
2024-07-25 11:45:44 +02:00
|
|
|
inherit (lib.options) mkOption;
|
2024-05-05 12:38:40 +02:00
|
|
|
inherit (lib.types) str;
|
2024-02-29 00:29:56 +01:00
|
|
|
in {
|
2024-07-15 23:18:25 +02:00
|
|
|
options.poz.other.system = {
|
2024-02-29 00:29:56 +01:00
|
|
|
hostname = mkOption {
|
|
|
|
description = "hostname for this system";
|
2024-05-05 12:38:40 +02:00
|
|
|
type = str;
|
2024-02-29 00:29:56 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
username = mkOption {
|
|
|
|
description = "username for this system (doesn't support multi user yet)";
|
2024-05-05 12:38:40 +02:00
|
|
|
type = str;
|
2024-02-29 00:29:56 +01:00
|
|
|
};
|
2024-07-15 21:14:23 +02:00
|
|
|
|
|
|
|
platform = mkOption {
|
|
|
|
description = "system (the one you usually passed to nixosSystem)";
|
|
|
|
type = str;
|
|
|
|
};
|
2024-02-29 00:29:56 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
config = {
|
|
|
|
networking.hostName = cfg.hostname;
|
|
|
|
|
|
|
|
users.users.${cfg.username} = {
|
|
|
|
isNormalUser = true;
|
|
|
|
extraGroups = [ "wheel" ];
|
|
|
|
};
|
2024-07-15 21:14:23 +02:00
|
|
|
|
|
|
|
nixpkgs.hostPlatform = cfg.platform;
|
2024-02-29 00:29:56 +01:00
|
|
|
};
|
|
|
|
}
|