Add secret handling

This commit is contained in:
Martin Pander
2026-02-07 15:55:01 +01:00
parent a9c5e2398d
commit 61bb1578e0
8 changed files with 91 additions and 5 deletions

View File

@@ -18,9 +18,14 @@
url = "github:LnL7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, nixos-wsl, home-manager, nix-darwin, ... }@inputs:
outputs = { self, nixpkgs, nixos-wsl, home-manager, nix-darwin, sops-nix, ... }@inputs:
let
linuxSystem = "x86_64-linux";
linuxAarchSystem = "aarch64-linux";
@@ -38,7 +43,7 @@
# Work WSL
work = nixpkgs.lib.nixosSystem {
system = linuxSystem;
specialArgs = { inherit self; };
specialArgs = { inherit self inputs; };
modules = [
nixos-wsl.nixosModules.wsl
./hosts/work/nixos/configuration.nix
@@ -46,6 +51,7 @@
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = { inherit self inputs; };
home-manager.users.pan = import ./hosts/work/nixos/home.nix;
}
];
@@ -54,13 +60,14 @@
# Home
home = nixpkgs.lib.nixosSystem {
system = linuxAarchSystem;
specialArgs = { inherit self; };
specialArgs = { inherit self inputs; };
modules = [
./hosts/home/nixos/configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = { inherit self inputs; };
home-manager.users.martin = import ./hosts/home/nixos/home.nix;
}
];
@@ -70,7 +77,7 @@
# --- Darwin Systems (Mac) ---
darwinConfigurations."Martins-MacBook-Pro" = nix-darwin.lib.darwinSystem {
system = darwinSystem;
specialArgs = { inherit self; };
specialArgs = { inherit self inputs; };
modules = [ ./hosts/home/darwin/configuration.nix ];
};
@@ -78,11 +85,13 @@
homeConfigurations = {
"pan@work" = home-manager.lib.homeManagerConfiguration {
pkgs = pkgsLinux;
extraSpecialArgs = { inherit self inputs; };
modules = [ ./hosts/work/nix/home.nix ];
};
"martin@mac" = home-manager.lib.homeManagerConfiguration {
pkgs = pkgsDarwin;
extraSpecialArgs = { inherit self inputs; };
modules = [ ./hosts/home/nix/home.nix ];
};
};