Sun Aug 14 06:35:44 PM CEST 2022
This commit is contained in:
54
backup/sway.nix
Normal file
54
backup/sway.nix
Normal file
@ -0,0 +1,54 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
unstable = import <nixos-unstable> { config.allowUnfree = true; };
|
||||
in
|
||||
{
|
||||
programs = {
|
||||
sway = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
wofi
|
||||
swaylock
|
||||
swayidle
|
||||
xwayland
|
||||
kanshi
|
||||
grim
|
||||
slurp
|
||||
wl-clipboard
|
||||
(python38.withPackages (ps: with ps; [ i3pystatus keyring ]))
|
||||
];
|
||||
extraSessionCommands = ''
|
||||
export SDL_VIDEODRIVER=wayland
|
||||
export QT_QPA_PLATFORM=wayland
|
||||
export QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
|
||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||
export MOZ_ENABLE_WAYLAND=1
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.targets.sway-session = {
|
||||
description = "Sway compositor session";
|
||||
documentation = [ "man:systemd.special(7)" ];
|
||||
bindsTo = [ "graphical-session.target" ];
|
||||
wants = [ "graphical-session-pre.target" ];
|
||||
after = [ "graphical-session-pre.target" ];
|
||||
};
|
||||
|
||||
systemd.user.services.kanshi = {
|
||||
description = "Kanshi output autoconfig ";
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
partOf = [ "graphical-session.target" ];
|
||||
environment = { XDG_CONFIG_HOME = "/home/alex/.config"; };
|
||||
serviceConfig = {
|
||||
# kanshi doesn't have an option to specifiy config file yet, so it looks
|
||||
# at .config/kanshi/config
|
||||
ExecStart = ''
|
||||
${pkgs.kanshi}/bin/kanshi
|
||||
'';
|
||||
RestartSec = 5;
|
||||
Restart = "always";
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user