refactor
This commit is contained in:
parent
66c05f9093
commit
45d6f4b0f3
205 changed files with 9040 additions and 342 deletions
3
modules/nixos/desktop/addons/kanshi/config
Normal file
3
modules/nixos/desktop/addons/kanshi/config
Normal file
|
@ -0,0 +1,3 @@
|
|||
profile {
|
||||
output eDP-1 enable scale 2
|
||||
}
|
41
modules/nixos/desktop/addons/kanshi/default.nix
Normal file
41
modules/nixos/desktop/addons/kanshi/default.nix
Normal file
|
@ -0,0 +1,41 @@
|
|||
{ options, config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
with lib.plusultra;
|
||||
let
|
||||
cfg = config.plusultra.desktop.addons.kanshi;
|
||||
user = config.plusultra.user;
|
||||
home = config.users.users.${user.name}.home;
|
||||
in
|
||||
{
|
||||
options.plusultra.desktop.addons.kanshi = with types; {
|
||||
enable =
|
||||
mkBoolOpt false "Whether to enable Kanshi in the desktop environment.";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
plusultra.home.configFile."kanshi/config".source = ./config;
|
||||
|
||||
environment.systemPackages = with pkgs; [ kanshi ];
|
||||
|
||||
# configuring kanshi
|
||||
systemd.user.services.kanshi = {
|
||||
description = "Kanshi output autoconfig ";
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
partOf = [ "graphical-session.target" ];
|
||||
environment = { XDG_CONFIG_HOME = "${home}/.config"; };
|
||||
serviceConfig = {
|
||||
ExecCondition = ''
|
||||
${pkgs.bash}/bin/bash -c '[ -n "$WAYLAND_DISPLAY" ]'
|
||||
'';
|
||||
|
||||
ExecStart = ''
|
||||
${pkgs.kanshi}/bin/kanshi
|
||||
'';
|
||||
|
||||
RestartSec = 5;
|
||||
Restart = "always";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue