nixos/iio-niri: move from programs to services/misc

The module was wrongly put in programs following PR #454551 and we didn't catch it during review. This commit fixes that issue so the path is compliant to the guidelines.
This commit is contained in:
Zhaith Izaliel
2025-10-24 14:22:58 +02:00
parent 62be5c9d5c
commit 0e6c2a2595
2 changed files with 1 additions and 1 deletions

View File

@@ -1,59 +0,0 @@
{
config,
lib,
pkgs,
...
}:
let
inherit (lib)
mkEnableOption
mkPackageOption
mkOption
types
mkIf
getExe
escapeShellArgs
mkDefault
;
cfg = config.services.iio-niri;
in
{
options.services.iio-niri = {
enable = mkEnableOption "IIO-Niri";
package = mkPackageOption pkgs "iio-niri" { };
niriUnit = mkOption {
type = types.nonEmptyStr;
default = "niri.service";
description = "The Niri **user** service unit to bind IIO-Niri's **user** service unit to.";
};
extraArgs = mkOption {
type = types.listOf types.str;
default = [ ];
description = "Extra arguments to pass to IIO-Niri.";
};
};
config = mkIf cfg.enable {
hardware.sensor.iio.enable = mkDefault true;
environment.systemPackages = [ cfg.package ];
systemd.user.services.iio-niri = {
description = "IIO-Niri";
wantedBy = [ cfg.niriUnit ];
bindsTo = [ cfg.niriUnit ];
partOf = [ cfg.niriUnit ];
after = [ cfg.niriUnit ];
serviceConfig = {
Type = "simple";
ExecStart = "${getExe cfg.package} ${escapeShellArgs cfg.extraArgs}";
Restart = "on-failure";
};
};
};
meta.maintainers = with lib.maintainers; [ zhaithizaliel ];
}