sway: Make package configurable
This commit is contained in:
parent
05986bc2a6
commit
c2744ea1eb
6 changed files with 60 additions and 27 deletions
|
@ -19,6 +19,7 @@ in
|
|||
options.eboskma.programs.sway = {
|
||||
enable = mkEnableOption "sway";
|
||||
wayvnc = mkEnableOption "wayvnc";
|
||||
package = mkPackageOption pkgs "sway" { };
|
||||
|
||||
lock-wallpaper = mkOption {
|
||||
description = "Wallpaper to use for the lockscreen";
|
||||
|
@ -85,6 +86,8 @@ in
|
|||
config = mkIf cfg.enable {
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
package = cfg.package;
|
||||
|
||||
config = {
|
||||
modifier = mod;
|
||||
|
||||
|
@ -160,7 +163,7 @@ in
|
|||
|
||||
gaps = {
|
||||
inner = 10;
|
||||
outer = 5;
|
||||
# outer = 5;
|
||||
smartBorders = "on";
|
||||
};
|
||||
|
||||
|
@ -244,8 +247,8 @@ in
|
|||
|
||||
"${mod}+c" = mkIf config.eboskma.programs.emacs.enable "exec ${config.programs.emacs.package}/bin/emacsclient -c";
|
||||
|
||||
"${mod}+Print" = "exec ${pkgs.grim}/bin/grim -o $(${pkgs.sway}/bin/swaymsg -t get_outputs | ${pkgs.jaq}/bin/jaq -r '.[] | select(.focused) | .name')";
|
||||
"${mod}+Shift+Print" = ''exec ${pkgs.grim}/bin/grim -o $(${pkgs.sway}/bin/swaymsg -t get_outputs | ${pkgs.jaq}/bin/jaq -r '.[] | select(.focused) | .name') - | ${pkgs.wl-clipboard}/bin/wl-copy -t "image/png" -f'';
|
||||
"${mod}+Print" = "exec ${pkgs.grim}/bin/grim -o $(${cfg.package}/bin/swaymsg -t get_outputs | ${pkgs.jaq}/bin/jaq -r '.[] | select(.focused) | .name')";
|
||||
"${mod}+Shift+Print" = ''exec ${pkgs.grim}/bin/grim -o $(${cfg.package}/bin/swaymsg -t get_outputs | ${pkgs.jaq}/bin/jaq -r '.[] | select(.focused) | .name') - | ${pkgs.wl-clipboard}/bin/wl-copy -t "image/png" -f'';
|
||||
"${mod}+Shift+Ctrl+Print" = ''exec ${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp)" - | ${pkgs.wl-clipboard}/bin/wl-copy -t "image/png" -f'';
|
||||
"${mod}+Shift+Alt+Print" = ''exec ${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp)"'';
|
||||
|
||||
|
@ -288,6 +291,16 @@ in
|
|||
for_window [shell="xwayland"] title_format "%title [XWayland]"
|
||||
for_window [app_id="^.*iwgtk$"] floating enable
|
||||
|
||||
blur enable
|
||||
blur_xray disable
|
||||
|
||||
shadows enable
|
||||
|
||||
default_dim_inactive 0.2
|
||||
|
||||
corner_radius 10
|
||||
|
||||
|
||||
include /etc/sway/config.d/*
|
||||
'';
|
||||
# exec --no-startup-id ${pkgs.swaynotificationcenter}/bin/swaync
|
||||
|
@ -345,8 +358,8 @@ in
|
|||
}
|
||||
{
|
||||
timeout = 1200;
|
||||
command = "${pkgs.sway}/bin/swaymsg 'output * power off'";
|
||||
resumeCommand = "${pkgs.sway}/bin/swaymsg '${resumeMessages}'";
|
||||
command = "${cfg.package}/bin/swaymsg 'output * power off'";
|
||||
resumeCommand = "${cfg.package}/bin/swaymsg '${resumeMessages}'";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
|
|
@ -121,7 +121,7 @@
|
|||
kernelParams = [ "amd_pstate.shared_mem=1" ];
|
||||
extraModulePackages = with config.boot.kernelPackages; [
|
||||
cpupower
|
||||
rtl88x2bu
|
||||
# rtl88x2bu
|
||||
zenpower
|
||||
];
|
||||
|
||||
|
@ -226,6 +226,14 @@
|
|||
enable = true;
|
||||
};
|
||||
sudo.enable = false;
|
||||
pam.services.swaylock = {
|
||||
unixAuth = true;
|
||||
setLoginUid = true;
|
||||
enableGnomeKeyring = true;
|
||||
allowNullPassword = true;
|
||||
updateWtmp = true;
|
||||
startSession = true;
|
||||
};
|
||||
};
|
||||
|
||||
systemd = {
|
||||
|
@ -384,6 +392,18 @@
|
|||
};
|
||||
|
||||
programs = {
|
||||
sway = {
|
||||
enable = true;
|
||||
package = pkgs.swayfx;
|
||||
wrapperFeatures = {
|
||||
gtk = true;
|
||||
base = true;
|
||||
};
|
||||
extraPackages = with pkgs; [
|
||||
swaylock
|
||||
swayidle
|
||||
];
|
||||
};
|
||||
gnome-disks.enable = true;
|
||||
# ssh.startAgent = true;
|
||||
|
||||
|
|
|
@ -230,6 +230,14 @@
|
|||
apparmor = {
|
||||
enable = true;
|
||||
};
|
||||
pam.services.swaylock = {
|
||||
unixAuth = true;
|
||||
setLoginUid = true;
|
||||
enableGnomeKeyring = true;
|
||||
allowNullPassword = true;
|
||||
updateWtmp = true;
|
||||
startSession = true;
|
||||
};
|
||||
};
|
||||
|
||||
systemd.network = {
|
||||
|
@ -308,6 +316,17 @@
|
|||
|
||||
# programs.ssh.startAgent = true;
|
||||
programs = {
|
||||
sway = {
|
||||
enable = true;
|
||||
wrapperFeatures = {
|
||||
gtk = true;
|
||||
base = true;
|
||||
};
|
||||
extraPackages = with pkgs; [
|
||||
swaylock
|
||||
swayidle
|
||||
];
|
||||
};
|
||||
gnome-disks.enable = true;
|
||||
nix-ld = {
|
||||
enable = true;
|
||||
|
|
|
@ -25,18 +25,6 @@ in
|
|||
fuse.userAllowOther = true;
|
||||
|
||||
seahorse.enable = true;
|
||||
|
||||
sway = mkIf cfg.wayland {
|
||||
enable = true;
|
||||
wrapperFeatures = {
|
||||
gtk = true;
|
||||
base = true;
|
||||
};
|
||||
extraPackages = with pkgs; [
|
||||
swaylock
|
||||
swayidle
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
xdg = {
|
||||
|
@ -61,14 +49,6 @@ in
|
|||
};
|
||||
|
||||
security = {
|
||||
pam.services.swaylock = {
|
||||
unixAuth = true;
|
||||
setLoginUid = true;
|
||||
enableGnomeKeyring = true;
|
||||
allowNullPassword = true;
|
||||
updateWtmp = true;
|
||||
startSession = true;
|
||||
};
|
||||
pki.certificates = [ (builtins.readFile ./horus-ca.pem) ];
|
||||
wrappers = {
|
||||
fusermount.source = "${pkgs.fuse}/bin/fusermount";
|
||||
|
|
|
@ -12,7 +12,7 @@ let
|
|||
style = builtins.readFile ./greetd.css;
|
||||
|
||||
swaySession = pkgs.writeShellScript "sway-session" ''
|
||||
${pkgs.sway}/bin/sway --unsupported-gpu
|
||||
${config.programs.sway.package}/bin/sway --unsupported-gpu
|
||||
'';
|
||||
|
||||
steam-gamescope =
|
||||
|
|
|
@ -118,6 +118,7 @@ in
|
|||
starship.enable = true;
|
||||
sway = {
|
||||
enable = true;
|
||||
package = pkgs.swayfx;
|
||||
lock-wallpaper = "${homeCfg.home.homeDirectory}/.wallpapers/river-2560.png";
|
||||
output = {
|
||||
"DP-2" = {
|
||||
|
|
Loading…
Reference in a new issue