fn: Improve readability of fn.lst function arguments.

This commit is contained in:
Kevin Baensch 2024-11-30 21:08:01 +01:00
parent b6b22c2c22
commit c1c5ff299e
Signed by: derped
GPG key ID: C0F1D326C7626543
4 changed files with 32 additions and 31 deletions

View file

@ -35,25 +35,25 @@
fn = import ./fn.nix { inherit lib; };
pkgs = nixpkgs.legacyPackages."${system}";
machineList = fn.lst {
p = toString ./machines;
t = "directory";
b = false;
path = toString ./machines;
fileType = "directory";
fullPath = false;
};
nixosSystemFor = machine: {
name = machine;
value =
let
configFiles = fn.lst {
p = toString ./config;
b = true;
path = toString ./config;
fullPath = true;
};
pkgsFiles = fn.lst {
p = toString ./pkgs;
b = true;
path = toString ./pkgs;
fullPath = true;
};
serviceFiles = fn.lst {
p = toString ./services;
b = true;
path = toString ./services;
fullPath = true;
};
machinePath = lib.concatStringsSep "/" [
(toString ./.)
@ -62,8 +62,8 @@
];
machineFiles = lib.filter (lib.strings.hasSuffix ".nix") (
fn.lst {
p = machinePath;
b = true;
path = machinePath;
fullPath = true;
}
);
in