2022-11-13 21:45:50 +00:00
|
|
|
{
|
|
|
|
description = "hacc infra stuff";
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
mattermost-webapp.url = "https://releases.mattermost.com/6.7.2/mattermost-6.7.2-linux-amd64.tar.gz";
|
|
|
|
mattermost-webapp.flake = false;
|
|
|
|
mattermost-server.url = "github:mattermost/mattermost-server?ref=v6.7.2";
|
|
|
|
mattermost-server.flake = false;
|
|
|
|
|
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs?rev=df2bcbbd1c2aa144261cf1b0003c889c075dc693";
|
|
|
|
nixpkgs-unstable.url = "github:NixOS/nixpkgs?rev=ae1dc133ea5f1538d035af41e5ddbc2ebcb67b90";
|
|
|
|
nix-hexchen.url = "git+https://gitlab.com/hexchen/nixfiles?ref=main";
|
|
|
|
nixos-mailserver.url = "git+https://gitlab.com/simple-nixos-mailserver/nixos-mailserver?rev=f535d8123c4761b2ed8138f3d202ea710a334a1d";
|
2022-11-13 22:04:55 +00:00
|
|
|
|
|
|
|
deploy-rs.url = "github:serokell/deploy-rs";
|
|
|
|
deploy-rs.inputs.nixpkgs.follows = "nixpkgs";
|
2022-11-13 21:45:50 +00:00
|
|
|
};
|
|
|
|
|
2022-11-13 22:04:55 +00:00
|
|
|
outputs = { self, nixpkgs, nix-hexchen, deploy-rs, ... }@inputs:
|
2022-11-13 21:45:50 +00:00
|
|
|
let modules = nix-hexchen.nixosModules;
|
|
|
|
profiles = nix-hexchen.nixosModules.profiles;
|
|
|
|
pkgs = import ./pkgs {
|
|
|
|
sources = inputs;
|
|
|
|
system = "x86_64-linux";
|
|
|
|
};
|
|
|
|
# simulate the evalConfig as contained in nix-hexchen/lib/hosts.nix,
|
|
|
|
# but compatible with flakes
|
|
|
|
evalConfig = extraSpecial: config: nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = [
|
|
|
|
config
|
|
|
|
nix-hexchen.nixosModules.network.nftables
|
|
|
|
{ nixpkgs.pkgs = pkgs; }
|
|
|
|
];
|
|
|
|
specialArgs = {
|
|
|
|
inherit modules profiles evalConfig;
|
|
|
|
sources = inputs;
|
|
|
|
} // extraSpecial;
|
|
|
|
};
|
|
|
|
in {
|
|
|
|
# do this by hand instead of via nix-hexchen/lib/hosts.nix, since that one
|
|
|
|
# apparently can't support pkgs depending on flake inputs
|
|
|
|
nixosConfigurations.parsons = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = [
|
|
|
|
./hosts/parsons/configuration.nix
|
|
|
|
# not used anymore, but other things in nix-hexchen still depend on it
|
|
|
|
nix-hexchen.nixosModules.deploy
|
|
|
|
{ nixpkgs.pkgs = pkgs; }
|
|
|
|
];
|
|
|
|
specialArgs = {
|
|
|
|
# with a few exceptions, the flake inputs can be used the same
|
|
|
|
# as the niv-style (import nix/sources.nix {})
|
|
|
|
sources = inputs;
|
|
|
|
inherit modules profiles evalConfig;
|
|
|
|
};
|
|
|
|
};
|
2022-11-13 22:04:55 +00:00
|
|
|
|
|
|
|
deploy.nodes.parsons = {
|
|
|
|
hostname = "parsons";
|
|
|
|
profiles.system = {
|
|
|
|
user = "root";
|
|
|
|
path = deploy-rs.lib.x86_64-linux.activate.nixos
|
|
|
|
self.nixosConfigurations.parsons;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
# This is highly advised, and will prevent many possible mistakes
|
|
|
|
checks = builtins.mapAttrs
|
|
|
|
(system: deployLib: deployLib.deployChecks self.deploy)
|
|
|
|
deploy-rs.lib;
|
2022-11-13 21:45:50 +00:00
|
|
|
};
|
2022-11-13 22:04:55 +00:00
|
|
|
|
2022-11-13 21:45:50 +00:00
|
|
|
}
|