feat: foundation for secrets under NixOS

This commit is contained in:
Kat Inskip 2022-12-02 02:06:54 +01:00
parent ae7d7de111
commit bc01d35279
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
3 changed files with 182 additions and 3 deletions

View file

@ -1,4 +1,4 @@
{ nixpkgs, darwin, home-manager, ... }@inputs: let
{ nixpkgs, darwin, home-manager, scalpel ... }@inputs: let
tree = (inputs.tree.tree {
inherit inputs;
folder = ./.;
@ -18,7 +18,7 @@
inherit (lib.attrsets) mapAttrs;
in {
inherit tree;
nixosConfigurations = mapAttrs (name: path: nixpkgs.lib.nixosSystem {
nixosConfigurations = let base = mapAttrs (name: path: nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs tree;
machine = name;
@ -26,9 +26,15 @@ in {
system = "x86_64-linux";
modules = [
home-manager.nixosModules.home-manager
agenix.nixosModule
path
];
} ) tree.nixos.systems;
} ) tree.nixos.systems in mapAttrs (_: sys: sys.extendModules {
modules = [ scalpel.nixosModule ];
specialArgs = {
prev = sys;
};
} ) base;
darwinConfigurations = mapAttrs (name: path: darwin.lib.darwinSystem {
specialArgs = {
inherit inputs tree;