switched single host to colmena

This commit is contained in:
Vivian 2022-07-30 13:12:10 +02:00
parent f56ed00acf
commit 799c41ec58
5 changed files with 36 additions and 12 deletions

View file

@ -26,7 +26,7 @@
};
outputs =
{ self, nixpkgs, deploy-rs, vault-secrets, serokell-nix, ... }@inputs:
{ self, nixpkgs, deploy-rs, vault-secrets, serokell-nix, minecraft-servers, ... }@inputs:
let
inherit (nixpkgs) lib;
inherit (builtins) filter mapAttrs;
@ -83,8 +83,37 @@
in
{
# Make the config and deploy sets
nixosConfigurations = lib.foldr (el: acc: acc // mkConfig el) { } nixHosts;
deploy.nodes = lib.foldr (el: acc: acc // mkDeploy el) { } nixHosts;
# nixosConfigurations = lib.foldr (el: acc: acc // mkConfig 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 {
@ -114,6 +143,7 @@
# This only support bash so just execute zsh in bash as a workaround :/
shellHook = "zsh; exit $?";
buildInputs = with pkgs; [
colmena
deploy-rs.packages.${system}.deploy-rs
fluxcd
k9s

View file

@ -97,7 +97,6 @@
hostname = "minecraft";
ip = "10.42.42.21";
mac = "EA:30:73:E4:B6:69";
nix = false;
}
{
hostname = "gitea";

View file

@ -1,8 +1,7 @@
{ config, inputs, pkgs, ... }:
{ config, pkgs, ... }:
{
imports = [
inputs.vault-secrets.nixosModules.vault-secrets
# User account definitions
./users
./services
@ -37,10 +36,6 @@
};
nixpkgs.config.allowUnfree = true;
nixpkgs.overlays = [
(import ../pkgs)
inputs.minecraft-servers.overlays.default
];
# Limit the systemd journal to 100 MB of disk or the
# last 7 days of logs, whichever happens first.

View file

@ -45,7 +45,7 @@ in {
# Additional packages
environment.systemPackages = with pkgs; [
binutils
checkov
colmena
fix-vscode
fluxcd
k9s

View file

@ -24,7 +24,7 @@
networking.firewall.allowedTCPPorts = [ ];
services.minecraft-server = {
enable = true;
enable = false;
package = pkgs.minecraftServers.purpur_1_18;
jvmOpts = "--add-modules=jdk.incubator.vector -Xmx2048M -Xms2048M";