nix: use lib where possible
Signed-off-by: Myned <dev@bjork.tech>
This commit is contained in:
parent
48e84a857d
commit
654b594643
5 changed files with 11 additions and 9 deletions
|
@ -158,7 +158,7 @@ in {
|
|||
merge = field: expr: rules:
|
||||
map (
|
||||
rule:
|
||||
if builtins.isAttrs field
|
||||
if isAttrs field
|
||||
then "${rule}, ${lib.concatStringsSep ", " (lib.mapAttrsToList (f: e: format f e) field)}"
|
||||
else "${rule}, ${format field expr}"
|
||||
)
|
||||
|
|
|
@ -122,7 +122,7 @@ in {
|
|||
|
||||
src = "${pkgs.writeShellApplication {
|
||||
name = "search";
|
||||
text = builtins.readFile ./search.sh;
|
||||
text = readFile ./search.sh;
|
||||
|
||||
runtimeInputs = with pkgs; [
|
||||
coreutils
|
||||
|
@ -145,7 +145,7 @@ in {
|
|||
font: larger ${config.custom.font.monospace};
|
||||
}
|
||||
|
||||
${builtins.readFile ./style.css}
|
||||
${readFile ./style.css}
|
||||
'';
|
||||
|
||||
#!! Inherit from default layout
|
||||
|
|
|
@ -26,7 +26,7 @@ in {
|
|||
-- # TODO: Remove when using Wayland
|
||||
config.font_size = ${toString (14 * config.custom.scale)}
|
||||
|
||||
${builtins.readFile ./config.lua}
|
||||
${readFile ./config.lua}
|
||||
|
||||
return config
|
||||
'';
|
||||
|
|
|
@ -25,7 +25,7 @@ in {
|
|||
#// excludeShellChecks = ["SC2154"]; # argc evaluates variables at runtime
|
||||
|
||||
runtimeInputs = dependencies;
|
||||
text = builtins.readFile ./${name}.sh;
|
||||
text = readFile ./${name}.sh;
|
||||
}
|
||||
+ "/bin/${name}";
|
||||
};
|
||||
|
@ -38,7 +38,7 @@ in {
|
|||
pkgs.writers.writePython3Bin name {libraries = dependencies;}
|
||||
# Disable linting
|
||||
# https://flake8.pycqa.org/en/3.1.1/user/ignoring-errors.html#ignoring-entire-files
|
||||
("# flake8: noqa\n" + builtins.readFile ./${name}.py)
|
||||
("# flake8: noqa\n" + readFile ./${name}.py)
|
||||
+ "/bin/${name}";
|
||||
};
|
||||
in
|
||||
|
|
|
@ -17,13 +17,15 @@ in {
|
|||
package = pkgs.google-cursor;
|
||||
};
|
||||
|
||||
gtk = {
|
||||
gtk = let
|
||||
css = readFile ./style.css;
|
||||
in {
|
||||
enable = true;
|
||||
gtk3.extraCss = builtins.readFile ./style.css;
|
||||
gtk3.extraCss = css;
|
||||
|
||||
gtk4 = {
|
||||
extraConfig.gtk-hint-font-metrics = 1; # Fix blurry fonts
|
||||
extraCss = builtins.readFile ./style.css;
|
||||
extraCss = css;
|
||||
};
|
||||
|
||||
font = {
|
||||
|
|
Loading…
Add table
Reference in a new issue