workflow verbosity and sudo fix
Some checks failed
Activate NixOS Homelab Configuration On Push / build-and-activate (push) Failing after 29s
Some checks failed
Activate NixOS Homelab Configuration On Push / build-and-activate (push) Failing after 29s
This commit is contained in:
parent
0bfffe7acb
commit
6024695830
2 changed files with 11 additions and 5 deletions
|
|
@ -15,10 +15,10 @@ jobs:
|
|||
shell: /bin/sh -e {0}
|
||||
steps:
|
||||
- name: Clone
|
||||
run: git clone http://localhost:5080/satr14/nix-flake.git src
|
||||
run: git clone -v http://localhost:5080/satr14/nix-flake.git src
|
||||
- name: Build
|
||||
run: nixos-rebuild build --flake ./src#homelab
|
||||
run: nixos-rebuild build --flake ./src#homelab -L --show-trace -v
|
||||
- name: Activate
|
||||
run: sudo nixos-rebuild switch --flake ./src#homelab
|
||||
run: sudo nixos-rebuild switch --flake ./src#homelab -L --show-trace -v
|
||||
- name: Clean
|
||||
run: rm -rf src
|
||||
run: rm -rfv src
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, homelab, ... }: {
|
||||
{ lib, pkgs, homelab, ... }: {
|
||||
security.sudo.extraRules = [{ # for configuration activation on push to git
|
||||
users = [ "gitea-runner" ];
|
||||
commands = [{
|
||||
|
|
@ -63,4 +63,10 @@
|
|||
hostPackages = with pkgs; [ bash coreutils git nix nodejs ];
|
||||
};
|
||||
};
|
||||
systemd.services."gitea-runner-nixos-deploy".serviceConfig = {
|
||||
# Force systemd to allow privilege escalation (sudo) for this service
|
||||
NoNewPrivileges = lib.mkForce false;
|
||||
RestrictSUIDSGID = lib.mkForce false;
|
||||
PrivateUsers = lib.mkForce false;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue