mirror of
https://github.com/caperren/nixos-configs.git
synced 2025-12-30 19:14:19 +00:00
Allow git-auto-rebuild without password for admins
This commit is contained in:
@@ -9,6 +9,5 @@
|
|||||||
Type = "simple";
|
Type = "simple";
|
||||||
ExecStart = "${pkgs.bash}/bin/bash -c 'cd /etc/nixos && ${pkgs.git}/bin/git pull && ${pkgs.nixos-rebuild}/bin/nixos-rebuild switch --flake #$(hostname)'";
|
ExecStart = "${pkgs.bash}/bin/bash -c 'cd /etc/nixos && ${pkgs.git}/bin/git pull && ${pkgs.nixos-rebuild}/bin/nixos-rebuild switch --flake #$(hostname)'";
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,13 @@
|
|||||||
command = "${pkgs.systemd}/bin/poweroff";
|
command = "${pkgs.systemd}/bin/poweroff";
|
||||||
options = [ "NOPASSWD" ];
|
options = [ "NOPASSWD" ];
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
commands = [
|
||||||
|
"${pkgs.systemd}/bin/systemctl start git-auto-rebuild"
|
||||||
|
"${pkgs.systemd}/bin/systemctl stop git-auto-rebuild"
|
||||||
|
];
|
||||||
|
options = [ "NOPASSWD" ];
|
||||||
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user