Working on reshuffling
This commit is contained in:
+5
-4
@@ -1989,20 +1989,21 @@ the top of the file."
|
|||||||
** =generated/modules/apps/wofi.nix=
|
** =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
|
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
|
#+BEGIN_SRC nix :tangle generated/modules/apps/wofi.nix :noweb tangle :mkdirp yes :eval never-html
|
||||||
{ lib, pkgs, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
# relative path from this module
|
|
||||||
wofiAssets = ../../../assets/system/conf/wofi;
|
wofiAssets = ../../../assets/system/conf/wofi;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# Declare an option to enable Wofi
|
# Option to enable Wofi
|
||||||
options.enableWofi = lib.mkEnableOption "Enable Wofi terminal launcher";
|
options.enableWofi = lib.mkEnableOption "Enable Wofi terminal launcher";
|
||||||
|
|
||||||
# Apply config if enabled
|
# Config applied when module is evaluated
|
||||||
config = {
|
config = {
|
||||||
|
# Add Wofi to systemPackages if enabled
|
||||||
environment.systemPackages = lib.mkIf (config.enableWofi) [ pkgs.wofi ];
|
environment.systemPackages = lib.mkIf (config.enableWofi) [ pkgs.wofi ];
|
||||||
|
|
||||||
|
# Install wofi config files
|
||||||
environment.etc."xdg/wofi".source = lib.mkIf (config.enableWofi) wofiAssets;
|
environment.etc."xdg/wofi".source = lib.mkIf (config.enableWofi) wofiAssets;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,17 +1,18 @@
|
|||||||
{ lib, pkgs, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
# relative path from this module
|
|
||||||
wofiAssets = ../../../assets/system/conf/wofi;
|
wofiAssets = ../../../assets/system/conf/wofi;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# Declare an option to enable Wofi
|
# Option to enable Wofi
|
||||||
options.enableWofi = lib.mkEnableOption "Enable Wofi terminal launcher";
|
options.enableWofi = lib.mkEnableOption "Enable Wofi terminal launcher";
|
||||||
|
|
||||||
# Apply config if enabled
|
# Config applied when module is evaluated
|
||||||
config = {
|
config = {
|
||||||
|
# Add Wofi to systemPackages if enabled
|
||||||
environment.systemPackages = lib.mkIf (config.enableWofi) [ pkgs.wofi ];
|
environment.systemPackages = lib.mkIf (config.enableWofi) [ pkgs.wofi ];
|
||||||
|
|
||||||
|
# Install wofi config files
|
||||||
environment.etc."xdg/wofi".source = lib.mkIf (config.enableWofi) wofiAssets;
|
environment.etc."xdg/wofi".source = lib.mkIf (config.enableWofi) wofiAssets;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user