Format project using nixfmt rfc candidate.
This commit is contained in:
parent
1f63817684
commit
a9f7fe416f
91 changed files with 1347 additions and 1000 deletions
102
flake.nix
102
flake.nix
|
@ -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";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue