diff options
Diffstat (limited to 'nixos/profiles/workstation')
-rw-r--r-- | nixos/profiles/workstation/create.nix | 5 | ||||
-rw-r--r-- | nixos/profiles/workstation/default.nix | 18 | ||||
-rw-r--r-- | nixos/profiles/workstation/dev.nix | 20 | ||||
-rw-r--r-- | nixos/profiles/workstation/graphical.nix | 4 | ||||
-rw-r--r-- | nixos/profiles/workstation/patches/skim-blank.patch | 73 | ||||
-rw-r--r-- | nixos/profiles/workstation/scripts/ed | 2 |
6 files changed, 104 insertions, 18 deletions
diff --git a/nixos/profiles/workstation/create.nix b/nixos/profiles/workstation/create.nix index 924717f..e902e7b 100644 --- a/nixos/profiles/workstation/create.nix +++ b/nixos/profiles/workstation/create.nix @@ -6,6 +6,11 @@ typst + (inkscape-with-extensions.override { + inkscapeExtensions = [ + inkscape-extensions.inkstitch + ]; + }) gimp krita ]; diff --git a/nixos/profiles/workstation/default.nix b/nixos/profiles/workstation/default.nix index 0332200..9df5328 100644 --- a/nixos/profiles/workstation/default.nix +++ b/nixos/profiles/workstation/default.nix @@ -2,13 +2,7 @@ let cfg = config.workstation; - sources = import ../../npins; - nixGit = import (pkgs.fetchFromGitHub { - owner = "NixOS"; - repo = "nix"; - rev = "7a8a28629c61c75af010ff0a5a88c16c4ce536c7"; - sha256 = "sha256-oqG9AFPXBneKVmiWa9b9ai0hGZqHVKVFaFLdBZitSUA="; - }); + sources = import <top/npins>; in { options.workstation = { @@ -33,6 +27,7 @@ in "wheel" "networkmanager" "dialout" + "wireshark" ]; }; @@ -44,6 +39,11 @@ in environment.systemPackages = with pkgs; [ npins (callPackage "${sources.agenix}/pkgs/agenix.nix" {}) + (callPackage sources.my-vdf {}) + + vim-full + skim + (writeShellScriptBin "ed" (builtins.readFile ./scripts/ed)) unzip @@ -60,9 +60,5 @@ in # Age defaults to this anyway when openssh is enabled. # We're setting this here for workstations where openssh is disabled. age.identityPaths = ["/etc/ssh/ssh_host_ed25519_key"]; - - # Using nix from git for --raw support in nix-instantiate --eval. - # FUTURE: remove once upgrading to NixOS 25.05 - nix.package = nixGit.packages.${builtins.currentSystem}.default; }; } diff --git a/nixos/profiles/workstation/dev.nix b/nixos/profiles/workstation/dev.nix index ea39b83..a40d574 100644 --- a/nixos/profiles/workstation/dev.nix +++ b/nixos/profiles/workstation/dev.nix @@ -4,16 +4,19 @@ environment.systemPackages = with pkgs; [ rustup go + golangci-lint python313 nodejs_22 # CLI tools + skim docker-compose gnumake jq + pkgs-unstable.jujutsu just sqlite-interactive - tokei + scc fastmod license-generator @@ -22,16 +25,21 @@ gcc # rustc fails if cc linker isn't found chromium - # FUTURE: Check if Linux kernel of NixOS 25.05 still has this amdgpu bug. - (pkgs.writeShellScriptBin "zed" '' - export ZED_PATH_SAMPLE_COUNT=0 # workaround for https://github.com/zed-industries/zed/issues/26143 - exec ${pkgs-unstable.zed-editor}/bin/zeditor "$@" - '') + zed-editor vscodium # I'm installing extensions via my install-imperative script. platformio + + # language servers + # rust-analyzer is installed via rustup + nixd ]; + programs.wireshark = { + enable = true; + package = pkgs.wireshark; + }; + virtualisation.podman = { enable = true; dockerSocket.enable = true; diff --git a/nixos/profiles/workstation/graphical.nix b/nixos/profiles/workstation/graphical.nix index dc05f05..2df27f4 100644 --- a/nixos/profiles/workstation/graphical.nix +++ b/nixos/profiles/workstation/graphical.nix @@ -32,7 +32,9 @@ # graphical tools imv - mpv + (mpv.override { + youtubeSupport = false; # disable yt-dlp dependency + }) zathura # TODO: zathura doesn't adjust zoom on PDF open even though adjust-open="best-fit" is the default according to zathurarc(5) element-desktop diff --git a/nixos/profiles/workstation/patches/skim-blank.patch b/nixos/profiles/workstation/patches/skim-blank.patch new file mode 100644 index 0000000..590515c --- /dev/null +++ b/nixos/profiles/workstation/patches/skim-blank.patch @@ -0,0 +1,73 @@ +commit bd0a387d9a4c6ad2cea1a3270e2897f2b740ece4 +Author: Martin Fischer <martin@push-f.com> +Date: Sun Jun 15 08:37:25 2025 +0200 + + feat: add --blank option + +diff --git a/skim/src/model/mod.rs b/skim/src/model/mod.rs +index ff9ec6c..c3d2966 100644 +--- a/skim/src/model/mod.rs ++++ b/skim/src/model/mod.rs +@@ -93,6 +93,7 @@ pub struct Model { + info: InfoDisplay, + no_clear_if_empty: bool, + theme: Arc<ColorTheme>, ++ hide_results_for_empty_query: bool, + + // timer thread for scheduled events + timer: Timer, +@@ -177,6 +178,7 @@ impl Model { + info: InfoDisplay::Default, + no_clear_if_empty: false, + theme, ++ hide_results_for_empty_query: false, + timer: Timer::new(), + hb_timer_guard: None, + +@@ -201,6 +203,7 @@ impl Model { + } else { + options.info.clone() + }; ++ self.hide_results_for_empty_query = options.blank; + + self.use_regex = options.regex; + +@@ -316,7 +319,9 @@ impl Model { + } + }; + self.num_options += matched.len(); +- self.selection.append_sorted_items(matched); ++ if !self.hide_results_for_empty_query || !self.query.get_query().is_empty() { ++ self.selection.append_sorted_items(matched); ++ } + } + + let items_consumed = self.item_pool.num_not_taken() == 0; +diff --git a/skim/src/options.rs b/skim/src/options.rs +index 657130a..b78b3e7 100644 +--- a/skim/src/options.rs ++++ b/skim/src/options.rs +@@ -650,6 +650,10 @@ pub struct SkimOptions { + #[arg(long, default_value = "0", help_heading = "Display")] + pub header_lines: usize, + ++ /// Don't show results if the query is empty. ++ #[arg(long, help_heading = "Display")] ++ pub blank: bool, ++ + // --- History --- + /// History file + /// +diff --git a/skim/src/query.rs b/skim/src/query.rs +index 7a09091..9e9ff24 100644 +--- a/skim/src/query.rs ++++ b/skim/src/query.rs +@@ -170,7 +170,7 @@ impl Query { + .collect() + } + +- fn get_query(&mut self) -> String { ++ pub fn get_query(&mut self) -> String { + match self.mode { + QueryMode::Query => self.get_fz_query(), + QueryMode::Cmd => self.get_cmd_query(), diff --git a/nixos/profiles/workstation/scripts/ed b/nixos/profiles/workstation/scripts/ed new file mode 100644 index 0000000..a3dd433 --- /dev/null +++ b/nixos/profiles/workstation/scripts/ed @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +$VISUAL $(find . -not -path "*/.*" | sk --no-info "$@") |