feat(nixos): some moves to nixos server
This commit is contained in:
11
nixos/module/hectic/service/astroneer.nix
Normal file
11
nixos/module/hectic/service/astroneer.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
inputs,
|
||||
flake,
|
||||
self,
|
||||
}:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let in { }
|
||||
17
nixos/system/games/astroneer.nix
Normal file
17
nixos/system/games/astroneer.nix
Normal 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
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
22
nixos/system/games/default.nix
Normal file
22
nixos/system/games/default.nix
Normal 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; })
|
||||
];
|
||||
}
|
||||
44
nixos/system/games/games.nix
Normal file
44
nixos/system/games/games.nix
Normal 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''
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user