From e854b5ec00455e3ee5ea1ae1f42a0a732a6fdb34 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 25 Nov 2024 14:40:07 +0000 Subject: [PATCH 01/16] feat: enable nullmailer on all my computers --- nixos/_mixins/services/nullmailer/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nixos/_mixins/services/nullmailer/default.nix b/nixos/_mixins/services/nullmailer/default.nix index 613dbde1b..4b73c2220 100644 --- a/nixos/_mixins/services/nullmailer/default.nix +++ b/nixos/_mixins/services/nullmailer/default.nix @@ -1,9 +1,8 @@ { config, hostname, lib, username, ... }: let domain = "wimpys.world"; - installOn = [ "malak" "revan" ]; in -lib.mkIf (lib.elem hostname installOn) { +{ environment ={ shellAliases = { mail-log = "journalctl _SYSTEMD_UNIT=nullmailer.service"; From 2dc1255ad7d8ac902ea19b2110acbf50907a5593 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 25 Nov 2024 14:40:29 +0000 Subject: [PATCH 02/16] chore: update owncast to the tip of git --- pkgs/owncast/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/owncast/default.nix b/pkgs/owncast/default.nix index db67424b1..4ae909abe 100644 --- a/pkgs/owncast/default.nix +++ b/pkgs/owncast/default.nix @@ -17,10 +17,10 @@ in buildGoModule { repo = "owncast"; #rev = "v${version}"; - rev = "49c07594fba75e7c098cb4914b8668b9fc081f8d"; - hash = "sha256-YUi/M9fqwhC75n/YKooj5RqfMy+kdon1jsBvTMKvPw4="; + rev = "2c2bf2b5bbf49885f14f19c3f04dbbb0f3fbc5f2"; + hash = "sha256-1ghdwAq+m2Kz4yy50+IU4KtyYBbtJz3vwfmCgja0LRE="; }; - vendorHash = "sha256-yxWXh16vZIND9QB3xb0G5OOVhA7iy2dWNUzQXNi6gEk="; + vendorHash = "sha256-h17CzPyboCessk6oRHTurIzjhLgg7/jxfBPd5Vp3Vos="; patches = [ ./4022.diff # VA-API From 77a769d8fdf408f78a4fd94796b8ea66ad41b1bd Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 25 Nov 2024 14:40:50 +0000 Subject: [PATCH 03/16] chore: update flake.lock --- flake.lock | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/flake.lock b/flake.lock index baf11d6f1..d89533b23 100644 --- a/flake.lock +++ b/flake.lock @@ -141,11 +141,11 @@ ] }, "locked": { - "lastModified": 1732284644, - "narHash": "sha256-REGLarOB5McRMmFtOgNihEXXQILY6+2UBAY8lw8CJCI=", + "lastModified": 1732540163, + "narHash": "sha256-5EYzmoTpem2IB9JWzd41sL98pz3lyyCSTiCjv08i4Uk=", "owner": "nix-community", "repo": "disko", - "rev": "abc8baff333ac9dca930fc4921a26a8fc248e442", + "rev": "2ed5e30fc7e34adf455db8b02b9151d3922a54ea", "type": "github" }, "original": { @@ -401,11 +401,11 @@ ] }, "locked": { - "lastModified": 1732453608, - "narHash": "sha256-HeFye2mgoBZWtRLMSwGxdNabB4haWeWw2mS+hDF0mTo=", + "lastModified": 1732466619, + "narHash": "sha256-T1e5oceypZu3Q8vzICjv1X/sGs9XfJRMW5OuXHgpB3c=", "owner": "nix-community", "repo": "home-manager", - "rev": "2777de38dd20826238712c8fdaac3e960773e43a", + "rev": "f3111f62a23451114433888902a55cf0692b408d", "type": "github" }, "original": { @@ -511,11 +511,11 @@ ] }, "locked": { - "lastModified": 1732419467, - "narHash": "sha256-TjuKScXbj4Ddr0L+kEOLFaYOhzbS/k/EFL543wkjN5E=", + "lastModified": 1732519917, + "narHash": "sha256-AGXhwHdJV0q/WNgqwrR2zriubLr785b02FphaBtyt1Q=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "0ef970b7021e0ee9ab93437d0e28296e86669b03", + "rev": "f4a5ca5771ba9ca31ad24a62c8d511a405303436", "type": "github" }, "original": { @@ -554,11 +554,11 @@ ] }, "locked": { - "lastModified": 1732413494, - "narHash": "sha256-KcKOpa6da8/9MfGYRqUJhwK9Q2rNrLXxqZMQoojJTvA=", + "lastModified": 1732499683, + "narHash": "sha256-Hw95rpgNiyAL4v9pJF2756PMud6O0p/1XQixs5f/Shk=", "owner": "nix-community", "repo": "nix-vscode-extensions", - "rev": "aa61c826513046837049bca77493ad06dda37012", + "rev": "b376bfa567fd25f9f22b6f51ffaa4f84d0b7c72f", "type": "github" }, "original": { @@ -592,11 +592,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1731797098, - "narHash": "sha256-UhWmEZhwJZmVZ1jfHZFzCg+ZLO9Tb/v3Y6LC0UNyeTo=", + "lastModified": 1732483221, + "narHash": "sha256-kF6rDeCshoCgmQz+7uiuPdREVFuzhIorGOoPXMalL2U=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "672ac2ac86f7dff2f6f3406405bddecf960e0db6", + "rev": "45348ad6fb8ac0e8415f6e5e96efe47dd7f39405", "type": "github" }, "original": { @@ -744,11 +744,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1731755305, - "narHash": "sha256-v5P3dk5JdiT+4x69ZaB18B8+Rcu3TIOrcdG4uEX7WZ8=", + "lastModified": 1732350895, + "narHash": "sha256-GcOQbOgmwlsRhpLGSwZJwLbo3pu9ochMETuRSS1xpz4=", "owner": "nixos", "repo": "nixpkgs", - "rev": "057f63b6dc1a2c67301286152eb5af20747a9cb4", + "rev": "0c582677378f2d9ffcb01490af2f2c678dcb29d3", "type": "github" }, "original": { From 7c6f3ed984d227d7c2e67f2f134dac0da70aeb39 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 25 Nov 2024 14:45:04 +0000 Subject: [PATCH 04/16] fix: pin vader and phasma due to mwprocapture regression in Linux 6.12 --- nixos/phasma/default.nix | 1 + nixos/vader/default.nix | 1 + 2 files changed, 2 insertions(+) diff --git a/nixos/phasma/default.nix b/nixos/phasma/default.nix index 697f4cc63..eb200cf60 100644 --- a/nixos/phasma/default.nix +++ b/nixos/phasma/default.nix @@ -38,6 +38,7 @@ "kvm-amd" "nvidia" ]; + kernelPackages = lib.mkForce pkgs.linuxPackages_6_11; kernelParams = [ "video=DP-1:3440x1440@100" "video=DP-2:1920x1080@60" diff --git a/nixos/vader/default.nix b/nixos/vader/default.nix index cb563879e..36bfd669b 100644 --- a/nixos/vader/default.nix +++ b/nixos/vader/default.nix @@ -39,6 +39,7 @@ "kvm-amd" "nvidia" ]; + kernelPackages = lib.mkForce pkgs.linuxPackages_6_11; kernelParams = [ "video=DP-1:2560x2880@60" "video=DP-2:2560x2880@60" From 5ecea832c05705e02dabdc56ba145f2a8d2da844 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 25 Nov 2024 23:26:13 +0000 Subject: [PATCH 05/16] chore: remove thunderbird --- nixos/_mixins/desktop/apps/default.nix | 1 - .../_mixins/desktop/apps/thunderbird/default.nix | 15 --------------- 2 files changed, 16 deletions(-) delete mode 100644 nixos/_mixins/desktop/apps/thunderbird/default.nix diff --git a/nixos/_mixins/desktop/apps/default.nix b/nixos/_mixins/desktop/apps/default.nix index 4c5a6c6b1..4dd99c7cd 100644 --- a/nixos/_mixins/desktop/apps/default.nix +++ b/nixos/_mixins/desktop/apps/default.nix @@ -8,7 +8,6 @@ _: { ./graphics-production ./libreoffice ./steam - ./thunderbird ./utilities ./video-production ./web-browsers diff --git a/nixos/_mixins/desktop/apps/thunderbird/default.nix b/nixos/_mixins/desktop/apps/thunderbird/default.nix deleted file mode 100644 index c84e5dfa0..000000000 --- a/nixos/_mixins/desktop/apps/thunderbird/default.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ - lib, - isInstall, - pkgs, - ... -}: -{ - environment = { - systemPackages = - with pkgs; - lib.optionals isInstall [ - thunderbird - ]; - }; -} From 39d87a4bd28799d447ddbf765d237bcfe5a7bc23 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 25 Nov 2024 23:26:55 +0000 Subject: [PATCH 06/16] feat: preconfigure evolution --- .../desktop/apps/evolution/default.nix | 46 +++++++++++++++++++ nixos/_mixins/desktop/gnome/default.nix | 1 - nixos/_mixins/desktop/mate/default.nix | 10 ---- nixos/_mixins/desktop/pantheon/default.nix | 1 - 4 files changed, 46 insertions(+), 12 deletions(-) diff --git a/nixos/_mixins/desktop/apps/evolution/default.nix b/nixos/_mixins/desktop/apps/evolution/default.nix index 5f8a2e282..1626bb04f 100644 --- a/nixos/_mixins/desktop/apps/evolution/default.nix +++ b/nixos/_mixins/desktop/apps/evolution/default.nix @@ -22,6 +22,52 @@ search-gravatar-for-photo = true; show-sender-photo = true; variable-width-font = "Work Sans 12"; + send-recv-all-on-start = true; + junk-check-incoming = false; + junk-lookup-addressbook = true; + junk-check-custom-header = false; + composer-mode = "markdown"; + composer-magic-smileys = true; + composer-outlook-filenames = true; + composer-use-outbox = true; + composer-delay-outbox-flush = mkUint32 1; + composer-word-wrap-length = mkUint32 72; + composer-signature-in-new-only = true; + composer-ignore-list-reply-to = true; + composer-group-reply-to-list = true; + forward-style-name = "quoted"; + forward-style = mkUint32 2; + reply-style-name = "quoted"; + reply-style = mkUint32 0; + load-http-images = mkUint32 2; + notify-remote-content = false; + show-attachment-bar = false; + }; + "org/gnome/evolution/calendar" = { + use-24hour-format = true; + day-end-hour = mkUint32 18; + day-end-minute = mkUint32 0; + allow-direct-summary-edit = true; + use-markdown-editor = true; + week-view-days-left-to-right = true; + hide-completed-tasks = true; + hide-completed-tasks-value = mkUint32 7; + use-default-reminder = true; + default-reminder-interval = mkUint32 10; + contacts-reminder-enabled = true; + contacts-reminder-units = "days"; + contacts-reminder-interval = mkUint32 7; + delete-meeting-on-decline = false; + }; + "org/gnome/evolution/addressbook" = { + completion-show-address = true; + }; + "org/gnome/evolution/plugin/itip" = { + show-message-description = true; + attach-components = true; + }; + "org/gnome/evolution/plugin/prefer-plain" = { + mode = "prefer_plain"; }; #"org/gnome/evolution/plugin/external-editor" = { diff --git a/nixos/_mixins/desktop/gnome/default.nix b/nixos/_mixins/desktop/gnome/default.nix index 868da515b..0b564df71 100644 --- a/nixos/_mixins/desktop/gnome/default.nix +++ b/nixos/_mixins/desktop/gnome/default.nix @@ -317,7 +317,6 @@ services = { gnome = { - evolution-data-server.enable = lib.mkForce isInstall; games.enable = false; gnome-browser-connector.enable = isInstall; gnome-online-accounts.enable = isInstall; diff --git a/nixos/_mixins/desktop/mate/default.nix b/nixos/_mixins/desktop/mate/default.nix index cbc836d70..234ff3112 100644 --- a/nixos/_mixins/desktop/mate/default.nix +++ b/nixos/_mixins/desktop/mate/default.nix @@ -19,7 +19,6 @@ systemPackages = with pkgs; lib.optionals isInstall [ - evolutionWithPlugins gucharmap gnome-firmware ]; @@ -53,13 +52,6 @@ titlebar-uses-system-font = false; }; - "org/gnome/evolution/mail" = { - monospace-font = "FiraCode Nerd Font Mono Medium 13"; - search-gravatar-for-photo = true; - show-sender-photo = true; - variable-width-font = "Work Sans 12"; - }; - "org/gnome/evolution/plugin/external-editor" = { command = "pluma"; }; @@ -339,7 +331,6 @@ }; } ]; - evolution.enable = isInstall; gnome-disks.enable = isInstall; nm-applet = { enable = true; @@ -352,7 +343,6 @@ # Enable services to round out the desktop services = { blueman.enable = true; - gnome.evolution-data-server.enable = lib.mkForce isInstall; gnome.gnome-keyring.enable = true; gvfs.enable = true; xserver = { diff --git a/nixos/_mixins/desktop/pantheon/default.nix b/nixos/_mixins/desktop/pantheon/default.nix index 958e3c23f..c0dea2a0d 100644 --- a/nixos/_mixins/desktop/pantheon/default.nix +++ b/nixos/_mixins/desktop/pantheon/default.nix @@ -280,7 +280,6 @@ services = { gnome = { - evolution-data-server.enable = lib.mkForce isInstall; gnome-online-accounts.enable = isInstall; gnome-keyring.enable = true; }; From da6964b20dac87d657b511ccefe01bb12bff713c Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Tue, 26 Nov 2024 09:30:13 +0000 Subject: [PATCH 07/16] fix: add username pass through to phasma --- nixos/phasma/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/phasma/default.nix b/nixos/phasma/default.nix index eb200cf60..aa971f437 100644 --- a/nixos/phasma/default.nix +++ b/nixos/phasma/default.nix @@ -3,6 +3,7 @@ inputs, lib, pkgs, + username, ... }: { From c71c7747a56df9068451a640e8a0927bad93a8cf Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 27 Nov 2024 11:09:40 +0000 Subject: [PATCH 08/16] fix: update catppuccin theme name for kvantum --- home-manager/_mixins/desktop/features/qt/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home-manager/_mixins/desktop/features/qt/default.nix b/home-manager/_mixins/desktop/features/qt/default.nix index af81b627c..1c8916421 100644 --- a/home-manager/_mixins/desktop/features/qt/default.nix +++ b/home-manager/_mixins/desktop/features/qt/default.nix @@ -30,7 +30,7 @@ lib.mkIf isLinux { xdg.configFile = { kvantum = { target = "Kvantum/kvantum.kvconfig"; - text = lib.generators.toINI { } { General.theme = "Catppuccin-Mocha-Blue"; }; + text = lib.generators.toINI { } { General.theme = "catppuccin-mocha-blue"; }; }; qt5ct = { target = "qt5ct/qt5ct.conf"; From ed0a6758f9633ace98c344e00223244b1e91f039 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 27 Nov 2024 11:48:39 +0000 Subject: [PATCH 09/16] feat: add mwprocapture-hunter script --- .../scripts/mwprocapture-hunter/default.nix | 15 +++++++ .../mwprocapture-hunter.sh | 44 +++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 home-manager/_mixins/scripts/mwprocapture-hunter/default.nix create mode 100755 home-manager/_mixins/scripts/mwprocapture-hunter/mwprocapture-hunter.sh diff --git a/home-manager/_mixins/scripts/mwprocapture-hunter/default.nix b/home-manager/_mixins/scripts/mwprocapture-hunter/default.nix new file mode 100644 index 000000000..a5ac6a59f --- /dev/null +++ b/home-manager/_mixins/scripts/mwprocapture-hunter/default.nix @@ -0,0 +1,15 @@ +{ pkgs, ... }: +let + name = builtins.baseNameOf (builtins.toString ./.); + shellApplication = pkgs.writeShellApplication { + inherit name; + runtimeInputs = with pkgs; [ + coreutils-full + curl + ]; + text = builtins.readFile ./${name}.sh; + }; +in +{ + home.packages = with pkgs; [ shellApplication ]; +} diff --git a/home-manager/_mixins/scripts/mwprocapture-hunter/mwprocapture-hunter.sh b/home-manager/_mixins/scripts/mwprocapture-hunter/mwprocapture-hunter.sh new file mode 100755 index 000000000..b95adb8a2 --- /dev/null +++ b/home-manager/_mixins/scripts/mwprocapture-hunter/mwprocapture-hunter.sh @@ -0,0 +1,44 @@ +#!/usr/bin/env bash + +set +e # Disable errexit +set +u # Disable nounset +set +o pipefail # Disable pipefail + +# Base URL for Magewell downloads +BASE_URL="https://www.magewell.com/files/drivers/ProCaptureForLinux_" +#START_VERSION=4390 +START_VERSION=4407 +END_VERSION=$((START_VERSION + 100)) + +# Function to check if URL exists using curl +check_url() { + local url=$1 + local version=$2 + local http_code="" + + # Use curl with --head to only get headers + # -s for silent mode, -L to follow redirects, -w for custom output format + # -o /dev/null to discard the actual content + http_code=$(curl -s -L -w "%{http_code}" --head "$url" -o /dev/null) + + if [ "$http_code" = "200" ]; then + echo "✅ Version $version is available at: $url" + else + echo "❌ Version $version not found (HTTP $http_code)" + fi + # Add a small delay to be nice to the server + sleep 0.5 +} + +echo "Starting version check from $START_VERSION to $END_VERSION" +echo "Results will be saved to found_versions.txt" +echo "----------------------------------------" + +# Main loop +for version in $(seq $START_VERSION $END_VERSION); do + url="${BASE_URL}${version}.tar.gz" + check_url "$url" "$version" +done + +echo "----------------------------------------" +echo "Scan complete! Available versions have been saved to found_versions.txt" From 307e64186fa8c6924cbfe88ce6dfd8a0690e7376 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 27 Nov 2024 12:24:27 +0000 Subject: [PATCH 10/16] feat: upgrade phasma and vader to latest kernel --- nixos/phasma/default.nix | 1 - nixos/vader/default.nix | 1 - 2 files changed, 2 deletions(-) diff --git a/nixos/phasma/default.nix b/nixos/phasma/default.nix index aa971f437..fbac35e95 100644 --- a/nixos/phasma/default.nix +++ b/nixos/phasma/default.nix @@ -39,7 +39,6 @@ "kvm-amd" "nvidia" ]; - kernelPackages = lib.mkForce pkgs.linuxPackages_6_11; kernelParams = [ "video=DP-1:3440x1440@100" "video=DP-2:1920x1080@60" diff --git a/nixos/vader/default.nix b/nixos/vader/default.nix index 36bfd669b..cb563879e 100644 --- a/nixos/vader/default.nix +++ b/nixos/vader/default.nix @@ -39,7 +39,6 @@ "kvm-amd" "nvidia" ]; - kernelPackages = lib.mkForce pkgs.linuxPackages_6_11; kernelParams = [ "video=DP-1:2560x2880@60" "video=DP-2:2560x2880@60" From 01399aa48ad7a2e3c3f53bda984f04d9e5fef4cc Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 27 Nov 2024 12:25:20 +0000 Subject: [PATCH 11/16] fix: enable mwprocapture overlay with Linux 6.12 compatibility patch --- overlays/default.nix | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/overlays/default.nix b/overlays/default.nix index 66bcd24c4..d5f6e56ff 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -17,17 +17,26 @@ custom-caddy = import ./custom-caddy.nix { pkgs = prev; }; - #linuxPackages_latest = prev.linuxPackages_latest.extend (_lpself: lpsuper: { - # mwprocapture = lpsuper.mwprocapture.overrideAttrs ( old: rec { - # pname = "mwprocapture"; - # subVersion = "4390"; - # version = "1.3.0.${subVersion}"; - # src = prev.fetchurl { - # url = "https://www.magewell.com/files/drivers/ProCaptureForLinux_${subVersion}.tar.gz"; - # sha256 = "sha256-a2cU7PYQh1KR5eeMhMNx2Sc3HHd7QvCG9+BoJyVPp1Y="; - # }; - # }); - #}); + linuxPackages_latest = prev.linuxPackages_latest.extend (_lpself: lpsuper: { + mwprocapture = lpsuper.mwprocapture.overrideAttrs ( old: rec { + pname = "mwprocapture"; + subVersion = "4407"; + version = "1.3.0.${subVersion}"; + src = prev.fetchurl { + url = "https://www.magewell.com/files/drivers/ProCaptureForLinux_${subVersion}.tar.gz"; + sha256 = "sha256-wzOwnaxaD4Cm/cdc/sXHEzYZoN6b/kivDPvXRsC+Aig="; + }; + postPatch = let + kernelVersion = lpsuper.kernel.version; + needsPatch = prev.lib.versionAtLeast kernelVersion "6.12"; + in '' + ${old.postPatch or ""} + ${if needsPatch then '' + sed -i 's/no_llseek/noop_llseek/' src/sources/avstream/mw-event-dev.c + '' else ""} + ''; + }); + }); hyprland = prev.hyprland.overrideAttrs (_old: rec { postPatch = _old.postPatch + '' From 6306009a290b80913e214880106a27b3b5e289a7 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 27 Nov 2024 12:25:47 +0000 Subject: [PATCH 12/16] fix: use NVIDIA beta driver on Linux 6.12 and newer --- nixos/_mixins/features/gpu/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/nixos/_mixins/features/gpu/default.nix b/nixos/_mixins/features/gpu/default.nix index a2121d1f7..80637bd8c 100644 --- a/nixos/_mixins/features/gpu/default.nix +++ b/nixos/_mixins/features/gpu/default.nix @@ -14,6 +14,8 @@ let "i915" "xe" ]; + kernelVersion = lib.versions.majorMinor config.boot.kernelPackages.kernel.version; + useNvidiaBeta = lib.versionAtLeast kernelVersion "6.12"; in lib.mkIf isInstall { @@ -56,7 +58,12 @@ lib.mkIf isInstall { enable32Bit = lib.mkForce isInstall; extraPackages = with pkgs; lib.optionals hasIntelGPU [ intel-compute-runtime ]; }; - nvidia = lib.mkIf hasNvidiaGPU { nvidiaSettings = lib.mkDefault isWorkstation; }; + nvidia = lib.mkIf hasNvidiaGPU { + nvidiaSettings = lib.mkDefault isWorkstation; + # Use the NVIDIA beta on kernel 6.12 as there's a bug requiring a patch for 560 + # - https://github.com/NixOS/nixpkgs/issues/353636 + package = lib.mkIf useNvidiaBeta config.boot.kernelPackages.nvidiaPackages.beta; + }; }; # Allow power and thermal control for NVIDIA GPUs From c1cf28850335eb4d833d6f13c3079066e9ed2f59 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 27 Nov 2024 12:32:39 +0000 Subject: [PATCH 13/16] chore: update flake.lock --- flake.lock | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/flake.lock b/flake.lock index d89533b23..89aada6fd 100644 --- a/flake.lock +++ b/flake.lock @@ -41,11 +41,11 @@ }, "catppuccin": { "locked": { - "lastModified": 1731232837, - "narHash": "sha256-0aIwr/RC/oe7rYkfJb47xjdEQDSNcqpFGsEa+EPlDEs=", + "lastModified": 1732703064, + "narHash": "sha256-n8XOmn0WGtQhAMJKTnhL/3ttV2ZahPRf6gtlqZ6R4QE=", "owner": "catppuccin", "repo": "nix", - "rev": "32359bf226fe874d3b7a0a5753d291a4da9616fe", + "rev": "2e2bdecf0bae287d74947cd5cf967c5c499c23c1", "type": "github" }, "original": { @@ -141,11 +141,11 @@ ] }, "locked": { - "lastModified": 1732540163, - "narHash": "sha256-5EYzmoTpem2IB9JWzd41sL98pz3lyyCSTiCjv08i4Uk=", + "lastModified": 1732645828, + "narHash": "sha256-+4U2I2653JvPFxcux837ulwYS864QvEueIljUkwytsk=", "owner": "nix-community", "repo": "disko", - "rev": "2ed5e30fc7e34adf455db8b02b9151d3922a54ea", + "rev": "869ba3a87486289a4197b52a6c9e7222edf00b3e", "type": "github" }, "original": { @@ -477,11 +477,11 @@ ] }, "locked": { - "lastModified": 1732420287, - "narHash": "sha256-CzvYF4x6jUh/+NEEIFrIY5t1W/N3IA2bNZJiMXu9GTo=", + "lastModified": 1732603785, + "narHash": "sha256-AEjWTJwOmSnVYsSJCojKgoguGfFfwel6z/6ud6UFMU8=", "owner": "LnL7", "repo": "nix-darwin", - "rev": "3c52583b99666a349a6219dc1f0dd07d75c82d6a", + "rev": "6ab87b7c84d4ee873e937108c4ff80c015a40c7a", "type": "github" }, "original": { @@ -554,11 +554,11 @@ ] }, "locked": { - "lastModified": 1732499683, - "narHash": "sha256-Hw95rpgNiyAL4v9pJF2756PMud6O0p/1XQixs5f/Shk=", + "lastModified": 1732672419, + "narHash": "sha256-lWTckUrhvGYTJId+mI9F2/bHXrNHrkdvzyy6xNzITUY=", "owner": "nix-community", "repo": "nix-vscode-extensions", - "rev": "b376bfa567fd25f9f22b6f51ffaa4f84d0b7c72f", + "rev": "c10eb0e26ca40bdc952b4d89aee9d0e9b673eb09", "type": "github" }, "original": { @@ -688,12 +688,12 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1731890469, - "narHash": "sha256-D1FNZ70NmQEwNxpSSdTXCSklBH1z2isPR84J6DQrJGs=", - "rev": "5083ec887760adfe12af64830a66807423a859a7", - "revCount": 709559, + "lastModified": 1732238832, + "narHash": "sha256-sQxuJm8rHY20xq6Ah+GwIUkF95tWjGRd1X8xF+Pkk38=", + "rev": "8edf06bea5bcbee082df1b7369ff973b91618b8d", + "revCount": 711046, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nixpkgs-weekly/0.1.709559%2Brev-5083ec887760adfe12af64830a66807423a859a7/019342ec-4762-77f2-9a11-86e7601b0be4/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nixpkgs-weekly/0.1.711046%2Brev-8edf06bea5bcbee082df1b7369ff973b91618b8d/019366f9-30a0-7cd4-b5a3-b47513aca739/source.tar.gz" }, "original": { "type": "tarball", @@ -869,11 +869,11 @@ ] }, "locked": { - "lastModified": 1732186149, - "narHash": "sha256-N9JGWe/T8BC0Tss2Cv30plvZUYoiRmykP7ZdY2on2b0=", + "lastModified": 1732575825, + "narHash": "sha256-xtt95+c7OUMoqZf4OvA/7AemiH3aVuWHQbErYQoPwFk=", "owner": "Mic92", "repo": "sops-nix", - "rev": "53c853fb1a7e4f25f68805ee25c83d5de18dc699", + "rev": "3433ea14fbd9e6671d0ff0dd45ed15ee4c156ffa", "type": "github" }, "original": { From c77ab3f21d24e89c8f09460f6b3c58ee06c0c08c Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 27 Nov 2024 13:16:48 +0000 Subject: [PATCH 14/16] feat: add gitkraken overlay to update to 10.5.0 --- overlays/default.nix | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/overlays/default.nix b/overlays/default.nix index d5f6e56ff..510f7a6c0 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -17,6 +17,27 @@ custom-caddy = import ./custom-caddy.nix { pkgs = prev; }; + gitkraken = prev.gitkraken.overrideAttrs (old: rec { + version = "10.5.0"; + + src = { + x86_64-linux = prev.fetchzip { + url = "https://release.axocdn.com/linux/GitKraken-v${version}.tar.gz"; + hash = "sha256-zgzKwQCt1FoBgzVn1WrllANuBvYxKjPJNhVq0JqiXCM="; + }; + + x86_64-darwin = prev.fetchzip { + url = "https://release.axocdn.com/darwin/GitKraken-v${version}.zip"; + hash = "sha256-H1rxvCGo0m8g5XSUcuREMfe+Im/QsL6nsDbPQDo09j4="; + }; + + aarch64-darwin = prev.fetchzip { + url = "https://release.axocdn.com/darwin-arm64/GitKraken-v${version}.zip"; + hash = "sha256-OsCbTtGNo+heQQL6OEeUq64Dlbs86FUpfqEJ80PnV2o="; + }; + }.${prev.stdenv.hostPlatform.system} or (throw "Unsupported system: ${prev.stdenv.hostPlatform.system}"); + }); + linuxPackages_latest = prev.linuxPackages_latest.extend (_lpself: lpsuper: { mwprocapture = lpsuper.mwprocapture.overrideAttrs ( old: rec { pname = "mwprocapture"; From 49fbb0ac068f1663b9aff4b5f1a3b972853dbb17 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 27 Nov 2024 13:17:28 +0000 Subject: [PATCH 15/16] style: order overlay alphabetically --- overlays/default.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/overlays/default.nix b/overlays/default.nix index 510f7a6c0..0e676e974 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -38,6 +38,12 @@ }.${prev.stdenv.hostPlatform.system} or (throw "Unsupported system: ${prev.stdenv.hostPlatform.system}"); }); + hyprland = prev.hyprland.overrideAttrs (_old: rec { + postPatch = _old.postPatch + '' + sed -i 's|Exec=Hyprland|Exec=hypr-launch|' example/hyprland.desktop + ''; + }); + linuxPackages_latest = prev.linuxPackages_latest.extend (_lpself: lpsuper: { mwprocapture = lpsuper.mwprocapture.overrideAttrs ( old: rec { pname = "mwprocapture"; @@ -59,12 +65,6 @@ }); }); - hyprland = prev.hyprland.overrideAttrs (_old: rec { - postPatch = _old.postPatch + '' - sed -i 's|Exec=Hyprland|Exec=hypr-launch|' example/hyprland.desktop - ''; - }); - wavebox = prev.wavebox.overrideAttrs (_old: rec { pname = "wavebox"; version = "10.131.15-2"; From fdd771107f03229843424961171ae1d2ecfe4b2d Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 27 Nov 2024 13:55:31 +0000 Subject: [PATCH 16/16] feat: degrade build-all and switch-all tools gracefully --- darwin/_mixins/scripts/build-all/build-all.sh | 8 ++++++-- darwin/_mixins/scripts/switch-all/switch-all.sh | 12 +++++++++--- home-manager/_mixins/scripts/nh-home/nh-home.sh | 4 +++- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/darwin/_mixins/scripts/build-all/build-all.sh b/darwin/_mixins/scripts/build-all/build-all.sh index eaeb5e8fe..645d6ee98 100644 --- a/darwin/_mixins/scripts/build-all/build-all.sh +++ b/darwin/_mixins/scripts/build-all/build-all.sh @@ -1,9 +1,13 @@ #!/usr/bin/env bash -# if nh-home is in the PATH then use it +# Build home-manager, using the best available command if command -v nh-home &> /dev/null; then nh-home build +elif command -v nh &> /dev/null; then + nh home build "${HOME}/Zero/nix-config/" +elif command -v home-manager &> /dev/null; then + home-manager build --flake "$HOME/Zero/nix-config" -L else - nix run nixpkgs#home-manager -- build --flake "$HOME/Zero/nix-config" -L + nix run nixpkgs#home-manager -- build "$HOME/Zero/nix-config" -L fi build-host diff --git a/darwin/_mixins/scripts/switch-all/switch-all.sh b/darwin/_mixins/scripts/switch-all/switch-all.sh index 932c32e92..12368e6b6 100644 --- a/darwin/_mixins/scripts/switch-all/switch-all.sh +++ b/darwin/_mixins/scripts/switch-all/switch-all.sh @@ -1,9 +1,15 @@ #!/usr/bin/env bash -# if nh-home is in the PATH then use it +STAMP=$(date +%Y%m%d-%H%M%S) + +# Switch home-manager, using the best available command if command -v nh-home &> /dev/null; then - nh-home build + nh-home switch +elif command -v nh &> /dev/null; then + nh home switch --backup-extension "${STAMP}" "${HOME}/Zero/nix-config/" +elif command -v home-manager &> /dev/null; then + home-manager switch --backup-extension "${STAMP}" --flake "$HOME/Zero/nix-config" -L else - nix run nixpkgs#home-manager -- switch --flake "$HOME/Zero/nix-config" -L + nix run nixpkgs#home-manager -- switch --backup-extension "${STAMP}" --flake "$HOME/Zero/nix-config" -L fi switch-host diff --git a/home-manager/_mixins/scripts/nh-home/nh-home.sh b/home-manager/_mixins/scripts/nh-home/nh-home.sh index bde4418b0..9f38aab24 100644 --- a/home-manager/_mixins/scripts/nh-home/nh-home.sh +++ b/home-manager/_mixins/scripts/nh-home/nh-home.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +STAMP=$(date +%Y%m%d-%H%M%S) + function usage() { echo "Usage: ${0} {build|switch}" exit 1 @@ -28,7 +30,7 @@ if [ -e "${HOME}/Zero/nix-config" ]; then echo "${1^}ing Home Manager 🏠️ with ${build_cores} cores" case $1 in build) nh home build "${HOME}/Zero/nix-config/" -- --cores "${build_cores}";; - switch) nh home switch --backup-extension backup "${HOME}/Zero/nix-config/" -- --cores "${build_cores}";; + switch) nh home switch --backup-extension "${STAMP}" "${HOME}/Zero/nix-config/" -- --cores "${build_cores}";; esac else echo "ERROR! No nix-config found in ${HOME}/Zero/nix-config"