Migrate to flakes
This commit is contained in:
parent
54d0e660c5
commit
02df2ff862
9 changed files with 160 additions and 241 deletions
13
module.nix
13
module.nix
|
|
@ -4,8 +4,6 @@ with lib;
|
|||
|
||||
let
|
||||
|
||||
strojnadzor = import ./. {};
|
||||
|
||||
cfg = config.services.strojnadzor;
|
||||
|
||||
hsts = ''
|
||||
|
|
@ -14,7 +12,7 @@ let
|
|||
|
||||
static = pkgs.runCommand "static" {} ''
|
||||
export STROJNADZOR_STATIC_ROOT="$out"
|
||||
${strojnadzor}/bin/strojnadzor-admin collectstatic
|
||||
${cfg.package}/bin/strojnadzor-admin collectstatic
|
||||
'';
|
||||
|
||||
in
|
||||
|
|
@ -29,6 +27,11 @@ in
|
|||
Whether to enable Strojnadzor
|
||||
";
|
||||
};
|
||||
package = mkOption {
|
||||
type = types.path;
|
||||
default = pkgs.strojnadzor;
|
||||
description = "The Strojnadzor package.";
|
||||
};
|
||||
hostName = mkOption {
|
||||
default = "golovizin.ru";
|
||||
type = types.str;
|
||||
|
|
@ -96,8 +99,8 @@ in
|
|||
Type = "notify";
|
||||
User = "strojnadzor";
|
||||
Group = "strojnadzor";
|
||||
ExecStartPre = "${strojnadzor}/bin/strojnadzor-admin migrate";
|
||||
ExecStart = "${strojnadzor}/bin/strojnadzor-admin runserver-gunicorn";
|
||||
ExecStartPre = "${cfg.package}/bin/strojnadzor-admin migrate";
|
||||
ExecStart = "${cfg.package}/bin/strojnadzor-admin runserver-gunicorn";
|
||||
StateDirectory = "strojnadzor";
|
||||
CapabilityBoundingSet = "";
|
||||
LockPersonality = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue