From 703a811593200db20a2ee27b3790dce8be4944e8 Mon Sep 17 00:00:00 2001 From: Erwin Boskma Date: Mon, 21 Oct 2024 23:28:03 +0200 Subject: [PATCH] Factorio stuff --- machines/loki/configuration.nix | 4 ++++ machines/loki/secrets.yaml | 7 ++++--- users/erwin/home.nix | 9 ++++++++- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/machines/loki/configuration.nix b/machines/loki/configuration.nix index 941400d..0d71ea3 100644 --- a/machines/loki/configuration.nix +++ b/machines/loki/configuration.nix @@ -562,6 +562,10 @@ barman-passwords = { owner = "barman"; }; + + factorio-token = { + owner = "erwin"; + }; }; # This value determines the NixOS release from which the default diff --git a/machines/loki/secrets.yaml b/machines/loki/secrets.yaml index 252d566..a544e03 100644 --- a/machines/loki/secrets.yaml +++ b/machines/loki/secrets.yaml @@ -6,6 +6,7 @@ renovate_env: ENC[AES256_GCM,data:mzeS0FXsycD4hWMzRMgeEgTY+x2QtYtxmhcFCJcjwlD/q5 wireguard-horus-privkey: ENC[AES256_GCM,data:JVhdbvNqfdPWFCg24F56Hmu1Tf/EA6BOqa1uPuu8C/FrJhNaGi4S+KYOook=,iv:z8cq4C5vu/QqJ3UZdL1zEH22Ht3rKSbdHgAQbRSk8Kk=,tag:AVBvV8wJqw5jgDRiES89eQ==,type:str] k3s-token: ENC[AES256_GCM,data:agr9ihvrufHJ+zsWUTT7tT6oXwhQfp1VjlzvL/YrjhfsQsWdA2wqQOBG8Fgi6gDlqz+3DwWr3wdy/jclEEwrnA==,iv:zgYrN9CSraugO+LMIpJ2jDvxjCnQ9a3GHj6ffO/K0uY=,tag:6en6lNNvNMyOVf1Rfow6ew==,type:str] barman-passwords: ENC[AES256_GCM,data:M7HCuXsq8kSqoEfbn94/Hdl1tvb93i5oDYOr+QeuDVD33aF/xxuOwDVZM7wz7OcuozV7f6URtMGDy26KaHqekWhn2hFoRi5WHOxjE7M6oYLP6V4F+IGQBeMOHjjzqjQ9ti/BfhGpi3oHf0RK4RxLCmoNzAfWuP6zZnCyKgwyxBVu6lCHG2I08CJ8w2novts8,iv:EMLqvGIb1WK71Aw+LWr7JrQydA89CTTOavsFUZ6M3G8=,tag:PXu0JVzHjbH9wQfijf9V7A==,type:str] +factorio-token: ENC[AES256_GCM,data:m18pL2ck9ak7Sr/OQtxuG0rl4oXoFGCFG82Cplt0,iv:fXAkF+k1B4vzTxanPO39r7FvFPRFmpOy3My/zaOfLQE=,tag:JXotTaf4Aba9R11bSwiVbA==,type:str] sops: kms: [] gcp_kms: [] @@ -39,8 +40,8 @@ sops: c0dlMkVlRG9LYU00M2M3UGJpUkxDOWsKiwc5oM63ezv1TVng0zQOqILOxuRMU+j7 hHl6AWg0iorXJ1IWmGxLINDAK/RQVEFLK6gRjfN7qB+6wdmrKl8seQ== -----END AGE ENCRYPTED FILE----- - lastmodified: "2024-10-01T18:48:17Z" - mac: ENC[AES256_GCM,data:TjNyX17d3PaScsPidp1wTc4DVK2Jl5/QRmlfH3WN/Hs+lsPn9BvFHmuy50Fs9TLfDjTBQ4WdreWw3Tz2SSBw12WO9tt7vt2b8MudLr1EqHP2rGN6u6cxz9xKYSm0v8j+mJFuL3VJvGAKdSvHS0lxo3SooEhONGkrhDwPidhhcks=,iv:9DhtXHJo6JTGJY/nPCAt11x8ZZwv/1B37dSaqFVAOiE=,tag:xfnRBecHFKOY09VTMBh9dw==,type:str] + lastmodified: "2024-10-17T10:13:01Z" + mac: ENC[AES256_GCM,data:z/e3bOudpTvxgR0l1qMzVq1O7vsxXr7jA4YETzDI6T25bj+A2rIk4YE9PDi3rp0ADsNFy0yclknvzrkPuFlYQ+ylFzD2NJ97hbRzD3jl+NdyPdmUFU4ohkFA/EXWZ1sVWoPOogdk0Od3PUPzKpQwL3gTJB6jxSDDcy+lmRRXgDQ=,iv:BSscMpW1tVkonTIqJKkeUeG1s2ZPx4QUL97Rr+rf+7E=,tag:5RdHeD8SDzfkouM23qnH3Q==,type:str] pgp: [] unencrypted_suffix: _unencrypted - version: 3.9.0 + version: 3.9.1 diff --git a/users/erwin/home.nix b/users/erwin/home.nix index cd32466..c253bfd 100644 --- a/users/erwin/home.nix +++ b/users/erwin/home.nix @@ -10,6 +10,11 @@ let cfg = config.eboskma.users.erwin; homeCfg = config.home-manager.users.erwin; bt = config.eboskma.bluetooth; + + downloadFactorio = pkgs.writeShellScriptBin "download-factorio" '' + version=$(${pkgs.xh}/bin/xhs factorio.com/api/latest-releases | ${pkgs.jaq}/bin/jaq -r '.stable.alpha') + ${pkgs.nix}/bin/nix-prefetch-url --name factorio_alpha_x64-''${version}.tar.xz https://factorio.com/get-download/''${version}/alpha/linux64\?username=eboskma\&token=$(cat ${config.sops.secrets.factorio-token.path}) + ''; in { config = mkIf cfg.home { @@ -203,6 +208,7 @@ in devenv doggo easyeffects + factorio fd ffmpeg-full geekbench @@ -225,7 +231,6 @@ in kicad kubectl kubernetes-helm - ladybird libnotify libreoffice-fresh minio-client @@ -259,6 +264,8 @@ in wl-clipboard zeal zed-editor + + downloadFactorio ] ++ (with gst_all_1; [ gstreamer