1
1
Fork 0
mirror of https://git.sr.ht/~rouven/nixos-config synced 2025-05-12 15:30:54 +02:00

use lib.getExe where possible

This commit is contained in:
Rouven Seifert 2023-06-19 13:22:15 +02:00
parent 20dd0ece6c
commit 1169e53c76
Signed by: rouven.seifert
GPG key ID: B95E8FE6B11C4D09
11 changed files with 40 additions and 43 deletions
users/rouven/options

View file

@ -7,16 +7,14 @@ let
tomlFormat = pkgs.formats.toml { };
in
{
meta.maintainers = [ hm.maintainers.therealr5 ];
meta.maintainers = [ maintainers.therealr5 ];
options.services.shikane = {
enable = mkEnableOption
"shikane, A dynamic output configuration tool that automatically detects and configures connected outputs based on a set of profiles.";
package = mkOption {
type = types.package;
default = pkgs.shikane;
defaultText = literalExpression "pkgs.shikane";
description = "The package to use for shikane.";
};
package = mkPackageOption pkgs "shikane" { };
settings = mkOption {
type = tomlFormat.type;
default = { };
@ -63,17 +61,17 @@ in
};
config = mkIf cfg.enable {
xdg.configFile."shikane/config.toml".source = tomlFormat.generate "shikane-config" cfg.settings;
xdg.configFile."shikane/config.toml".source =
tomlFormat.generate "shikane-config" cfg.settings;
systemd.user.services.shikane = {
Unit = {
Description = "Dynamic output configuration tool";
Documentation = "man:shikane(1)";
After = [ "graphical-session-pre.target" ];
PartOf = [ "graphical-session.target" ];
};
Service = {
ExecStart = "${cfg.package}/bin/shikane";
};
Service = { ExecStart = getExe cfg.package; };
Install = { WantedBy = [ "graphical-session.target" ]; };
};