refactor(flake): extract more stuff in flake modules
`pkgs` redefinition (with overlays) `nix-topology` setup `agenix-rekey` setup
This commit is contained in:
parent
b4e7901780
commit
eeae48b5d8
4 changed files with 54 additions and 26 deletions
15
nix/agenix.nix
Normal file
15
nix/agenix.nix
Normal 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
13
nix/pkgs.nix
Normal 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
23
nix/topology.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue