2021-06-05 23:59:06 +03:00
|
|
|
{
|
|
|
|
description = "Private Void system configurations";
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-21.05";
|
|
|
|
|
2021-08-23 20:27:12 +03:00
|
|
|
nix-super.url = "git+https://git.privatevoid.net/max/nix-super";
|
|
|
|
nix-super.inputs.nix.follows = "nix-super-unstable-repin";
|
|
|
|
|
|
|
|
nix-super-unstable-repin.url = "github:NixOS/nix";
|
|
|
|
nix-super-unstable-repin.inputs.nixpkgs.follows = "nixpkgs";
|
2021-06-05 23:59:06 +03:00
|
|
|
|
|
|
|
home-manager.url = "github:nix-community/home-manager/master";
|
|
|
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
2021-11-25 21:09:15 +02:00
|
|
|
deploy-rs.url = "git+https://git.privatevoid.net/max/deploy-rs";
|
2021-06-05 23:59:06 +03:00
|
|
|
|
|
|
|
agenix.url = "github:ryantm/agenix";
|
|
|
|
agenix.inputs.nixpkgs.follows = "nixpkgs";
|
2021-10-16 21:24:25 +03:00
|
|
|
|
|
|
|
nar-serve.url = "github:numtide/nar-serve";
|
|
|
|
nar-serve.inputs.nixpkgs.follows = "nixpkgs";
|
2021-06-05 23:59:06 +03:00
|
|
|
};
|
|
|
|
outputs = { self, nixpkgs, home-manager, ... }@inputs:
|
|
|
|
let
|
|
|
|
inherit (nixpkgs) lib;
|
|
|
|
system = "x86_64-linux";
|
|
|
|
pkgs = import nixpkgs {
|
|
|
|
inherit system;
|
|
|
|
};
|
|
|
|
|
|
|
|
deploy-rs-lib = inputs.deploy-rs.lib.${system};
|
|
|
|
agenixModule = inputs.agenix.nixosModules.age;
|
|
|
|
|
|
|
|
aspect = import ./modules inputs;
|
|
|
|
hosts = import ./hosts;
|
2021-10-16 18:00:47 +03:00
|
|
|
specialArgs = {
|
|
|
|
inherit inputs hosts aspect;
|
|
|
|
toolsets = import ./tools;
|
|
|
|
};
|
2021-06-05 23:59:06 +03:00
|
|
|
mkNixOS' = lib: name: lib.nixosSystem {
|
|
|
|
inherit system;
|
|
|
|
inherit specialArgs;
|
2021-10-16 18:00:47 +03:00
|
|
|
modules = [ hosts."${name}".nixos ./tools/inject.nix ];
|
2021-06-05 23:59:06 +03:00
|
|
|
};
|
|
|
|
mkNixOS = mkNixOS' lib;
|
|
|
|
in {
|
|
|
|
nixosModules = aspect.modules;
|
2021-10-16 19:34:11 +03:00
|
|
|
nixosConfigurations = lib.genAttrs [
|
|
|
|
"styx"
|
|
|
|
"meet"
|
|
|
|
"git"
|
|
|
|
"VEGAS"
|
|
|
|
] mkNixOS;
|
2021-06-05 23:59:06 +03:00
|
|
|
|
|
|
|
deploy.nodes = with deploy-rs-lib; {
|
|
|
|
styx = {
|
|
|
|
hostname = "styx.services.privatevoid.net";
|
|
|
|
profiles.system = {
|
|
|
|
user = "root";
|
|
|
|
path = activate.nixos self.nixosConfigurations.styx;
|
|
|
|
};
|
|
|
|
};
|
2021-06-12 23:28:09 +03:00
|
|
|
meet = {
|
|
|
|
hostname = "meet.services.privatevoid.net";
|
|
|
|
profiles.system = {
|
|
|
|
user = "root";
|
|
|
|
path = activate.nixos self.nixosConfigurations.meet;
|
|
|
|
};
|
|
|
|
};
|
2021-06-25 05:11:26 +03:00
|
|
|
git = {
|
|
|
|
hostname = "git.services.privatevoid.net";
|
|
|
|
profiles.system = {
|
|
|
|
user = "root";
|
|
|
|
path = activate.nixos self.nixosConfigurations.git;
|
|
|
|
};
|
|
|
|
};
|
2021-10-16 19:34:11 +03:00
|
|
|
VEGAS = {
|
|
|
|
hostname = "vegas.backbone.privatevoid.net";
|
|
|
|
profiles.system = {
|
|
|
|
user = "root";
|
|
|
|
sshUser = "deploy";
|
|
|
|
path = activate.nixos self.nixosConfigurations.VEGAS;
|
|
|
|
};
|
|
|
|
};
|
2021-06-05 23:59:06 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
packages.${system} = import ./packages {
|
|
|
|
inherit pkgs inputs;
|
|
|
|
};
|
|
|
|
|
|
|
|
defaultApp.${system} = {
|
|
|
|
type = "app";
|
|
|
|
program = self.packages.${system}.flake-installer.outPath;
|
|
|
|
};
|
|
|
|
|
|
|
|
hydraJobs = {
|
|
|
|
systems.${system} = lib.mapAttrs (_: x: x.config.system.build.toplevel) self.nixosConfigurations;
|
|
|
|
packages = self.packages;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|