mirror of
https://codeberg.org/icewind/shortcutd.git
synced 2026-06-03 17:24:08 +02:00
module fix
This commit is contained in:
parent
90a30ef175
commit
6ab675c3d0
3 changed files with 15 additions and 11 deletions
|
|
@ -16,10 +16,15 @@ in {
|
|||
example = "INFO";
|
||||
description = "log level";
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
description = "package to use";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.dbus.packages = [self.packages.${pkgs.system}.default];
|
||||
services.dbus.packages = [cfg.package];
|
||||
|
||||
users.users.shortcutd = {
|
||||
isSystemUser = true;
|
||||
|
|
@ -34,12 +39,10 @@ in {
|
|||
RUST_LOG = cfg.log;
|
||||
};
|
||||
|
||||
serviceConfig = let
|
||||
pkg = self.packages.${pkgs.system}.default;
|
||||
in {
|
||||
serviceConfig = {
|
||||
User = "shortcutd";
|
||||
Restart = "on-failure";
|
||||
ExecStart = "${pkg}/bin/shortcutd";
|
||||
ExecStart = getExe cfg.package;
|
||||
PrivateTmp = true;
|
||||
ProtectSystem = "strict";
|
||||
ProtectHome = true;
|
||||
|
|
|
|||
|
|
@ -11,17 +11,14 @@ in
|
|||
|
||||
src = sourceByRegex ../server ["Cargo.*" "(src)(/.*)?"];
|
||||
|
||||
postPatch = ''
|
||||
cp ${../Cargo.lock} Cargo.lock
|
||||
chmod 0755 Cargo.lock
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/etc/dbus-1/system.d/
|
||||
cp ${../nixos-nl.icewind.shortcutd.conf} $out/etc/dbus-1/system.d/nl.icewind.shortcutd.conf
|
||||
'';
|
||||
|
||||
cargoLock = {
|
||||
lockFile = ../Cargo.lock;
|
||||
lockFile = ../server/Cargo.lock;
|
||||
};
|
||||
|
||||
meta.mainProgram = "shortcutd";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue