From 384ecd5712b12a1002c31f27f8679859038460ca Mon Sep 17 00:00:00 2001 From: Toast Date: Wed, 17 Apr 2024 10:14:43 +0200 Subject: [PATCH 1/7] Common/starship: update nerd font symbols preset --- roles/common/programs/starship.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/common/programs/starship.nix b/roles/common/programs/starship.nix index 527034a..8c9cfaa 100644 --- a/roles/common/programs/starship.nix +++ b/roles/common/programs/starship.nix @@ -11,7 +11,7 @@ with builtins; let presets = { nerdFontSymbols = pkgs.fetchurl { url = "https://starship.rs/presets/toml/nerd-font-symbols.toml"; - hash = "sha256-BVe5JMSIa3CoY2Wf9pvcF1EUtDVCWCLhW3IyKuwfHug="; + hash = "sha256-JKX+DKY4IPQwNj3znkhMUReNqbKBxdJyBZW+WCdKwuU="; }; }; # -------------------------------- F U N C T I O N S -------------------------------- From 5d644f095917def5a21700eda2de7fa6249d6825 Mon Sep 17 00:00:00 2001 From: Toast Date: Wed, 17 Apr 2024 11:27:35 +0200 Subject: [PATCH 2/7] Common/helix: use home-manager languages option --- roles/common/programs/helix.nix | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/roles/common/programs/helix.nix b/roles/common/programs/helix.nix index c5ea603..38e7d22 100644 --- a/roles/common/programs/helix.nix +++ b/roles/common/programs/helix.nix @@ -25,17 +25,14 @@ indent-guides.render = true; }; }; - }; - # The builtin languages options have issues - # https://github.com/nix-community/home-manager/issues/3299 - xdg.configFile."helixLanguages" = { - target = "helix/languages.toml"; - text = '' - [language-server.nil] - config.nil.formatting.command = [ "nixpkgs-fmt" ] - [[language]] - name = "nix" - ''; + languages = { + language = [ + { + name = "nix"; + formatter.command = "nixpkgs-fmt"; + } + ]; + }; }; }; } From 544d1f6a226a0e1a69971308f8c9230c3d9a84ee Mon Sep 17 00:00:00 2001 From: Toast Date: Wed, 17 Apr 2024 11:57:05 +0200 Subject: [PATCH 3/7] Common/helix: change nil lsp settings --- roles/common/programs/helix.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/roles/common/programs/helix.nix b/roles/common/programs/helix.nix index 38e7d22..e30d49a 100644 --- a/roles/common/programs/helix.nix +++ b/roles/common/programs/helix.nix @@ -1,4 +1,4 @@ -{pkgs, ...}: { +{pkgs, config, ...}: { home-manager.users.toast = { programs.helix = { enable = true; @@ -32,6 +32,14 @@ formatter.command = "nixpkgs-fmt"; } ]; + language-server.nil = { + config = { + flake = { + autoArchive = false; + autoEvalInputs = true; + }; + }; + }; }; }; }; From 1ac5d06ab273494eb80a2716f2bea9e541fe2dab Mon Sep 17 00:00:00 2001 From: Toast Date: Wed, 17 Apr 2024 11:58:03 +0200 Subject: [PATCH 4/7] School/helix: add omnisharp to helix --- roles/school/programs/helix.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/school/programs/helix.nix b/roles/school/programs/helix.nix index f26c5d0..e16ddf0 100644 --- a/roles/school/programs/helix.nix +++ b/roles/school/programs/helix.nix @@ -3,6 +3,7 @@ programs.helix = { extraPackages = with pkgs; [ nodePackages.typescript-language-server + omnisharp-roslyn ]; }; }; From ed6067d43eebc2ff253e17cf26acbcc4938959b0 Mon Sep 17 00:00:00 2001 From: Toast Date: Wed, 17 Apr 2024 12:28:35 +0200 Subject: [PATCH 5/7] Flake: update nixpkgs patch --- .../0001-handheld-daemon-1.1.0-2.6.2.patch | 185 -------- .../0001-handheld-daemon-1.1.0-2.6.4.patch | 417 ++++++++++++++++++ 2 files changed, 417 insertions(+), 185 deletions(-) delete mode 100644 nixpkgs-patches/0001-handheld-daemon-1.1.0-2.6.2.patch create mode 100644 nixpkgs-patches/0001-handheld-daemon-1.1.0-2.6.4.patch diff --git a/nixpkgs-patches/0001-handheld-daemon-1.1.0-2.6.2.patch b/nixpkgs-patches/0001-handheld-daemon-1.1.0-2.6.2.patch deleted file mode 100644 index 0c72686..0000000 --- a/nixpkgs-patches/0001-handheld-daemon-1.1.0-2.6.2.patch +++ /dev/null @@ -1,185 +0,0 @@ -From d9e4af9ae8ed30a1ab860915c5c0ff9ae0c16dc1 Mon Sep 17 00:00:00 2001 -From: Toast <39011842+toast003@users.noreply.github.com> -Date: Fri, 12 Apr 2024 13:32:24 +0200 -Subject: [PATCH 1/6] handheld-daemon: 1.1.0 -> 2.6.2 - ---- - pkgs/by-name/ha/handheld-daemon/package.nix | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/pkgs/by-name/ha/handheld-daemon/package.nix b/pkgs/by-name/ha/handheld-daemon/package.nix -index bb0c9d65bfe19d..b5f25f339ffb60 100644 ---- a/pkgs/by-name/ha/handheld-daemon/package.nix -+++ b/pkgs/by-name/ha/handheld-daemon/package.nix -@@ -8,14 +8,14 @@ - }: - python3.pkgs.buildPythonApplication rec { - pname = "handheld-daemon"; -- version = "1.1.0"; -+ version = "2.6.2"; - pyproject = true; - - src = fetchFromGitHub { - owner = "hhd-dev"; - repo = "hhd"; - rev = "v${version}"; -- hash = "sha256-ovLC1BQ98jUaDEMPBzWma4TYSzTF+yE/cMemFdJmqlE="; -+ hash = "sha256-fsH8H6ZhiguOWI2t79GnxqAmqL/1m06RQzs+k8bUWcU="; - }; - - propagatedBuildInputs = with python3.pkgs; [ -@@ -26,6 +26,7 @@ python3.pkgs.buildPythonApplication rec { - rich - setuptools - toybox -+ xlib - ]; - - # This package doesn't have upstream tests. - -From 2a8d54c511bda43bea18d35d2c08f224f3352a18 Mon Sep 17 00:00:00 2001 -From: Toast <39011842+toast003@users.noreply.github.com> -Date: Sat, 13 Apr 2024 15:42:25 +0200 -Subject: [PATCH 2/6] handheld-daemon: update license - ---- - pkgs/by-name/ha/handheld-daemon/package.nix | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/pkgs/by-name/ha/handheld-daemon/package.nix b/pkgs/by-name/ha/handheld-daemon/package.nix -index b5f25f339ffb60..f0ce6e9648e3e8 100644 ---- a/pkgs/by-name/ha/handheld-daemon/package.nix -+++ b/pkgs/by-name/ha/handheld-daemon/package.nix -@@ -48,7 +48,7 @@ python3.pkgs.buildPythonApplication rec { - homepage = "https://github.com/hhd-dev/hhd/"; - description = "Linux support for handheld gaming devices like the Legion Go, ROG Ally, and GPD Win"; - platforms = platforms.linux; -- license = licenses.mit; -+ license = licenses.gpl3Only; - maintainers = with maintainers; [ appsforartists ]; - mainProgram = "hhd"; - }; - -From 3b96a3c082f6b0e9f7e2eabcc18cf599a0c7eb63 Mon Sep 17 00:00:00 2001 -From: Toast <39011842+toast003@users.noreply.github.com> -Date: Mon, 15 Apr 2024 00:31:56 +0200 -Subject: [PATCH 3/6] handheld-daemon: patch generated udev rules to use chmod - from nix store - ---- - pkgs/by-name/ha/handheld-daemon/package.nix | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/pkgs/by-name/ha/handheld-daemon/package.nix b/pkgs/by-name/ha/handheld-daemon/package.nix -index f0ce6e9648e3e8..72981284e2e9c1 100644 ---- a/pkgs/by-name/ha/handheld-daemon/package.nix -+++ b/pkgs/by-name/ha/handheld-daemon/package.nix -@@ -5,6 +5,7 @@ - , lib - , python3 - , toybox -+, coreutils - }: - python3.pkgs.buildPythonApplication rec { - pname = "handheld-daemon"; -@@ -38,6 +39,10 @@ python3.pkgs.buildPythonApplication rec { - hidapi=${ hidapi }/lib/ - test -d $hidapi || { echo "ERROR: $hidapi doesn't exist, please update/fix this build expression."; exit 1; } - sed -i -e "s|libhidapi|$hidapi/libhidapi|" src/hhd/controller/lib/hid.py -+ -+ # The generated udev rules point to /bin/chroot, which does not exist in NixOS -+ chmod=${ coreutils }/bin/chmod -+ sed -i -e "s|/bin/chmod|$chmod|" src/hhd/controller/lib/hide.py - ''; - - postInstall = '' - -From 6a2060842db04c81b354b49a9c53bfd2262a5af3 Mon Sep 17 00:00:00 2001 -From: Toast <39011842+toast003@users.noreply.github.com> -Date: Mon, 15 Apr 2024 19:57:10 +0200 -Subject: [PATCH 4/6] handheld-daemon: remove unneeded coreutils dependency - ---- - pkgs/by-name/ha/handheld-daemon/package.nix | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/pkgs/by-name/ha/handheld-daemon/package.nix b/pkgs/by-name/ha/handheld-daemon/package.nix -index 72981284e2e9c1..835c0774469354 100644 ---- a/pkgs/by-name/ha/handheld-daemon/package.nix -+++ b/pkgs/by-name/ha/handheld-daemon/package.nix -@@ -5,7 +5,6 @@ - , lib - , python3 - , toybox --, coreutils - }: - python3.pkgs.buildPythonApplication rec { - pname = "handheld-daemon"; -@@ -41,7 +40,7 @@ python3.pkgs.buildPythonApplication rec { - sed -i -e "s|libhidapi|$hidapi/libhidapi|" src/hhd/controller/lib/hid.py - - # The generated udev rules point to /bin/chroot, which does not exist in NixOS -- chmod=${ coreutils }/bin/chmod -+ chmod=${ toybox }/bin/chmod - sed -i -e "s|/bin/chmod|$chmod|" src/hhd/controller/lib/hide.py - ''; - - -From c9e8b7cf0260618682c15f7ba601ec9827396ceb Mon Sep 17 00:00:00 2001 -From: Toast <39011842+toast003@users.noreply.github.com> -Date: Mon, 15 Apr 2024 20:07:46 +0200 -Subject: [PATCH 5/6] handheld-daemon: move udev rule comment - ---- - pkgs/by-name/ha/handheld-daemon/package.nix | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/pkgs/by-name/ha/handheld-daemon/package.nix b/pkgs/by-name/ha/handheld-daemon/package.nix -index 835c0774469354..d79457057e392c 100644 ---- a/pkgs/by-name/ha/handheld-daemon/package.nix -+++ b/pkgs/by-name/ha/handheld-daemon/package.nix -@@ -34,12 +34,12 @@ python3.pkgs.buildPythonApplication rec { - - # handheld-daemon contains a fork of the python module `hid`, so this hook - # is borrowed from the `hid` derivation. -+ # The generated udev rules point to /bin/chroot, which does not exist in NixOS - postPatch = '' - hidapi=${ hidapi }/lib/ - test -d $hidapi || { echo "ERROR: $hidapi doesn't exist, please update/fix this build expression."; exit 1; } - sed -i -e "s|libhidapi|$hidapi/libhidapi|" src/hhd/controller/lib/hid.py - -- # The generated udev rules point to /bin/chroot, which does not exist in NixOS - chmod=${ toybox }/bin/chmod - sed -i -e "s|/bin/chmod|$chmod|" src/hhd/controller/lib/hide.py - ''; - -From 7bea1eb24a9e84b343c3944318e74ce3442ce40c Mon Sep 17 00:00:00 2001 -From: Toast <39011842+toast003@users.noreply.github.com> -Date: Mon, 15 Apr 2024 20:32:43 +0200 -Subject: [PATCH 6/6] handheld-daemon: 2.6.2 -> 2.6.4 - ---- - pkgs/by-name/ha/handheld-daemon/package.nix | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/pkgs/by-name/ha/handheld-daemon/package.nix b/pkgs/by-name/ha/handheld-daemon/package.nix -index d79457057e392c..7801038ea36669 100644 ---- a/pkgs/by-name/ha/handheld-daemon/package.nix -+++ b/pkgs/by-name/ha/handheld-daemon/package.nix -@@ -8,14 +8,14 @@ - }: - python3.pkgs.buildPythonApplication rec { - pname = "handheld-daemon"; -- version = "2.6.2"; -+ version = "2.6.4"; - pyproject = true; - - src = fetchFromGitHub { - owner = "hhd-dev"; - repo = "hhd"; - rev = "v${version}"; -- hash = "sha256-fsH8H6ZhiguOWI2t79GnxqAmqL/1m06RQzs+k8bUWcU="; -+ hash = "sha256-S77APtE1GGfqnv1IkZdJOSlprPOBtrqVXV60yVMvopg="; - }; - - propagatedBuildInputs = with python3.pkgs; [ diff --git a/nixpkgs-patches/0001-handheld-daemon-1.1.0-2.6.4.patch b/nixpkgs-patches/0001-handheld-daemon-1.1.0-2.6.4.patch new file mode 100644 index 0000000..ed37f7a --- /dev/null +++ b/nixpkgs-patches/0001-handheld-daemon-1.1.0-2.6.4.patch @@ -0,0 +1,417 @@ +From d9e4af9ae8ed30a1ab860915c5c0ff9ae0c16dc1 Mon Sep 17 00:00:00 2001 +From: Toast <39011842+toast003@users.noreply.github.com> +Date: Fri, 12 Apr 2024 13:32:24 +0200 +Subject: [PATCH 01/13] handheld-daemon: 1.1.0 -> 2.6.2 + +--- + pkgs/by-name/ha/handheld-daemon/package.nix | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/pkgs/by-name/ha/handheld-daemon/package.nix b/pkgs/by-name/ha/handheld-daemon/package.nix +index bb0c9d65bfe19d..b5f25f339ffb60 100644 +--- a/pkgs/by-name/ha/handheld-daemon/package.nix ++++ b/pkgs/by-name/ha/handheld-daemon/package.nix +@@ -8,14 +8,14 @@ + }: + python3.pkgs.buildPythonApplication rec { + pname = "handheld-daemon"; +- version = "1.1.0"; ++ version = "2.6.2"; + pyproject = true; + + src = fetchFromGitHub { + owner = "hhd-dev"; + repo = "hhd"; + rev = "v${version}"; +- hash = "sha256-ovLC1BQ98jUaDEMPBzWma4TYSzTF+yE/cMemFdJmqlE="; ++ hash = "sha256-fsH8H6ZhiguOWI2t79GnxqAmqL/1m06RQzs+k8bUWcU="; + }; + + propagatedBuildInputs = with python3.pkgs; [ +@@ -26,6 +26,7 @@ python3.pkgs.buildPythonApplication rec { + rich + setuptools + toybox ++ xlib + ]; + + # This package doesn't have upstream tests. + +From 2a8d54c511bda43bea18d35d2c08f224f3352a18 Mon Sep 17 00:00:00 2001 +From: Toast <39011842+toast003@users.noreply.github.com> +Date: Sat, 13 Apr 2024 15:42:25 +0200 +Subject: [PATCH 02/13] handheld-daemon: update license + +--- + pkgs/by-name/ha/handheld-daemon/package.nix | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/pkgs/by-name/ha/handheld-daemon/package.nix b/pkgs/by-name/ha/handheld-daemon/package.nix +index b5f25f339ffb60..f0ce6e9648e3e8 100644 +--- a/pkgs/by-name/ha/handheld-daemon/package.nix ++++ b/pkgs/by-name/ha/handheld-daemon/package.nix +@@ -48,7 +48,7 @@ python3.pkgs.buildPythonApplication rec { + homepage = "https://github.com/hhd-dev/hhd/"; + description = "Linux support for handheld gaming devices like the Legion Go, ROG Ally, and GPD Win"; + platforms = platforms.linux; +- license = licenses.mit; ++ license = licenses.gpl3Only; + maintainers = with maintainers; [ appsforartists ]; + mainProgram = "hhd"; + }; + +From 3b96a3c082f6b0e9f7e2eabcc18cf599a0c7eb63 Mon Sep 17 00:00:00 2001 +From: Toast <39011842+toast003@users.noreply.github.com> +Date: Mon, 15 Apr 2024 00:31:56 +0200 +Subject: [PATCH 03/13] handheld-daemon: patch generated udev rules to use + chmod from nix store + +--- + pkgs/by-name/ha/handheld-daemon/package.nix | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/pkgs/by-name/ha/handheld-daemon/package.nix b/pkgs/by-name/ha/handheld-daemon/package.nix +index f0ce6e9648e3e8..72981284e2e9c1 100644 +--- a/pkgs/by-name/ha/handheld-daemon/package.nix ++++ b/pkgs/by-name/ha/handheld-daemon/package.nix +@@ -5,6 +5,7 @@ + , lib + , python3 + , toybox ++, coreutils + }: + python3.pkgs.buildPythonApplication rec { + pname = "handheld-daemon"; +@@ -38,6 +39,10 @@ python3.pkgs.buildPythonApplication rec { + hidapi=${ hidapi }/lib/ + test -d $hidapi || { echo "ERROR: $hidapi doesn't exist, please update/fix this build expression."; exit 1; } + sed -i -e "s|libhidapi|$hidapi/libhidapi|" src/hhd/controller/lib/hid.py ++ ++ # The generated udev rules point to /bin/chroot, which does not exist in NixOS ++ chmod=${ coreutils }/bin/chmod ++ sed -i -e "s|/bin/chmod|$chmod|" src/hhd/controller/lib/hide.py + ''; + + postInstall = '' + +From 6a2060842db04c81b354b49a9c53bfd2262a5af3 Mon Sep 17 00:00:00 2001 +From: Toast <39011842+toast003@users.noreply.github.com> +Date: Mon, 15 Apr 2024 19:57:10 +0200 +Subject: [PATCH 04/13] handheld-daemon: remove unneeded coreutils dependency + +--- + pkgs/by-name/ha/handheld-daemon/package.nix | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/pkgs/by-name/ha/handheld-daemon/package.nix b/pkgs/by-name/ha/handheld-daemon/package.nix +index 72981284e2e9c1..835c0774469354 100644 +--- a/pkgs/by-name/ha/handheld-daemon/package.nix ++++ b/pkgs/by-name/ha/handheld-daemon/package.nix +@@ -5,7 +5,6 @@ + , lib + , python3 + , toybox +-, coreutils + }: + python3.pkgs.buildPythonApplication rec { + pname = "handheld-daemon"; +@@ -41,7 +40,7 @@ python3.pkgs.buildPythonApplication rec { + sed -i -e "s|libhidapi|$hidapi/libhidapi|" src/hhd/controller/lib/hid.py + + # The generated udev rules point to /bin/chroot, which does not exist in NixOS +- chmod=${ coreutils }/bin/chmod ++ chmod=${ toybox }/bin/chmod + sed -i -e "s|/bin/chmod|$chmod|" src/hhd/controller/lib/hide.py + ''; + + +From c9e8b7cf0260618682c15f7ba601ec9827396ceb Mon Sep 17 00:00:00 2001 +From: Toast <39011842+toast003@users.noreply.github.com> +Date: Mon, 15 Apr 2024 20:07:46 +0200 +Subject: [PATCH 05/13] handheld-daemon: move udev rule comment + +--- + pkgs/by-name/ha/handheld-daemon/package.nix | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/pkgs/by-name/ha/handheld-daemon/package.nix b/pkgs/by-name/ha/handheld-daemon/package.nix +index 835c0774469354..d79457057e392c 100644 +--- a/pkgs/by-name/ha/handheld-daemon/package.nix ++++ b/pkgs/by-name/ha/handheld-daemon/package.nix +@@ -34,12 +34,12 @@ python3.pkgs.buildPythonApplication rec { + + # handheld-daemon contains a fork of the python module `hid`, so this hook + # is borrowed from the `hid` derivation. ++ # The generated udev rules point to /bin/chroot, which does not exist in NixOS + postPatch = '' + hidapi=${ hidapi }/lib/ + test -d $hidapi || { echo "ERROR: $hidapi doesn't exist, please update/fix this build expression."; exit 1; } + sed -i -e "s|libhidapi|$hidapi/libhidapi|" src/hhd/controller/lib/hid.py + +- # The generated udev rules point to /bin/chroot, which does not exist in NixOS + chmod=${ toybox }/bin/chmod + sed -i -e "s|/bin/chmod|$chmod|" src/hhd/controller/lib/hide.py + ''; + +From 7bea1eb24a9e84b343c3944318e74ce3442ce40c Mon Sep 17 00:00:00 2001 +From: Toast <39011842+toast003@users.noreply.github.com> +Date: Mon, 15 Apr 2024 20:32:43 +0200 +Subject: [PATCH 06/13] handheld-daemon: 2.6.2 -> 2.6.4 + +--- + pkgs/by-name/ha/handheld-daemon/package.nix | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/pkgs/by-name/ha/handheld-daemon/package.nix b/pkgs/by-name/ha/handheld-daemon/package.nix +index d79457057e392c..7801038ea36669 100644 +--- a/pkgs/by-name/ha/handheld-daemon/package.nix ++++ b/pkgs/by-name/ha/handheld-daemon/package.nix +@@ -8,14 +8,14 @@ + }: + python3.pkgs.buildPythonApplication rec { + pname = "handheld-daemon"; +- version = "2.6.2"; ++ version = "2.6.4"; + pyproject = true; + + src = fetchFromGitHub { + owner = "hhd-dev"; + repo = "hhd"; + rev = "v${version}"; +- hash = "sha256-fsH8H6ZhiguOWI2t79GnxqAmqL/1m06RQzs+k8bUWcU="; ++ hash = "sha256-S77APtE1GGfqnv1IkZdJOSlprPOBtrqVXV60yVMvopg="; + }; + + propagatedBuildInputs = with python3.pkgs; [ + +From b510c5a603c7f2193a4f1c10e03bac6f7f361584 Mon Sep 17 00:00:00 2001 +From: Toast <39011842+toast003@users.noreply.github.com> +Date: Mon, 15 Apr 2024 21:30:51 +0200 +Subject: [PATCH 07/13] handheld-daemon: move udev rule comment to the right + place this time + +--- + pkgs/by-name/ha/handheld-daemon/package.nix | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/pkgs/by-name/ha/handheld-daemon/package.nix b/pkgs/by-name/ha/handheld-daemon/package.nix +index 7801038ea36669..4189bf0483b973 100644 +--- a/pkgs/by-name/ha/handheld-daemon/package.nix ++++ b/pkgs/by-name/ha/handheld-daemon/package.nix +@@ -32,14 +32,14 @@ python3.pkgs.buildPythonApplication rec { + # This package doesn't have upstream tests. + doCheck = false; + +- # handheld-daemon contains a fork of the python module `hid`, so this hook +- # is borrowed from the `hid` derivation. +- # The generated udev rules point to /bin/chroot, which does not exist in NixOS + postPatch = '' ++ # handheld-daemon contains a fork of the python module `hid`, so this hook ++ # is borrowed from the `hid` derivation. + hidapi=${ hidapi }/lib/ + test -d $hidapi || { echo "ERROR: $hidapi doesn't exist, please update/fix this build expression."; exit 1; } + sed -i -e "s|libhidapi|$hidapi/libhidapi|" src/hhd/controller/lib/hid.py + ++ # The generated udev rules point to /bin/chroot, which does not exist in NixOS + chmod=${ toybox }/bin/chmod + sed -i -e "s|/bin/chmod|$chmod|" src/hhd/controller/lib/hide.py + ''; + +From f7b450a4d83aec36be9c1576cb69b92c7895b33d Mon Sep 17 00:00:00 2001 +From: Toast <39011842+toast003@users.noreply.github.com> +Date: Mon, 15 Apr 2024 21:38:38 +0200 +Subject: [PATCH 08/13] handheld-daemon: fix typo in comment + +--- + pkgs/by-name/ha/handheld-daemon/package.nix | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/pkgs/by-name/ha/handheld-daemon/package.nix b/pkgs/by-name/ha/handheld-daemon/package.nix +index 4189bf0483b973..5087698c793430 100644 +--- a/pkgs/by-name/ha/handheld-daemon/package.nix ++++ b/pkgs/by-name/ha/handheld-daemon/package.nix +@@ -39,7 +39,7 @@ python3.pkgs.buildPythonApplication rec { + test -d $hidapi || { echo "ERROR: $hidapi doesn't exist, please update/fix this build expression."; exit 1; } + sed -i -e "s|libhidapi|$hidapi/libhidapi|" src/hhd/controller/lib/hid.py + +- # The generated udev rules point to /bin/chroot, which does not exist in NixOS ++ # The generated udev rules point to /bin/chmod, which does not exist in NixOS + chmod=${ toybox }/bin/chmod + sed -i -e "s|/bin/chmod|$chmod|" src/hhd/controller/lib/hide.py + ''; + +From a581a28a074a3a8bad48ba2883a320bfb02a5062 Mon Sep 17 00:00:00 2001 +From: Toast <39011842+toast003@users.noreply.github.com> +Date: Tue, 16 Apr 2024 19:50:25 +0200 +Subject: [PATCH 09/13] handheld-daemon: format with nixfmt-rfc-style + +--- + pkgs/by-name/ha/handheld-daemon/package.nix | 19 ++++++++++--------- + 1 file changed, 10 insertions(+), 9 deletions(-) + +diff --git a/pkgs/by-name/ha/handheld-daemon/package.nix b/pkgs/by-name/ha/handheld-daemon/package.nix +index 5087698c793430..52b5729bc6f300 100644 +--- a/pkgs/by-name/ha/handheld-daemon/package.nix ++++ b/pkgs/by-name/ha/handheld-daemon/package.nix +@@ -1,10 +1,11 @@ +-{ config +-, fetchFromGitHub +-, hidapi +-, kmod +-, lib +-, python3 +-, toybox ++{ ++ config, ++ fetchFromGitHub, ++ hidapi, ++ kmod, ++ lib, ++ python3, ++ toybox, + }: + python3.pkgs.buildPythonApplication rec { + pname = "handheld-daemon"; +@@ -35,12 +36,12 @@ python3.pkgs.buildPythonApplication rec { + postPatch = '' + # handheld-daemon contains a fork of the python module `hid`, so this hook + # is borrowed from the `hid` derivation. +- hidapi=${ hidapi }/lib/ ++ hidapi=${hidapi}/lib/ + test -d $hidapi || { echo "ERROR: $hidapi doesn't exist, please update/fix this build expression."; exit 1; } + sed -i -e "s|libhidapi|$hidapi/libhidapi|" src/hhd/controller/lib/hid.py + + # The generated udev rules point to /bin/chmod, which does not exist in NixOS +- chmod=${ toybox }/bin/chmod ++ chmod=${toybox}/bin/chmod + sed -i -e "s|/bin/chmod|$chmod|" src/hhd/controller/lib/hide.py + ''; + + +From d9b7086a02c8b6a156438d88d86903218907aa9e Mon Sep 17 00:00:00 2001 +From: Toast <39011842+toast003@users.noreply.github.com> +Date: Tue, 16 Apr 2024 20:15:21 +0200 +Subject: [PATCH 10/13] handheld-daemon: replace sed commands with + substituteInPlace + +--- + pkgs/by-name/ha/handheld-daemon/package.nix | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +diff --git a/pkgs/by-name/ha/handheld-daemon/package.nix b/pkgs/by-name/ha/handheld-daemon/package.nix +index 52b5729bc6f300..356130ec54e07e 100644 +--- a/pkgs/by-name/ha/handheld-daemon/package.nix ++++ b/pkgs/by-name/ha/handheld-daemon/package.nix +@@ -34,15 +34,17 @@ python3.pkgs.buildPythonApplication rec { + doCheck = false; + + postPatch = '' ++ # The generated udev rules point to /bin/chmod, which does not exist in NixOS ++ substituteInPlace src/hhd/controller/lib/hide.py \ ++ --replace-fail /bin/chmod ${toybox}/bin/chmod ++ + # handheld-daemon contains a fork of the python module `hid`, so this hook + # is borrowed from the `hid` derivation. ++ substituteInPlace src/hhd/controller/lib/hid.py \ ++ --replace-fail libhidapi ${hidapi}/lib/libhidapi ++ + hidapi=${hidapi}/lib/ + test -d $hidapi || { echo "ERROR: $hidapi doesn't exist, please update/fix this build expression."; exit 1; } +- sed -i -e "s|libhidapi|$hidapi/libhidapi|" src/hhd/controller/lib/hid.py +- +- # The generated udev rules point to /bin/chmod, which does not exist in NixOS +- chmod=${toybox}/bin/chmod +- sed -i -e "s|/bin/chmod|$chmod|" src/hhd/controller/lib/hide.py + ''; + + postInstall = '' + +From 20753a73d1a20cf5b67bc7cc51572807c0eda9fc Mon Sep 17 00:00:00 2001 +From: Toast <39011842+toast003@users.noreply.github.com> +Date: Tue, 16 Apr 2024 20:29:56 +0200 +Subject: [PATCH 11/13] handheld-daemon: trim out trailing whitespace + +--- + pkgs/by-name/ha/handheld-daemon/package.nix | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/pkgs/by-name/ha/handheld-daemon/package.nix b/pkgs/by-name/ha/handheld-daemon/package.nix +index b734034a439dab..db6c46a7e8055c 100644 +--- a/pkgs/by-name/ha/handheld-daemon/package.nix ++++ b/pkgs/by-name/ha/handheld-daemon/package.nix +@@ -41,9 +41,9 @@ python3.pkgs.buildPythonApplication rec { + # handheld-daemon contains a fork of the python module `hid`, so this hook + # is borrowed from the `hid` derivation. + substituteInPlace src/hhd/controller/lib/hid.py \ +- --replace-fail libhidapi ${hidapi}/lib/libhidapi +- +- hidapi=${hidapi}/lib/ ++ --replace-fail libhidapi ${hidapi}/lib/libhidapi ++ ++ hidapi=${hidapi}/lib/ + test -d $hidapi || { echo "ERROR: $hidapi doesn't exist, please update/fix this build expression."; exit 1; } + ''; + + +From cb2fa9a66110a6deb4f66c2dfd146b2895f932bd Mon Sep 17 00:00:00 2001 +From: Toast <39011842+toast003@users.noreply.github.com> +Date: Tue, 16 Apr 2024 21:04:48 +0200 +Subject: [PATCH 12/13] handheld-daemon: fix indenting + +--- + pkgs/by-name/ha/handheld-daemon/package.nix | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/pkgs/by-name/ha/handheld-daemon/package.nix b/pkgs/by-name/ha/handheld-daemon/package.nix +index db6c46a7e8055c..ad0554bec36d52 100644 +--- a/pkgs/by-name/ha/handheld-daemon/package.nix ++++ b/pkgs/by-name/ha/handheld-daemon/package.nix +@@ -41,9 +41,9 @@ python3.pkgs.buildPythonApplication rec { + # handheld-daemon contains a fork of the python module `hid`, so this hook + # is borrowed from the `hid` derivation. + substituteInPlace src/hhd/controller/lib/hid.py \ +- --replace-fail libhidapi ${hidapi}/lib/libhidapi ++ --replace-fail libhidapi ${hidapi}/lib/libhidapi + +- hidapi=${hidapi}/lib/ ++ hidapi=${hidapi}/lib/ + test -d $hidapi || { echo "ERROR: $hidapi doesn't exist, please update/fix this build expression."; exit 1; } + ''; + + +From d9b487ae609a368378c1a9d89a5441c5c44121df Mon Sep 17 00:00:00 2001 +From: Toast <39011842+toast003@users.noreply.github.com> +Date: Wed, 17 Apr 2024 09:19:43 +0200 +Subject: [PATCH 13/13] handheld-daemon: undo refactor + +--- + pkgs/by-name/ha/handheld-daemon/package.nix | 12 +++++------- + 1 file changed, 5 insertions(+), 7 deletions(-) + +diff --git a/pkgs/by-name/ha/handheld-daemon/package.nix b/pkgs/by-name/ha/handheld-daemon/package.nix +index ad0554bec36d52..246e3879bb5cfa 100644 +--- a/pkgs/by-name/ha/handheld-daemon/package.nix ++++ b/pkgs/by-name/ha/handheld-daemon/package.nix +@@ -34,17 +34,15 @@ python3.pkgs.buildPythonApplication rec { + doCheck = false; + + postPatch = '' +- # The generated udev rules point to /bin/chmod, which does not exist in NixOS +- substituteInPlace src/hhd/controller/lib/hide.py \ +- --replace-fail /bin/chmod ${toybox}/bin/chmod +- + # handheld-daemon contains a fork of the python module `hid`, so this hook + # is borrowed from the `hid` derivation. +- substituteInPlace src/hhd/controller/lib/hid.py \ +- --replace-fail libhidapi ${hidapi}/lib/libhidapi +- + hidapi=${hidapi}/lib/ + test -d $hidapi || { echo "ERROR: $hidapi doesn't exist, please update/fix this build expression."; exit 1; } ++ sed -i -e "s|libhidapi|$hidapi/libhidapi|" src/hhd/controller/lib/hid.py ++ ++ # The generated udev rules point to /bin/chmod, which does not exist in NixOS ++ chmod=${toybox}/bin/chmod ++ sed -i -e "s|/bin/chmod|$chmod|" src/hhd/controller/lib/hide.py + ''; + + postInstall = '' From 335c97864e2f30a226c0494357766b127093dca5 Mon Sep 17 00:00:00 2001 From: Toast Date: Wed, 17 Apr 2024 12:35:59 +0200 Subject: [PATCH 6/7] Flake: update lock file --- flake.lock | 66 +++++++++++++++++++++++++++--------------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/flake.lock b/flake.lock index 6482a8d..b11e227 100644 --- a/flake.lock +++ b/flake.lock @@ -25,11 +25,11 @@ }, "catppuccin": { "locked": { - "lastModified": 1712890104, - "narHash": "sha256-56RS7wdJ2QDUNCQt/9lx8MFcwuTdVQnzBV+9QToLLmM=", + "lastModified": 1713323853, + "narHash": "sha256-EfUm65RRsoch0tpfHZtEyqo+iWIYhuSX39U/fi0/4WU=", "owner": "catppuccin", "repo": "nix", - "rev": "850c26a3a2474b0d068abc89c905f536cca415de", + "rev": "372decb578f3187d7aad837885ed98e73e8abd60", "type": "github" }, "original": { @@ -45,11 +45,11 @@ ] }, "locked": { - "lastModified": 1710544781, - "narHash": "sha256-nkxihb3D85k1nZV1CzlB3seMKtTEeKb688sblIGp/Bs=", + "lastModified": 1713319998, + "narHash": "sha256-qigmP08byrOEAnvRC0aP+mxWGlXOlNgtvkDUnUblr8k=", "owner": "catppuccin", "repo": "vscode", - "rev": "d7b96ccac36fd29929bd97bc9357413cc4e0240c", + "rev": "15977cc2446fa661a228891a18125d0b6b9ed012", "type": "github" }, "original": { @@ -120,11 +120,11 @@ ] }, "locked": { - "lastModified": 1712759992, - "narHash": "sha256-2APpO3ZW4idlgtlb8hB04u/rmIcKA8O7pYqxF66xbNY=", + "lastModified": 1713294767, + "narHash": "sha256-LmaabaQZdx52MPGKPRt9Opoc9Gd9RbwvCdysUUYQoXI=", "owner": "nix-community", "repo": "home-manager", - "rev": "31357486b0ef6f4e161e002b6893eeb4fafc3ca9", + "rev": "fa8c16e2452bf092ac76f09ee1fb1e9f7d0796e7", "type": "github" }, "original": { @@ -162,11 +162,11 @@ ] }, "locked": { - "lastModified": 1712909442, - "narHash": "sha256-D+VrmsPLkEbxNcI7lp9rGFR33RumbQIyhhjJ4PooWBs=", + "lastModified": 1713333160, + "narHash": "sha256-iz4Uz3vykqsZwIY2hxEMfRrc1DvBgxHVCfSxppuj40s=", "owner": "Jovian-Experiments", "repo": "Jovian-NixOS", - "rev": "8886e3da78fcefb11935ea85da3d1572bf444c55", + "rev": "d3ce25a385ec7ed899ffb282d1e54ccb4ac9ef0d", "type": "github" }, "original": { @@ -235,11 +235,11 @@ ] }, "locked": { - "lastModified": 1712459390, - "narHash": "sha256-e12bNDottaGoBgd0AdH/bQvk854xunlWAdZwr/oHO1c=", + "lastModified": 1713067146, + "narHash": "sha256-9D20xjblGKEVRVCnM3qWhiizEa9i6OpK6xQJajwcwOQ=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "4676d72d872459e1e3a248d049609f110c570e9a", + "rev": "93aed67288be60c9ef6133ba2f8de128f4ef265c", "type": "github" }, "original": { @@ -255,11 +255,11 @@ ] }, "locked": { - "lastModified": 1712459390, - "narHash": "sha256-e12bNDottaGoBgd0AdH/bQvk854xunlWAdZwr/oHO1c=", + "lastModified": 1713067146, + "narHash": "sha256-9D20xjblGKEVRVCnM3qWhiizEa9i6OpK6xQJajwcwOQ=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "4676d72d872459e1e3a248d049609f110c570e9a", + "rev": "93aed67288be60c9ef6133ba2f8de128f4ef265c", "type": "github" }, "original": { @@ -270,11 +270,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1712760404, - "narHash": "sha256-4zhaEW1nB+nGbCNMjOggWeY5nXs/H0Y71q0+h+jdxoU=", + "lastModified": 1712909959, + "narHash": "sha256-7/5ubuwdEbQ7Z+Vqd4u0mM5L2VMNDsBh54visp27CtQ=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "e1c4bac14beb8c409d0534382cf967171706b9d9", + "rev": "f58b25254be441cd2a9b4b444ed83f1e51244f1f", "type": "github" }, "original": { @@ -286,11 +286,11 @@ }, "nixpkgs-raw": { "locked": { - "lastModified": 1712741485, - "narHash": "sha256-bCs0+MSTra80oXAsnM6Oq62WsirOIaijQ/BbUY59tR4=", + "lastModified": 1713145326, + "narHash": "sha256-m7+IWM6mkWOg22EC5kRUFCycXsXLSU7hWmHdmBfmC3s=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b2cf36f43f9ef2ded5711b30b1f393ac423d8f72", + "rev": "53a2c32bc66f5ae41a28d7a9a49d321172af621e", "type": "github" }, "original": { @@ -301,11 +301,11 @@ }, "nixpkgs-unstable-raw": { "locked": { - "lastModified": 1712791164, - "narHash": "sha256-3sbWO1mbpWsLepZGbWaMovSO7ndZeFqDSdX0hZ9nVyw=", + "lastModified": 1713248628, + "narHash": "sha256-NLznXB5AOnniUtZsyy/aPWOk8ussTuePp2acb9U+ISA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1042fd8b148a9105f3c0aca3a6177fd1d9360ba5", + "rev": "5672bc9dbf9d88246ddab5ac454e82318d094bb8", "type": "github" }, "original": { @@ -316,11 +316,11 @@ }, "nur": { "locked": { - "lastModified": 1712906890, - "narHash": "sha256-MkhmSqGqQ5cDa1VzqkA76h6+9rYCY2IJzSRglNV+Vr4=", + "lastModified": 1713347163, + "narHash": "sha256-ElGPXN2CwsBn/f8yQuRx9Xtplnu/xX3gkuc84QhRTtg=", "owner": "nix-community", "repo": "NUR", - "rev": "0fb8bccadea16d13d87210c21fbae09b26c28e07", + "rev": "8848aa88dc8b9cfe4e9129b7fa06f47f9f2f5dbc", "type": "github" }, "original": { @@ -429,11 +429,11 @@ ] }, "locked": { - "lastModified": 1712884817, - "narHash": "sha256-zs8oMnWHg3g0P+3ZsEj69m9aZCrGa/bqZUHRV9sF0w0=", + "lastModified": 1713316726, + "narHash": "sha256-VIQkEgU1xUD4nEh7w3uL0xRsTYZdC7p5+v35G9wv8U0=", "owner": "nix-community", "repo": "nix-vscode-extensions", - "rev": "882c461b61050a266fe9bc8d93d342f24b54250f", + "rev": "c1b75aedd50054ff43bb26ddb2702a2ac3475ea2", "type": "github" }, "original": { From 4964354f8cc03390851cd1134df25c4c90bb5884 Mon Sep 17 00:00:00 2001 From: Toast Date: Wed, 17 Apr 2024 12:36:08 +0200 Subject: [PATCH 7/7] School/mongodb: update to mongo 5.0 --- roles/school/services/mongodb.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/school/services/mongodb.nix b/roles/school/services/mongodb.nix index 75f7c7a..42c12fc 100644 --- a/roles/school/services/mongodb.nix +++ b/roles/school/services/mongodb.nix @@ -6,7 +6,7 @@ }: { services.mongodb = { enable = true; - package = pkgs.mongodb-4_4; + package = pkgs.mongodb-5_0; user = "toast"; };