Working on reshuffling
This commit is contained in:
+12
-8
@@ -1989,22 +1989,26 @@ the top of the file."
|
||||
** =generated/modules/apps/wofi.nix=
|
||||
This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder
|
||||
#+BEGIN_SRC nix :tangle generated/modules/apps/wofi.nix :noweb tangle :mkdirp yes :eval never-html
|
||||
{ config, pkgs, lib, ... }:
|
||||
{ lib, ... }:
|
||||
|
||||
let
|
||||
wofiAssets = ../../../assets/system/conf/wofi;
|
||||
wofiFiles = builtins.readDir wofiAssets;
|
||||
|
||||
# Generate attribute set of files
|
||||
wofiConfs = lib.genAttrs (builtins.attrNames wofiFiles) (name: {
|
||||
src = "${wofiAssets}/${name}";
|
||||
});
|
||||
in
|
||||
{
|
||||
# Option to enable Wofi
|
||||
options.enableWofi = lib.mkEnableOption "Enable Wofi terminal launcher";
|
||||
|
||||
# Config applied when module is evaluated
|
||||
config = {
|
||||
# Add Wofi to systemPackages if enabled
|
||||
environment.systemPackages = lib.mkIf (config.enableWofi) [ pkgs.wofi ];
|
||||
|
||||
# Install wofi config files
|
||||
environment.etc."xdg/wofi".source = lib.mkIf (config.enableWofi) wofiAssets;
|
||||
# Config applied when module is enabled
|
||||
config = lib.mkIf (config.enableWofi) {
|
||||
# Symbolic references to configuration files
|
||||
environment.etc."xdg/wofi".source = wofiAssets;
|
||||
environment.etc."xdg/wofi".files = wofiConfs;
|
||||
};
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
Reference in New Issue
Block a user