temporary chaos
This commit is contained in:
parent
3032768cc9
commit
8e31bd6c02
27 changed files with 490 additions and 106 deletions
80
flake.nix
80
flake.nix
|
|
@ -5,8 +5,16 @@
|
|||
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";
|
||||
|
||||
deploy-rs = {
|
||||
url = "github:serokell/deploy-rs";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
project-a-software = {
|
||||
url = "git+ssh://forgejo@git.project-a.space/Project-A/project-software.git";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.nixpkgs-unstable.follows = "nixpkgs-unstable";
|
||||
};
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-25.05";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
|
@ -22,6 +30,7 @@
|
|||
nixpkgs,
|
||||
nixpkgs-unstable,
|
||||
project-a-software,
|
||||
deploy-rs,
|
||||
home-manager,
|
||||
winapps,
|
||||
secret,
|
||||
|
|
@ -31,9 +40,12 @@
|
|||
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;
|
||||
specialArgs = {
|
||||
pkgs-unstable = import nixpkgs-unstable { system = linux64; config.allowUnfree = true; };
|
||||
pkgs-projecta = project-a-software.packages.${system};
|
||||
secret = secret.${name};
|
||||
common-secret = secret.common;
|
||||
};
|
||||
modules = [
|
||||
./servers/common/main.nix
|
||||
./servers/${name}/main.nix
|
||||
|
|
@ -41,17 +53,18 @@
|
|||
};
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
artemisia = nixosServer { name = "artemisia"; modules = [ project-a-software.marzban ]; };
|
||||
reine = nixosServer { name = "reine"; modules = [ project-a-software.affine ]; };
|
||||
mio = nixosServer { name = "mio"; modules = [ project-a-software.marzban ]; };
|
||||
ivan = nixosServer { name = "ivan"; modules = [ project-a-software.marzban ]; };
|
||||
vanessa = nixosServer { name = "vanessa"; modules = [ project-a-software.marzban ]; };
|
||||
artemisia = nixosServer { name = "artemisia"; modules = [ project-a-software.nixosModules.marzban ]; };
|
||||
reine = nixosServer { name = "reine"; modules = [ project-a-software.nixosModules.affine ]; };
|
||||
ivan = nixosServer { name = "ivan"; modules = [ project-a-software.nixosModules.marzban ]; };
|
||||
kotori = nixosServer { name = "kotori"; modules = [ project-a-software.nixosModules.marzban ]; };
|
||||
mio = nixosServer { name = "mio"; modules = [ ]; };
|
||||
kristine = nixosServer { name = "kristine"; modules = [ project-a-software.nixosModules.marzban ]; };
|
||||
|
||||
aqore-nix = nixpkgs.lib.nixosSystem {
|
||||
system = linux64;
|
||||
specialArgs = {
|
||||
inherit winapps;
|
||||
pkgs-unstable = nixpkgs-unstable.legacyPackages.${linux64};
|
||||
pkgs-unstable = import nixpkgs-unstable { system = linux64; config.allowUnfree = true; };
|
||||
};
|
||||
modules = [
|
||||
./desktops/aqore-nix/main.nix
|
||||
|
|
@ -64,10 +77,57 @@
|
|||
environment.systemPackages = [
|
||||
winapps.packages."${linux64}".winapps
|
||||
winapps.packages."${linux64}".winapps-launcher
|
||||
deploy-rs.packages."${linux64}".deploy-rs
|
||||
];
|
||||
})
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
deploy.nodes = let serverNode = name: {
|
||||
hostname = "${name}.project-a.space";
|
||||
profiles.system = {
|
||||
user = "root";
|
||||
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.${name};
|
||||
};
|
||||
sshUser = "in5ar";
|
||||
sshOpts = [ "-p" "1004" ];
|
||||
};
|
||||
in {
|
||||
artemisia = serverNode "artemisia";
|
||||
reine = {
|
||||
hostname = "192.168.0.3";
|
||||
profiles.system = {
|
||||
user = "root";
|
||||
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.reine;
|
||||
};
|
||||
sshUser = "in5ar";
|
||||
sshOpts = [ "-p" "1004" ];
|
||||
};
|
||||
ivan = serverNode "ivan";
|
||||
kotori = serverNode "kotori";
|
||||
mio = serverNode "mio";
|
||||
kristine = serverNode "kristine";
|
||||
};
|
||||
|
||||
devShells = nixpkgs.lib.genAttrs [ "x86_64-linux" ] (system: {
|
||||
default = let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
prompt = ''function fish_prompt; set_color red; echo -n "Project-A/debug> "; set_color normal; end'';
|
||||
inspect = ''function inspect; nix repl .; end;'';
|
||||
inspect-nixpkgs = ''function inspect-nixpkgs; nix repl nixpkgs; end;'';
|
||||
included-functions = "${inspect} ${inspect-nixpkgs}";
|
||||
in pkgs.mkShell {
|
||||
buildInputs = [];
|
||||
shellHook = ''
|
||||
printf "Welcome to the \033[1;31mProject-A\033[0m dev shell!\n"
|
||||
|
||||
if [ -z "$FISH_VERSION" ] && [ -x "${pkgs.fish}/bin/fish" ]; then
|
||||
exec ${pkgs.fish}/bin/fish --init-command '${prompt}; ${included-functions}'
|
||||
fi
|
||||
'';
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue