summaryrefslogtreecommitdiff
path: root/nixos/profiles/workstation
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/profiles/workstation')
-rw-r--r--nixos/profiles/workstation/create.nix5
-rw-r--r--nixos/profiles/workstation/default.nix16
-rw-r--r--nixos/profiles/workstation/dev.nix12
-rw-r--r--nixos/profiles/workstation/patches/skim-blank.patch73
-rw-r--r--nixos/profiles/workstation/scripts/ed2
5 files changed, 94 insertions, 14 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..052a3c8 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 = {
@@ -45,6 +39,10 @@ in
npins
(callPackage "${sources.agenix}/pkgs/agenix.nix" {})
+ vim-full
+ skim
+ (writeShellScriptBin "ed" (builtins.readFile ./scripts/ed))
+
unzip
# Android
@@ -60,9 +58,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 e550a4c..ac9b2f1 100644
--- a/nixos/profiles/workstation/dev.nix
+++ b/nixos/profiles/workstation/dev.nix
@@ -1,19 +1,21 @@
-{ config, pkgs, pkgs-unstable, ... }:
+{ config, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
rustup
go
+ golangci-lint
python313
nodejs_22
# CLI tools
+ skim
docker-compose
gnumake
jq
just
sqlite-interactive
- tokei
+ scc
fastmod
license-generator
@@ -22,10 +24,14 @@
gcc # rustc fails if cc linker isn't found
chromium
- pkgs-unstable.zed-editor
+ zed-editor
vscodium
# I'm installing extensions via my install-imperative script.
platformio
+
+ # language servers
+ # rust-analyzer is installed via rustup
+ nixd
];
virtualisation.podman = {
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 "$@")