nixy to home manager module

Signed-off-by: Hadi <hadi@example.com>
This commit is contained in:
Hadi
2026-04-28 09:45:47 +02:00
parent 31964cca35
commit 795621ada6
4 changed files with 36 additions and 5 deletions
+21 -5
View File
@@ -6,10 +6,26 @@
#- - `nixy rebuild` - Rebuild the system. #- - `nixy rebuild` - Rebuild the system.
#- - `nixy ...` - ... see the script for more commands. #- - `nixy ...` - ... see the script for more commands.
{ {
pkgs,
config, config,
lib,
pkgs,
... ...
}: let }: {
inherit (config.var) configDirectory; options.programs.nixy = {
nixy = import ./package.nix {inherit pkgs configDirectory;}; enable = lib.mkEnableOption "nixy";
in {home.packages = [nixy];} configDirectory = lib.mkOption {
type = lib.types.str;
default = "$HOME/.config/nixos";
description = "Path to the NixOS configuration directory";
};
};
config = lib.mkIf config.programs.nixy.enable {
home.packages = [
(import ./package.nix {
inherit pkgs;
inherit (config.programs.nixy) configDirectory;
})
];
};
}
+5
View File
@@ -47,4 +47,9 @@
}; };
programs.home-manager.enable = true; programs.home-manager.enable = true;
programs.nixy = {
enable = true;
configDirectory = config.var.configDirectory;
};
} }
+5
View File
@@ -23,4 +23,9 @@
}; };
programs.home-manager.enable = true; programs.home-manager.enable = true;
programs.nixy = {
enable = true;
configDirectory = config.var.configDirectory;
};
} }
+5
View File
@@ -40,4 +40,9 @@
}; };
programs.home-manager.enable = true; programs.home-manager.enable = true;
programs.nixy = {
enable = true;
configDirectory = config.var.configDirectory;
};
} }