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:
parent
20dd0ece6c
commit
1169e53c76
11 changed files with 40 additions and 43 deletions
users/rouven/options
|
@ -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" ]; };
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue