nichts/modules/other/system.nix

31 lines
600 B
Nix
Raw Normal View History

{ config, lib, ... }:
with lib;
let cfg = config.modules.other.system;
2024-04-10 17:39:26 +02:00
in {
options.modules.other.system = {
hostname = mkOption {
description = "hostname for this system";
type = types.str;
};
2024-04-10 17:39:26 +02:00
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
};
};
2024-04-10 17:39:26 +02:00
config = {
networking.hostName = cfg.hostname;
2024-04-10 17:39:26 +02:00
users.users.${cfg.username} = {
isNormalUser = true;
extraGroups = [ "wheel" ];
2024-04-10 17:39:26 +02:00
};
};
2024-04-10 17:39:26 +02:00
}