moved rebuild
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
flake.modules.homeManager.base = { pkgs, ... }:
|
||||
{
|
||||
imports = with inputs.self.modules.homeManager; [
|
||||
rebuild
|
||||
git
|
||||
shell-tools
|
||||
];
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
{ inputs, ... }:
|
||||
{
|
||||
flake.modules.homeManager.rebuild =
|
||||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
options = {
|
||||
homeManagerFlakeDir = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "${config.xdg.configHome}/home-manager";
|
||||
description = "Path to the home-manager flake directory.";
|
||||
};
|
||||
};
|
||||
|
||||
config = let
|
||||
nixBin = lib.getExe pkgs.nix;
|
||||
flakeDir = config.homeManagerFlakeDir;
|
||||
in
|
||||
{
|
||||
home.activation.printFlakeDir = lib.hm.dag.entryAfter ["writeBoundary"] ''
|
||||
run echo "Home Manager flake directory: ${flakeDir}"
|
||||
'';
|
||||
|
||||
home.packages = with pkgs; [
|
||||
home-manager
|
||||
(writeShellScriptBin "flake-parts-test" ''
|
||||
echo "Test ${flakeDir}"
|
||||
'')
|
||||
(writeShellScriptBin "flake-parts-check" ''
|
||||
cd ${flakeDir}
|
||||
${nixBin} run ".#write-flake"
|
||||
${nixBin} flake check
|
||||
'')
|
||||
(writeShellScriptBin "nhms" ''
|
||||
${lib.getExe home-manager} switch --impure --flake ${flakeDir}
|
||||
'')
|
||||
(writeShellScriptBin "nhmu" ''
|
||||
${nixBin} flake update --flake ${flakeDir}
|
||||
nhms
|
||||
'')
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user