first commit
This commit is contained in:
commit
21737592da
27 changed files with 744 additions and 0 deletions
38
flake.nix
Normal file
38
flake.nix
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
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 ]; };
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue