diff options
Diffstat (limited to '')
34 files changed, 453 insertions, 76 deletions
diff --git a/modules/by-name/at/atuin/module.nix b/modules/by-name/at/atuin/module.nix index 700f50fb..6cf8a396 100644 --- a/modules/by-name/at/atuin/module.nix +++ b/modules/by-name/at/atuin/module.nix @@ -34,10 +34,12 @@ in { home-manager.users.soispha = { programs.atuin = { enable = true; - package = pkgs.atuin-dvorak; + + daemon.enable = true; # We can do this on our own. enableZshIntegration = false; + settings = { key_path = lib.mkMerge [ (lib.mkIf cfg.enableAge "${config.age.secrets.atuin_encryption_key.path}") @@ -52,6 +54,11 @@ in { auto_sync = lib.mkIf cfg.enableAge true; sync_address = lib.mkIf cfg.enableAge "https://atuin-sync.vhack.eu"; + logs = { + enabled = true; + dir = "${config.home-manager.users.soispha.xdg.cacheHome}/atuin/logs"; + }; + # Use the rather reasonable syntax of `skim` to search. search_mode = "skim"; @@ -80,9 +87,16 @@ in { ignored_commands = []; }; + keymap.vim-normal = { + "h" = "cursor-left"; + "t" = "select-next"; + "n" = "select-previous"; + "s" = "cursor-right"; + }; + # I currently don't want a sync deamon or a dotfiles manager running. - deamon.enable = false; dotfiles.enable = false; + ai.enabled = false; }; }; }; diff --git a/modules/by-name/ca/cargo/module.nix b/modules/by-name/ca/cargo/module.nix index 980ebcba..d36a11e5 100644 --- a/modules/by-name/ca/cargo/module.nix +++ b/modules/by-name/ca/cargo/module.nix @@ -10,17 +10,26 @@ { config, lib, + libraries, ... }: let cfg = config.soispha.programs.cargo; in { options.soispha.programs.cargo = { - enable = lib.mkEnableOption "cargo"; + enable = libraries.base.options.mkEnable "cargo"; }; + config = lib.mkIf cfg.enable { home-manager.users.soispha = { - home.sessionVariables = { - CARGO_HOME = "${config.home-manager.users.soispha.xdg.dataHome}/cargo"; + programs.cargo = { + enable = true; + package = null; + cargoHome = "${config.home-manager.users.soispha.xdg.dataHome}/cargo"; + + settings = { + # {cargo-cache-home} means $CARGO_HOME + build.build-dir = "{cargo-cache-home}/shared-target/"; + }; }; }; }; diff --git a/modules/by-name/di/disks/hibernate.nix b/modules/by-name/di/disks/hibernate.nix index e983f9c7..d3f8fe8b 100644 --- a/modules/by-name/di/disks/hibernate.nix +++ b/modules/by-name/di/disks/hibernate.nix @@ -48,7 +48,8 @@ systemd-hibernate.serviceConfig.Environment = "SYSTEMD_BYPASS_HIBERNATION_MEMORY_CHECK=1"; systemd-logind.serviceConfig.Environment = "SYSTEMD_BYPASS_HIBERNATION_MEMORY_CHECK=1"; }; - sleep.extraConfig = '' - HibernateDelaySec=5m - ''; + + sleep.settings.Sleep = { + HibernateDelaySec = "10m"; + }; } diff --git a/modules/by-name/fo/fonts/module.nix b/modules/by-name/fo/fonts/module.nix index 4bf9a612..f05cae5a 100644 --- a/modules/by-name/fo/fonts/module.nix +++ b/modules/by-name/fo/fonts/module.nix @@ -20,11 +20,12 @@ in { fonts = lib.mkOption { type = lib.types.listOf lib.types.package; - example = lib.literalExpression '' [ + example = lib.literalExpression '' + [ pkgs.nerd-fonts.source-code-pro pkgs.nerd-fonts.overpass pkgs.nerd-fonts.fira-code - ]''; + ]''; default = [ pkgs.nerd-fonts.sauce-code-pro pkgs.nerd-fonts.overpass diff --git a/modules/by-name/gi/git/aliases.nix b/modules/by-name/gi/git/aliases.nix index bc30ea40..948ec131 100644 --- a/modules/by-name/gi/git/aliases.nix +++ b/modules/by-name/gi/git/aliases.nix @@ -29,20 +29,11 @@ lg2 = "lg2-specific --all"; lg3 = "lg3-specific --all"; - lg1-specific = "log --graph --abbrev-commit --decorate \ - --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold cyan) [%G?]%C(reset)%C(auto)%d%C(reset)'"; + lg1-specific = "log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold cyan) [%G?]%C(reset)%C(auto)%d%C(reset)'"; - lg2-specific = "log --graph --abbrev-commit --decorate \ - --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(auto)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)'"; + lg2-specific = "log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(auto)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)'"; - lg3-specific = "log --graph --abbrev-commit --decorate \ - --format=format:'%C(bold blue)%h%C(reset)\ - - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)\ - %C(bold cyan)(committed: %cD)%C(reset) %C(auto)%d%C(reset)\ - %C(bold red)(signature: %G? by %GS, trust: %GT)%C(reset)%n\ - '' %C(white)%s%C(reset)%n''\ - %C(dim white)- %an <%ae> %C(reset) %C(dim white)(committer: %cn <%ce>)%C(reset)\ - %C(bold white)- trailers: %(trailers) %C(reset)'"; + lg3-specific = "log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset) %C(bold cyan)(committed: %cD)%C(reset) %C(auto)%d%C(reset) %C(bold red)(signature: %G? by %GS, trust: %GT)%C(reset)%n '' %C(white)%s%C(reset)%n'' %C(dim white)- %an <%ae> %C(reset) %C(dim white)(committer: %cn <%ce>)%C(reset) %C(bold white)- trailers: %(trailers) %C(reset)'"; # hard reset with commit before (use reflog to recover) # git wipe [<commit>] diff --git a/modules/by-name/gi/git/module.nix b/modules/by-name/gi/git/module.nix index 77cfce54..64a64904 100644 --- a/modules/by-name/gi/git/module.nix +++ b/modules/by-name/gi/git/module.nix @@ -45,7 +45,9 @@ in { programs.git = { enable = true; - #package = pkgs.gitAndTools.gitFull; # TODO: for git send-email support + + signing.format = "openpgp"; + settings = { alias = import ./aliases.nix { inherit lib; diff --git a/modules/by-name/i3/i3status-rust/module.nix b/modules/by-name/i3/i3status-rust/module.nix index 10cb4475..1e247100 100644 --- a/modules/by-name/i3/i3status-rust/module.nix +++ b/modules/by-name/i3/i3status-rust/module.nix @@ -18,7 +18,7 @@ in { options.soispha.programs.i3status-rust = { enable = lib.mkEnableOption "i3status-rust"; - package = lib.mkPackageOption pkgs "i3status-rust-patched" {}; + package = lib.mkPackageOption pkgs "i3status-rust" {}; }; config = lib.mkIf cfg.enable { diff --git a/modules/by-name/lf/lf/colors b/modules/by-name/lf/lf/colors index 17201e64..ed211581 100644 --- a/modules/by-name/lf/lf/colors +++ b/modules/by-name/lf/lf/colors @@ -58,7 +58,7 @@ ex 03;01;95 # EXEC fi 00 # FILE # links to hide -~/.mozilla 01;08;30 +~/.pki 01;08;30 ~/.ssh 01;08;30 # archives or compressed (dircolors defaults) diff --git a/modules/by-name/lf/lf/commands/scripts/archive_decompress.sh b/modules/by-name/lf/lf/commands/scripts/archive_decompress.sh index 11d634b1..6cae62a2 100755 --- a/modules/by-name/lf/lf/commands/scripts/archive_decompress.sh +++ b/modules/by-name/lf/lf/commands/scripts/archive_decompress.sh @@ -29,5 +29,8 @@ echo "$fx" | while read -r file; do *.7z) 7z x "$file" ;; *) die "'$file' is not a supported file for unarchiving." ;; esac + + lf_cmd echo "decompression of '$file' done." done + # vim: ft=sh diff --git a/modules/by-name/lf/lf/ctpv/prev/application/archive/default.nix b/modules/by-name/lf/lf/ctpv/prev/application/archive/default.nix index aee5c732..d64c9572 100644 --- a/modules/by-name/lf/lf/ctpv/prev/application/archive/default.nix +++ b/modules/by-name/lf/lf/ctpv/prev/application/archive/default.nix @@ -14,14 +14,19 @@ matches.mime = [ "application/gzip" "application/java-archive" + "application/vnd.android.package-archive" "application/vnd.debian.binary-package" "application/x-7z-compressed" + "application/x-archive" "application/x-bzip2" + "application/x-cpio" + "application/x-lz4" "application/x-rar" "application/x-tar" "application/x-xz" "application/zip" "application/zlib" + "application/zstd" ]; matches.extension = [ diff --git a/modules/by-name/lf/lf/ctpv/prev/application/x-pem-file/default.nix b/modules/by-name/lf/lf/ctpv/prev/application/x-pem-file/default.nix index fb82aa8a..28b69890 100644 --- a/modules/by-name/lf/lf/ctpv/prev/application/x-pem-file/default.nix +++ b/modules/by-name/lf/lf/ctpv/prev/application/x-pem-file/default.nix @@ -11,7 +11,9 @@ soispha.programs.lf.ctpv.previewers = { pem = { previewer = ./pem.sh; - matches.mime = ["application/x-pem-file"]; + matches.mime = [ + "application/x-pem-file" + ]; dependencies = [ pkgs.openssl ]; diff --git a/modules/by-name/lf/lf/ctpv/prev/font/default.nix b/modules/by-name/lf/lf/ctpv/prev/font/default.nix index 76a284f4..0f94603b 100644 --- a/modules/by-name/lf/lf/ctpv/prev/font/default.nix +++ b/modules/by-name/lf/lf/ctpv/prev/font/default.nix @@ -14,6 +14,7 @@ matches.mime = [ "font/*" "application/vnd.ms-opentype" + "application/x-font-pf2" # TODO: This should be added (ext: 'eot') <2024-12-04> # "application/vnd.ms-fontobject" diff --git a/modules/by-name/lf/lf/ctpv/prev/inode/default.nix b/modules/by-name/lf/lf/ctpv/prev/inode/directory/default.nix index fe5ee3e1..baf0314f 100644 --- a/modules/by-name/lf/lf/ctpv/prev/inode/default.nix +++ b/modules/by-name/lf/lf/ctpv/prev/inode/directory/default.nix @@ -15,11 +15,5 @@ matches.mime = ["inode/directory"]; dependencies = [pkgs.coreutils]; }; - symlink = { - previewer = ./symlink.sh; - priority = 1; - matches.mime = ["inode/symlink"]; - dependencies = []; - }; }; } diff --git a/modules/by-name/lf/lf/ctpv/prev/inode/ls.sh b/modules/by-name/lf/lf/ctpv/prev/inode/directory/ls.sh index 73e036eb..73e036eb 100644 --- a/modules/by-name/lf/lf/ctpv/prev/inode/ls.sh +++ b/modules/by-name/lf/lf/ctpv/prev/inode/directory/ls.sh diff --git a/modules/by-name/lf/lf/ctpv/prev/inode/fifo/default.nix b/modules/by-name/lf/lf/ctpv/prev/inode/fifo/default.nix new file mode 100644 index 00000000..70cb9132 --- /dev/null +++ b/modules/by-name/lf/lf/ctpv/prev/inode/fifo/default.nix @@ -0,0 +1,19 @@ +# nixos-config - My current NixOS configuration +# +# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> +# 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 <https://www.gnu.org/licenses/gpl-3.0.txt>. +{...}: { + soispha.programs.lf.ctpv.previewers = { + fifo = { + previewer = ./fifo.sh; + priority = 1; + matches.mime = ["inode/fifo"]; + dependencies = []; + }; + }; +} diff --git a/pkgs/by-name/i3/i3status-rust-patched/package.nix b/modules/by-name/lf/lf/ctpv/prev/inode/fifo/fifo.sh index a103e275..594d40db 100644 --- a/pkgs/by-name/i3/i3status-rust-patched/package.nix +++ b/modules/by-name/lf/lf/ctpv/prev/inode/fifo/fifo.sh @@ -1,3 +1,5 @@ +#! /usr/bin/env dash + # nixos-config - My current NixOS configuration # # Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> @@ -7,16 +9,8 @@ # # You should have received a copy of the License along with this program. # If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. -{ - i3status-rust, -}: -i3status-rust.overrideAttrs (final: prev: { - pname = "${prev.pname}-patched"; - patches = - (prev.patches or []) - ++ [ - # Btrfs support for disk_space block. - ./patches/0001-disk_space-Support-btrfs-backend.patch - ]; -}) +# shellcheck disable=SC2269 +f="$f" + +printf "<fifo no preview>\n" diff --git a/modules/by-name/lf/lf/ctpv/prev/inode/symlink/default.nix b/modules/by-name/lf/lf/ctpv/prev/inode/symlink/default.nix new file mode 100644 index 00000000..0c1cb286 --- /dev/null +++ b/modules/by-name/lf/lf/ctpv/prev/inode/symlink/default.nix @@ -0,0 +1,19 @@ +# nixos-config - My current NixOS configuration +# +# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> +# 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 <https://www.gnu.org/licenses/gpl-3.0.txt>. +{...}: { + soispha.programs.lf.ctpv.previewers = { + symlink = { + previewer = ./symlink.sh; + priority = 1; + matches.mime = ["inode/symlink"]; + dependencies = []; + }; + }; +} diff --git a/modules/by-name/lf/lf/ctpv/prev/inode/symlink.sh b/modules/by-name/lf/lf/ctpv/prev/inode/symlink/symlink.sh index 2629f62a..2629f62a 100644 --- a/modules/by-name/lf/lf/ctpv/prev/inode/symlink.sh +++ b/modules/by-name/lf/lf/ctpv/prev/inode/symlink/symlink.sh diff --git a/modules/by-name/lf/lf/ctpv/prev/inode/x-empty/default.nix b/modules/by-name/lf/lf/ctpv/prev/inode/x-empty/default.nix new file mode 100644 index 00000000..670ad38b --- /dev/null +++ b/modules/by-name/lf/lf/ctpv/prev/inode/x-empty/default.nix @@ -0,0 +1,19 @@ +# nixos-config - My current NixOS configuration +# +# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> +# 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 <https://www.gnu.org/licenses/gpl-3.0.txt>. +{...}: { + soispha.programs.lf.ctpv.previewers = { + empty = { + previewer = ./empty.sh; + priority = 1; + matches.mime = ["inode/x-empty"]; + dependencies = []; + }; + }; +} diff --git a/modules/by-name/lf/lf/ctpv/prev/inode/x-empty/empty.sh b/modules/by-name/lf/lf/ctpv/prev/inode/x-empty/empty.sh new file mode 100644 index 00000000..da2cd9a9 --- /dev/null +++ b/modules/by-name/lf/lf/ctpv/prev/inode/x-empty/empty.sh @@ -0,0 +1,16 @@ +#! /usr/bin/env dash + +# nixos-config - My current NixOS configuration +# +# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> +# 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 <https://www.gnu.org/licenses/gpl-3.0.txt>. + +# shellcheck disable=SC2269 +f="$f" + +printf "<empty file no preview>\n" diff --git a/modules/by-name/lf/lf/ctpv/prev/message/rfc822/default.nix b/modules/by-name/lf/lf/ctpv/prev/message/rfc822/default.nix new file mode 100644 index 00000000..3cb0fcf5 --- /dev/null +++ b/modules/by-name/lf/lf/ctpv/prev/message/rfc822/default.nix @@ -0,0 +1,26 @@ +# nixos-config - My current NixOS configuration +# +# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> +# 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 <https://www.gnu.org/licenses/gpl-3.0.txt>. +{pkgs, ...}: { + soispha.programs.lf.ctpv.previewers = { + rfc822 = { + previewer = ./rfc822.sh; + priority = 1; + matches.mime = [ + "message/rfc822" + "application/mbox" + ]; + dependencies = [ + pkgs.coreutils + # pkgs.meli + # pkgs.util-linux + ]; + }; + }; +} diff --git a/modules/by-name/lf/lf/ctpv/prev/message/rfc822/rfc822.sh b/modules/by-name/lf/lf/ctpv/prev/message/rfc822/rfc822.sh new file mode 100644 index 00000000..228e01b7 --- /dev/null +++ b/modules/by-name/lf/lf/ctpv/prev/message/rfc822/rfc822.sh @@ -0,0 +1,22 @@ +#! /usr/bin/env dash + +# nixos-config - My current NixOS configuration +# +# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> +# 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 <https://www.gnu.org/licenses/gpl-3.0.txt>. + +# shellcheck disable=SC2269 +f="$f" +# shellcheck disable=SC2269 +cache_f="$cache_f" + +# TODO: Actually use `meli`, currently it will just not produce output, because the script +# never stops <2026-02-19> +# hide_script_env meli --config /dev/null view "$f" + +cat "$f" diff --git a/modules/by-name/lf/lf/ctpv/prev/text/default.nix b/modules/by-name/lf/lf/ctpv/prev/text/default.nix index ca042646..868a7460 100644 --- a/modules/by-name/lf/lf/ctpv/prev/text/default.nix +++ b/modules/by-name/lf/lf/ctpv/prev/text/default.nix @@ -24,6 +24,9 @@ matches.mime = [ "text/*" "application/postscript" + "application/javascript" + "application/x-setupscript" + "application/x-wine-extension-ini" ]; dependencies = [ pkgs.bat diff --git a/modules/by-name/ly/ly/blackhole-smooth-240x67.dur b/modules/by-name/ly/ly/blackhole-smooth-240x67.dur new file mode 100644 index 00000000..d65c878f --- /dev/null +++ b/modules/by-name/ly/ly/blackhole-smooth-240x67.dur Binary files differdiff --git a/modules/by-name/ly/ly/module.nix b/modules/by-name/ly/ly/module.nix new file mode 100644 index 00000000..dedabe81 --- /dev/null +++ b/modules/by-name/ly/ly/module.nix @@ -0,0 +1,110 @@ +# nixos-config - My current NixOS configuration +# +# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> +# 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 <https://www.gnu.org/licenses/gpl-3.0.txt>. +{ + lib, + config, + pkgs, + ... +}: let + cfg = config.soispha.programs.ly; + + # HACK: We search for the generate river desktop file, which should exist <2026-03-13> + riverDesktop = + lib.lists.findFirst + (x: lib.strings.hasSuffix "river.desktop" x) + null + config.home-manager.users.soispha.home.packages; + + shellDesktop = pkgs.writeText "zsh.desktop" '' + [Desktop Entry] + Comment=A simple shell session + DesktopNames=null + Exec=zsh + Name=zsh shell + Terminal=true + ''; + + customSessionsDir = + pkgs.runCommand "custom-sessions" {} + /* + bash + */ + '' + mkdir "$out"; + cp "${riverDesktop}/share/applications/river.desktop" "$out" + cp "${shellDesktop}" "$out" + ''; +in { + options.soispha.programs.ly = { + enable = lib.mkEnableOption "ly"; + + batteryName = lib.mkOption { + type = lib.types.nullOr lib.types.str; + example = "BAT0"; + default = null; + description = "The name of the battery, if null, will not show a batter percentage."; + }; + }; + + config = lib.mkIf cfg.enable { + assertions = [ + { + assertion = riverDesktop != null; + message = '' + There seems to be no `river.desktop` file generated. You will not be able to + log-into river without it. + ''; + } + ]; + + home-manager.users.soispha = { + home.sessionVariables = { + XCOMPOSECACHE = "${config.home-manager.users.soispha.xdg.cacheHome}/X11/xcompose"; + }; + }; + + services.displayManager.ly = { + enable = true; + x11Support = false; + + settings = { + battery_id = cfg.batteryName; + + # Stop animations after 10 secs. + animation_timeout_sec = 60; + + animation = "dur_file"; + dur_file_path = "${./blackhole-smooth-240x67.dur}"; + full_color = true; + + custom_sessions = "${customSessionsDir}"; + + # Clear the screen before starting up (otherwise error messages might linger on + # it.) + start_cmd = "clear"; + + # Clear the password on failure. + clear_password = true; + + session_log = "${config.home-manager.users.soispha.xdg.dataHome}/ly/ly-session.log"; + + clock = "%c"; + + hibernate_cmd = "systemctl hibernate"; + inactivity_cmd = "systmectl suspend-then-hibernate"; + restart_cmd = "reboot"; + shutdown_cmd = "shutdown $PLATFORM_SHUTDOWN_ARG now"; + sleep_cmd = "systemctl suspend"; + + inactivity_delay = 30; # unit is seconds + }; + }; + }; +} diff --git a/modules/by-name/me/mergiraf/module.nix b/modules/by-name/me/mergiraf/module.nix index 474a0ae3..693969e6 100644 --- a/modules/by-name/me/mergiraf/module.nix +++ b/modules/by-name/me/mergiraf/module.nix @@ -23,6 +23,7 @@ in { home-manager.users.soispha = { programs.mergiraf = { enable = true; + enableGitIntegration = true; }; }; }; diff --git a/modules/by-name/mp/mpdpopm/module.nix b/modules/by-name/mp/mpdpopm/module.nix index 3524554c..82943fe8 100644 --- a/modules/by-name/mp/mpdpopm/module.nix +++ b/modules/by-name/mp/mpdpopm/module.nix @@ -42,6 +42,9 @@ in { path = config.home-manager.users.soispha.home.sessionVariables.MPD_HOST; }; + # Automatically start in DJ mode. + mode = "Dj"; + local_music_dir = config.soispha.services.mpd.directories.music; }; diff --git a/modules/by-name/nv/nvim/plgs/lsp/servers/default.nix b/modules/by-name/nv/nvim/plgs/lsp/servers/default.nix index b6e47ca4..0e7be6e8 100644 --- a/modules/by-name/nv/nvim/plgs/lsp/servers/default.nix +++ b/modules/by-name/nv/nvim/plgs/lsp/servers/default.nix @@ -11,13 +11,14 @@ imports = [ ./servers/bashls.nix ./servers/ccls.nix - ./servers/quick-lint-js.nix ./servers/ltex.nix ./servers/lua-ls.nix ./servers/nil-ls.nix ./servers/openscad.nix + ./servers/quick-lint-js.nix ./servers/ruff-lsp.nix ./servers/rust-analyzer.nix ./servers/texlab.nix + ./servers/zls.nix ]; } diff --git a/modules/by-name/nv/nvim/plgs/lsp/servers/servers/openscad.nix b/modules/by-name/nv/nvim/plgs/lsp/servers/servers/openscad.nix index 3d55adfa..1d516c9d 100644 --- a/modules/by-name/nv/nvim/plgs/lsp/servers/servers/openscad.nix +++ b/modules/by-name/nv/nvim/plgs/lsp/servers/servers/openscad.nix @@ -21,10 +21,25 @@ in { lua */ '' - require('lspconfig').openscad_lsp.setup{ - cmd = {"openscad-lsp", "--stdio", "--fmt-style", "WebKit"}, + vim.lsp.config['openscad_lsp'] = { + cmd = {"openscad-lsp", "--stdio", "--fmt-style", "WebKit"}, } + vim.lsp.enable("openscad_lsp") ''; + + autoCmd = [ + { + command = "set filetype=openscad"; + event = [ + "BufRead" + "BufNewFile" + ]; + pattern = [ + "*.scad" + ]; + } + ]; + extraPackages = [ pkgs.openscad-lsp pkgs.clang-tools # Need to satisfy `clang-format` (which is used by openscad-lsp) diff --git a/modules/by-name/nv/nvim/plgs/lsp/servers/servers/quick-lint-js.nix b/modules/by-name/nv/nvim/plgs/lsp/servers/servers/quick-lint-js.nix index 404784f1..097abfbe 100644 --- a/modules/by-name/nv/nvim/plgs/lsp/servers/servers/quick-lint-js.nix +++ b/modules/by-name/nv/nvim/plgs/lsp/servers/servers/quick-lint-js.nix @@ -21,9 +21,9 @@ in { lua */ '' - require('lspconfig').quick_lint_js.setup{ - } + vim.lsp.enable('quick_lint_js') ''; + extraPackages = [ pkgs.quick-lint-js ]; diff --git a/modules/by-name/nv/nvim/plgs/lsp/servers/servers/zls.nix b/modules/by-name/nv/nvim/plgs/lsp/servers/servers/zls.nix new file mode 100644 index 00000000..aab7a135 --- /dev/null +++ b/modules/by-name/nv/nvim/plgs/lsp/servers/servers/zls.nix @@ -0,0 +1,30 @@ +# nixos-config - My current NixOS configuration +# +# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> +# 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 <https://www.gnu.org/licenses/gpl-3.0.txt>. +{ + lib, + config, + pkgs, + ... +}: let + cfg = config.soispha.programs.nvim; +in { + home-manager.users.soispha.programs.nixvim = lib.mkIf cfg.enable { + extraConfigLuaPost = + /* + lua + */ + '' + vim.lsp.enable("zls") + ''; + extraPackages = [ + pkgs.zls + ]; + }; +} diff --git a/modules/by-name/pl/plymouth/module.nix b/modules/by-name/pl/plymouth/module.nix new file mode 100644 index 00000000..5e4735b9 --- /dev/null +++ b/modules/by-name/pl/plymouth/module.nix @@ -0,0 +1,33 @@ +# nixos-config - My current NixOS configuration +# +# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> +# 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 <https://www.gnu.org/licenses/gpl-3.0.txt>. +{ + config, + pkgs, + lib, + libraries, + ... +}: let + cfg = config.soispha.services.plymouth; +in { + options.soispha.services.plymouth = { + enable = libraries.base.options.mkEnable "plymouth"; + }; + + config = lib.mkIf cfg.enable { + boot.plymouth = { + enable = true; + + theme = "rings"; + themePackages = [ + pkgs.adi1090x-plymouth-themes + ]; + }; + }; +} diff --git a/modules/by-name/ri/river/module.nix b/modules/by-name/ri/river/module.nix index 893fdc77..bafaf0a3 100644 --- a/modules/by-name/ri/river/module.nix +++ b/modules/by-name/ri/river/module.nix @@ -19,6 +19,8 @@ esa = lib.strings.escapeShellArg; riverctl = lib.getExe' cfg.package "riverctl"; + river-start = pkgs.callPackage ./river-start/package.nix {}; + mkOutputFlags = output: flags: let expandedFlags = builtins.concatStringsSep " " (lib.attrsets.mapAttrsToList (flag: value: "--${esa flag} ${esa value}") flags); in '' @@ -197,6 +199,17 @@ in { services.udev.packages = lib.mkIf cfg.unicodeInput.enable [externalBinaries.qmk_firmware.packages.${system}.qmk_unicode_type]; home-manager.users.soispha = { + xdg.desktopEntries."river" = { + name = "river"; + exec = lib.getExe river-start; + comment = "A non-monolithic Wayland compositor"; + + settings = { + X-DesktopNames = "river"; + Type = "Application"; + }; + }; + home.sessionVariables = { WM = "river"; XDG_CURRENT_DESKTOP = "river"; @@ -211,7 +224,7 @@ in { }; home.packages = [ - (pkgs.callPackage ./river-start/package.nix {}) + river-start pkgs.swallow ]; diff --git a/modules/by-name/xd/xdg/module.nix b/modules/by-name/xd/xdg/module.nix index 9ff71ca0..108e0179 100644 --- a/modules/by-name/xd/xdg/module.nix +++ b/modules/by-name/xd/xdg/module.nix @@ -47,36 +47,63 @@ in { }; config = lib.mkIf cfg.enable { - home-manager.users.soispha = { - xdg = { - configFile."xdg-desktop-portal-termfilechooser/config".source = tfcConfigFile; - - desktopEntries = { - url-handler = { - name = "url-handler"; - genericName = "Web Browser"; - exec = "${lib.getExe url-handler} %u"; - terminal = false; - categories = [ - "Application" - "Network" - "WebBrowser" - ]; - mimeType = [ - "text/html" - "text/xml" - "x-scheme-handler/http" - "x-scheme-handler/https" - "x-scheme-handler/about" - "x-scheme-handler/unknown" - ]; - }; + home-manager.users.soispha.xdg = let + inherit (config.home-manager.users.soispha.home) homeDirectory; + in { + enable = true; + + configFile."xdg-desktop-portal-termfilechooser/config".source = tfcConfigFile; + + configHome = "${homeDirectory}/.config"; + dataHome = "${homeDirectory}/.local/share"; + stateHome = "${homeDirectory}/.local/state"; + cacheHome = "${homeDirectory}/.cache"; + + userDirs = { + enable = true; + + # TODO: We shouldn't build on these variables to exist, but currently my config + # might expect them. So let's just keep it. See here for a full explanation: + # https://github.com/nix-community/home-manager/pull/7937#issuecomment-3372232126 + # <2026-04-14> + setSessionVariables = true; + + createDirectories = true; + + documents = "${homeDirectory}/documents/general"; + download = "/tmp/download"; + music = "${homeDirectory}/media/music"; + pictures = "${homeDirectory}/media/pictures"; + videos = "${homeDirectory}/media/videos"; + + templates = null; + publicShare = null; + desktop = null; + }; + + desktopEntries = { + url-handler = { + name = "url-handler"; + genericName = "Web Browser"; + exec = "${lib.getExe url-handler} %u"; + terminal = false; + categories = [ + "Application" + "Network" + "WebBrowser" + ]; + mimeType = [ + "text/html" + "text/xml" + "x-scheme-handler/http" + "x-scheme-handler/https" + "x-scheme-handler/about" + "x-scheme-handler/unknown" + ]; }; }; }; - services.dbus.enable = true; - xdg = { mime = { enable = true; @@ -98,6 +125,7 @@ in { wlr = { enable = true; }; + config = { common = { default = ["wlr"]; @@ -118,6 +146,8 @@ in { }; }; + services.dbus.enable = true; + systemd.user.services.xdg-desktop-portal-termfilechooser = { serviceConfig.ExecStart = [ "" |
