Working on reshuffling
This commit is contained in:
+10
-15
@@ -1994,28 +1994,23 @@ This is top file of this level which contains just an import statement for all r
|
|||||||
let
|
let
|
||||||
wofiAssets = ../../../assets/system/conf/wofi;
|
wofiAssets = ../../../assets/system/conf/wofi;
|
||||||
wofiFiles = builtins.readDir wofiAssets;
|
wofiFiles = builtins.readDir wofiAssets;
|
||||||
|
|
||||||
# Generate attribute set of files
|
|
||||||
wofiConfs = lib.genAttrs (builtins.attrNames wofiFiles) (name: {
|
wofiConfs = lib.genAttrs (builtins.attrNames wofiFiles) (name: {
|
||||||
src = "${wofiAssets}/${name}";
|
src = "${wofiAssets}/${name}";
|
||||||
});
|
});
|
||||||
|
|
||||||
# Module options
|
enableWofi = true; # toggle on/off
|
||||||
enableWofi = true; # or set to false to disable
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options = {
|
options.enableWofi = lib.mkEnableOption "Enable Wofi terminal launcher";
|
||||||
enableWofi = lib.mkEnableOption "Enable Wofi terminal launcher";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Conditional attributes returned directly
|
# Everything is wrapped safely in config
|
||||||
wofi = if enableWofi then {
|
config = lib.mkIf enableWofi {
|
||||||
xdg = {
|
# Just symbolic references to files, no pkgs or recursive config
|
||||||
wofi = {
|
programs.wofi = {
|
||||||
source = wofiAssets;
|
enable = true;
|
||||||
files = wofiConfs;
|
assetsDir = wofiAssets;
|
||||||
};
|
files = wofiConfs;
|
||||||
};
|
};
|
||||||
} else {};
|
};
|
||||||
}
|
}
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|||||||
@@ -3,27 +3,22 @@
|
|||||||
let
|
let
|
||||||
wofiAssets = ../../../assets/system/conf/wofi;
|
wofiAssets = ../../../assets/system/conf/wofi;
|
||||||
wofiFiles = builtins.readDir wofiAssets;
|
wofiFiles = builtins.readDir wofiAssets;
|
||||||
|
|
||||||
# Generate attribute set of files
|
|
||||||
wofiConfs = lib.genAttrs (builtins.attrNames wofiFiles) (name: {
|
wofiConfs = lib.genAttrs (builtins.attrNames wofiFiles) (name: {
|
||||||
src = "${wofiAssets}/${name}";
|
src = "${wofiAssets}/${name}";
|
||||||
});
|
});
|
||||||
|
|
||||||
# Module options
|
enableWofi = true; # toggle on/off
|
||||||
enableWofi = true; # or set to false to disable
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options = {
|
options.enableWofi = lib.mkEnableOption "Enable Wofi terminal launcher";
|
||||||
enableWofi = lib.mkEnableOption "Enable Wofi terminal launcher";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Conditional attributes returned directly
|
# Everything is wrapped safely in config
|
||||||
wofi = if enableWofi then {
|
config = lib.mkIf enableWofi {
|
||||||
xdg = {
|
# Just symbolic references to files, no pkgs or recursive config
|
||||||
wofi = {
|
programs.wofi = {
|
||||||
source = wofiAssets;
|
enable = true;
|
||||||
files = wofiConfs;
|
assetsDir = wofiAssets;
|
||||||
};
|
files = wofiConfs;
|
||||||
};
|
};
|
||||||
} else {};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user