re-added the repo-checker thingy
This commit is contained in:
8
flake.lock
generated
8
flake.lock
generated
@@ -374,11 +374,11 @@
|
|||||||
"wshowkeys": "wshowkeys"
|
"wshowkeys": "wshowkeys"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1787769371,
|
"lastModified": 1787836964,
|
||||||
"narHash": "sha256-UkFvvWGP5DyVlHz9lYuDqikWbLbcG0alPPbSWFGZzhQ=",
|
"narHash": "sha256-j8WRQxgRyPHhIC8SV02l84bvn3I5TraVSDPkgWCTzAU=",
|
||||||
"ref": "refs/heads/main",
|
"ref": "refs/heads/main",
|
||||||
"rev": "309c07ef94c7742f145c00e91ea068a0a03582c6",
|
"rev": "5b008b1022c8d3bac04da319a864f67202370d40",
|
||||||
"revCount": 75,
|
"revCount": 76,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.voidarc.co.uk/voidarc/hypr"
|
"url": "https://git.voidarc.co.uk/voidarc/hypr"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
self',
|
self',
|
||||||
pkgs,
|
pkgs,
|
||||||
inputs',
|
inputs',
|
||||||
|
flakeLocation,
|
||||||
...
|
...
|
||||||
}: {config, ...}: let
|
}: {config, ...}: let
|
||||||
modules = with self.nixosModules; [
|
modules = with self.nixosModules; [
|
||||||
@@ -65,12 +66,22 @@
|
|||||||
''}
|
''}
|
||||||
end)
|
end)
|
||||||
'';
|
'';
|
||||||
|
# Easy way to get nix runtime info (ie the directory the config is at)
|
||||||
|
# into hyprland to run commands and stuff
|
||||||
|
runtimeFile = pkgs.writeText "runtime.lua" ''
|
||||||
|
hl.on("hyprland.start", function ()
|
||||||
|
${lib.optionalString (flakeLocation != "") ''
|
||||||
|
hl.exec_cmd( 'curl -X POST -H "Content-Type: application/json" -d "{\"ref\":\"$(git -C ${flakeLocation} rev-parse HEAD)\", \"status\":\"$(git -C ${flakeLocation} diff --quiet && echo "clean" || echo "dirty")\"}" https://n8n.voidarc.co.uk/webhook/config-checker' )
|
||||||
|
''}
|
||||||
|
end)
|
||||||
|
'';
|
||||||
in
|
in
|
||||||
lib.stringAfter ["specialfs"] ''
|
lib.stringAfter ["specialfs"] ''
|
||||||
mkdir -p /run/hypr/config
|
mkdir -p /run/hypr/config
|
||||||
rm -rf /run/hypr/config/*
|
rm -rf /run/hypr/config/*
|
||||||
ln -sfn ${inputs'.hyprland.packages.repo-files}/* /run/hypr/config
|
ln -sfn ${inputs'.hyprland.packages.repo-files}/* /run/hypr/config
|
||||||
ln -sfn ${pluginFile} /run/hypr/config/plugins.lua
|
ln -sfn ${pluginFile} /run/hypr/config/plugins.lua
|
||||||
|
ln -sfn ${runtimeFile} /run/hypr/config/runtime.lua
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user