infrastructure/flake.nix

169 lines
5.2 KiB
Nix
Raw Normal View History

2023-04-12 12:47:22 +00:00
{
inputs = {
2024-04-07 09:45:56 +00:00
attic = { url = "github:zhaofengli/attic"; };
2023-04-12 12:47:22 +00:00
nixpkgs = { url = "github:nixos/nixpkgs/nixos-unstable"; };
deploy-rs = { url = "github:serokell/deploy-rs"; inputs.nixpkgs.follows = "nixpkgs"; };
utils = { url = "github:numtide/flake-utils"; };
sops-nix = { url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; };
};
2024-04-07 09:45:56 +00:00
outputs = { self, attic, nixpkgs, deploy-rs, utils, sops-nix, ... }@inputs:
2023-04-12 12:47:22 +00:00
{
nixosConfigurations = {
2024-02-04 00:11:26 +00:00
"phoenix.lewd.wtf" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs self; };
modules = [
sops-nix.nixosModules.sops
./default.nix
./hosts/phoenix.lewd.wtf/configuration.nix
2024-04-07 09:45:56 +00:00
attic.nixosModules.atticd
2024-02-04 00:11:26 +00:00
];
};
2024-06-08 09:17:08 +00:00
"sphinx.lewd.wtf" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs self; };
modules = [
sops-nix.nixosModules.sops
./default.nix
./hosts/sphinx.lewd.wtf/configuration.nix
];
};
2023-04-12 12:47:22 +00:00
"aztul.elmosco.lewd.wtf" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs self; };
modules = [
sops-nix.nixosModules.sops
./default.nix
./hosts/seedbox/aztul/configuration.nix
];
};
2023-06-04 17:43:32 +00:00
"rene.elmosco.lewd.wtf" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs self; };
modules = [
sops-nix.nixosModules.sops
./default.nix
./hosts/seedbox/rene/configuration.nix
];
};
2023-11-19 20:08:25 +00:00
"reject.elmosco.lewd.wtf" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs self; };
modules = [
sops-nix.nixosModules.sops
./default.nix
./hosts/seedbox/reject/configuration.nix
];
};
2023-04-12 12:47:22 +00:00
"kinda.sus.lol" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs self; };
modules = [
sops-nix.nixosModules.sops
./default.nix
./hosts/kinda.sus.lol/configuration.nix
];
};
};
deploy.nodes = {
2024-02-04 00:11:26 +00:00
"phoenix.lewd.wtf" = {
2024-05-20 13:54:44 +00:00
sshOpts = [ "-p" "222" "-o" "StrictHostKeyChecking=no" ];
hostname = "192.168.0.42";
2024-02-04 00:11:26 +00:00
fastConnection = true;
profiles.system = {
sshUser = "root";
path =
deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations."phoenix.lewd.wtf";
user = "root";
};
};
2024-06-08 09:17:08 +00:00
"sphinx.lewd.wtf" = {
sshOpts = [ "-p" "222" "-o" "StrictHostKeyChecking=no" ];
hostname = "sphinx.lewd.wtf";
fastConnection = true;
profiles.system = {
sshUser = "root";
path =
deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations."sphinx.lewd.wtf";
user = "root";
};
};
2023-04-12 12:47:22 +00:00
"aztul.elmosco.lewd.wtf" = {
2024-05-20 13:54:44 +00:00
sshOpts = [ "-p" "22111" "-o" "StrictHostKeyChecking=no" ];
2023-04-12 12:47:22 +00:00
hostname = "aztul.elmosco.lewd.wtf";
fastConnection = true;
profiles.system = {
sshUser = "root";
path =
deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations."aztul.elmosco.lewd.wtf";
user = "root";
};
};
2023-06-04 17:43:32 +00:00
"rene.elmosco.lewd.wtf" = {
2024-05-20 13:54:44 +00:00
sshOpts = [ "-p" "22113" "-o" "StrictHostKeyChecking=no" ];
2023-06-04 17:43:32 +00:00
hostname = "rene.elmosco.lewd.wtf";
fastConnection = true;
profiles.system = {
sshUser = "root";
path =
deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations."rene.elmosco.lewd.wtf";
user = "root";
};
};
2023-11-19 20:08:25 +00:00
"reject.elmosco.lewd.wtf" = {
2024-05-20 13:54:44 +00:00
sshOpts = [ "-p" "22104" "-o" "StrictHostKeyChecking=no" ];
2023-11-19 20:08:25 +00:00
hostname = "reject.elmosco.lewd.wtf";
fastConnection = true;
profiles.system = {
sshUser = "root";
path =
deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations."reject.elmosco.lewd.wtf";
user = "root";
};
};
2023-04-12 12:47:22 +00:00
"kinda.sus.lol" = {
2024-05-20 13:54:44 +00:00
sshOpts = [ "-p" "22201" "-o" "StrictHostKeyChecking=no" ];
2023-04-12 12:47:22 +00:00
hostname = "kinda.sus.lol";
fastConnection = true;
profiles.system = {
sshUser = "root";
path =
deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations."kinda.sus.lol";
user = "root";
};
};
};
checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
} // utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
deploy-rs.defaultPackage.${system}
apacheHttpd
nixpkgs-fmt
];
};
}
);
}