switched single host to colmena
This commit is contained in:
parent
f56ed00acf
commit
799c41ec58
36
flake.nix
36
flake.nix
|
@ -26,7 +26,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
{ self, nixpkgs, deploy-rs, vault-secrets, serokell-nix, ... }@inputs:
|
{ self, nixpkgs, deploy-rs, vault-secrets, serokell-nix, minecraft-servers, ... }@inputs:
|
||||||
let
|
let
|
||||||
inherit (nixpkgs) lib;
|
inherit (nixpkgs) lib;
|
||||||
inherit (builtins) filter mapAttrs;
|
inherit (builtins) filter mapAttrs;
|
||||||
|
@ -83,8 +83,37 @@
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# Make the config and deploy sets
|
# Make the config and deploy sets
|
||||||
nixosConfigurations = lib.foldr (el: acc: acc // mkConfig el) { } nixHosts;
|
# nixosConfigurations = lib.foldr (el: acc: acc // mkConfig el) { } nixHosts;
|
||||||
deploy.nodes = lib.foldr (el: acc: acc // mkDeploy el) { } nixHosts;
|
# deploy.nodes = lib.foldr (el: acc: acc // mkDeploy el) { } nixHosts;
|
||||||
|
|
||||||
|
colmena = {
|
||||||
|
meta = {
|
||||||
|
nixpkgs = import nixpkgs {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
overlays = [
|
||||||
|
(import ./nixos/pkgs)
|
||||||
|
minecraft-servers.overlays.default
|
||||||
|
];
|
||||||
|
specialArgs = {
|
||||||
|
inherit hosts;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
minecraft = {
|
||||||
|
imports = [
|
||||||
|
vault-secrets.nixosModules.vault-secrets
|
||||||
|
./nixos/common
|
||||||
|
"${./.}/nixos/hosts/minecraft/configuration.nix"
|
||||||
|
"${nixpkgs}/nixos/modules/virtualisation/lxc-container.nix"
|
||||||
|
./nixos/common/generic-lxc.nix
|
||||||
|
];
|
||||||
|
deployment = {
|
||||||
|
targetHost = "10.42.42.21";
|
||||||
|
targetUser = "victor";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
apps.${system} = rec {
|
apps.${system} = rec {
|
||||||
|
@ -114,6 +143,7 @@
|
||||||
# This only support bash so just execute zsh in bash as a workaround :/
|
# This only support bash so just execute zsh in bash as a workaround :/
|
||||||
shellHook = "zsh; exit $?";
|
shellHook = "zsh; exit $?";
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
|
colmena
|
||||||
deploy-rs.packages.${system}.deploy-rs
|
deploy-rs.packages.${system}.deploy-rs
|
||||||
fluxcd
|
fluxcd
|
||||||
k9s
|
k9s
|
||||||
|
|
|
@ -97,7 +97,6 @@
|
||||||
hostname = "minecraft";
|
hostname = "minecraft";
|
||||||
ip = "10.42.42.21";
|
ip = "10.42.42.21";
|
||||||
mac = "EA:30:73:E4:B6:69";
|
mac = "EA:30:73:E4:B6:69";
|
||||||
nix = false;
|
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
hostname = "gitea";
|
hostname = "gitea";
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
{ config, inputs, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
inputs.vault-secrets.nixosModules.vault-secrets
|
|
||||||
# User account definitions
|
# User account definitions
|
||||||
./users
|
./users
|
||||||
./services
|
./services
|
||||||
|
@ -37,10 +36,6 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
nixpkgs.overlays = [
|
|
||||||
(import ../pkgs)
|
|
||||||
inputs.minecraft-servers.overlays.default
|
|
||||||
];
|
|
||||||
|
|
||||||
# Limit the systemd journal to 100 MB of disk or the
|
# Limit the systemd journal to 100 MB of disk or the
|
||||||
# last 7 days of logs, whichever happens first.
|
# last 7 days of logs, whichever happens first.
|
||||||
|
|
|
@ -45,7 +45,7 @@ in {
|
||||||
# Additional packages
|
# Additional packages
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
binutils
|
binutils
|
||||||
checkov
|
colmena
|
||||||
fix-vscode
|
fix-vscode
|
||||||
fluxcd
|
fluxcd
|
||||||
k9s
|
k9s
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
networking.firewall.allowedTCPPorts = [ ];
|
networking.firewall.allowedTCPPorts = [ ];
|
||||||
|
|
||||||
services.minecraft-server = {
|
services.minecraft-server = {
|
||||||
enable = true;
|
enable = false;
|
||||||
package = pkgs.minecraftServers.purpur_1_18;
|
package = pkgs.minecraftServers.purpur_1_18;
|
||||||
jvmOpts = "--add-modules=jdk.incubator.vector -Xmx2048M -Xms2048M";
|
jvmOpts = "--add-modules=jdk.incubator.vector -Xmx2048M -Xms2048M";
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue