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, ... }:
|
{ lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
# Relative path to assets
|
# relative path from this module
|
||||||
wofiAssets = ../../../assets/system/conf/wofi;
|
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
|
in
|
||||||
{
|
{
|
||||||
# Provide a module option to enable Wofi
|
# Declare an option to enable Wofi
|
||||||
options.enableWofi =
|
options.enableWofi = lib.mkEnableOption "Enable Wofi terminal launcher";
|
||||||
lib.mkEnableOption "Enable Wofi terminal launcher";
|
|
||||||
|
|
||||||
# Only apply config if enabled
|
# Apply config if enabled
|
||||||
config = lib.mkIf (lib.getOption "enableWofi") {
|
config = { enableWofi, ... }: lib.mkIf enableWofi {
|
||||||
# Install Wofi system-wide
|
# Install system package
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [ pkgs.wofi ];
|
||||||
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;
|
environment.etc."xdg/wofi".source = wofiAssets;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,28 +1,19 @@
|
|||||||
{ lib, pkgs, ... }:
|
{ lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
# Relative path to assets
|
# relative path from this module
|
||||||
wofiAssets = ../../../assets/system/conf/wofi;
|
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
|
in
|
||||||
{
|
{
|
||||||
# Provide a module option to enable Wofi
|
# Declare an option to enable Wofi
|
||||||
options.enableWofi =
|
options.enableWofi = lib.mkEnableOption "Enable Wofi terminal launcher";
|
||||||
lib.mkEnableOption "Enable Wofi terminal launcher";
|
|
||||||
|
|
||||||
# Only apply config if enabled
|
# Apply config if enabled
|
||||||
config = lib.mkIf (lib.getOption "enableWofi") {
|
config = { enableWofi, ... }: lib.mkIf enableWofi {
|
||||||
# Install Wofi system-wide
|
# Install system package
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [ pkgs.wofi ];
|
||||||
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;
|
environment.etc."xdg/wofi".source = wofiAssets;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user