Run linter+formatter.
This commit is contained in:
parent
8fd1b6c982
commit
e2330f01fc
16 changed files with 58 additions and 54 deletions
24
flake.nix
24
flake.nix
|
@ -6,12 +6,12 @@
|
|||
nixpkgs-unstable.url = "github:/NixOS/nixpkgs/nixos-unstable";
|
||||
nixpkgs.url = "github:/NixOS/nixpkgs/nixos-unstable";
|
||||
alejandra = {
|
||||
url = github:kamadorueda/alejandra/3.0.0;
|
||||
url = "github:kamadorueda/alejandra/3.0.0";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
mailserver.url = "gitlab:/simple-nixos-mailserver/nixos-mailserver";
|
||||
sops-nix = {
|
||||
url = github:Mic92/sops-nix;
|
||||
url = "github:Mic92/sops-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
@ -23,15 +23,17 @@
|
|||
sops-nix,
|
||||
...
|
||||
} @ attrs: let
|
||||
lib = nixpkgs.lib;
|
||||
inherit (nixpkgs) lib;
|
||||
fn = import ./fn.nix {inherit lib;};
|
||||
mappedFormatter = builtins.mapAttrs (arch: packages: packages.default) alejandra.packages;
|
||||
mappedApps = builtins.mapAttrs (_arch: packages: {
|
||||
"lint" = {
|
||||
type = "app";
|
||||
program = "${packages.statix}/bin/statix";
|
||||
};
|
||||
}) nixpkgs.legacyPackages;
|
||||
mappedApps =
|
||||
builtins.mapAttrs (_arch: packages: {
|
||||
"lint" = {
|
||||
type = "app";
|
||||
program = "${packages.statix}/bin/statix";
|
||||
};
|
||||
})
|
||||
nixpkgs.legacyPackages;
|
||||
system = "x86_64-linux";
|
||||
machineList = fn.lst {
|
||||
p = toString ./machines;
|
||||
|
@ -54,14 +56,14 @@
|
|||
name = machine;
|
||||
value = let
|
||||
machinePath = lib.concatStringsSep "/" [(toString ./.) "machines" machine];
|
||||
machineFiles = lib.filter (name: lib.strings.hasSuffix ".nix" name) (fn.lst {
|
||||
machineFiles = lib.filter (lib.strings.hasSuffix ".nix") (fn.lst {
|
||||
p = machinePath;
|
||||
b = true;
|
||||
});
|
||||
in
|
||||
nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = attrs // {fn = fn;};
|
||||
specialArgs = attrs // {inherit fn;};
|
||||
modules =
|
||||
[
|
||||
(toString ./options/machine.nix)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue