Import modules when needed

pull/50/head
Tudor Roman 2023-12-31 15:54:02 +02:00
parent 8d8d78e118
commit d09ed5b642
Signed by: tudor
SSH Key Fingerprint: SHA256:3CwS9plgXBecpXImPGxDIaSktUXBejbV/zerZMqzzBk
3 changed files with 4 additions and 7 deletions

View File

@ -104,8 +104,6 @@
services.openssh.enable = true;
}
inputs.home-manager.nixosModules.home-manager
inputs.nixos-wsl.nixosModules.wsl
inputs.yarr-nix.nixosModules.default
{
home-manager = {
useGlobalPkgs = true;
@ -124,9 +122,6 @@
"wsl2" = mkNixOSSystem "wsl2" "x86_64-linux";
};
packages."x86_64-linux"."tudor" = self.homeConfigurations."tudor".activationPackage;
packages."x86_64-linux"."tudor@pepper-penguin" = self.homeConfigurations."tudor@pepper-penguin".activationPackage;
homeConfigurations = let
mkHomeConfiguration = name: user: system: let
pkgs = self.lib.nixpkgs.mkPkgs { inherit system; };

View File

@ -1,6 +1,6 @@
{ config, pkgs, vars, ... }:
{ config, flake, vars, ... }:
{
imports = [ ../_all ];
imports = [ ../_all flake.inputs.nixos-wsl.nixosModules.wsl ];
systemModules = {
basePackages.enable = true;

View File

@ -3,6 +3,8 @@ let
cfg = config.systemModules.services.web.yarr;
in
with lib; {
imports = [ flake.inputs.yarr-nix.nixosModules.default ];
options.systemModules.services.web.yarr.enable = mkEnableOption "Enable yarr";
config = mkIf cfg.enable {