mirror of
https://github.com/astro/buzzrelay.git
synced 2024-11-21 19:51:00 +00:00
nix: install static
This commit is contained in:
parent
def1e2bf3c
commit
f010e84c94
2 changed files with 7 additions and 1 deletions
|
@ -20,6 +20,10 @@
|
|||
root = ./.;
|
||||
nativeBuildInputs = with pkgs; [ pkg-config ];
|
||||
buildInputs = with pkgs; [ openssl systemd ];
|
||||
postInstall = ''
|
||||
mkdir -p $out/share/buzzrelay
|
||||
cp -r static $out/share/buzzrelay/
|
||||
'';
|
||||
checkInputs = [ pkgs.rustPackages.clippy ];
|
||||
doCheck = true;
|
||||
cargoTestCommands = x:
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
pub_key_file = cfg.pubKeyFile;
|
||||
db = "host=/var/run/postgresql user=${cfg.user} dbname=${cfg.database}";
|
||||
});
|
||||
inherit (self.packages.${pkgs.system}) buzzrelay;
|
||||
in
|
||||
lib.mkIf cfg.enable {
|
||||
users.users.${cfg.user} = {
|
||||
|
@ -64,7 +65,8 @@
|
|||
after = [ "network-online.target" ];
|
||||
serviceConfig = {
|
||||
Type = "notify";
|
||||
ExecStart = "${self.packages.${pkgs.system}.buzzrelay}/bin/buzzrelay ${lib.escapeShellArg configFile}";
|
||||
WorkingDirectory = "${buzzrelay}/share/buzzrelay";
|
||||
ExecStart = "${buzzrelay}/bin/buzzrelay ${lib.escapeShellArg configFile}";
|
||||
User = cfg.user;
|
||||
Group = cfg.group;
|
||||
ProtectSystem = "full";
|
||||
|
|
Loading…
Reference in a new issue