nixos-systems/system.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

42 lines
1 KiB
Nix

{ configFiles, configuration, disko, home-manager, nixpkgs, nixvim, sops-nix, system, ... }:
let
allowed-unfree-packages = [
"corefonts"
"mongodb"
];
in nixpkgs.lib.nixosSystem {
modules = [
disko.nixosModules.disko
home-manager.nixosModules.home-manager
{
home-manager.extraSpecialArgs = { inherit configFiles; };
home-manager.sharedModules = [
nixvim.homeManagerModules.nixvim
./modules/home/nixvim.nix
];
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
}
configuration
./modules
sops-nix.nixosModules.sops {
sops = {
age.generateKey = true;
age.keyFile = "/var/libs/sops-nix/key.txt";
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
defaultSopsFile = ./secrets/secrets.yaml;
};
}
./users
];
pkgs = import nixpkgs {
config = {
allowUnfreePredicate = pkg: builtins.elem (nixpkgs.lib.getName pkg) allowed-unfree-packages;
};
system = "${system}";
};
specialArgs = {
inherit configFiles;
};
system = "${system}";
}