diff --git a/nix/sources.json b/nix/sources.json index c37cc7c6..7f84c258 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -121,6 +121,12 @@ "url": "https://github.com/NixOS/nixpkgs/archive/301aada7a64812853f2e2634a530ef5d34505048.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, + "nixpkgs-bot": { + "branch": "main", + "repo": "git@hera.m-0.eu:nixpkgs-bot", + "rev": "c8363dd353bb40357339b760258d36d07b4b7b91", + "type": "git" + }, "obelisk": { "branch": "master", "description": "Obelisk provides an easy way to develop and deploy your Reflex project for web and mobile", diff --git a/nixos/machines/hera/configuration.nix b/nixos/machines/hera/configuration.nix index 4e0785b1..212a2008 100644 --- a/nixos/machines/hera/configuration.nix +++ b/nixos/machines/hera/configuration.nix @@ -28,6 +28,7 @@ in { ../../roles/mailman.nix ../../roles/firefox-sync.nix ../../roles/goatcounter.nix + ../../roles/nixpkgs-bot.nix (import ../../roles/monitoring/folder-size-exporter.nix { folders = [ "/" diff --git a/nixos/roles/nixpkgs-bot.nix b/nixos/roles/nixpkgs-bot.nix new file mode 100644 index 00000000..fdbfdeb3 --- /dev/null +++ b/nixos/roles/nixpkgs-bot.nix @@ -0,0 +1,13 @@ +{pkgs, ...}: { + systemd.services.nixpkgs-bot = { + wantedBy = ["multi-user.target"]; + description = "nixpkgs-bot"; + path = [pkgs.git]; + serviceConfig = { + WorkingDirectory = "/var/lib/nixpkgs-bot"; + ExecStart = "${pkgs.nixpkgs-bot}/bin/nixpkgs-bot /var/lib/nixpkgs-bot/config.yaml"; + DynamicUser = true; + StateDirectory = "nixpkgs-bot"; + }; + }; +} diff --git a/overlays/10-previews.nix b/overlays/10-previews.nix index 2270d1f7..09217f0a 100644 --- a/overlays/10-previews.nix +++ b/overlays/10-previews.nix @@ -2,8 +2,10 @@ self: super: let unstable = import super.sources.nixos-unstable {}; nom_commit = (builtins.fromJSON (builtins.readFile ../nix/sources.json)).nix-output-monitor.rev; hx_commit = (builtins.fromJSON (builtins.readFile ../nix/sources.json)).helix.rev; + bot_commit = (builtins.fromJSON (builtins.readFile ../nix/sources.json)).nixpkgs-bot.rev; hx = builtins.getFlake "github:helix-editor/helix/${hx_commit}"; nom = builtins.getFlake "git+ssh://git@hera.m-0.eu/nix-output-monitor?rev=${nom_commit}&ref=main"; + bot = builtins.getFlake "git+ssh://git@hera.m-0.eu/nixpkgs-bot?rev=${bot_commit}&ref=main"; in { inherit unstable; unstableHaskellPackages = unstable.haskellPackages; @@ -11,4 +13,5 @@ in { inherit (unstable) nix home-assistant vscode-extensions vscodium cachix cabal2nix chrysalis; nix-output-monitor = nom.packages.x86_64-linux.default; helix = hx.packages.x86_64-linux.default; + nixpkgs-bot = bot.packages.x86_64-linux.default; } diff --git a/private b/private index eb88a5c6..63ffea2f 160000 --- a/private +++ b/private @@ -1 +1 @@ -Subproject commit eb88a5c6e97cb5f5b677cb2104127a70578b7bb9 +Subproject commit 63ffea2ff280a7795e7edcfb57cbfe5fa68a0726