From b7ba1b7ba9b87c7a60e3f2fe4772d8579b0ed711 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Thu, 1 Sep 2022 14:34:57 +0200 Subject: [PATCH 1/3] Fix hosts rebuilding with ISO config after #125 See: https://github.com/divnix/digga/pull/455#issuecomment-1231789444 Upstream fix found in https://github.com/montchr/dotfield/blob/e1b09712fef297ee6173f7010787cd5b2b574a17/nixos/default.nix#L85-L88 --- flake.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 466d107..41cd4ff 100644 --- a/flake.nix +++ b/flake.nix @@ -92,7 +92,10 @@ imports = [ (digga.lib.importExportableModules ./modules) ]; modules = [ { lib.our = self.lib; } - digga.nixosModules.bootstrapIso + # FIXME: upstream module causes a huge number of unnecessary + # dependencies to be pulled in for all systems -- many of them are + # graphical. should only be imported as needed. + # digga.nixosModules.bootstrapIso digga.nixosModules.nixConfig home.nixosModules.home-manager agenix.nixosModules.age From d563b1d469a0a8bd2e170f450e8c6e790ee4efb9 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Thu, 1 Sep 2022 14:37:14 +0200 Subject: [PATCH 2/3] Fix swaylock-bg, now a bash script - reference jq from pkgs - shellcheck fixes --- pkgs/swaylock-bg.nix | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pkgs/swaylock-bg.nix b/pkgs/swaylock-bg.nix index b55c32a..75bcd7d 100644 --- a/pkgs/swaylock-bg.nix +++ b/pkgs/swaylock-bg.nix @@ -3,18 +3,17 @@ self: with self; '' # swaylock # Make sure we aren't running twice - RUNNING=$(ps -A | grep swaylock | wc -l) - if [ $RUNNING -ne 0 ]; then + RUNNING=$(${procps}/bin/pgrep -c ${swaylock}/bin/swaylock) + if [ "$RUNNING" -ne 0 ]; then exit 0 fi - IMAGE=$XDG_CONFIG_HOME/wallpaper.jpg + IMAGE="$XDG_CONFIG_HOME/wallpaper.jpg" LOCKARGS="" - for OUTPUT in `${sway}/bin/swaymsg -t get_outputs | jq -r '.[].name'` + for OUTPUT in $(${sway}/bin/swaymsg -t get_outputs | ${jq}/bin/jq -r '.[].name') do LOCKARGS="''${LOCKARGS} --image ''${OUTPUT}:''${IMAGE}" - IMAGES="''${IMAGES} ''${IMAGE}" done exec ${swaylock}/bin/swaylock $LOCKARGS '' From 1767dcb0763cbfeed673200602b20e11c465da35 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Thu, 1 Sep 2022 14:38:10 +0200 Subject: [PATCH 3/3] Fix swayidle service - add missing \ - reference swaylock-bg script from pkgs --- modules/sway/swayidle.service.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/sway/swayidle.service.nix b/modules/sway/swayidle.service.nix index f10675f..685d0f1 100644 --- a/modules/sway/swayidle.service.nix +++ b/modules/sway/swayidle.service.nix @@ -12,11 +12,11 @@ Environment = "PATH=/run/current-system/sw/bin:${pkgs.sway}/bin"; ExecStart = ''${pkgs.swayidle}/bin/swayidle -w \ after-resume 'swaymsg "output * dpms on"' \ - before-sleep 'swaylock-bg' '' + (if psCfg.paranoia.enable then '' \ + before-sleep '${pkgs.swaylock-bg}/bin/swaylock-bg' '' + (if psCfg.paranoia.enable then '' \ timeout 120 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \ timeout 150 'systemctl hibernate' '' else '' \ - timeout 600 'swaylock-bg' + timeout 600 '${pkgs.swaylock-bg}/bin/swaylock-bg' \ timeout 900 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' ''); };