38 lines
No EOL
1.3 KiB
Nix
38 lines
No EOL
1.3 KiB
Nix
{
|
|
description = "Project-A flake!";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "nixpkgs/nixos-25.05";
|
|
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
secret.url = "git+ssh://forgejo@git.project-a.space/Project-A/project-secret.git";
|
|
project-a-software.url = "git+ssh://forgejo@git.project-a.space/Project-A/project-software.git";
|
|
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager/release-25.05";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs = { self, nixpkgs, nixpkgs-unstable, project-a-software, home-manager, secret, ... }:
|
|
let
|
|
linux64 = "x86_64-linux";
|
|
nixosServer = { name, system ? linux64, modules ? [] }:
|
|
nixpkgs.lib.nixosSystem {
|
|
system = system;
|
|
specialArgs.pkgs-unstable = nixpkgs-unstable.legacyPackages.${system};
|
|
specialArgs.secret = secret.${name};
|
|
specialArgs.common-secret = secret.common;
|
|
modules = [
|
|
./servers/common/main.nix
|
|
./servers/${name}/main.nix
|
|
] ++ modules;
|
|
};
|
|
in {
|
|
nixosConfigurations = {
|
|
artemisia = nixosServer { name = "artemisia"; modules = [ project-a-software.marzban ]; };
|
|
reine = nixosServer { name = "reine"; };
|
|
mio = nixosServer { name = "mio"; modules = [ project-a-software.marzban ]; };
|
|
vanessa = nixosServer { name = "vanessa"; modules = [ project-a-software.marzban ]; };
|
|
};
|
|
};
|
|
} |