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;
|
||||
baseModules = [
|
||||
defaultModules = [
|
||||
# make flake inputs accessible in NixOS
|
||||
{
|
||||
_module.args.self = self;
|
||||
|
|
@ -45,10 +44,12 @@ let
|
|||
sops-nix.nixosModules.sops
|
||||
];
|
||||
}
|
||||
{
|
||||
my.profiles.core.enable = true;
|
||||
}
|
||||
../modules
|
||||
../profiles
|
||||
];
|
||||
defaultModules = baseModules ++ customModules;
|
||||
in
|
||||
{
|
||||
flake.nixosConfigurations = {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,23 @@
|
|||
[
|
||||
./core.nix
|
||||
./modules.nix
|
||||
./network.nix
|
||||
./nix.nix
|
||||
./users.nix
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}@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
|
||||
./android
|
||||
./clean
|
||||
./core
|
||||
./desktop-apps
|
||||
./desktop-dev
|
||||
./development
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue