niksos/modules/other/system.nix

39 lines
841 B
Nix
Raw Normal View History

{
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;
in {
2024-07-15 23:18:25 +02:00
options.poz.other.system = {
hostname = mkOption {
description = "hostname for this system";
2024-05-05 12:38:40 +02:00
type = str;
};
username = mkOption {
description = "username for this system (doesn't support multi user yet)";
2024-05-05 12:38:40 +02:00
type = str;
};
platform = mkOption {
description = "system (the one you usually passed to nixosSystem)";
type = str;
};
};
config = {
networking.hostName = cfg.hostname;
users.users.${cfg.username} = {
isNormalUser = true;
extraGroups = [ "wheel" ];
};
nixpkgs.hostPlatform = cfg.platform;
};
}