feat(nixos): some moves to nixos server

This commit is contained in:
2025-12-28 19:18:15 +00:00
parent 96782b7b51
commit 4a9bb42015
12 changed files with 253 additions and 45 deletions

View File

@@ -0,0 +1,11 @@
{
inputs,
flake,
self,
}:
{
pkgs,
lib,
config,
...
}: let in { }

View File

@@ -0,0 +1,17 @@
{ pkgs, ... }: let
astroneerServer = pkgs.hectic.helpers.steam.buildSteamServer 728470;
in {
options = {
};
config = {
systemd.services."hectic-astroneer-server" = {
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
path = with pkgs; [ steamcmd ];
script = ''
echo zalupa
'';
};
};
}

View File

@@ -0,0 +1,22 @@
{
flake,
self,
inputs,
system,
...
}: let
# Use folder name as name of this system
name = builtins.baseNameOf ./.;
in self.lib.nixpkgs-lib.nixosSystem {
pkgs = import inputs.nixpkgs {
inherit system;
overlays = [ self.overlays.default ];
config.allowUnfreePredicate = pkg:
builtins.elem (inputs.nixpkgs.lib.getName pkg) [ "steamcmd" "steam-unwrapped" ];
};
modules = [
{ networking.hostName = name; }
(import ./${name}.nix { inherit flake self inputs; })
];
}

View File

@@ -0,0 +1,44 @@
{
inputs ? null,
flake ? null,
self ? null,
...
}:
{
config ? null,
pkgs ? null,
lib ? null,
modulesPath ? null,
...
}: {
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
self.nixosModules.hectic
inputs.sops-nix.nixosModules.sops
./astroneer.nix
];
hectic = {
archetype.dev.enable = true;
hardware.hetzner-cloud = {
enable = true;
networkMatchConfigName = "enp1s0";
ipv4 = "91.98.127.6";
ipv6 = "2a01:4f8:1c1b:6f10";
};
};
sops = {
gnupg.sshKeyPaths = [ ];
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
defaultSopsFile = ../../../sus/games.yaml;
secrets."env" = {};
};
environment.systemPackages = (with pkgs; [ rsync git steamcmd hectic.AstroTuxLauncher ]);
users.users.root.openssh.authorizedKeys.keys = [
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKAaObjLBslsdTlqEcYaS1TqX4x9aVJu75y27/8MFevO''
];
}