1
0

Compare commits

..

2 Commits

Author SHA1 Message Date
3d644b885a flake.lock: Update nixpkgs-krypton 2024-01-30 10:21:43 +01:00
da76595558 hosts/osmium: Polkit test 2024-01-30 09:53:27 +01:00
3 changed files with 33 additions and 3 deletions

View File

@ -196,11 +196,11 @@
}, },
"nixpkgs-krypton": { "nixpkgs-krypton": {
"locked": { "locked": {
"lastModified": 1701253981, "lastModified": 1706371002,
"narHash": "sha256-ztaDIyZ7HrTAfEEUt9AtTDNoCYxUdSd6NrRHaYOIxtk=", "narHash": "sha256-dwuorKimqSYgyu8Cw6ncKhyQjUDOyuXoxDTVmAXq88s=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e92039b55bcd58469325ded85d4f58dd5a4eaf58", "rev": "c002c6aa977ad22c60398daaa9be52f2203d0006",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -7,6 +7,7 @@
../../configuration/proxmox-vm ../../configuration/proxmox-vm
./nixfiles-updated-inputs.nix ./nixfiles-updated-inputs.nix
./polkit-test.nix
]; ];
boot.loader.grub.enable = true; boot.loader.grub.enable = true;

View File

@ -0,0 +1,29 @@
{ ... }:
{
security.polkit.enable = true;
security.polkit.extraConfig = ''
polkit.addRule(function(action, subject) {
if (
action.id == "org.freedesktop.systemd1.manage-units"
&& action.lookup("unit") == "update-from-hydra-olimex-esp32-poe.service"
&& action.lookup("verb") == "start"
&& subject.user == "clerie"
) {
return polkit.Result.YES;
}
});
'';
services.update-from-hydra.paths.olimex-esp32-poe = {
enable = true;
hydraUrl = "https://hydra.clerie.de";
hydraProject = "clerie";
hydraJobset = "olimex-esp32-poe";
hydraJob = "olimex-esp32-poe";
nixStoreUri = "https://nix-cache.clerie.de";
resultPath = "/srv/olimex-esp32-poe";
};
}