nixos-systems/flake.nix
Eli Ribble 79c577cfff Attempt to make new corp hardware the definitive corp hardware
This is...a big change. If I run this on the old corp server it will
break a lot, LOT of stuff. So don't do that. This is also the first time
I'm attempting to use disko to fully define a server in a single step
rather than as a bootstrapping step.
2025-09-08 20:36:59 +00:00

49 lines
1.4 KiB
Nix

{
description = "Multi-host NixOS configuration";
inputs = {
disko = {
inputs.nixpkgs.follows = "nixpkgs";
url = "github:nix-community/disko";
};
home-manager = {
url = "github:nix-community/home-manager/release-25.05";
inputs.nixpkgs.follows = "nixpkgs";
};
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
nixvim = {
url = "github:nix-community/nixvim/nixos-25.05";
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix.url = "github:Mic92/sops-nix";
};
outputs = { self, disko, home-manager, nixpkgs, nixvim, sops-nix, ...}:
let
configFiles = pkgs.stdenv.mkDerivation {
name = "config-files";
src = ./configs;
installPhase = ''
mkdir -p $out
cp -r * $out/
'';
};
pkgs = nixpkgs.legacyPackages.${system};
system = "x86_64-linux";
in {
nixosConfigurations = {
corp = import ./system.nix {
configuration = ./host/corp/configuration.nix;
inherit configFiles disko home-manager nixpkgs nixvim sops-nix system;
};
"sync.nidus.cloud" = import ./system.nix {
configuration = ./host/sync/configuration.nix;
inherit configFiles disko home-manager nixpkgs nixvim sops-nix system;
};
test-corp = nixpkgs.lib.nixosSystem {
configuration = ./host/test-corp/configuration.nix;
inherit configFiles disko home-manager nixpkgs nixvim sops-nix system;
};
};
};
}