major refactor
This commit is contained in:
parent
20472f8d1b
commit
d778875a1b
32 changed files with 495 additions and 428 deletions
71
mod/common/default.nix
Normal file
71
mod/common/default.nix
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
{
|
||||
var,
|
||||
inputs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
{
|
||||
options.hd.common.enable = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Common options that are used on every host by default.";
|
||||
};
|
||||
|
||||
options.hd.common = {
|
||||
locale = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = config.hd.common.enable;
|
||||
description = "Enable locale settings";
|
||||
};
|
||||
};
|
||||
|
||||
nix = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = config.hd.common.enable;
|
||||
description = "Enable Nix-related configuration";
|
||||
};
|
||||
};
|
||||
|
||||
security = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = config.hd.common.enable;
|
||||
description = "Enable security-related configuration";
|
||||
};
|
||||
};
|
||||
|
||||
shell = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = config.hd.common.enable;
|
||||
description = "Enable basic shell utilities";
|
||||
};
|
||||
};
|
||||
|
||||
users = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = config.hd.common.enable;
|
||||
description = "Enable default user accounts";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
imports = [
|
||||
inputs.agenix.nixosModules.default
|
||||
./locale.nix
|
||||
./nix.nix
|
||||
./security.nix
|
||||
./shell.nix
|
||||
./users.nix
|
||||
];
|
||||
|
||||
config = mkIf config.hd.common.enable {
|
||||
environment.defaultPackages = [ ];
|
||||
networking.extraHosts = var.lan-dns.hostsFile;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue