summaryrefslogtreecommitdiff
path: root/os
diff options
context:
space:
mode:
authoradikro <adikro@disroot.org>2026-02-08 18:03:39 +0100
committeradikro <adikro@disroot.org>2026-02-08 18:03:39 +0100
commit2c8a4dd99efd61298bc18393e7fcbf6063db8671 (patch)
tree1efd5ac8f5bcf7b1611cec1beaa545e6a2c14160 /os
parenteb95abfc230dc239122f1e89e90cd9a998491a2f (diff)
...
Diffstat (limited to 'os')
-rw-r--r--os/srv/gaming.nix2
-rw-r--r--os/srv/sops.nix28
-rw-r--r--os/srv/srv.nix2
-rw-r--r--os/srv/syncthing.nix54
4 files changed, 86 insertions, 0 deletions
diff --git a/os/srv/gaming.nix b/os/srv/gaming.nix
index 9ac8c88..f0ff771 100644
--- a/os/srv/gaming.nix
+++ b/os/srv/gaming.nix
@@ -27,6 +27,8 @@ in
};
environment.systemPackages = with pkgs; [
+ openttd-jgrpp
+ ludusavi
protonplus
openmw
heroic
diff --git a/os/srv/sops.nix b/os/srv/sops.nix
new file mode 100644
index 0000000..85a5123
--- /dev/null
+++ b/os/srv/sops.nix
@@ -0,0 +1,28 @@
+{
+ config,
+ lib,
+ username,
+ ...
+}:
+let
+ cfg = config.os.srv.sops;
+in
+{
+ options.os.srv.sops.enable = lib.mkEnableOption "enables sops-nix secret storing";
+ config = lib.mkIf cfg.enable {
+ sops = {
+ defaultSopsFile = ../../secrets.yaml;
+ defaultSopsFormat = "yaml";
+ age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
+
+ secrets = {
+ "syncthing/gui_password" = {
+ owner = config.services.syncthing.user;
+ };
+ "obs/websocket_password" = {
+ owner = username;
+ };
+ };
+ };
+ };
+}
diff --git a/os/srv/srv.nix b/os/srv/srv.nix
index 6109361..0e2a4f7 100644
--- a/os/srv/srv.nix
+++ b/os/srv/srv.nix
@@ -1,6 +1,8 @@
{ ... }:
{
imports = [
+ ./syncthing.nix
+ ./sops.nix
./bluetooth.nix
./compat.nix
./docker.nix
diff --git a/os/srv/syncthing.nix b/os/srv/syncthing.nix
new file mode 100644
index 0000000..1531c04
--- /dev/null
+++ b/os/srv/syncthing.nix
@@ -0,0 +1,54 @@
+{
+ config,
+ lib,
+ username,
+ ...
+}:
+let
+ cfg = config.os.srv.syncthing;
+in
+{
+ options.os.srv.syncthing.enable = lib.mkEnableOption "enables syncthing syncing";
+ config = lib.mkIf cfg.enable {
+ services.syncthing = {
+ enable = true;
+ user = "${username}";
+ dataDir = "/home/${username}/.local/share/syncthing";
+ configDir = "/home/${username}/.config/syncthing";
+ guiPasswordFile = config.sops.secrets."syncthing/gui_password".path;
+
+ settings = {
+ devices = {
+ "desktop" = {
+ id = "YGMWGOB-LTJUDM7-CY25MAF-NPE7J4J-KYRNPB5-ZHD5DBI-VNRAXI6-LIP2DQP";
+ };
+ "laptop" = {
+ id = "";
+ };
+ "thinkpad" = {
+ id = "";
+ };
+ };
+ folders = {
+ "game-saves" = {
+ path = "/home/${username}/.saves";
+ id = "shared-saves-v1";
+ devices = [
+ "desktop"
+ "laptop"
+ "thinkpad"
+ ];
+
+ versioning = {
+ type = "staggered";
+ params = {
+ cleanInterval = "3600";
+ maxAge = "2592000";
+ };
+ };
+ };
+ };
+ };
+ };
+ };
+}