feat: flake update workflow (#1)

Co-authored-by: KoenDR06 <koen.de.ruiter@hotmail.com>
Co-committed-by: KoenDR06 <koen.de.ruiter@hotmail.com>
This commit is contained in:
KoenDR06 2026-02-10 18:25:00 +01:00 committed by Koen
parent bdb287e492
commit dfcea20497
3 changed files with 26 additions and 8 deletions

View file

@ -0,0 +1,14 @@
on:
schedule:
- cron: "0 3 * * sun" # Runs every 3AM on sunday
jobs:
test:
runs-on: nixos
steps:
- uses: actions/checkout@v4
- run: git config --global user.name "flake-updater"
- run: git config --global user.email "runner@git.koendev.nl"
- run: nix flake update --extra-experimental-features nix-command --extra-experimental-features flakes
- run: git commit flake.lock -m "Update flake.lock"
- run: git push

12
flake.lock generated
View file

@ -112,11 +112,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1770464364,
"narHash": "sha256-z5NJPSBwsLf/OfD8WTmh79tlSU8XgIbwmk6qB1/TFzY=",
"lastModified": 1770617025,
"narHash": "sha256-1jZvgZoAagZZB6NwGRv2T2ezPy+X6EFDsJm+YSlsvEs=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "23d72dabcb3b12469f57b37170fcbc1789bd7457",
"rev": "2db38e08fdadcc0ce3232f7279bab59a15b94482",
"type": "github"
},
"original": {
@ -136,11 +136,11 @@
]
},
"locked": {
"lastModified": 1769956244,
"narHash": "sha256-12RCFLyAedyMOdenUi7cN3ioJPEGjA/ZG1BLjugfUVs=",
"lastModified": 1770741375,
"narHash": "sha256-f5qSP6X4XHlWQp8Q/Naj/yfDFO5naIPU8losw1T0xqE=",
"owner": "pjones",
"repo": "plasma-manager",
"rev": "fe54ea85c6e4413fba03b84d50f2b431d2f7c831",
"rev": "4d5bb6b427206989eb46f97ffc3a00ab11b351c3",
"type": "github"
},
"original": {

View file

@ -75,11 +75,12 @@ in {
configFile = pkgs.writeText "runner.yml" ''
runner:
labels:
- "self-hosted:host"
- "nixos:host"
'';
in {
environment.systemPackages = with pkgs; [
forgejo-runner
nodejs_24 # Needed for actions/checkout@v4 action
];
users.groups.runner = {};
@ -95,7 +96,10 @@ in {
sleep 10
${pkgs.forgejo-runner}/bin/forgejo-runner daemon --config ${configFile}
'';
serviceConfig.User = "runner";
serviceConfig = {
User = "runner";
Environment = "PATH=$PATH:/run/current-system/sw/bin";
};
wantedBy = ["multi-user.target"];
};