nixos/stratis: init

This commit is contained in:
Nick Cao 2022-09-12 14:38:10 +08:00
parent bb307c917d
commit ca03f2dc0f
No known key found for this signature in database
2 changed files with 19 additions and 0 deletions

View File

@ -1266,6 +1266,7 @@
./tasks/network-interfaces-scripted.nix
./tasks/scsi-link-power-management.nix
./tasks/snapraid.nix
./tasks/stratis.nix
./tasks/swraid.nix
./tasks/trackpoint.nix
./tasks/powertop.nix

View File

@ -0,0 +1,18 @@
{ config, lib, pkgs, ... }:
let
cfg = config.services.stratis;
in
{
options.services.stratis = {
enable = lib.mkEnableOption (lib.mdDoc "Stratis Storage - Easy to use local storage management for Linux");
};
config = lib.mkIf cfg.enable {
environment.systemPackages = [ pkgs.stratis-cli ];
systemd.packages = [ pkgs.stratisd ];
services.dbus.packages = [ pkgs.stratisd ];
services.udev.packages = [ pkgs.stratisd ];
systemd.services.stratisd.wantedBy = [ "sysinit.target" ];
};
}