2021-06-05 23:59:06 +03:00
|
|
|
{
|
|
|
|
description = "Private Void system configurations";
|
|
|
|
|
|
|
|
nixConfig = {
|
|
|
|
substituters = [ "https://cache.privatevoid.net" ];
|
|
|
|
trusted-public-keys = ["cache.privatevoid.net:SErQ8bvNWANeAvtsOESUwVYr2VJynfuc9JRwlzTTkVg="];
|
|
|
|
};
|
|
|
|
|
|
|
|
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";
|
|
|
|
|
|
|
|
deploy-rs.url = "github:serokell/deploy-rs";
|
|
|
|
deploy-rs.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
deploy-rs.inputs.naersk.follows = "naersk";
|
|
|
|
|
|
|
|
# re-pin naersk to fix deprecation warning in deploy-rs
|
|
|
|
naersk.url = "github:nmattia/naersk/master";
|
|
|
|
naersk.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
|
|
|
agenix.url = "github:ryantm/agenix";
|
|
|
|
agenix.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
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;
|
|
|
|
nixosConfigurations =
|
2021-06-25 05:11:26 +03:00
|
|
|
(lib.genAttrs [ "styx" "meet" "git" ] 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-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;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|