Files
infra/flake.nix

52 lines
1.4 KiB
Nix
Raw Permalink Normal View History

2025-08-03 15:42:02 -04:00
{
description = "Gortium infra flake";
2025-08-03 15:42:02 -04:00
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
agenix = {
url = "github:ryantm/agenix";
inputs.darwin.follows = "";
inputs.nixpkgs.follows = "nixpkgs";
};
2025-08-08 19:11:29 -04:00
self.submodules = true;
2025-08-03 15:42:02 -04:00
};
outputs = { self, nixpkgs, agenix, ... }@inputs:
2025-08-03 15:42:02 -04:00
let
system = "x86_64-linux";
keys = import ./lib/keys.nix;
paths = {
flake = "/home/gortium/infra";
2025-08-24 19:02:42 -04:00
identities = [
"/home/gortium/.ssh/gortium_ssh_key"
"/etc/ssh/ssh_host_ed25519_key"
"/root/.age/bootstrap.key" ];
};
overlays = [ agenix.overlays.default ];
2025-08-04 22:15:59 -04:00
pkgs = import nixpkgs {
inherit system overlays;
config.allowUnfree = true;
};
devShell = import ./shells/nix_dev.nix {
inherit pkgs system agenix;
2025-08-04 22:15:59 -04:00
};
2025-08-03 15:42:02 -04:00
in
{
nixosConfigurations = {
lazyworkhorse = nixpkgs.lib.nixosSystem {
specialArgs = { inherit system self keys paths; };
2025-08-03 15:42:02 -04:00
modules = [
{ nixpkgs.overlays = overlays; }
agenix.nixosModules.default
2025-08-03 15:42:02 -04:00
./hosts/lazyworkhorse/configuration.nix
./hosts/lazyworkhorse/hardware-configuration.nix
./modules/default.nix
./users/gortium.nix
2025-08-03 15:42:02 -04:00
];
};
};
devShells.${system}.default = devShell;
2025-08-03 15:42:02 -04:00
};
}