mirror of
https://github.com/Stunkymonkey/nixos.git
synced 2026-01-02 22:29:52 +01:00
profile/core: convert to nixosModule
This commit is contained in:
parent
346f4d6592
commit
fc2feddfbb
3 changed files with 28 additions and 10 deletions
|
|
@ -17,8 +17,7 @@ let
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
customModules = import ../profiles/core/default.nix;
|
defaultModules = [
|
||||||
baseModules = [
|
|
||||||
# make flake inputs accessible in NixOS
|
# make flake inputs accessible in NixOS
|
||||||
{
|
{
|
||||||
_module.args.self = self;
|
_module.args.self = self;
|
||||||
|
|
@ -45,10 +44,12 @@ let
|
||||||
sops-nix.nixosModules.sops
|
sops-nix.nixosModules.sops
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
my.profiles.core.enable = true;
|
||||||
|
}
|
||||||
../modules
|
../modules
|
||||||
../profiles
|
../profiles
|
||||||
];
|
];
|
||||||
defaultModules = baseModules ++ customModules;
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
flake.nixosConfigurations = {
|
flake.nixosConfigurations = {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,23 @@
|
||||||
[
|
{
|
||||||
./core.nix
|
config,
|
||||||
./modules.nix
|
lib,
|
||||||
./network.nix
|
pkgs,
|
||||||
./nix.nix
|
inputs,
|
||||||
./users.nix
|
...
|
||||||
|
}@args:
|
||||||
|
let
|
||||||
|
cfg = config.my.profiles.core;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
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)
|
||||||
]
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
./3d-design
|
./3d-design
|
||||||
./android
|
./android
|
||||||
./clean
|
./clean
|
||||||
|
./core
|
||||||
./desktop-apps
|
./desktop-apps
|
||||||
./desktop-dev
|
./desktop-dev
|
||||||
./development
|
./development
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue