Compare commits
35
Commits
fc6eeca5cf
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e4a3a0344d
|
||
|
|
18982a6247
|
||
|
|
2f7ae14883
|
||
|
|
1cfc810e69
|
||
|
|
0d6602004f
|
||
|
|
161f375258
|
||
|
|
92a37a127d
|
||
|
|
fef3a464ef
|
||
|
|
24d0ce1550
|
||
|
|
943e0f682c
|
||
|
|
daa7052958
|
||
|
|
e6b2edcc42
|
||
|
|
aaaf95429b
|
||
|
|
677a50ed68
|
||
|
|
500145237d
|
||
|
|
6f0af993ba
|
||
|
|
30ce28a0a6
|
||
|
|
a41a05ac9f
|
||
|
|
d2f2f7fad2
|
||
|
|
fbdc2e8420
|
||
|
|
9846cf8d3b
|
||
|
|
f1567e6123
|
||
|
|
78defcb9e9
|
||
|
|
124314796a
|
||
|
|
fd300f979e
|
||
|
|
0677d2c9e6
|
||
|
|
57f553a059
|
||
|
|
bc4136e9b3
|
||
|
|
8a615b7f2d
|
||
|
|
f342fc3337
|
||
|
|
3abf233c93
|
||
|
|
5f5a169c56
|
||
|
|
00aa016aaa
|
||
|
|
2bb337795e
|
||
|
|
219a097abf
|
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
mkSymlinkActivationScript = {target, source}: ''
|
mkSymlinkActivationScript = {target, source}: ''
|
||||||
if [ -e ${source} ]; then
|
if [ -e ${source} ]; then
|
||||||
if [ -e ${target} ]; then
|
if [ -L ${target} ] || [ -e ${target} ]; then
|
||||||
rm -rf ${target}
|
rm -rf ${target}
|
||||||
fi
|
fi
|
||||||
ln -s ${source} ${target}
|
ln -s ${source} ${target}
|
||||||
@@ -51,12 +51,30 @@
|
|||||||
flake.homeModules.${moduleName} = func;
|
flake.homeModules.${moduleName} = func;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
mkStandardFeature = {
|
||||||
|
flakeModule = moduleName: optionName: optionString: (mkMirroredModulesFlakeModule "${moduleName}Options" ({ lib, ... }: {
|
||||||
|
options = setAttrByStrPath optionName (lib.mkEnableOption optionString);
|
||||||
|
}));
|
||||||
|
|
||||||
|
nixosModule = { config, optionName }: systemConfig: {
|
||||||
|
config = lib.mkIf (attrByStrPath optionName config) (mkIfElse (config.features.nixos.home-manager.enable) {
|
||||||
|
home-manager.users.${config.info.userName} = setAttrByStrPath optionName (lib.mkDefault true);
|
||||||
|
} systemConfig);
|
||||||
|
};
|
||||||
|
|
||||||
|
homeModule = { config, optionName }: homeConfig: {
|
||||||
|
config = lib.mkIf (attrByStrPath optionName config) homeConfig;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
mkRedundantOptionDescription = name: value: "The functionality of this option completely depends on `${name}` being `${value}`, and will not be evaluated otherwise.";
|
mkRedundantOptionDescription = name: value: "The functionality of this option completely depends on `${name}` being `${value}`, and will not be evaluated otherwise.";
|
||||||
|
|
||||||
mkRedundantOptionAttrs = name: value: attrs: {
|
mkRedundantOption = name: value: attrs: lib.mkOption {
|
||||||
inherit (attrs) type default;
|
inherit (attrs) type default;
|
||||||
description = ''
|
description = ''
|
||||||
${attrs.description}
|
${attrs.description}
|
||||||
|
|
||||||
|
|
||||||
${mkRedundantOptionDescription name value}
|
${mkRedundantOptionDescription name value}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in new issue
Block a user