more progress on custom options config

This commit is contained in:
greyweather committed 2026-08-27 19:28:28 +01:00
1 parent f770b83b5c
commit 765f346eb6
26 files changed
+900 -561

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
{ inputs, self, ... }: {
flake.nixosModules.global = { pkgs, config, lib, ... }: {
options.helpers = {
mkSymlinkActivationScript = lib.mkOption {
type = lib.types.functionTo lib.types.str;
default = {target, source, isDir ? false}: ''
if [ ${if isDir then "-d" else "-f"} /home/grey/${target} ]; then
rm${if isDir then " -rf" else ""} /home/grey/${target}
fi
ln -s ${config.info.rootPath}/${source} /home/grey/${target}
'';
};
};
};
}