Format project using nixfmt rfc candidate.

This commit is contained in:
Kevin Baensch 2024-11-20 20:32:38 +01:00
parent 1f63817684
commit a9f7fe416f
Signed by: derped
GPG key ID: C0F1D326C7626543
91 changed files with 1347 additions and 1000 deletions

102
flake.nix
View file

@ -18,19 +18,21 @@
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
self,
nixpkgs,
flake-utils,
nixpkgs-wayland,
mailserver,
sops-nix,
...
} @ attrs:
outputs =
{
self,
nixpkgs,
flake-utils,
nixpkgs-wayland,
mailserver,
sops-nix,
...
}@attrs:
flake-utils.lib.eachDefaultSystem (
system: let
system:
let
inherit (nixpkgs) lib;
fn = import ./fn.nix {inherit lib;};
fn = import ./fn.nix { inherit lib; };
pkgs = nixpkgs.legacyPackages."${system}";
machineList = fn.lst {
p = toString ./machines;
@ -39,46 +41,52 @@
};
nixosSystemFor = machine: {
name = machine;
value = let
configFiles = fn.lst {
p = toString ./config;
b = true;
};
pkgsFiles = fn.lst {
p = toString ./pkgs;
b = true;
};
serviceFiles = fn.lst {
p = toString ./services;
b = true;
};
machinePath = lib.concatStringsSep "/" [(toString ./.) "machines" machine];
machineFiles = lib.filter (lib.strings.hasSuffix ".nix") (fn.lst {
p = machinePath;
b = true;
});
in
value =
let
configFiles = fn.lst {
p = toString ./config;
b = true;
};
pkgsFiles = fn.lst {
p = toString ./pkgs;
b = true;
};
serviceFiles = fn.lst {
p = toString ./services;
b = true;
};
machinePath = lib.concatStringsSep "/" [
(toString ./.)
"machines"
machine
];
machineFiles = lib.filter (lib.strings.hasSuffix ".nix") (
fn.lst {
p = machinePath;
b = true;
}
);
in
nixpkgs.lib.nixosSystem {
inherit system;
specialArgs =
attrs
// {
inherit system;
inherit fn;
};
modules =
[
({config, ...}: {config.nixpkgs.overlays = [nixpkgs-wayland.overlay];})
(toString ./options/machine.nix)
sops-nix.nixosModules.sops
]
++ machineFiles
++ configFiles
++ pkgsFiles
++ serviceFiles;
specialArgs = attrs // {
inherit system;
inherit fn;
};
modules = [
(
{ config, ... }:
{
config.nixpkgs.overlays = [ nixpkgs-wayland.overlay ];
}
)
(toString ./options/machine.nix)
sops-nix.nixosModules.sops
] ++ machineFiles ++ configFiles ++ pkgsFiles ++ serviceFiles;
};
};
in {
in
{
apps = {
"lint" = {
type = "app";