chore(module): remove installPackage parameter

This commit is contained in:
Yorick Barbanneau 2024-09-03 00:40:48 +02:00
parent e2e5c9c75e
commit 691e01e22c
7 changed files with 30 additions and 60 deletions

View file

@ -1,13 +1,10 @@
{ ... }: {
{ pkgs, ... }: {
config.modules = {
application = {
gnupg.enable = true;
gnupg.enable = false;
zathura.enable = true;
foot.enable = true;
imv = {
enable = true;
installPackage = false;
};
foot.enable = false;
imv.enable = false;
};
cli = {
direnv.enable = true;
@ -21,7 +18,7 @@
};
video = {
kdenlive.enable = false;
mpv.enable = true;
mpv.enable = false;
};
web.firefox = {
enable = true;
@ -34,8 +31,7 @@
web.webcord.enable = false;
gaming.lutris.enable = false;
desktop.sway = {
enable = true;
installPackage = false;
enable = false;
kanshi = false;
wallpapers.lockscreen = "${./files/lockscreen.png}";
wallpapers.desktop = "${./files/background.png} fill #000000";

View file

@ -1,8 +1,20 @@
_:
{
wayland.windowManager.sway.config.output = {
"eDP-1" = {
scale = "1.3";
};
};
}
programs.zsh.loginExtra = ''
#notmutch
export NOTMUCH_CONFIG="$HOME/.config/notmuch/config"
export PATH=~/.local/bin:$PATH
# export XDG_DATA_HOME=$HOME/.local/share
unset DEBUGINFOD_URLS
if [[ ! $DISPLAY && $XDG_VTNR -eq 1 ]]; then
export QT_QPA_PLATFORM="wayland-egl"
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
export MOZ_ENABLE_WAYLAND=1
export QT_QPA_PLATFORMTHEME=qt5ct
export NO_AT_BRIDGE=1
export XDG_SESSION_TYPE=wayland
export XDG_CURRENT_DESKTOP=sway
exec ~/.local/bin/sway.sh
fi
'';
}

View file

@ -17,11 +17,6 @@ in
config = mkIf cfg.enable {
programs.imv = {
enable = true;
package =
if cfg.installPackage
then pkgs.imv
else pkgs.emptyDirectory;
};
xdg.mimeApps.defaultApplications = {
"image/*" = "imv-dir.desktop";

View file

@ -7,12 +7,6 @@ in
options.modules.desktop.sway = {
enable = mkEnableOption "enable Sway Windows Manager";
installPackage = mkOption {
type = types.bool;
default = true;
description = "install Package, if false relies on distribution packages";
};
kanshi = mkOption {
type = types.bool;
default = false;

View file

@ -7,14 +7,6 @@ in
config = mkIf config.modules.desktop.sway.enable {
wayland.windowManager.sway = {
enable = true;
# Do not install sway package on other system that NixOS
# because performance issue
package =
if cfg.installPackage
then pkgs.sway
else null;
wrapperFeatures.gtk = true;
systemd.enable = true;
config = {
@ -69,10 +61,7 @@ in
"${mod}+Shift+q" = "kill";
"${mod}+d" = "exec ${pkgs.fuzzel}/bin/fuzzel";
"${mod}+Shift+c" = "reload";
"${mod}+Alt+l" =
if cfg.installPackage
then "exec ${pkgs.swaylock}/bin/swaylock"
else "exec swaylock";
"${mod}+Alt+l" = "exec ${pkgs.swaylock}/bin/swaylock";
"${mod}+${left} focus" = "left";
"${mod}+${down} focus" = "down";
"${mod}+${up} focus" = "up";

View file

@ -10,34 +10,22 @@ in
timeouts = [
{
timeout = 300;
command =
if cfg.installPackage
then "${pkgs.swaylock}/bin/swaylock -f"
else "swaylock -f";
command = "${pkgs.swaylock}/bin/swaylock -f";
}
{
timeout = 600;
command = ''${pkgs.sway}/bin/swaymsg "output * power off"'';
resumeCommand =
if cfg.installPackage
then ''${pkgs.sway}/bin/swaymsg "output * power on"''
else ''swaymsg "output * power on"'';
resumeCommand =''${pkgs.sway}/bin/swaymsg "output * power on"'';
}
];
events = [
{
event = "before-sleep";
command =
if cfg.installPackage
then "${pkgs.swaylock}/bin/swaylock -f"
else "swaylock -f";
command = "${pkgs.swaylock}/bin/swaylock -f";
}
{
event = "lock";
command =
if cfg.installPackage
then "${pkgs.swaylock}/bin/swaylock -f"
else "swaylock -f";
command = "${pkgs.swaylock}/bin/swaylock -f";
}
];
};

View file

@ -7,10 +7,6 @@ in
config = mkIf config.modules.desktop.sway.enable {
programs.swaylock = {
enable = true;
package =
if cfg.installPackage
then pkgs.swaylock
else pkgs.emptyDirectory;
settings = {
image = "${cfg.wallpapers.lockscreen}";
scaling = "center";