Reformat with alejandra

This commit is contained in:
Invariantspace 2024-08-14 11:14:20 -07:00
parent 7b2b5b3b80
commit 52a81ddb21
No known key found for this signature in database
GPG key ID: EBC4A20067373921
53 changed files with 764 additions and 746 deletions

View file

@ -13,47 +13,51 @@
sops-nix.url = "github:Mic92/sops-nix";
};
outputs = inputs@{ self, nixpkgs, nix-custom, ... }:
let
linuxCfgDir = ./linux;
templateDir = ./template;
in
{
nixosConfigurations = builtins.mapAttrs
(instance: _:
nixpkgs.lib.nixosSystem ({
modules = [
# Import config from folder
(linuxCfgDir + "/${instance}")
# Setup Nix
({ pkgs, ... }: {
networking.hostName = instance;
nix = {
gc = {
automatic = true;
options = "--delete-older-than 30d";
};
settings = {
auto-optimise-store = true;
experimental-features = [ "nix-command" "flakes" ];
trusted-substituters = [ "https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store" ];
};
outputs = inputs @ {
self,
nixpkgs,
nix-custom,
...
}: let
linuxCfgDir = ./linux;
templateDir = ./template;
in {
nixosConfigurations =
builtins.mapAttrs
(instance: _:
nixpkgs.lib.nixosSystem {
modules = [
# Import config from folder
(linuxCfgDir + "/${instance}")
# Setup Nix
({pkgs, ...}: {
networking.hostName = instance;
nix = {
gc = {
automatic = true;
options = "--delete-older-than 30d";
};
nixpkgs = {
config.allowUnfree = true;
overlays = [ nix-custom.overlays.default ];
settings = {
auto-optimise-store = true;
experimental-features = ["nix-command" "flakes"];
trusted-substituters = ["https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store"];
};
})
];
specialArgs = { inherit inputs; };
}))
(builtins.readDir linuxCfgDir);
templates = builtins.mapAttrs
(template: _: {
path = templateDir + "/${template}";
description = "Template flake setup: ${template}";
};
nixpkgs = {
config.allowUnfree = true;
overlays = [nix-custom.overlays.default];
};
})
];
specialArgs = {inherit inputs;};
})
(builtins.readDir templateDir);
};
(builtins.readDir linuxCfgDir);
templates =
builtins.mapAttrs
(template: _: {
path = templateDir + "/${template}";
description = "Template flake setup: ${template}";
})
(builtins.readDir templateDir);
};
}