From 31efd7f50ea3fac6583e1e959e3ef3fe5fd01ae4 Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Mon, 9 Jun 2025 12:38:03 +0200 Subject: [PATCH 01/16] auto-cpufreq: enable --- hosts/pumpkin/hardware.nix | 11 +++ nixos/profiles/auto-cpufreq.nix | 112 ++++++++++++++++++++++++ nixos/profiles/hardware/T14sAMDGen1.nix | 2 +- nixos/profiles/hardware/T480.nix | 2 +- nixos/profiles/hardware/X200.nix | 2 +- nixos/profiles/hardware/X201.nix | 2 +- 6 files changed, 127 insertions(+), 4 deletions(-) create mode 100644 nixos/profiles/auto-cpufreq.nix diff --git a/hosts/pumpkin/hardware.nix b/hosts/pumpkin/hardware.nix index 9679b22..7800c8a 100644 --- a/hosts/pumpkin/hardware.nix +++ b/hosts/pumpkin/hardware.nix @@ -115,4 +115,15 @@ #lidEventCommands = ""; }; + services.auto-cpufreq = { + enable = true; + settings = { + battery = { + enable_thresholds = true; + start_threshold = 65; + stop_threshold = 80; + }; + }; + }; + } diff --git a/nixos/profiles/auto-cpufreq.nix b/nixos/profiles/auto-cpufreq.nix new file mode 100644 index 0000000..c20f592 --- /dev/null +++ b/nixos/profiles/auto-cpufreq.nix @@ -0,0 +1,112 @@ +{ lib, ... }: +{ + # ExplanationNote: not compatible with auto-cpufreq + services.tlp.enable = false; + services.auto-cpufreq = { + enable = true; + settings = { + # settings for when connected to a power source + charger = { + # see available governors by running: cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors + # preferred governor. + governor = lib.mkDefault "ondemand"; + # EPP: see available preferences by running: cat /sys/devices/system/cpu/cpu0/cpufreq/energy_performance_available_preferences + energy_performance_preference = lib.mkDefault "ondemand"; + + # EPB (Energy Performance Bias) for the intel_pstate driver + # see conversion info: https://www.kernel.org/doc/html/latest/admin-guide/pm/intel_epb.html + # available EPB options include a numeric value between 0-15 + # (where 0 = maximum performance and 15 = maximum power saving), + # or one of the following strings: + # performance (0), balance_performance (4), default (6), balance_power (8), or power (15) + # if the parameter is missing in the config and the hardware supports this setting, the default value will be used + # the default value is `balance_performance` (for charger) + # energy_perf_bias = balance_performance + + # Platform Profiles + # https://www.kernel.org/doc/html/latest/userspace-api/sysfs-platform_profile.html + # See available options by running: + # cat /sys/firmware/acpi/platform_profile_choices + platform_profile = lib.mkDefault "balanced"; + + # minimum cpu frequency (in kHz) + # example: for 800 MHz = 800000 kHz --> scaling_min_freq = 800000 + # see conversion info: https://www.rapidtables.com/convert/frequency/mhz-to-hz.html + # to use this feature, uncomment the following line and set the value accordingly + # scaling_min_freq = 800000 + + # maximum cpu frequency (in kHz) + # example: for 1GHz = 1000 MHz = 1000000 kHz -> scaling_max_freq = 1000000 + # see conversion info: https://www.rapidtables.com/convert/frequency/mhz-to-hz.html + # to use this feature, uncomment the following line and set the value accordingly + # scaling_max_freq = 1000000 + + # turbo boost setting. possible values: always, auto, never + turbo = lib.mkDefault "auto"; + + # this is for ignoring controllers and other connected devices battery from affecting + # laptop preformence + # [power_supply_ignore_list] + + # name1 = this + # name2 = is + # name3 = an + # name4 = example + }; + # settings for when using battery power + battery = { + # see available governors by running: cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors + # preferred governor + governor = "powersave"; + + # EPP: see available preferences by running: cat /sys/devices/system/cpu/cpu0/cpufreq/energy_performance_available_preferences + energy_performance_preference = "power"; + + # EPB (Energy Performance Bias) for the intel_pstate driver + # see conversion info: https://www.kernel.org/doc/html/latest/admin-guide/pm/intel_epb.html + # available EPB options include a numeric value between 0-15 + # (where 0 = maximum performance and 15 = maximum power saving), + # or one of the following strings: + # performance (0), balance_performance (4), default (6), balance_power (8), or power (15) + # if the parameter is missing in the config and the hardware supports this setting, the default value will be used + # the default value is `balance_power` (for battery) + # energy_perf_bias = balance_power + + # Platform Profiles + # https://www.kernel.org/doc/html/latest/userspace-api/sysfs-platform_profile.html + # See available options by running: + # cat /sys/firmware/acpi/platform_profile_choices + platform_profile = "low-power"; + + # minimum cpu frequency (in kHz) + # example: for 800 MHz = 800000 kHz --> scaling_min_freq = 800000 + # see conversion info: https://www.rapidtables.com/convert/frequency/mhz-to-hz.html + # to use this feature, uncomment the following line and set the value accordingly + # scaling_min_freq = 800000 + + # maximum cpu frequency (in kHz) + # see conversion info: https://www.rapidtables.com/convert/frequency/mhz-to-hz.html + # example: for 1GHz = 1000 MHz = 1000000 kHz -> scaling_max_freq = 1000000 + # to use this feature, uncomment the following line and set the value accordingly + # scaling_max_freq = 1000000 + + # turbo boost setting. possible values: always, auto, never + turbo = lib.mkDefault "auto"; + + # experimental + + # Add battery charging threshold (currently only available to Lenovo) + # checkout README.md for more info + + # enable thresholds true or false + enable_thresholds = lib.mkDefault false; + # + # start threshold (0 is off ) can be 0-99 + start_threshold = lib.mkDefault 0; + # + # stop threshold (100 is off) can be 1-100 + stop_threshold = lib.mkDefault 100; + }; + }; + }; +} diff --git a/nixos/profiles/hardware/T14sAMDGen1.nix b/nixos/profiles/hardware/T14sAMDGen1.nix index ff0d74d..8c2fa82 100644 --- a/nixos/profiles/hardware/T14sAMDGen1.nix +++ b/nixos/profiles/hardware/T14sAMDGen1.nix @@ -10,7 +10,7 @@ with lib; imports = [ ../acpid.nix ../acpi_call.nix - ../tlp.nix + ../auto-cpufreq.nix inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t14-amd-gen1 ]; diff --git a/nixos/profiles/hardware/T480.nix b/nixos/profiles/hardware/T480.nix index 0ced32a..2270536 100644 --- a/nixos/profiles/hardware/T480.nix +++ b/nixos/profiles/hardware/T480.nix @@ -9,7 +9,7 @@ with lib; imports = [ ../acpid.nix ../acpi_call.nix - ../tlp.nix + ../auto-cpufreq.nix ]; nixpkgs.hostPlatform = { diff --git a/nixos/profiles/hardware/X200.nix b/nixos/profiles/hardware/X200.nix index a2ba4e9..e3291df 100644 --- a/nixos/profiles/hardware/X200.nix +++ b/nixos/profiles/hardware/X200.nix @@ -8,7 +8,7 @@ with lib; { imports = [ ../acpid.nix - ../tlp.nix + ../auto-cpufreq.nix ]; nixpkgs.hostPlatform = { diff --git a/nixos/profiles/hardware/X201.nix b/nixos/profiles/hardware/X201.nix index e9b03bd..a4c51be 100644 --- a/nixos/profiles/hardware/X201.nix +++ b/nixos/profiles/hardware/X201.nix @@ -8,7 +8,7 @@ with lib; { imports = [ ../acpid.nix - ../tlp.nix + ../auto-cpufreq.nix ]; nixpkgs.hostPlatform = { -- 2.47.2 From 4ac25aa95a96d384f44ddf57f66774b20b6839d4 Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Sat, 14 Jun 2025 10:51:10 +0200 Subject: [PATCH 02/16] nix: fix update to nixos-25.05 --- ...noid-add-utilities-useful-to-syncoid.patch | 2 +- .../0002-nixos-syncoid-use-DynamicUser.patch | 40 +++++-------------- 2 files changed, 10 insertions(+), 32 deletions(-) diff --git a/nixpkgs/patches/syncoid/0001-nixos-sanoid-add-utilities-useful-to-syncoid.patch b/nixpkgs/patches/syncoid/0001-nixos-sanoid-add-utilities-useful-to-syncoid.patch index 943dc55..1d21be5 100644 --- a/nixpkgs/patches/syncoid/0001-nixos-sanoid-add-utilities-useful-to-syncoid.patch +++ b/nixpkgs/patches/syncoid/0001-nixos-sanoid-add-utilities-useful-to-syncoid.patch @@ -26,5 +26,5 @@ index 1baf08f462..cd3c1d4594 100644 meta.maintainers = with lib.maintainers; [ lopsided98 ]; -- -2.47.2 +2.49.0 diff --git a/nixpkgs/patches/syncoid/0002-nixos-syncoid-use-DynamicUser.patch b/nixpkgs/patches/syncoid/0002-nixos-syncoid-use-DynamicUser.patch index b0df633..114282f 100644 --- a/nixpkgs/patches/syncoid/0002-nixos-syncoid-use-DynamicUser.patch +++ b/nixpkgs/patches/syncoid/0002-nixos-syncoid-use-DynamicUser.patch @@ -1,4 +1,4 @@ -From 0e837ecd5ffb5e8366a5e2878838ba691b31cd99 Mon Sep 17 00:00:00 2001 +From 41d06042cb9c2d4070a732745305b85b6328b58f Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Sat, 27 Nov 2021 02:50:39 +0100 Subject: [PATCH 2/2] nixos/syncoid: use DynamicUser= @@ -44,12 +44,12 @@ and those changes have been preserved: - 71967c47e54c56557c0ee7bec7fe554c018e37c4 nixos/syncoid: allow interval to be list of strings - f34483be5ee2418a563545a56743b7b59c549935 nixosTests: handleTest -> runTest, batch 1 --- - nixos/modules/services/backup/syncoid.nix | 454 +++++++++++----------- + nixos/modules/services/backup/syncoid.nix | 444 +++++++++++----------- nixos/tests/sanoid.nix | 78 ++-- - 2 files changed, 269 insertions(+), 263 deletions(-) + 2 files changed, 265 insertions(+), 257 deletions(-) diff --git a/nixos/modules/services/backup/syncoid.nix b/nixos/modules/services/backup/syncoid.nix -index 8b4c59155f..7d344a1ad0 100644 +index 8b4c59155f..a011b9b24f 100644 --- a/nixos/modules/services/backup/syncoid.nix +++ b/nixos/modules/services/backup/syncoid.nix @@ -7,7 +7,7 @@ @@ -192,17 +192,7 @@ index 8b4c59155f..7d344a1ad0 100644 # Permissions snapshot and destroy are in case --no-sync-snap is not used default = [ "bookmark" -@@ -162,19 +75,22 @@ in - "mount" - ]; - description = '' -- Permissions granted for the {option}`services.syncoid.user` user -- for local source datasets. See -- -+ Permissions granted for the syncoid user for local source datasets. -+ See - for available permissions. - ''; +@@ -170,11 +83,15 @@ in }; localTargetAllow = lib.mkOption { @@ -219,19 +209,7 @@ index 8b4c59155f..7d344a1ad0 100644 "mount" "mountpoint" "receive" -@@ -187,9 +103,8 @@ in - "rollback" - ]; - description = '' -- Permissions granted for the {option}`services.syncoid.user` user -- for local target datasets. See -- -+ Permissions granted for the syncoid user for local target datasets. -+ See - for available permissions. - Make sure to include the `change-key` permission if you send raw encrypted datasets, - the `compression` permission if you send raw compressed datasets, and so on. -@@ -198,7 +113,7 @@ in +@@ -198,7 +115,7 @@ in }; commonArgs = lib.mkOption { @@ -240,7 +218,7 @@ index 8b4c59155f..7d344a1ad0 100644 default = [ ]; example = [ "--no-sync-snap" ]; description = '' -@@ -296,13 +211,13 @@ in +@@ -296,13 +213,13 @@ in ''; }; @@ -261,7 +239,7 @@ index 8b4c59155f..7d344a1ad0 100644 service = lib.mkOption { type = lib.types.attrs; -@@ -341,139 +256,216 @@ in +@@ -341,139 +258,216 @@ in # Implementation config = lib.mkIf cfg.enable { @@ -713,5 +691,5 @@ index e42fd54dfd..eabe88b6be 100644 ''; } -- -2.47.2 +2.49.0 -- 2.47.2 From 067306ed6e2eddce99a2166c1345728d5a0546fe Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Sat, 14 Jun 2025 10:52:03 +0200 Subject: [PATCH 03/16] libreoffice: --enable-report-builder is not longer supported --- nixpkgs/overlays/libreoffice.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/nixpkgs/overlays/libreoffice.nix b/nixpkgs/overlays/libreoffice.nix index 25e274e..cb7c9ef 100644 --- a/nixpkgs/overlays/libreoffice.nix +++ b/nixpkgs/overlays/libreoffice.nix @@ -1,7 +1,9 @@ final: prev: { - libreoffice = prev.libreoffice.overrideAttrs (oldAttrs: { - configureFlags = oldAttrs.configureFlags ++ [ - "--enable-report-builder" - ]; - }); + libreoffice = prev.libreoffice.override { + unwrapped = prev.libreoffice.unwrapped.overrideAttrs (oldAttrs: { + configureFlags = oldAttrs.configureFlags ++ [ + "--enable-report-builder" + ]; + }); + }; } -- 2.47.2 From 29e6b9bcba6ba2f94f0b60bb53c38a2caee50dfc Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Sat, 14 Jun 2025 10:53:17 +0200 Subject: [PATCH 04/16] numbat: enable in science profile --- home-manager/profiles/science.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/home-manager/profiles/science.nix b/home-manager/profiles/science.nix index 4fdcc82..a69c1cf 100644 --- a/home-manager/profiles/science.nix +++ b/home-manager/profiles/science.nix @@ -5,6 +5,7 @@ # electron = pkgs.electron_15; #}) pkgs.anki + pkgs.numbat pkgs.stellarium pkgs.wxmaxima #pkgs.zotero -- 2.47.2 From 207c6962509d8c89050506eae471747d2593b724 Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Sat, 14 Jun 2025 10:54:16 +0200 Subject: [PATCH 05/16] blackberry: add a few games --- homes/julm/hosts/blackberry.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/homes/julm/hosts/blackberry.nix b/homes/julm/hosts/blackberry.nix index 8e16021..53f9c9d 100644 --- a/homes/julm/hosts/blackberry.nix +++ b/homes/julm/hosts/blackberry.nix @@ -71,6 +71,10 @@ pkgs.espeak-ng pkgs.vdhcoapp #pkgs.qsynth + pkgs.classicube + pkgs.cuyo + pkgs.pingus + pkgs.superTux ]; dconf.settings = { -- 2.47.2 From 2e9d52989e0f0b94761dadaa7998b10a7a9e2544 Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Sat, 14 Jun 2025 10:54:46 +0200 Subject: [PATCH 06/16] pumpkin: syncoid: backup to off4 --- hosts/pumpkin/syncoid.nix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/hosts/pumpkin/syncoid.nix b/hosts/pumpkin/syncoid.nix index cdbbad4..760960f 100644 --- a/hosts/pumpkin/syncoid.nix +++ b/hosts/pumpkin/syncoid.nix @@ -8,7 +8,8 @@ }: let inherit (config.users) users; - pumpkin2off2 = + pumpkinBackupDataset = "off4"; + pumpkin2off = conf: lib.mapAttrs (_n: v: lib.recursiveUpdate v conf) { "pumpkin/root" = @@ -16,7 +17,7 @@ let targetHost = "aubergine.local"; in { - target = "backup@${targetHost}:off2/julm/backup/pumpkin"; + target = "backup@${targetHost}:${pumpkinBackupDataset}/julm/backup/pumpkin"; sendOptions = "raw"; recursive = true; extraArgs = [ @@ -96,14 +97,14 @@ in service = { serviceConfig.Group = config.users.groups."disk".name; }; - commands = { } // pumpkin2off2 { }; + commands = { } // pumpkin2off { }; }; programs.bash.interactiveShellInit = '' backup-pumpkin () { local - set -x dst= - if ! zpool list off2 + if ! zpool list ${pumpkinBackupDataset} then dst=aubergine.sp: fi sudo syncoid --sshkey ~julm/.ssh/id_ed25519 \ @@ -117,7 +118,7 @@ in --exclude pumpkin/root/home/julm/games \ --exclude pumpkin/root/home/julm/Downloads \ pumpkin/root \ - ''${dst}off2/julm/backup/pumpkin + ''${dst}${pumpkinBackupDataset}/julm/backup/pumpkin zfs-fix-bookmarks pumpkin 2>/dev/null } ''; -- 2.47.2 From e1705a48783bb511d58b1e1b2dec3c2f44338969 Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Sat, 14 Jun 2025 10:56:11 +0200 Subject: [PATCH 07/16] blackberry: set nixpkgs.config.allowUnfreePredicate --- hosts/blackberry.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/hosts/blackberry.nix b/hosts/blackberry.nix index 1c7e155..9ee6289 100644 --- a/hosts/blackberry.nix +++ b/hosts/blackberry.nix @@ -169,6 +169,16 @@ }; }; + nixpkgs.config.allowUnfreePredicate = + pkg: + builtins.elem (lib.getName pkg) [ + "canon-cups-ufr2" + "geogebra" + "hplip" + "memtest86-efi" + #"shipwright" + ]; + # This value determines the NixOS release with which your system is to be # compatible, in order to avoid breaking some software such as database # servers. You should change this only after NixOS release notes say you should. -- 2.47.2 From 9401a1baca926d6e582c8516650a81232279d1a7 Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Sat, 14 Jun 2025 11:07:32 +0200 Subject: [PATCH 08/16] aubergine: systemd-networkd: keep in mind BootServerAddress= --- hosts/aubergine/networking/ethernet.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/hosts/aubergine/networking/ethernet.nix b/hosts/aubergine/networking/ethernet.nix index c6cf99e..8b0a1a2 100644 --- a/hosts/aubergine/networking/ethernet.nix +++ b/hosts/aubergine/networking/ethernet.nix @@ -51,6 +51,7 @@ with (import ./names-and-numbers.nix.clear); EmitDNS = true; PoolOffset = 100; PoolSize = 20; + #BootServerAddress="${eth3IPv4}.1"; }; linkConfig = { RequiredForOnline = "no"; -- 2.47.2 From 31fc210553e9dd8f6d7cf5ddca5cc55c4bb8f718 Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Sat, 14 Jun 2025 11:08:03 +0200 Subject: [PATCH 09/16] aubergine: scanimage: keep in mind debugging command --- hosts/aubergine/printing.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/hosts/aubergine/printing.nix b/hosts/aubergine/printing.nix index ee34638..d7064ac 100644 --- a/hosts/aubergine/printing.nix +++ b/hosts/aubergine/printing.nix @@ -22,6 +22,7 @@ ''; }; # DebugNote: SANE_DEBUG_NET=128 SANE_NET_HOSTS=aubergine.local scanimage -L + # DebugNote: SANE_DEBUG_NET=128 SANE_NET_HOSTS=aubergine.local scanimage --dev=net:aubergine.local:hpaio:/usb/Deskjet_1510_series?serial=CN53P2F1N105YR --mode Color --resolution 100 --progress --format jpeg --compression JPEG >out100.jpg services.saned = { enable = true; extraConfig = '' -- 2.47.2 From bd6fd8808dfd5e2b6fc39485053ae2120991a55e Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Sat, 14 Jun 2025 11:09:00 +0200 Subject: [PATCH 10/16] pumpkin: install libreoffice with JAVA support --- homes/julm/hosts/pumpkin.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/homes/julm/hosts/pumpkin.nix b/homes/julm/hosts/pumpkin.nix index 2673b8f..e08efab 100644 --- a/homes/julm/hosts/pumpkin.nix +++ b/homes/julm/hosts/pumpkin.nix @@ -40,6 +40,8 @@ programs.gpg.homedir = "${config.home.homeDirectory}/files/sec/.gnupg"; home.sessionVariables = { PASSWORD_STORE_DIR = "$HOME/files/sec/.password-store"; + #(pkgs.jre17_minimal.override { modules = [ "java.base" "java.desktop" "java.logging" "java.sql" ]; }) + JAVA_HOME = pkgs.libreoffice.unwrapped.jdk; }; home.packages = [ (lib.meta.hiPrio ( -- 2.47.2 From c924ecfaf0e635f0f2502ee45af816588ab965a1 Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Sat, 14 Jun 2025 11:11:03 +0200 Subject: [PATCH 11/16] torch: prepare for ROCM --- hosts/pumpkin.nix | 19 ++++++++++++++++++- nixos/profiles/hardware/T14sAMDGen1.nix | 5 +++++ nixpkgs/overlays/torch.nix | 16 ++++++++++++++++ 3 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 nixpkgs/overlays/torch.nix diff --git a/hosts/pumpkin.nix b/hosts/pumpkin.nix index 48776e6..8a74ca9 100644 --- a/hosts/pumpkin.nix +++ b/hosts/pumpkin.nix @@ -243,11 +243,28 @@ nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ + "canon-cups-ufr2" + "cuda_cccl" + "cuda_cudart" + "cuda_cupti" + "cuda_nvcc" + "cuda_nvrtc" + "cuda_nvtx" + "cudnn" "geogebra" "hplip" + "libcublas" + "libcufft" + "libcurand" + "libcusolver" + "libcusparse" + "libnvjitlink" "memtest86-efi" "shipwright" - "steam-run" + "steam-unwrapped" + "synthesia" + "torch" + "triton" ]; # This value determines the NixOS release with which your system is to be diff --git a/nixos/profiles/hardware/T14sAMDGen1.nix b/nixos/profiles/hardware/T14sAMDGen1.nix index 8c2fa82..b4e0225 100644 --- a/nixos/profiles/hardware/T14sAMDGen1.nix +++ b/nixos/profiles/hardware/T14sAMDGen1.nix @@ -21,6 +21,11 @@ with lib; #gcc.tune = "znver3"; }; + # For NVIDIA GPUs only (though it may change), and very heavy (>1GiB), and downloading fails often + nixpkgs.config.cudaSupport = false; + #nixpkgs.config.rocmSupport = false; + #nixpkgs.config.allowBroken = true; + boot.kernelModules = [ "kvm_amd" ]; diff --git a/nixpkgs/overlays/torch.nix b/nixpkgs/overlays/torch.nix new file mode 100644 index 0000000..0a5ce3e --- /dev/null +++ b/nixpkgs/overlays/torch.nix @@ -0,0 +1,16 @@ +finalPkgs: prevPkgs: { + python3Packages = + (prevPkgs.python3.override { + #self = finalPkgs.python3Packages; + packageOverrides = finalPython: prevPython: { + torch-bin = finalPython.torch; + torchvision-bin = prevPython.torchvision; + #tensorflow-bin = prevPython.tensorflow; + torch = prevPython.torch.override { + triton = prevPython.triton-no-cuda; + rocmSupport = false; + cudaSupport = false; + }; + }; + }).pkgs; +} -- 2.47.2 From 32a1c9055077d3397d3f39085daa201302e4ce24 Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Sat, 14 Jun 2025 11:12:54 +0200 Subject: [PATCH 12/16] julm: pumpkin: enable wine --- homes/julm/hosts/pumpkin.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/homes/julm/hosts/pumpkin.nix b/homes/julm/hosts/pumpkin.nix index e08efab..bef03a5 100644 --- a/homes/julm/hosts/pumpkin.nix +++ b/homes/julm/hosts/pumpkin.nix @@ -23,6 +23,7 @@ ../../../home-manager/profiles/radio.nix ../../../home-manager/profiles/science.nix ../../../home-manager/profiles/video.nix + ../../../home-manager/profiles/wine.nix ../../../home-manager/profiles/wireless.nix ../../../home-manager/profiles/yt-dlp.nix -- 2.47.2 From 506be6d1a1efbd1e9fa2219df5bbcd560d60d265 Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Sat, 14 Jun 2025 14:44:15 +0200 Subject: [PATCH 13/16] aubergine: anki-sync-server: enable --- hosts/aubergine.nix | 1 + hosts/aubergine/anki.nix | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 hosts/aubergine/anki.nix diff --git a/hosts/aubergine.nix b/hosts/aubergine.nix index fa1d404..0b64610 100644 --- a/hosts/aubergine.nix +++ b/hosts/aubergine.nix @@ -13,6 +13,7 @@ #../nixos/profiles/tor.nix ../nixos/profiles/networking/remote.nix ../nixos/profiles/home.nix + aubergine/anki.nix aubergine/hardware.nix aubergine/nebula.nix aubergine/networking.nix diff --git a/hosts/aubergine/anki.nix b/hosts/aubergine/anki.nix new file mode 100644 index 0000000..51e2ed0 --- /dev/null +++ b/hosts/aubergine/anki.nix @@ -0,0 +1,33 @@ +{ lib, config, ... }: +let + domain = "sourcephile.fr"; + iface = config.services.nebula.networks.${domain}.tun.device; + cfg = config.services.anki-sync-server; +in +{ + services.anki-sync-server = { + enable = true; + address = "::"; + port = 27701; + openFirewall = true; + users = + lib.map + (name: { + username = name; + passwordFile = "/var/lib/anki-sync-server/${name}.pass"; + }) + [ + "julm" + "maya" + "merlin" + "maya+merlin" + ]; + }; + networking.nftables.ruleset = lib.mkIf cfg.openFirewall '' + table inet filter { + chain input-${iface} { + tcp dport ${toString cfg.port} counter accept comment "anki: sync server" + } + } + ''; +} -- 2.47.2 From af51d6a8ff2175d26559b109833033ade656330c Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Sat, 14 Jun 2025 14:44:35 +0200 Subject: [PATCH 14/16] aubergine: sanoid: fix pumpkin backup --- hosts/aubergine/backup.nix | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/hosts/aubergine/backup.nix b/hosts/aubergine/backup.nix index d24c911..3da20d5 100644 --- a/hosts/aubergine/backup.nix +++ b/hosts/aubergine/backup.nix @@ -129,16 +129,7 @@ yearly = 0; recursive = true; }; - "off2/julm/backup/oignon" = { - autosnap = false; - autoprune = true; - hourly = 0; - daily = 7; - monthly = 3; - yearly = 0; - recursive = true; - }; - "off2/julm/backup/pumpkin" = { + "off4/julm/backup/pumpkin" = { autosnap = false; autoprune = true; hourly = 12; -- 2.47.2 From f6cb5e3c37ec9cb4139aeff4a36599f3a587b315 Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Sun, 15 Jun 2025 15:44:00 +0200 Subject: [PATCH 15/16] kiwix: add to science profile --- home-manager/profiles/science.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/home-manager/profiles/science.nix b/home-manager/profiles/science.nix index a69c1cf..41d43d8 100644 --- a/home-manager/profiles/science.nix +++ b/home-manager/profiles/science.nix @@ -5,6 +5,7 @@ # electron = pkgs.electron_15; #}) pkgs.anki + pkgs.kiwix pkgs.numbat pkgs.stellarium pkgs.wxmaxima -- 2.47.2 From cb98bed4fa888223540b64d977816a85b08760be Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Mon, 16 Jun 2025 14:58:16 +0200 Subject: [PATCH 16/16] ffmpeg-split: add --- home-manager/profiles/bash.nix | 3 +++ home-manager/profiles/bash/ffmpeg-split.sh | 17 +++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100755 home-manager/profiles/bash/ffmpeg-split.sh diff --git a/home-manager/profiles/bash.nix b/home-manager/profiles/bash.nix index 203b8c5..daa0d69 100644 --- a/home-manager/profiles/bash.nix +++ b/home-manager/profiles/bash.nix @@ -246,6 +246,9 @@ with lib; ''; profileExtra = ''''; }; + home.packages = [ + (pkgs.writeShellScriptBin "ffmpeg-split" (lib.readFile bash/ffmpeg-split.sh)) + ]; #programs.broot.enableBashIntegration = true; programs.readline = { enable = mkDefault true; diff --git a/home-manager/profiles/bash/ffmpeg-split.sh b/home-manager/profiles/bash/ffmpeg-split.sh new file mode 100755 index 0000000..31c1ed8 --- /dev/null +++ b/home-manager/profiles/bash/ffmpeg-split.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +set -efu + +input="$1"; shift +ffprobe -print_format csv -show_chapters "$input" | +cut -d ',' -f '5,7,8' | +while IFS=, read -r start end chapter; do + ffmpeg \ + -nostdin \ + -ss "$start" -to "$end" \ + -i "$input" \ + -c copy \ + -map 0 \ + -map_chapters -1 \ + "$@" \ + "$(printf %s "${input%.*}.$chapter.${input##*.}" | tr / _ | sed -e "s/\.\./_/g")" +done -- 2.47.2