21 lines
645 B
Nix
21 lines
645 B
Nix
{ inputs, self, ... }: {
|
|
flake.nixosModules.global = { pkgs, config, lib, ... }: {
|
|
options.helpers = {
|
|
# nothing here yet
|
|
};
|
|
};
|
|
|
|
flake.homeModules.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}
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
} |