chore: refactor system modules
This commit is contained in:
40
system/default.nix
Normal file
40
system/default.nix
Normal file
@@ -0,0 +1,40 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.system.misc;
|
||||
in {
|
||||
imports = [
|
||||
./boot
|
||||
./desktop
|
||||
./dev
|
||||
./hardware
|
||||
./i18n
|
||||
./network
|
||||
./packages
|
||||
./security
|
||||
./services
|
||||
./users
|
||||
];
|
||||
|
||||
options.system.misc = {
|
||||
timezone = mkOption {
|
||||
type = types.str;
|
||||
default = "Europe/Paris";
|
||||
};
|
||||
keymap = mkOption {
|
||||
type = types.str;
|
||||
default = "fr";
|
||||
example = "fr-bepo";
|
||||
description = "Keymap to use in the TTY console";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
boot.tmp.cleanOnBoot = true;
|
||||
time.timeZone = cfg.timezone;
|
||||
console.keyMap = cfg.keymap;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user