Used agenix to manage secrets, 4 services up, ssh
This commit is contained in:
33
flake.nix
33
flake.nix
@@ -1,28 +1,47 @@
|
||||
{
|
||||
description = "A very basic flake";
|
||||
description = "Gortium infra flake";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||
agenix = {
|
||||
url = "github:ryantm/agenix";
|
||||
inputs.darwin.follows = "";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, sops-nix, ... }@inputs:
|
||||
outputs = { self, nixpkgs, agenix, ... }@inputs:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
keys = import ./lib/keys.nix;
|
||||
paths = {
|
||||
flake = "/home/gortium/infra";
|
||||
identities = [ "/home/gortium/.ssh/gortium_ssh_key" "/etc/ssh/ssh_host_ed25519_key" ];
|
||||
};
|
||||
overlays = [ agenix.overlays.default ];
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
};
|
||||
inherit system overlays;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
|
||||
devShell = import ./shells/nix_dev.nix {
|
||||
inherit pkgs system agenix;
|
||||
};
|
||||
in
|
||||
{
|
||||
nixosConfigurations = {
|
||||
lazyworkhorse = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit system; };
|
||||
specialArgs = { inherit system self keys paths; };
|
||||
modules = [
|
||||
{ nixpkgs.overlays = overlays; }
|
||||
agenix.nixosModules.default
|
||||
./hosts/lazyworkhorse/configuration.nix
|
||||
./hosts/lazyworkhorse/hardware-configuration.nix
|
||||
./modules/default.nix
|
||||
./users/gortium.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
devShells.${system}.default = devShell;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user