fix niri
This commit is contained in:
parent
db11846811
commit
67c2117563
16 changed files with 652 additions and 274 deletions
31
modules/desktop/shikane.nix
Normal file
31
modules/desktop/shikane.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.xyno.desktop.shikane;
|
||||
in
|
||||
{
|
||||
options.xyno.desktop.shikane.enable = lib.mkEnableOption "enable shikane screen size manager thing";
|
||||
options.xyno.desktop.shikane.wantedBy = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "niri.service";
|
||||
};
|
||||
options.xyno.desktop.shikane.package = lib.mkOption {
|
||||
type = lib.types.package;
|
||||
default = pkgs.shikane;
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
systemd.user.services.shikane = {
|
||||
unitConfig.PartOf = "graphical-session.target";
|
||||
unitConfig.After = "graphical-session.target";
|
||||
unitConfig.Requisite = "graphical-session.target";
|
||||
serviceConfig.Restart = "on-failure";
|
||||
wantedBy = [ cfg.wantedBy ];
|
||||
script = "${cfg.package}/bin/shikane";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue