diff options
author | Nick Cao <nickcao@nichi.co> | 2022-09-12 14:38:10 +0800 |
---|---|---|
committer | Nick Cao <nickcao@nichi.co> | 2022-09-12 15:19:36 +0800 |
commit | ca03f2dc0fff2d30387714e43886af5e74425820 (patch) | |
tree | f59ccf18ce18592ac0f96e89a8eb15378916b6a9 /nixos/modules/tasks | |
parent | bb307c917dde9f6f80114cd5b43b210ed552b884 (diff) |
nixos/stratis: init
Diffstat (limited to 'nixos/modules/tasks')
-rw-r--r-- | nixos/modules/tasks/stratis.nix | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/nixos/modules/tasks/stratis.nix b/nixos/modules/tasks/stratis.nix new file mode 100644 index 0000000000000..9a85fe23f248d --- /dev/null +++ b/nixos/modules/tasks/stratis.nix @@ -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" ]; + }; +} |