Working on reshuffling
This commit is contained in:
+8
-17
@@ -1992,28 +1992,19 @@ This is top file of this level which contains just an import statement for all r
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
# Relative path to assets
|
||||
# relative path from this module
|
||||
wofiAssets = ../../../assets/system/conf/wofi;
|
||||
wofiFiles = builtins.readDir wofiAssets;
|
||||
|
||||
# Map filenames to source paths
|
||||
wofiConfs = lib.genAttrs (builtins.attrNames wofiFiles) (name: {
|
||||
src = "${wofiAssets}/${name}";
|
||||
});
|
||||
in
|
||||
{
|
||||
# Provide a module option to enable Wofi
|
||||
options.enableWofi =
|
||||
lib.mkEnableOption "Enable Wofi terminal launcher";
|
||||
# Declare an option to enable Wofi
|
||||
options.enableWofi = lib.mkEnableOption "Enable Wofi terminal launcher";
|
||||
|
||||
# Only apply config if enabled
|
||||
config = lib.mkIf (lib.getOption "enableWofi") {
|
||||
# Install Wofi system-wide
|
||||
environment.systemPackages = [
|
||||
pkgs.wofi
|
||||
];
|
||||
# Apply config if enabled
|
||||
config = { enableWofi, ... }: lib.mkIf enableWofi {
|
||||
# Install system package
|
||||
environment.systemPackages = [ pkgs.wofi ];
|
||||
|
||||
# Copy config files to a standard location in /etc/xdg
|
||||
# Copy config files to /etc/xdg/wofi
|
||||
environment.etc."xdg/wofi".source = wofiAssets;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,28 +1,19 @@
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
# Relative path to assets
|
||||
# relative path from this module
|
||||
wofiAssets = ../../../assets/system/conf/wofi;
|
||||
wofiFiles = builtins.readDir wofiAssets;
|
||||
|
||||
# Map filenames to source paths
|
||||
wofiConfs = lib.genAttrs (builtins.attrNames wofiFiles) (name: {
|
||||
src = "${wofiAssets}/${name}";
|
||||
});
|
||||
in
|
||||
{
|
||||
# Provide a module option to enable Wofi
|
||||
options.enableWofi =
|
||||
lib.mkEnableOption "Enable Wofi terminal launcher";
|
||||
# Declare an option to enable Wofi
|
||||
options.enableWofi = lib.mkEnableOption "Enable Wofi terminal launcher";
|
||||
|
||||
# Only apply config if enabled
|
||||
config = lib.mkIf (lib.getOption "enableWofi") {
|
||||
# Install Wofi system-wide
|
||||
environment.systemPackages = [
|
||||
pkgs.wofi
|
||||
];
|
||||
# Apply config if enabled
|
||||
config = { enableWofi, ... }: lib.mkIf enableWofi {
|
||||
# Install system package
|
||||
environment.systemPackages = [ pkgs.wofi ];
|
||||
|
||||
# Copy config files to a standard location in /etc/xdg
|
||||
# Copy config files to /etc/xdg/wofi
|
||||
environment.etc."xdg/wofi".source = wofiAssets;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user