refactor(flake): extract more stuff in flake modules

`pkgs` redefinition (with overlays)
`nix-topology` setup
`agenix-rekey` setup
This commit is contained in:
reo101 2024-07-19 12:35:01 +03:00
parent b4e7901780
commit eeae48b5d8
Signed by: reo101
GPG key ID: 675AA7EF13964ACB
4 changed files with 54 additions and 26 deletions

15
nix/agenix.nix Normal file
View file

@ -0,0 +1,15 @@
{ lib, config, self, inputs, ... }:
{
imports = [
inputs.agenix-rekey.flakeModule
];
perSystem = {
agenix-rekey = {
nodes = {
inherit (self.nixosConfigurations) jeeves;
};
};
};
}

13
nix/pkgs.nix Normal file
View file

@ -0,0 +1,13 @@
{ lib, config, self, inputs, ... }:
{
perSystem = { lib, pkgs, system, ... }: {
_module.args.pkgs = import inputs.nixpkgs {
inherit system;
overlays = lib.attrValues self.overlays ++ [
inputs.nix-topology.overlays.default
];
config = { };
};
};
}

23
nix/topology.nix Normal file
View file

@ -0,0 +1,23 @@
{ lib, config, self, inputs, ... }:
let
modules = [
{
}
];
in
{
imports = [
inputs.nix-topology.flakeModule
];
perSystem = {
topology = {
inherit modules;
nixosConfigurations = {
inherit (self.nixosConfigurations)
jeeves;
};
};
};
}