profile/core: migrate to nixosModule

This commit is contained in:
Felix Buehler 2026-01-24 22:40:40 +01:00
parent a4d422e059
commit a16d497ebb
10 changed files with 208 additions and 157 deletions

View file

@ -1,23 +1,30 @@
{
config,
lib,
pkgs,
inputs,
...
}@args:
}:
let
cfg = config.my.profiles.core;
in
{
imports = [
./kernel-modules.nix
./network.nix
./nix.nix
./packages.nix
./users.nix
];
options.my.profiles.core.enable = lib.mkEnableOption "core profile";
config = lib.mkIf cfg.enable (
lib.mkMerge [
(import ./core.nix args)
(import ./modules.nix args)
(import ./network.nix args)
(import ./nix.nix args)
(import ./users.nix args)
]
);
config = lib.mkIf cfg.enable {
my.profiles.core = {
packages.enable = lib.mkDefault true;
kernel-modules.enable = lib.mkDefault true;
network.enable = lib.mkDefault true;
nix.enable = lib.mkDefault true;
users.enable = lib.mkDefault true;
};
time.timeZone = "Europe/Berlin";
};
}