diff options
Diffstat (limited to '')
18 files changed, 254 insertions, 68 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/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/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/pkgs/by-name/i3/i3status-rust-patched/package.nix b/modules/by-name/nv/nvim/plgs/lsp/servers/servers/zls.nix index a103e275..aab7a135 100644 --- a/pkgs/by-name/i3/i3status-rust-patched/package.nix +++ b/modules/by-name/nv/nvim/plgs/lsp/servers/servers/zls.nix @@ -8,15 +8,23 @@ # 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 + 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 index edfe7547..5e4735b9 100644 --- a/modules/by-name/pl/plymouth/module.nix +++ b/modules/by-name/pl/plymouth/module.nix @@ -24,7 +24,7 @@ in { boot.plymouth = { enable = true; - theme = "lone"; + theme = "rings"; themePackages = [ pkgs.adi1090x-plymouth-themes ]; 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 = [ "" |
