niksos/modules/other/system.nix
jacekpoz 59febb2149
move the config' arg to a custom module (big)
shoutout to raf for pointing out how retarded this was
this was needed very much
2024-02-29 00:29:56 +01:00

28 lines
617 B
Nix

{
config,
lib,
...
}: with lib; let
cfg = config.myOptions.other.system;
in {
options.myOptions.other.system = {
hostname = mkOption {
description = "hostname for this system";
type = types.str;
};
username = mkOption {
description = "username for this system (doesn't support multi user yet)";
type = types.str;
};
};
config = {
networking.hostName = cfg.hostname;
users.users.${cfg.username} = {
isNormalUser = true;
extraGroups = [ "wheel" ];
};
};
}