From f9d6eb2bf127083e961a079072c55418dd93c81f Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Tue, 23 Jun 2026 00:37:50 +0200 Subject: treewide: Remove config eval errors --- modules/by-name/fo/foot/module.nix | 10 +++-- modules/by-name/fo/foot/theme.ini | 13 +++++++ modules/by-name/i3/i3bar-river/module.nix | 24 ++++++------ modules/by-name/ri/river/module.nix | 4 +- modules/by-name/sw/swaybg/images/abstract-nord.png | Bin 0 -> 140219 bytes .../sw/swaybg/images/abstract-nord.png.license | 9 +++++ modules/by-name/sw/swaybg/module.nix | 35 +++++++++++++++++ modules/by-name/sw/swayidle/module.nix | 43 +++++++++++++++++++++ modules/common/abstract-nord.png | Bin 140219 -> 0 bytes modules/common/abstract-nord.png.license | 9 ----- modules/common/default.nix | 6 --- modules/home.legacy/conf/default.nix | 1 - modules/home.legacy/conf/swayidle/config | 5 --- modules/home.legacy/conf/swayidle/config.license | 9 ----- modules/home.legacy/conf/swayidle/default.nix | 35 ----------------- 15 files changed, 121 insertions(+), 82 deletions(-) create mode 100644 modules/by-name/sw/swaybg/images/abstract-nord.png create mode 100644 modules/by-name/sw/swaybg/images/abstract-nord.png.license create mode 100644 modules/by-name/sw/swaybg/module.nix create mode 100644 modules/by-name/sw/swayidle/module.nix delete mode 100644 modules/common/abstract-nord.png delete mode 100644 modules/common/abstract-nord.png.license delete mode 100644 modules/home.legacy/conf/swayidle/config delete mode 100644 modules/home.legacy/conf/swayidle/config.license delete mode 100644 modules/home.legacy/conf/swayidle/default.nix (limited to 'modules') diff --git a/modules/by-name/fo/foot/module.nix b/modules/by-name/fo/foot/module.nix index 29d886d6..00c198fa 100644 --- a/modules/by-name/fo/foot/module.nix +++ b/modules/by-name/fo/foot/module.nix @@ -11,6 +11,7 @@ config, lib, libraries, + pkgs, ... }: let cfg = config.soispha.foot; @@ -20,6 +21,11 @@ in { }; config = lib.mkIf cfg.enable { + # TODO: Maybe we can use the xdg-autostart mechanism for this? <2026-06-23> + soispha.programs.river.init.autoStart = [ + ["${lib.getExe' pkgs.foot "footclient"}"] + ]; + home-manager.users.soispha = { programs.foot = { enable = true; @@ -52,10 +58,6 @@ in { }; }; }; - - soispha.river.autostart = [ - "${lib.getExe' config.home-manager.users.soispha.programs.foot.package "footclient"}" - ]; }; }; } diff --git a/modules/by-name/fo/foot/theme.ini b/modules/by-name/fo/foot/theme.ini index f66cde40..aba19ecb 100644 --- a/modules/by-name/fo/foot/theme.ini +++ b/modules/by-name/fo/foot/theme.ini @@ -1,4 +1,17 @@ # From https://codeberg.org/dnkl/foot/src/commit/43d2d97386663ebd42563eb44b7fca8e9a7584ae/themes/visibone +# Other themes I considered: +# - ayu-mirage +# - catppuccin-mocha +# - chiba-dark +# - iterm +# - kitty +# - modus-vivendi +# - modus-vivendi-tinted +# - molokai +# - tokyonight-storm +# - visibone +# - xterm +# - poimandres # -*- conf -*- # VisiBone diff --git a/modules/by-name/i3/i3bar-river/module.nix b/modules/by-name/i3/i3bar-river/module.nix index 2b9150d3..898b6c69 100644 --- a/modules/by-name/i3/i3bar-river/module.nix +++ b/modules/by-name/i3/i3bar-river/module.nix @@ -110,20 +110,20 @@ in { }; config = lib.mkIf cfg.enable { - home-manager.users.soispha = { - systemd.user.services."i3bar-river" = { - description = "Highly customizable Wayland bar for river"; - partOf = "graphical-session.target"; - after = "graphical-session.target"; - requisite = "graphical-session.target"; - serviceConfig = { - ExecStart = "${lib.getExe cfg.package}"; - ExecReload = "kill -SIGUSR2 $MAINPID"; - Restart = "on-failure"; - }; - wantedBy = "graphical-session.target"; + systemd.user.services."i3bar-river" = { + description = "Highly customizable Wayland bar for river"; + partOf = ["graphical-session.target"]; + after = ["graphical-session.target"]; + requisite = ["graphical-session.target"]; + serviceConfig = { + ExecStart = "${lib.getExe cfg.package}"; + ExecReload = "kill -SIGUSR2 $MAINPID"; + Restart = "on-failure"; }; + wantedBy = ["graphical-session.target"]; + }; + home-manager.users.soispha = { programs.i3bar-river = { enable = true; inherit (cfg) package; diff --git a/modules/by-name/ri/river/module.nix b/modules/by-name/ri/river/module.nix index bc747c9d..b93e78af 100644 --- a/modules/by-name/ri/river/module.nix +++ b/modules/by-name/ri/river/module.nix @@ -166,7 +166,9 @@ in { }; autoStart = lib.mkOption { - type = lib.types.listOf lib.types.package; + type = + lib.types.listOf (lib.types.either lib.types.package (lib.types.listOf + lib.types.str)); description = "List of programs to be started at river start"; example = '' [ diff --git a/modules/by-name/sw/swaybg/images/abstract-nord.png b/modules/by-name/sw/swaybg/images/abstract-nord.png new file mode 100644 index 00000000..5ef498bf Binary files /dev/null and b/modules/by-name/sw/swaybg/images/abstract-nord.png differ diff --git a/modules/by-name/sw/swaybg/images/abstract-nord.png.license b/modules/by-name/sw/swaybg/images/abstract-nord.png.license new file mode 100644 index 00000000..eae6a84c --- /dev/null +++ b/modules/by-name/sw/swaybg/images/abstract-nord.png.license @@ -0,0 +1,9 @@ +nixos-config - My current NixOS configuration + +Copyright (C) 2025 Benedikt Peetz +SPDX-License-Identifier: GPL-3.0-or-later + +This file is part of my nixos-config. + +You should have received a copy of the License along with this program. +If not, see . diff --git a/modules/by-name/sw/swaybg/module.nix b/modules/by-name/sw/swaybg/module.nix new file mode 100644 index 00000000..fa6a079a --- /dev/null +++ b/modules/by-name/sw/swaybg/module.nix @@ -0,0 +1,35 @@ +# nixos-config - My current NixOS configuration +# +# Copyright (C) 2025 Benedikt Peetz +# SPDX-License-Identifier: GPL-3.0-or-later +# +# This file is part of my nixos-config. +# +# You should have received a copy of the License along with this program. +# If not, see . +{ + config, + lib, + pkgs, + libraries, + ... +}: let + cfg = config.soispha.programs.swaybg; +in { + options.soispha.programs.swaybg = { + enable = libraries.base.options.mkEnable "swaybg"; + }; + + config = lib.mkIf cfg.enable { + systemd.user.services."swaybg" = { + description = "Background display for river"; + partOf = ["graphical-session.target"]; + after = ["graphical-session.target"]; + requisite = ["graphical-session.target"]; + serviceConfig = { + ExecStart = "${lib.getExe pkgs.swaybg} --image ${./images/abstract-nord.png}"; + }; + wantedBy = ["graphical-session.target"]; + }; + }; +} diff --git a/modules/by-name/sw/swayidle/module.nix b/modules/by-name/sw/swayidle/module.nix new file mode 100644 index 00000000..a29b5952 --- /dev/null +++ b/modules/by-name/sw/swayidle/module.nix @@ -0,0 +1,43 @@ +# nixos-config - My current NixOS configuration +# +# Copyright (C) 2025 Benedikt Peetz +# SPDX-License-Identifier: GPL-3.0-or-later +# +# This file is part of my nixos-config. +# +# You should have received a copy of the License along with this program. +# If not, see . +{ + config, + lib, + libraries, + ... +}: let + cfg = config.soispha.programs.swayidle; +in { + options.soispha.programs.swayidle = { + enable = libraries.base.options.mkEnable "swayidle"; + }; + + config = lib.mkIf cfg.enable { + home-manager.users.soispha = { + services.swayidle = { + enable = true; + events = { + "before-sleep" = "swaylock -f "; + }; + + timeouts = [ + { + timeout = 180; + command = "swaylock -fF"; + } + { + timeout = 360; + command = "systemctl suspend-then-hibernate"; + } + ]; + }; + }; + }; +} diff --git a/modules/common/abstract-nord.png b/modules/common/abstract-nord.png deleted file mode 100644 index 5ef498bf..00000000 Binary files a/modules/common/abstract-nord.png and /dev/null differ diff --git a/modules/common/abstract-nord.png.license b/modules/common/abstract-nord.png.license deleted file mode 100644 index eae6a84c..00000000 --- a/modules/common/abstract-nord.png.license +++ /dev/null @@ -1,9 +0,0 @@ -nixos-config - My current NixOS configuration - -Copyright (C) 2025 Benedikt Peetz -SPDX-License-Identifier: GPL-3.0-or-later - -This file is part of my nixos-config. - -You should have received a copy of the License along with this program. -If not, see . diff --git a/modules/common/default.nix b/modules/common/default.nix index 5392538a..e5172921 100644 --- a/modules/common/default.nix +++ b/modules/common/default.nix @@ -219,12 +219,6 @@ pointer-1133-49970-Logitech_Gaming_Mouse_G502 = [["pointer-accel" "0"] ["accel-profile" "none"]]; pointer-12951-6505-ZSA_Technology_Labs_Moonlander_Mark_I = [["pointer-accel" "0"] ["accel-profile" "none"]]; }; - backgroundStart = [ - # TODO(@bpeetz): Move these to systemd units/their own modules <2025-05-18> - - ["${lib.getExe pkgs.swaybg}" "--image" "${./abstract-nord.png}"] - pkgs.swayidle - ]; }; }; mpv.enable = true; diff --git a/modules/home.legacy/conf/default.nix b/modules/home.legacy/conf/default.nix index 89502a64..b50068ea 100644 --- a/modules/home.legacy/conf/default.nix +++ b/modules/home.legacy/conf/default.nix @@ -24,6 +24,5 @@ ./prusa_slicer ./python ./starship - ./swayidle ]; } diff --git a/modules/home.legacy/conf/swayidle/config b/modules/home.legacy/conf/swayidle/config deleted file mode 100644 index a48f670b..00000000 --- a/modules/home.legacy/conf/swayidle/config +++ /dev/null @@ -1,5 +0,0 @@ -timeout 180 'swaylock -fF' - -timeout 360 'systemctl suspend-then-hibernate' - -before-sleep 'swaylock -f' diff --git a/modules/home.legacy/conf/swayidle/config.license b/modules/home.legacy/conf/swayidle/config.license deleted file mode 100644 index eae6a84c..00000000 --- a/modules/home.legacy/conf/swayidle/config.license +++ /dev/null @@ -1,9 +0,0 @@ -nixos-config - My current NixOS configuration - -Copyright (C) 2025 Benedikt Peetz -SPDX-License-Identifier: GPL-3.0-or-later - -This file is part of my nixos-config. - -You should have received a copy of the License along with this program. -If not, see . diff --git a/modules/home.legacy/conf/swayidle/default.nix b/modules/home.legacy/conf/swayidle/default.nix deleted file mode 100644 index 4483c8b9..00000000 --- a/modules/home.legacy/conf/swayidle/default.nix +++ /dev/null @@ -1,35 +0,0 @@ -# nixos-config - My current NixOS configuration -# -# Copyright (C) 2025 Benedikt Peetz -# SPDX-License-Identifier: GPL-3.0-or-later -# -# This file is part of my nixos-config. -# -# You should have received a copy of the License along with this program. -# If not, see . -{...}: { - # TODO: This fails to hibernate when the hardware swap was not previously activated. <2025-04-04> - xdg.configFile."swayidle/config".source = ./config; - - # services.swayidle = { - # enable = true; - # events = [ - # { - # event = "before-sleep"; - # command = "${pkgs.swaylock}/bin/swaylock -f "; - # } - # ]; - # timeouts = [ - # { - # timeout = 180; - # command = "${pkgs.swaylock}/bin/swaylock -fFu "; - # } - # { - # timeout = 360; - # # TODO: systemctl is installed? - # command = "systemctl suspend-then-hibernate"; - # } - # ]; - # # systemdTarget = ""; # TODO: this might be usefull - # }; -} -- cgit v1.3.1