Compare commits
45 Commits
3d79cc84a3
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
45417aa7ee | ||
|
|
50dc0c5cc3 | ||
|
|
a265472def | ||
|
|
528d438d86 | ||
|
|
1663e286bf | ||
|
|
91c1bef489 | ||
|
|
30585d8727 | ||
|
|
00d3bf09d7 | ||
|
|
1ff6894b35 | ||
|
|
2c4d822429 | ||
|
|
4880fbd0e3 | ||
|
|
e611a9e1fe | ||
|
|
b4c26f1b9f | ||
|
|
70438c74fc | ||
|
|
de10fa8dbb | ||
|
|
f114d45601 | ||
|
|
a023a12cf1 | ||
|
|
afc4bd44e7 | ||
|
|
7c4997c00b | ||
|
|
ab1faaba70 | ||
|
|
2b8a0a36d4 | ||
|
|
412e317efd | ||
|
|
454fe3bec6 | ||
|
|
192babbabe | ||
| 2762c323e9 | |||
| bd71d6e2f5 | |||
| 4899a37a82 | |||
| 99200dc201 | |||
| 4fb1c8957a | |||
| d2c274fca5 | |||
| eac627765a | |||
| 63de76572b | |||
| cbb94d9f4e | |||
| 84745a3dc7 | |||
| 1d3a931fd0 | |||
| 23b0695cf2 | |||
| b1a26b681f | |||
| 401ab250f1 | |||
| cd864b4061 | |||
|
|
6d2c5267a4 | ||
|
|
76bcc114a1 | ||
|
|
f2a482a46f | ||
|
|
969d8d8d5e | ||
|
|
518a7d0ffb | ||
|
|
2d6ad9f090 |
@@ -11,6 +11,7 @@ with lib;
|
|||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.pia-vpn;
|
cfg = config.pia-vpn;
|
||||||
|
hostName = config.networking.hostName;
|
||||||
|
|
||||||
mkContainer = name: ctr: {
|
mkContainer = name: ctr: {
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
@@ -28,6 +29,9 @@ let
|
|||||||
config = { config, pkgs, lib, ... }: {
|
config = { config, pkgs, lib, ... }: {
|
||||||
imports = allModules ++ [ ctr.config ];
|
imports = allModules ++ [ ctr.config ];
|
||||||
|
|
||||||
|
ntfy-alerts.ignoredUnits = [ "logrotate" ];
|
||||||
|
ntfy-alerts.hostLabel = "${hostName}/${name}";
|
||||||
|
|
||||||
# Static IP with gateway pointing to VPN container
|
# Static IP with gateway pointing to VPN container
|
||||||
networking.useNetworkd = true;
|
networking.useNetworkd = true;
|
||||||
systemd.network.enable = true;
|
systemd.network.enable = true;
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ with lib;
|
|||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.pia-vpn;
|
cfg = config.pia-vpn;
|
||||||
|
hostName = config.networking.hostName;
|
||||||
scripts = import ./scripts.nix;
|
scripts = import ./scripts.nix;
|
||||||
|
|
||||||
# Port forwarding derived state
|
# Port forwarding derived state
|
||||||
@@ -98,6 +99,8 @@ in
|
|||||||
|
|
||||||
# Route ntfy alerts through the host proxy (VPN container has no gateway on eth0)
|
# Route ntfy alerts through the host proxy (VPN container has no gateway on eth0)
|
||||||
ntfy-alerts.curlExtraArgs = "--proxy http://${cfg.hostAddress}:${toString cfg.proxyPort}";
|
ntfy-alerts.curlExtraArgs = "--proxy http://${cfg.hostAddress}:${toString cfg.proxyPort}";
|
||||||
|
ntfy-alerts.ignoredUnits = [ "logrotate" ];
|
||||||
|
ntfy-alerts.hostLabel = "${hostName}/pia-vpn";
|
||||||
|
|
||||||
# Enable forwarding so bridge traffic can go through WG
|
# Enable forwarding so bridge traffic can go through WG
|
||||||
boot.kernel.sysctl."net.ipv4.ip_forward" = 1;
|
boot.kernel.sysctl."net.ipv4.ip_forward" = 1;
|
||||||
|
|||||||
@@ -26,6 +26,12 @@
|
|||||||
default = [ ];
|
default = [ ];
|
||||||
description = "Unit names to skip failure notifications for.";
|
description = "Unit names to skip failure notifications for.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
hostLabel = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = config.networking.hostName;
|
||||||
|
description = "Label used in ntfy alert titles to identify this host/container.";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf config.thisMachine.hasRole."ntfy" {
|
config = lib.mkIf config.thisMachine.hasRole."ntfy" {
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ in
|
|||||||
--max-time 30 --retry 3 \
|
--max-time 30 --retry 3 \
|
||||||
${cfg.curlExtraArgs} \
|
${cfg.curlExtraArgs} \
|
||||||
-H "Authorization: Bearer $NTFY_TOKEN" \
|
-H "Authorization: Bearer $NTFY_TOKEN" \
|
||||||
-H "Title: Service failure on ${config.networking.hostName}" \
|
-H "Title: Service failure on ${cfg.hostLabel}" \
|
||||||
-H "Priority: high" \
|
-H "Priority: high" \
|
||||||
-H "Tags: rotating_light" \
|
-H "Tags: rotating_light" \
|
||||||
-H "Message: Unit $unit failed at $(date +%c)" \
|
-H "Message: Unit $unit failed at $(date +%c)" \
|
||||||
|
|||||||
@@ -19,6 +19,15 @@ in
|
|||||||
"--hdr-itm-enabled"
|
"--hdr-itm-enabled"
|
||||||
"--adaptive-sync"
|
"--adaptive-sync"
|
||||||
];
|
];
|
||||||
|
steamArgs = [
|
||||||
|
"-steamos3"
|
||||||
|
"-gamepadui"
|
||||||
|
"-pipewire-dmabuf"
|
||||||
|
];
|
||||||
|
env = {
|
||||||
|
STEAM_ENABLE_VOLUME_HANDLER = "1";
|
||||||
|
STEAM_DISABLE_AUDIO_DEVICE_SWITCHING = "1";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
environment.systemPackages = [ pkgs.gamescope-wsi ];
|
environment.systemPackages = [ pkgs.gamescope-wsi ];
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ config, lib, ... }:
|
{ config, lib, allModules, ... }:
|
||||||
|
|
||||||
# Gitea Actions Runner inside a NixOS container.
|
# Gitea Actions Runner inside a NixOS container.
|
||||||
# The container shares the host's /nix/store (read-only) and nix-daemon socket,
|
# The container shares the host's /nix/store (read-only) and nix-daemon socket,
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
thisMachineIsARunner = config.thisMachine.hasRole."gitea-actions-runner";
|
thisMachineIsARunner = config.thisMachine.hasRole."gitea-actions-runner";
|
||||||
hostOverlays = config.nixpkgs.overlays;
|
hostName = config.networking.hostName;
|
||||||
containerName = "gitea-runner";
|
containerName = "gitea-runner";
|
||||||
giteaRunnerUid = 991;
|
giteaRunnerUid = 991;
|
||||||
giteaRunnerGid = 989;
|
giteaRunnerGid = 989;
|
||||||
@@ -32,8 +32,10 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = { config, lib, pkgs, ... }: {
|
config = { config, lib, pkgs, ... }: {
|
||||||
system.stateVersion = "25.11";
|
imports = allModules;
|
||||||
nixpkgs.overlays = hostOverlays;
|
|
||||||
|
ntfy-alerts.ignoredUnits = [ "logrotate" ];
|
||||||
|
ntfy-alerts.hostLabel = "${hostName}/${containerName}";
|
||||||
|
|
||||||
services.gitea-actions-runner.instances.inst = {
|
services.gitea-actions-runner.instances.inst = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
56
flake.lock
generated
56
flake.lock
generated
@@ -53,11 +53,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1772587858,
|
"lastModified": 1775848625,
|
||||||
"narHash": "sha256-w0/XBU20BdBeEIJ9i3ecr9Lc6c8uQaXUn/ri+aOsyJk=",
|
"narHash": "sha256-y2/PYZu+yAeG+ueAuhjeeAWHOSvZMJfPiNs7pQJ/Wbc=",
|
||||||
"owner": "sadjow",
|
"owner": "sadjow",
|
||||||
"repo": "claude-code-nix",
|
"repo": "claude-code-nix",
|
||||||
"rev": "0a5fc14be38fabfcfff18db749b63c9c15726765",
|
"rev": "2a665ed3a46cb363630df50150ecf47f45a1d893",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -186,11 +186,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1769939035,
|
"lastModified": 1774959120,
|
||||||
"narHash": "sha256-Fok2AmefgVA0+eprw2NDwqKkPGEI5wvR+twiZagBvrg=",
|
"narHash": "sha256-Pzk6UbueeWy9WFiDY6iA1aHid+2AMzkS6gg2x2cSkz4=",
|
||||||
"owner": "cachix",
|
"owner": "cachix",
|
||||||
"repo": "git-hooks.nix",
|
"repo": "git-hooks.nix",
|
||||||
"rev": "a8ca480175326551d6c4121498316261cbb5b260",
|
"rev": "c06f90f1eb6569bdaf6a4a10cb7e66db4454ac2a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -228,11 +228,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1772569491,
|
"lastModified": 1775781825,
|
||||||
"narHash": "sha256-bdr6ueeXO1Xg91sFkuvaysYF0mVdwHBpdyhTjBEWv+s=",
|
"narHash": "sha256-L5yKTpR+alrZU2XYYvIxCeCP4LBHU5jhwSj7H1VAavg=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "924e61f5c2aeab38504028078d7091077744ab17",
|
"rev": "e35c39fca04fee829cecdf839a50eb9b54d8a701",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -250,11 +250,11 @@
|
|||||||
"spectrum": "spectrum"
|
"spectrum": "spectrum"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1772338235,
|
"lastModified": 1775847073,
|
||||||
"narHash": "sha256-9XcwtSIL/c+pkC3SBNuxCJuSktFOBV1TLvvkhekyB8I=",
|
"narHash": "sha256-OyRZOIQZZQNrIDN40jrhY1SFTzTNYURT5MPhZZchSbY=",
|
||||||
"owner": "astro",
|
"owner": "astro",
|
||||||
"repo": "microvm.nix",
|
"repo": "microvm.nix",
|
||||||
"rev": "9d1ff9b53532908a5eba7707931c9093508b6b92",
|
"rev": "239045c84aa62c2ce1349fa4c1ceae9eb6ce9e85",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -270,11 +270,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1772341813,
|
"lastModified": 1775365369,
|
||||||
"narHash": "sha256-/PQ0ubBCMj/MVCWEI/XMStn55a8dIKsvztj4ZVLvUrQ=",
|
"narHash": "sha256-DgH5mveLoau20CuTnaU5RXZWgFQWn56onQ4Du2CqYoI=",
|
||||||
"owner": "Mic92",
|
"owner": "Mic92",
|
||||||
"repo": "nix-index-database",
|
"repo": "nix-index-database",
|
||||||
"rev": "a2051ff239ce2e8a0148fa7a152903d9a78e854f",
|
"rev": "cef5cf82671e749ac87d69aadecbb75967e6f6c3",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -285,11 +285,11 @@
|
|||||||
},
|
},
|
||||||
"nixos-hardware": {
|
"nixos-hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1771969195,
|
"lastModified": 1775490113,
|
||||||
"narHash": "sha256-qwcDBtrRvJbrrnv1lf/pREQi8t2hWZxVAyeMo7/E9sw=",
|
"narHash": "sha256-2ZBhDNZZwYkRmefK5XLOusCJHnoeKkoN95hoSGgMxWM=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixos-hardware",
|
"repo": "nixos-hardware",
|
||||||
"rev": "41c6b421bdc301b2624486e11905c9af7b8ec68e",
|
"rev": "c775c2772ba56e906cbeb4e0b2db19079ef11ff7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -301,11 +301,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1772542754,
|
"lastModified": 1775710090,
|
||||||
"narHash": "sha256-WGV2hy+VIeQsYXpsLjdr4GvHv5eECMISX1zKLTedhdg=",
|
"narHash": "sha256-ar3rofg+awPB8QXDaFJhJ2jJhu+KqN/PRCXeyuXR76E=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "8c809a146a140c5c8806f13399592dbcb1bb5dc4",
|
"rev": "4c1018dae018162ec878d42fec712642d214fdfa",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -344,11 +344,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1772064816,
|
"lastModified": 1775244324,
|
||||||
"narHash": "sha256-ks1D9Rtmopd5F/8ENjEUJpSYYMxv603/v6TRen9Hq54=",
|
"narHash": "sha256-TSAozmLyWCRbUJu6tXQvhTjsDKNj9q1CsEqwhhh9kMU=",
|
||||||
"owner": "simple-nixos-mailserver",
|
"owner": "simple-nixos-mailserver",
|
||||||
"repo": "nixos-mailserver",
|
"repo": "nixos-mailserver",
|
||||||
"rev": "ea4dc17f4bc0f65eed082fa394509e4543072b56",
|
"rev": "c45a1e4385e81b937b353ee4ce97f5cfd60ceff2",
|
||||||
"type": "gitlab"
|
"type": "gitlab"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -361,11 +361,11 @@
|
|||||||
"spectrum": {
|
"spectrum": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1759482047,
|
"lastModified": 1772189877,
|
||||||
"narHash": "sha256-H1wiXRQHxxPyMMlP39ce3ROKCwI5/tUn36P8x6dFiiQ=",
|
"narHash": "sha256-i1p90Rgssb//aNiTDFq46ZG/fk3LmyRLChtp/9lddyA=",
|
||||||
"ref": "refs/heads/main",
|
"ref": "refs/heads/main",
|
||||||
"rev": "c5d5786d3dc938af0b279c542d1e43bce381b4b9",
|
"rev": "fe39e122d898f66e89ffa17d4f4209989ccb5358",
|
||||||
"revCount": 996,
|
"revCount": 1255,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://spectrum-os.org/git/spectrum"
|
"url": "https://spectrum-os.org/git/spectrum"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user