Restructure flake.nix and add JHelioviewer package

This commit is contained in:
2024-07-06 16:50:32 -05:00
parent 4424978387
commit d8d07896fe
6 changed files with 319 additions and 232 deletions

View File

@@ -16,11 +16,30 @@ in
services.swayidle = {
enable = true;
timeouts = [
{
(mkIf gui.sway.desktop {
timeout = 600;
command = "${pkgs.sway}/bin/swaymsg 'output * dpms off'";
resumeCommand = "${pkgs.sway}/bin/swaymsg 'output * dpms on'";
}
})
(mkIf (!gui.sway.desktop) {
timeout = 300;
command = "${pkgs.swaylock}/bin/swaylock -f -c 000000";
})
(mkIf (!gui.sway.desktop) {
timeout = 420;
command = "${pkgs.sway}/bin/swaymsg 'output * dpms off'";
resumeCommand = "${pkgs.sway}/bin/swaymsg 'output * dpms on'";
})
(mkIf (!gui.sway.desktop) {
timeout = 600;
command = "systemctl suspend";
})
];
events = [
(mkIf (!gui.sway.desktop) {
event = "before-sleep";
command = "${pkgs.swaylock}/bin/swaylock -f -c 000000";
})
];
};

View File

@@ -33,6 +33,9 @@ in
services.gnome.gnome-keyring.enable = mkIf cfg.secrets true;
services.dbus.packages = mkIf cfg.secrets [ pkgs.gnome.seahorse ];
# Remove when nixpkgs issue 143365 is fixed
security.pam.services.swaylock = mkIf (!cfg.sway.desktop) {};
xdg.portal.config.common = [ "wlr" "gtk" ];
programs.thunar.enable = true;