2023-06-05 15:50:07 +00:00
|
|
|
|
{ self, ... }:
|
|
|
|
|
let
|
|
|
|
|
inherit
|
|
|
|
|
(self.inputs)
|
|
|
|
|
nixpkgs
|
2024-10-19 02:22:11 +00:00
|
|
|
|
lix-module
|
2023-06-05 15:50:07 +00:00
|
|
|
|
home-manager
|
|
|
|
|
agenix
|
|
|
|
|
nur
|
|
|
|
|
colmena
|
|
|
|
|
flake-registry
|
|
|
|
|
nixos-hardware
|
|
|
|
|
srvos
|
|
|
|
|
disko
|
|
|
|
|
;
|
|
|
|
|
nixosSystem = nixpkgs.lib.makeOverridable nixpkgs.lib.nixosSystem;
|
|
|
|
|
|
|
|
|
|
colmenaModules = [
|
|
|
|
|
colmena.nixosModules.deploymentOptions
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
commonModules = [
|
|
|
|
|
{
|
|
|
|
|
_module.args.self = self;
|
|
|
|
|
_module.args.inputs = self.inputs;
|
|
|
|
|
srvos.flake = self;
|
|
|
|
|
}
|
|
|
|
|
# only include admins here for monitoring/backup infrastructure
|
|
|
|
|
./modules/users/admins.nix
|
|
|
|
|
./modules/packages.nix
|
|
|
|
|
./modules/nix-daemon.nix
|
|
|
|
|
./modules/tor-ssh.nix
|
|
|
|
|
./modules/hosts.nix
|
|
|
|
|
./modules/network.nix
|
|
|
|
|
./modules/zsh.nix
|
2024-02-12 18:08:12 +00:00
|
|
|
|
# FIXME: ./modules/buildbot — whenever you are ready.
|
2023-06-05 15:50:07 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
disko.nixosModules.disko
|
|
|
|
|
srvos.nixosModules.server
|
|
|
|
|
|
2023-07-01 11:00:00 +00:00
|
|
|
|
srvos.nixosModules.mixins-trusted-nix-caches
|
|
|
|
|
srvos.nixosModules.mixins-terminfo
|
|
|
|
|
|
2023-06-05 15:50:07 +00:00
|
|
|
|
# srvos.nixosModules.mixins-telegraf
|
|
|
|
|
# srvos.nixosModules.mixins-terminfo
|
|
|
|
|
|
2024-10-19 02:22:11 +00:00
|
|
|
|
# use lix
|
|
|
|
|
lix-module.nixosModules.default
|
|
|
|
|
|
2023-06-05 15:50:07 +00:00
|
|
|
|
agenix.nixosModules.default
|
|
|
|
|
({ pkgs
|
|
|
|
|
, config
|
|
|
|
|
, lib
|
|
|
|
|
, ...
|
2023-07-01 14:46:53 +00:00
|
|
|
|
}:
|
|
|
|
|
let
|
|
|
|
|
sopsFile = ./. + "/hosts/${config.networking.hostName}.yml";
|
|
|
|
|
in
|
|
|
|
|
{
|
|
|
|
|
nix.nixPath = [
|
|
|
|
|
"home-manager=${home-manager}"
|
2024-10-19 02:25:06 +00:00
|
|
|
|
"nixpkgs=flake:nixpkgs"
|
2023-07-01 14:46:53 +00:00
|
|
|
|
"nur=${nur}"
|
|
|
|
|
];
|
|
|
|
|
# TODO: share nixpkgs for each machine to speed up local evaluation.
|
|
|
|
|
#nixpkgs.pkgs = self.inputs.nixpkgs.legacyPackages.${system};
|
2023-06-05 15:50:07 +00:00
|
|
|
|
|
2023-07-01 14:46:53 +00:00
|
|
|
|
#users.withSops = builtins.pathExists sopsFile;
|
|
|
|
|
#sops.secrets = lib.mkIf (config.users.withSops) {
|
|
|
|
|
# root-password-hash.neededForUsers = true;
|
|
|
|
|
#};
|
|
|
|
|
# sops.defaultSopsFile = lib.mkIf (builtins.pathExists sopsFile) sopsFile;
|
2023-06-05 15:50:07 +00:00
|
|
|
|
|
2024-10-19 02:25:06 +00:00
|
|
|
|
nix.settings.builders-use-substitutes = true;
|
2023-06-05 15:50:07 +00:00
|
|
|
|
|
2023-07-01 14:46:53 +00:00
|
|
|
|
nix.registry = {
|
|
|
|
|
home-manager.flake = home-manager;
|
|
|
|
|
nixpkgs.flake = nixpkgs;
|
|
|
|
|
nur.flake = nur;
|
|
|
|
|
};
|
|
|
|
|
time.timeZone = "UTC";
|
2023-07-01 11:00:00 +00:00
|
|
|
|
|
2023-07-01 14:46:53 +00:00
|
|
|
|
environment.systemPackages = [
|
|
|
|
|
pkgs.kitty.terminfo
|
|
|
|
|
];
|
|
|
|
|
})
|
2023-06-05 15:50:07 +00:00
|
|
|
|
];
|
|
|
|
|
in
|
|
|
|
|
{
|
|
|
|
|
flake.nixosConfigurations = {
|
|
|
|
|
epyc = nixosSystem {
|
|
|
|
|
system = "x86_64-linux";
|
|
|
|
|
modules =
|
|
|
|
|
commonModules
|
|
|
|
|
++ colmenaModules
|
|
|
|
|
++ [
|
|
|
|
|
./hosts/epyc.nix
|
|
|
|
|
];
|
|
|
|
|
};
|
2023-07-01 14:46:53 +00:00
|
|
|
|
};
|
2023-06-05 15:50:07 +00:00
|
|
|
|
|
|
|
|
|
flake.colmena = {
|
|
|
|
|
meta.nixpkgs = import nixpkgs {
|
|
|
|
|
system = "x86_64-linux";
|
2024-10-19 02:22:11 +00:00
|
|
|
|
# yikes, this overlay has to be listed twice since colmena makes us
|
|
|
|
|
# import nixpkgs explicitly here
|
|
|
|
|
overlays = [
|
|
|
|
|
# bonking cppnix out of the closure as much as possible
|
|
|
|
|
lix-module.overlays.default
|
|
|
|
|
];
|
2023-06-05 15:50:07 +00:00
|
|
|
|
};
|
|
|
|
|
epyc = {
|
|
|
|
|
imports =
|
|
|
|
|
commonModules
|
|
|
|
|
++ [
|
|
|
|
|
./hosts/epyc.nix
|
|
|
|
|
];
|
2023-07-01 14:46:53 +00:00
|
|
|
|
};
|
2023-06-05 15:50:07 +00:00
|
|
|
|
};
|
|
|
|
|
}
|