This commit is contained in:
Hamcha 2023-11-28 20:54:04 +01:00
parent 70489ddf74
commit 6c6ec142a8
2 changed files with 34 additions and 23 deletions

View file

@ -21,6 +21,39 @@
systems = [
"x86_64-linux"
];
flake = with nixpkgs.lib; {
nixosModules.staxman = {
options = {
enable = mkEnableOption "staxman";
stackDir = mkOption {
type = types.path;
defaultText = "/stacks";
example = "/stacks";
description = ''
Directory containing Arion stacks
'';
};
};
config = mkIf cfg.enable {
systemd.services.staxman = {
description = "Scatting system management";
after = [ "network-online.target" ];
wantedBy = [ "multi-user.target" ];
environment.STAX_ARION_BIN = "${getBin nixpkgs.arion}";
environment.STAX_DIR = cfg.stackDir;
serviceConfig = {
User = "root";
Group = "root";
Restart = "always";
ExecStart = "${getBin nixpkgs.staxman}/bin/staxman";
};
StateDirectory = "staxman";
StateDirectoryMode = "0750";
};
};
};
};
perSystem = { system, pkgs, ... }: let
overlays = [
(import rust-overlay)

View file

@ -1,22 +0,0 @@
{ naersk
, version
, pkgs
, ...
}:
naersk.buildPackage {
name = "staxman";
inherit version;
src = ./.;
nativeBuildInputs = with pkgs; [
clang
mold
zlib
libgit2
pkg-config
];
buildInputs = with pkgs; [ ];
}