Fix Darwin dotfile symlink targets
This commit is contained in:
@@ -6,7 +6,8 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
dotfilesDir = builtins.dirOf (toString libDir);
|
srcDotfilesDir = builtins.dirOf libDir;
|
||||||
|
worktreeDotfilesDir = "${config.home.homeDirectory}/dotfiles/dotfiles";
|
||||||
outOfStore = config.lib.file.mkOutOfStoreSymlink;
|
outOfStore = config.lib.file.mkOutOfStoreSymlink;
|
||||||
replaceRuntimeDir = builtins.replaceStrings ["$XDG_RUNTIME_DIR"] ["\${XDG_RUNTIME_DIR}"];
|
replaceRuntimeDir = builtins.replaceStrings ["$XDG_RUNTIME_DIR"] ["\${XDG_RUNTIME_DIR}"];
|
||||||
gpgKeyPath = replaceRuntimeDir config.age.secrets.gpg-keys.path;
|
gpgKeyPath = replaceRuntimeDir config.age.secrets.gpg-keys.path;
|
||||||
@@ -78,17 +79,17 @@
|
|||||||
name = ".${name}";
|
name = ".${name}";
|
||||||
value = {
|
value = {
|
||||||
force = true;
|
force = true;
|
||||||
source = outOfStore "${dotfilesDir}/${name}";
|
source = outOfStore "${worktreeDotfilesDir}/${name}";
|
||||||
};
|
};
|
||||||
}) (lib.subtractLists excludedTopLevelEntries (builtins.attrNames (builtins.readDir dotfilesDir))));
|
}) (lib.subtractLists excludedTopLevelEntries (builtins.attrNames (builtins.readDir srcDotfilesDir))));
|
||||||
|
|
||||||
xdgConfigLinks = lib.listToAttrs (map (name: {
|
xdgConfigLinks = lib.listToAttrs (map (name: {
|
||||||
name = name;
|
name = name;
|
||||||
value = {
|
value = {
|
||||||
force = true;
|
force = true;
|
||||||
source = outOfStore "${dotfilesDir}/config/${name}";
|
source = outOfStore "${worktreeDotfilesDir}/config/${name}";
|
||||||
};
|
};
|
||||||
}) (lib.subtractLists excludedConfigEntries (builtins.attrNames (builtins.readDir "${dotfilesDir}/config"))));
|
}) (lib.subtractLists excludedConfigEntries (builtins.attrNames (builtins.readDir "${srcDotfilesDir}/config"))));
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
inputs.agenix.homeManagerModules.default
|
inputs.agenix.homeManagerModules.default
|
||||||
|
|||||||
Reference in New Issue
Block a user