mirror of
https://codeberg.org/icewind/palantir.git
synced 2026-06-03 18:24:08 +02:00
docker and zfs option for nix service
This commit is contained in:
parent
8488ff4ec5
commit
0134a26ba3
1 changed files with 16 additions and 1 deletions
17
flake.nix
17
flake.nix
|
|
@ -56,6 +56,20 @@
|
||||||
example = default;
|
example = default;
|
||||||
description = "The port to listen on";
|
description = "The port to listen on";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
zfs = mkOption rec {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
description = "enable zfs integration";
|
||||||
|
};
|
||||||
|
|
||||||
|
docker = mkOption rec {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
description = "enable docker integration";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
@ -66,13 +80,14 @@
|
||||||
users.users.palantir = {
|
users.users.palantir = {
|
||||||
isSystemUser = true;
|
isSystemUser = true;
|
||||||
group = "palantir";
|
group = "palantir";
|
||||||
extraGroups = ["powermonitoring"];
|
extraGroups = ["powermonitoring"] ++ lib.optional cfg.docker "docker";
|
||||||
};
|
};
|
||||||
|
|
||||||
services.udev.packages = [self.defaultPackage.${pkgs.system}];
|
services.udev.packages = [self.defaultPackage.${pkgs.system}];
|
||||||
|
|
||||||
systemd.services."palantir" = {
|
systemd.services."palantir" = {
|
||||||
wantedBy = ["multi-user.target"];
|
wantedBy = ["multi-user.target"];
|
||||||
|
path = lib.optional cfg.zfs pkgs.zfs;
|
||||||
|
|
||||||
serviceConfig = let
|
serviceConfig = let
|
||||||
pkg = self.defaultPackage.${pkgs.system};
|
pkg = self.defaultPackage.${pkgs.system};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue