From ff3df4f34db3eecea493f83b8c088a3a990b57bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 29 Jun 2024 01:32:00 -0300 Subject: [PATCH 001/218] sway: assign vesktop to chat workspace --- user/sway/sway-assigns.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/user/sway/sway-assigns.nix b/user/sway/sway-assigns.nix index 3822a22..65e1a97 100644 --- a/user/sway/sway-assigns.nix +++ b/user/sway/sway-assigns.nix @@ -44,6 +44,8 @@ in { title = "Discord"; } { class = "WebCord"; } { app_id = "WebCord"; } + { class = "vesktop"; } + { app_id = "vesktop"; } { class = "Element"; } { app_id = "Element"; } ]; From d6d9b95ab2007fe39ffc15234a76cc83d9a53d65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 29 Jun 2024 01:52:05 -0300 Subject: [PATCH 002/218] monolith: mount root --- hosts/monolith/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hosts/monolith/default.nix b/hosts/monolith/default.nix index 4dcc8b7..bf2771b 100644 --- a/hosts/monolith/default.nix +++ b/hosts/monolith/default.nix @@ -136,11 +136,11 @@ in "nofail" ] ++ btrfs_options; }; - # fileSystems."/home/lelgenio/.local/mount/bigboy" = { - # device = "/dev/disk/by-label/BTRFS_BIGBOY"; - # fsType = "btrfs"; - # options = [ "nofail" ] ++ btrfs_options ++ btrfs_ssd; - # }; + fileSystems."/home/lelgenio/.local/mount/old" = { + device = "/dev/disk/by-label/BTRFS_ROOT"; + fsType = "btrfs"; + options = [ "nofail" ] ++ btrfs_options ++ btrfs_ssd; + }; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's From ef39a83167893be88c0125831ba904e36c699642 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Mon, 1 Jul 2024 10:26:37 -0300 Subject: [PATCH 003/218] scripts: fix auto_connect_gamepad --- scripts/auto_connect_gamepad | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/auto_connect_gamepad b/scripts/auto_connect_gamepad index 6ff45b7..d373281 100755 --- a/scripts/auto_connect_gamepad +++ b/scripts/auto_connect_gamepad @@ -1,11 +1,11 @@ #!/bin/sh list_paired_controllers() { - bluetoothctl devices Paired | grep -i 'controller' | cut -d' ' -f2 + bluetoothctl devices Paired | grep 'Controller' | cut -d' ' -f2 } count_connected_controllers() { - bluetoothctl devices Connected | grep -i 'controller' | wc -l + bluetoothctl devices Connected | grep 'Controller' | wc -l } try_to_connect_to_all_controllers() { From f0dd6793fa13d1ce83c823b73ff899225c52eedb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 3 Jul 2024 12:58:04 -0300 Subject: [PATCH 004/218] firefox: switch to dev edition --- user/firefox.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user/firefox.nix b/user/firefox.nix index 8518c3f..f703486 100644 --- a/user/firefox.nix +++ b/user/firefox.nix @@ -7,7 +7,7 @@ }: let inherit (config.my) desktop browser; - bugfixedFirefox = pkgs.firefox-esr-unwrapped // { + bugfixedFirefox = pkgs.firefox-devedition-unwrapped // { requireSigning = false; allowAddonSideload = true; }; @@ -91,7 +91,7 @@ in ]; }; profiles = { - main = { + dev-edition-default = { isDefault = true; search.force = true; search.default = "DuckDuckGo"; From 8bca10051ab72d247e2e9da0a460eb5d619a7491 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 3 Jul 2024 12:59:17 -0300 Subject: [PATCH 005/218] kdenlive: fix dark theme --- user/sway/theme.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/user/sway/theme.nix b/user/sway/theme.nix index ca4ea76..3185d37 100644 --- a/user/sway/theme.nix +++ b/user/sway/theme.nix @@ -79,6 +79,13 @@ lib.mkIf (desktop == "sway") { # fixed=@Variant(\0\0\0@\0\0\0\x1c\0H\0\x61\0\x63\0k\0 \0N\0\x65\0r\0\x64\0 \0\x46\0o\0n\0t@(\0\0\0\0\0\0\xff\xff\xff\xff\x5\x1\0\x32\x10) # general=@Variant(\0\0\0@\0\0\0\x1e\0L\0i\0\x62\0\x65\0r\0\x61\0t\0i\0o\0n\0 \0S\0\x61\0n\0s@(\0\0\0\0\0\0\xff\xff\xff\xff\x5\x1\0\x32\x10) ''; + "kdedefaults/kdeglobals".text = '' + [General] + ColorScheme=BreezeDark + + [Icons] + Theme=${icon_theme} + ''; }; services.xsettingsd = { enable = true; From 89b758f163ba06382d444bf5c3a82f68b73ae177 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Thu, 4 Jul 2024 11:47:46 -0300 Subject: [PATCH 006/218] firefox: update ublock --- user/firefox.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user/firefox.nix b/user/firefox.nix index f703486..f5baa53 100644 --- a/user/firefox.nix +++ b/user/firefox.nix @@ -35,8 +35,8 @@ in }) (pkgs.fetchFirefoxAddon { name = "ublock-origin"; - url = "https://addons.mozilla.org/firefox/downloads/file/4198829/ublock_origin-1.54.0.xpi"; - hash = "sha256-l5cWCQgZFxD/CFhTa6bcKeytmSPDCyrW0+XjcddZ5E0="; + url = "https://addons.mozilla.org/firefox/downloads/file/4290466/ublock_origin-1.58.0.xpi"; + hash = "sha256-RwxWmUpxdNshV4rc5ZixWKXcCXDIfFz+iJrGMr0wheo="; }) (pkgs.fetchFirefoxAddon { name = "user_agent_string_switcher"; From 0150248650cbdc61b36d4b5d20ae8afb750bf669 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 6 Jul 2024 18:32:29 -0300 Subject: [PATCH 007/218] monolith: extract undervolt config --- hosts/monolith/default.nix | 9 +-------- hosts/monolith/undervolt.nix | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 8 deletions(-) create mode 100644 hosts/monolith/undervolt.nix diff --git a/hosts/monolith/default.nix b/hosts/monolith/default.nix index bf2771b..a0dd171 100644 --- a/hosts/monolith/default.nix +++ b/hosts/monolith/default.nix @@ -23,6 +23,7 @@ in imports = [ (modulesPath + "/installer/scan/not-detected.nix") ./partition.nix + ./undervolt.nix ]; boot.initrd.availableKernelModules = [ "nvme" @@ -66,14 +67,6 @@ in boot.kernelPackages = pkgs.linuxPackages_6_1; - programs.corectrl = { - enable = true; - gpuOverclock = { - enable = true; - ppfeaturemask = "0xffffffff"; - }; - }; - fileSystems."/mnt/old" = { device = "/dev/disk/by-label/BTRFS_ROOT"; fsType = "btrfs"; diff --git a/hosts/monolith/undervolt.nix b/hosts/monolith/undervolt.nix new file mode 100644 index 0000000..7666a5d --- /dev/null +++ b/hosts/monolith/undervolt.nix @@ -0,0 +1,16 @@ +{ pkgs, ... }: +let + undervoltGpu = pkgs.writeShellScript "undervolt-gpu" '' + set -xe + cd $1 + test -e pp_od_clk_voltage + echo "vo -100" > pp_od_clk_voltage + echo "c" > pp_od_clk_voltage + ''; +in +{ + boot.kernelParams = [ "amdgpu.ppfeaturemask=0xfffd7fff" ]; + services.udev.extraRules = '' + ACTION=="add", SUBSYSTEM=="hwmon", ATTR{name}=="amdgpu", ATTR{power1_cap}="186000000", RUN+="${undervoltGpu} %S%p/device" + ''; +} From 36c725400f78c4d856bcd01f1ce94a90004cf573 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 6 Jul 2024 18:41:17 -0300 Subject: [PATCH 008/218] firefox: install github auto-load extension --- user/firefox.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/user/firefox.nix b/user/firefox.nix index f5baa53..2e1a6f3 100644 --- a/user/firefox.nix +++ b/user/firefox.nix @@ -49,6 +49,11 @@ in url = "https://github.com/OhMyGuus/I-Still-Dont-Care-About-Cookies/releases/download/v1.1.4/istilldontcareaboutcookies-1.1.4.xpi"; hash = "sha256-yt6yRiLTuaK4K/QwgkL9gCVGsSa7ndFOHqZvKqIGZ5U="; }) + (pkgs.fetchFirefoxAddon { + name = "github_no_more"; + url = "https://addons.mozilla.org/firefox/downloads/file/4293306/github_no_more-0.0.1.xpi"; + hash = "sha256-1vzgo7z4K6aZAVAo5VqihYQi77mZ0rE68xbt7Oqz29s="; + }) (pkgs.fetchFirefoxAddon { name = "vimium_ff"; From bc8150a87924e5e31848612e7feeaf923fed1eb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 6 Jul 2024 18:41:32 -0300 Subject: [PATCH 009/218] qt: try to improve themes --- system/media-packages.nix | 1 + user/sway/theme.nix | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/system/media-packages.nix b/system/media-packages.nix index 818b78b..8458087 100644 --- a/system/media-packages.nix +++ b/system/media-packages.nix @@ -23,6 +23,7 @@ in gimp inkscape krita + kdePackages.breeze kdePackages.kdenlive pitivi blender-hip diff --git a/user/sway/theme.nix b/user/sway/theme.nix index 3185d37..17ac73c 100644 --- a/user/sway/theme.nix +++ b/user/sway/theme.nix @@ -48,9 +48,11 @@ lib.mkIf (desktop == "sway") { gtk3 = shared; } ); + qt = { enable = true; - platformTheme.name = "qtct"; + platformTheme.name = "gtk3"; + style.name = "qt5ct"; }; dconf.settings = { From dbe5e0196118d991f584bc53dfaba5abcd77ebd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Mon, 8 Jul 2024 02:04:58 -0300 Subject: [PATCH 010/218] monolith: fix amdgpu performance in new kernels --- hosts/monolith/default.nix | 2 -- hosts/monolith/undervolt.nix | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hosts/monolith/default.nix b/hosts/monolith/default.nix index a0dd171..4a8d69b 100644 --- a/hosts/monolith/default.nix +++ b/hosts/monolith/default.nix @@ -65,8 +65,6 @@ in rocmPackages.rocm-smi ]; - boot.kernelPackages = pkgs.linuxPackages_6_1; - fileSystems."/mnt/old" = { device = "/dev/disk/by-label/BTRFS_ROOT"; fsType = "btrfs"; diff --git a/hosts/monolith/undervolt.nix b/hosts/monolith/undervolt.nix index 7666a5d..1bd6c28 100644 --- a/hosts/monolith/undervolt.nix +++ b/hosts/monolith/undervolt.nix @@ -3,6 +3,8 @@ let undervoltGpu = pkgs.writeShellScript "undervolt-gpu" '' set -xe cd $1 + echo "manual" > power_dpm_force_performance_level + echo "1" > pp_power_profile_mode test -e pp_od_clk_voltage echo "vo -100" > pp_od_clk_voltage echo "c" > pp_od_clk_voltage From b6bd4d79565c1b4161b1ba0e49019e12757bafa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Thu, 11 Jul 2024 01:29:33 -0300 Subject: [PATCH 011/218] keyboard: fix capslock backspace bind for some programs --- system/configuration.nix | 1 + system/keyboard.nix | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 system/keyboard.nix diff --git a/system/configuration.nix b/system/configuration.nix index 6661e40..516a3ff 100644 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -22,6 +22,7 @@ ./users.nix ./containers.nix ./network.nix + ./keyboard.nix ../settings ]; diff --git a/system/keyboard.nix b/system/keyboard.nix new file mode 100644 index 0000000..7691343 --- /dev/null +++ b/system/keyboard.nix @@ -0,0 +1,15 @@ +{ pkgs, lib, ... }: +{ + services.keyd = { + enable = true; + keyboards.default = { + ids = [ "*" ]; + settings = { + "main" = { + # Some programs don't respect colemaks capslock bind, so we force it here + "capslock" = "backspace"; + }; + }; + }; + }; +} From 37c13221652dd6adafe9c0243e4075467bbe5e2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Mon, 15 Jul 2024 01:45:32 -0300 Subject: [PATCH 012/218] phantom: install invidious --- hosts/phantom/default.nix | 1 + hosts/phantom/invidious.nix | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 hosts/phantom/invidious.nix diff --git a/hosts/phantom/default.nix b/hosts/phantom/default.nix index db8a0bf..a0bf560 100644 --- a/hosts/phantom/default.nix +++ b/hosts/phantom/default.nix @@ -19,6 +19,7 @@ ./email.nix ./forgejo.nix ./warthunder-leak-counter.nix + ./invidious.nix ]; networking.hostName = "phantom"; diff --git a/hosts/phantom/invidious.nix b/hosts/phantom/invidious.nix new file mode 100644 index 0000000..739d9ae --- /dev/null +++ b/hosts/phantom/invidious.nix @@ -0,0 +1,20 @@ +{ config, ... }: +{ + services.invidious = { + enable = true; + domain = "invidious.lelgenio.com"; + nginx.enable = true; + settings.db = { + user = "invidious"; + dbname = "invidious"; + }; + }; + + services.nginx = { + clientMaxBodySize = "100m"; + virtualHosts.${config.services.invidious.domain} = { + enableACME = true; + forceSSL = true; + }; + }; +} From 6642b6c663c8e810d6760b1285905be49cb3107a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Mon, 15 Jul 2024 01:45:44 -0300 Subject: [PATCH 013/218] firefox: enable invidious support --- user/firefox.nix | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/user/firefox.nix b/user/firefox.nix index 2e1a6f3..7ea410b 100644 --- a/user/firefox.nix +++ b/user/firefox.nix @@ -61,14 +61,9 @@ in hash = "sha256-lKLX6IWWtliRdH1Ig33rVEB4DVfbeuMw0dfUPV/mSSI="; }) (pkgs.fetchFirefoxAddon { - name = "unhook"; - url = "https://addons.mozilla.org/firefox/downloads/file/4050795/youtube_recommended_videos-1.6.2.xpi"; - hash = "sha256-xMuglNassZb9WqjfEGg6WeuhMACRuYqQor+iX1dEdsE="; - }) - (pkgs.fetchFirefoxAddon { - name = "return_youtube_dislikes"; - url = "https://addons.mozilla.org/firefox/downloads/file/4208483/return_youtube_dislikes-3.0.0.14.xpi"; - hash = "sha256-oxqyNUmEa36rkqCU6S34NJBHtIu9gH8GnRKAg8Oyf2E="; + name = "invidious_redirect"; + url = "https://addons.mozilla.org/firefox/downloads/file/4292924/invidious_redirect_2-1.16.xpi"; + hash = "sha256-ApCc+MNmW9Wd/5seV6npePQVEaszT/rhD9EB7HGiUb8="; }) (pkgs.fetchFirefoxAddon { @@ -117,7 +112,7 @@ in "media.rdd-vpx.enabled" = true; "media.rdd-wav.enabled" = true; - "media.av1.enabled" = false; + "media.av1.enabled" = true; "media.ffmpeg.vaapi-drm-display.enabled" = true; "media.ffmpeg.vaapi.enabled" = true; "media.ffvpx.enabled" = true; From 8f8b0e02eab0f9e4a1ebd0d9af4ee00cdbc94ecd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Mon, 15 Jul 2024 02:16:02 -0300 Subject: [PATCH 014/218] update --- flake.lock | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/flake.lock b/flake.lock index 03069d6..04d8d8f 100644 --- a/flake.lock +++ b/flake.lock @@ -28,11 +28,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1718371084, - "narHash": "sha256-abpBi61mg0g+lFFU0zY4C6oP6fBwPzbHPKBGw676xsA=", + "lastModified": 1720546205, + "narHash": "sha256-boCXsjYVxDviyzoEyAk624600f3ZBo/DKtUdvMTpbGY=", "owner": "ryantm", "repo": "agenix", - "rev": "3a56735779db467538fb2e577eda28a9daacaca6", + "rev": "de96bd907d5fbc3b14fc33ad37d1b9a3cb15edc6", "type": "github" }, "original": { @@ -176,11 +176,11 @@ ] }, "locked": { - "lastModified": 1719451710, - "narHash": "sha256-h+bFEQHQ46pBkEsOXbxmmY6QNPPGrgpDbNlHtAKG49M=", + "lastModified": 1720661479, + "narHash": "sha256-nsGgA14vVn0GGiqEfomtVgviRJCuSR3UEopfP8ixW1I=", "owner": "nix-community", "repo": "disko", - "rev": "8767dbf5d723b1b6834f4d09b217da7c31580d58", + "rev": "786965e1b1ed3fd2018d78399984f461e2a44689", "type": "github" }, "original": { @@ -459,11 +459,11 @@ ] }, "locked": { - "lastModified": 1718530513, - "narHash": "sha256-BmO8d0r+BVlwWtMLQEYnwmngqdXIuyFzMwvmTcLMee8=", + "lastModified": 1720042825, + "narHash": "sha256-A0vrUB6x82/jvf17qPCpxaM+ulJnD8YZwH9Ci0BsAzE=", "owner": "nix-community", "repo": "home-manager", - "rev": "a1fddf0967c33754271761d91a3d921772b30d0e", + "rev": "e1391fb22e18a36f57e6999c7a9f966dc80ac073", "type": "github" }, "original": { @@ -480,11 +480,11 @@ ] }, "locked": { - "lastModified": 1719111455, - "narHash": "sha256-rnIxHx+fLpydjMQsbpZ21kblUr/lMqSaAtMA4+qMMEE=", + "lastModified": 1720926593, + "narHash": "sha256-fW6e27L6qY6s+TxInwrS2EXZZfhMAlaNqT0sWS49qMA=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "4293f532d0107dfb7e6f8b34a0421dc8111320e6", + "rev": "5fe5b0cdf1268112dc96319388819b46dc051ef4", "type": "github" }, "original": { @@ -592,11 +592,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1719253556, - "narHash": "sha256-A/76RFUVxZ/7Y8+OMVL1Lc8LRhBxZ8ZE2bpMnvZ1VpY=", + "lastModified": 1720823163, + "narHash": "sha256-FZ5dnrvKkln9ESdoTR8R7GKW9rNpXNZrxGsOXsbsTpE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "fc07dc3bdf2956ddd64f24612ea7fc894933eb2e", + "rev": "f12ee5f64c6a09995e71c9626d88c4efa983b488", "type": "github" }, "original": { From 789b651b4f0654cf58956a750b844d66cad34791 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Mon, 15 Jul 2024 11:49:06 -0300 Subject: [PATCH 015/218] thunar: fix finding programs --- user/thunar.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/user/thunar.nix b/user/thunar.nix index 2a9fe5b..26b90e9 100644 --- a/user/thunar.nix +++ b/user/thunar.nix @@ -10,6 +10,12 @@ }) ]; + wayland.windowManager.sway = { + extraConfig = '' + exec_always systemctl --user import-environment PATH + ''; + }; + xdg.configFile = { "Thunar/".source = ./thunar; }; From b2b50bf5e37a7bfc40712d5796f1358f58fd1292 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Mon, 15 Jul 2024 11:50:00 -0300 Subject: [PATCH 016/218] sway: disable vrr --- scripts/default.nix | 1 - scripts/vrr-fullscreen | 28 ---------------------------- user/sway/default.nix | 16 ---------------- 3 files changed, 45 deletions(-) delete mode 100755 scripts/vrr-fullscreen diff --git a/scripts/default.nix b/scripts/default.nix index 72f9cc6..01ce2b8 100644 --- a/scripts/default.nix +++ b/scripts/default.nix @@ -130,7 +130,6 @@ coreutils gnugrep ]; - vrr-fullscreen = [ ]; } // lib.mapAttrs import_script { wdmenu = ./wdmenu.nix; diff --git a/scripts/vrr-fullscreen b/scripts/vrr-fullscreen deleted file mode 100755 index 8413923..0000000 --- a/scripts/vrr-fullscreen +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env bash - -# List of supported outputs for VRR -output_vrr_whitelist=( - "DP-1" - "DP-2" -) - -# Toggle VRR for fullscreened apps in prespecified displays to avoid stutters while in desktop -swaymsg -t subscribe -m '[ "window" ]' | while read window_json; do - window_event=$(echo ${window_json} | jq -r '.change') - - # Process only focus change and fullscreen toggle - if [[ $window_event = "focus" || $window_event = "fullscreen_mode" ]]; then - output_json=$(swaymsg -t get_outputs | jq -r '.[] | select(.focused == true)') - output_name=$(echo ${output_json} | jq -r '.name') - - # Use only VRR in whitelisted outputs - if [[ ${output_vrr_whitelist[*]} =~ ${output_name} ]]; then - output_vrr_status=$(echo ${output_json} | jq -r '.adaptive_sync_status') - window_fullscreen_status=$(echo ${window_json} | jq -r '.container.fullscreen_mode') - - # Only update output if nesseccary to avoid flickering - [[ $output_vrr_status = "disabled" && $window_fullscreen_status = "1" ]] && swaymsg output "${output_name}" adaptive_sync 1 - [[ $output_vrr_status = "enabled" && $window_fullscreen_status = "0" ]] && swaymsg output "${output_name}" adaptive_sync 0 - fi - fi -done diff --git a/user/sway/default.nix b/user/sway/default.nix index 3e86994..9fcf2a0 100644 --- a/user/sway/default.nix +++ b/user/sway/default.nix @@ -69,7 +69,6 @@ in }; output = { "*" = { - adaptive_sync = "off"; bg = "${theme.background} fill"; mode = "1920x1080@144.000Hz"; }; @@ -116,21 +115,6 @@ in indicator = true; }; - systemd.user.services.vrr-fullscreen = { - Unit = { - Description = "Enable VRR for fullscreen windows"; - PartOf = [ "graphical-session.target" ]; - After = [ "graphical-session.target" ]; - }; - Service = { - ExecStart = "${lib.getExe pkgs.vrr-fullscreen}"; - Restart = "on-failure"; - }; - Install = { - WantedBy = [ "sway-session.target" ]; - }; - }; - services.gpg-agent.pinentryPackage = pkgs.pinentry-all; xdg.configFile."OpenTabletDriver/settings.json".source = ./open-tablet-driver.json; From a7eb3ce176c576cfae334b85ff260c63960c522e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Mon, 15 Jul 2024 12:03:13 -0300 Subject: [PATCH 017/218] waybar: fix clock locale --- user/waybar/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user/waybar/default.nix b/user/waybar/default.nix index d2dc661..c94edf5 100644 --- a/user/waybar/default.nix +++ b/user/waybar/default.nix @@ -106,7 +106,7 @@ in }; clock = { interval = 60; - format = "{:%H:%M %a %d/%m}"; + format = "{:L%H:%M %a %d/%m}"; tooltip-format = "{calendar}"; calendar = { mode = "year"; From 4a61403ede58c6f60377ab93aaee71e08d10536c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Mon, 15 Jul 2024 12:50:49 -0300 Subject: [PATCH 018/218] invidious: fix conflic with forgejo port --- hosts/phantom/forgejo.nix | 3 --- hosts/phantom/invidious.nix | 10 +--------- hosts/phantom/nginx.nix | 1 + 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/hosts/phantom/forgejo.nix b/hosts/phantom/forgejo.nix index eefb003..cd95461 100644 --- a/hosts/phantom/forgejo.nix +++ b/hosts/phantom/forgejo.nix @@ -13,9 +13,6 @@ in virtualHosts.${cfg.settings.server.DOMAIN} = { forceSSL = true; enableACME = true; - extraConfig = '' - client_max_body_size 512M; - ''; locations."/".proxyPass = "http://localhost:${toString srv.HTTP_PORT}"; }; }; diff --git a/hosts/phantom/invidious.nix b/hosts/phantom/invidious.nix index 739d9ae..8c1e0f6 100644 --- a/hosts/phantom/invidious.nix +++ b/hosts/phantom/invidious.nix @@ -1,20 +1,12 @@ -{ config, ... }: { services.invidious = { enable = true; domain = "invidious.lelgenio.com"; nginx.enable = true; + port = 10601; settings.db = { user = "invidious"; dbname = "invidious"; }; }; - - services.nginx = { - clientMaxBodySize = "100m"; - virtualHosts.${config.services.invidious.domain} = { - enableACME = true; - forceSSL = true; - }; - }; } diff --git a/hosts/phantom/nginx.nix b/hosts/phantom/nginx.nix index 0153fa6..bfff32c 100644 --- a/hosts/phantom/nginx.nix +++ b/hosts/phantom/nginx.nix @@ -11,6 +11,7 @@ recommendedTlsSettings = true; recommendedOptimisation = true; recommendedGzipSettings = true; + clientMaxBodySize = "512M"; }; # Redirect *lelgenio.xyz -> *lelgenio.com From ac6a8dde52c221cc3fc221e9978fa84470c66eab Mon Sep 17 00:00:00 2001 From: lelgenio Date: Wed, 17 Jul 2024 18:01:01 -0300 Subject: [PATCH 019/218] fish: update fish aliases --- user/fish/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user/fish/default.nix b/user/fish/default.nix index 4d4fccf..a744d02 100644 --- a/user/fish/default.nix +++ b/user/fish/default.nix @@ -36,7 +36,7 @@ in shellAliases = { rm = "trash"; tree = "eza -T"; - kys = "shutdown now"; + kill_yourself = "shutdown now"; }; shellAbbrs = { off = "shutdown now"; From 83ffaf9ee663e195839e48ffa74f4454fdb42618 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Thu, 18 Jul 2024 01:17:07 -0300 Subject: [PATCH 020/218] alacritty: add missing SearchPrevious bind --- user/alacritty.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/user/alacritty.nix b/user/alacritty.nix index 91b98c0..eaaa414 100644 --- a/user/alacritty.nix +++ b/user/alacritty.nix @@ -116,6 +116,12 @@ in mode = "Vi|~Search"; action = "SearchNext"; } + { + key = lib.toUpper key.next; + mods = "Shift"; + mode = "Vi|~Search"; + action = "SearchPrevious"; + } { key = "Up"; mods = "Control|Shift"; From 80675769d248775366570f1a2044f97bd2f56188 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Tue, 23 Jul 2024 16:32:31 -0300 Subject: [PATCH 021/218] docker: disable iptables to fix bad security --- system/containers.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/system/containers.nix b/system/containers.nix index 19698e5..2e8e52a 100644 --- a/system/containers.nix +++ b/system/containers.nix @@ -4,6 +4,9 @@ virtualisation.docker = { enable = true; + daemon.settings = { + "iptables" = false; + }; autoPrune = { enable = true; dates = "monthly"; From f565e4cc3e6107f1cdb36db3c15acc9c159ca567 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Tue, 23 Jul 2024 18:26:33 -0300 Subject: [PATCH 022/218] firewall: don't log refused connections --- system/network.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/system/network.nix b/system/network.nix index aee7518..682639d 100644 --- a/system/network.nix +++ b/system/network.nix @@ -9,6 +9,11 @@ # Open kde connect ports programs.kdeconnect.enable = true; + networking.firewall = { + enable = true; + logRefusedConnections = false; + }; + # Enable CUPS to print documents. # services.printing.enable = true; From 0247c7aadbf0ee5141154f787b58938f0fdde1be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 24 Jul 2024 20:16:59 -0300 Subject: [PATCH 023/218] update --- flake.lock | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/flake.lock b/flake.lock index 04d8d8f..c9f3362 100644 --- a/flake.lock +++ b/flake.lock @@ -176,11 +176,11 @@ ] }, "locked": { - "lastModified": 1720661479, - "narHash": "sha256-nsGgA14vVn0GGiqEfomtVgviRJCuSR3UEopfP8ixW1I=", + "lastModified": 1721735625, + "narHash": "sha256-4T0FK0b3Q7Dd7oj79M7GhA9+YqKxxGT0iN+h8yqdP7s=", "owner": "nix-community", "repo": "disko", - "rev": "786965e1b1ed3fd2018d78399984f461e2a44689", + "rev": "4698b1ef375e9c904037e0b2049aa73d39ac1b2d", "type": "github" }, "original": { @@ -480,11 +480,11 @@ ] }, "locked": { - "lastModified": 1720926593, - "narHash": "sha256-fW6e27L6qY6s+TxInwrS2EXZZfhMAlaNqT0sWS49qMA=", + "lastModified": 1721531260, + "narHash": "sha256-O72uxk4gYFQDwNkoBioyrR3GK9EReZmexCStBaORMW8=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "5fe5b0cdf1268112dc96319388819b46dc051ef4", + "rev": "b6db9fd8dc59bb2ccb403f76d16ba8bbc1d5263d", "type": "github" }, "original": { @@ -592,11 +592,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1720823163, - "narHash": "sha256-FZ5dnrvKkln9ESdoTR8R7GKW9rNpXNZrxGsOXsbsTpE=", + "lastModified": 1721548954, + "narHash": "sha256-7cCC8+Tdq1+3OPyc3+gVo9dzUNkNIQfwSDJ2HSi2u3o=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "f12ee5f64c6a09995e71c9626d88c4efa983b488", + "rev": "63d37ccd2d178d54e7fb691d7ec76000740ea24a", "type": "github" }, "original": { From 21fc3e6d719e61d3cb324876c14253ddabeaad95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 24 Jul 2024 21:18:01 -0300 Subject: [PATCH 024/218] keyd: fix modifier keys (rightshift bacame leftshift) --- system/keyboard.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/system/keyboard.nix b/system/keyboard.nix index 7691343..bdb9f24 100644 --- a/system/keyboard.nix +++ b/system/keyboard.nix @@ -8,6 +8,16 @@ "main" = { # Some programs don't respect colemaks capslock bind, so we force it here "capslock" = "backspace"; + + # keyd has incorrect defaults :/ + "leftshift" = "leftshift"; + "rightshift" = "rightshift"; + "leftalt" = "leftalt"; + "rightalt" = "rightalt"; + "leftcontrol" = "leftcontrol"; + "rightcontrol" = "rightcontrol"; + "leftmeta" = "leftmeta"; + "rightmeta" = "rightmeta"; }; }; }; From 240facab85686a9245f27eb65b73551338ffdf78 Mon Sep 17 00:00:00 2001 From: lelgenio Date: Mon, 29 Jul 2024 14:13:15 -0300 Subject: [PATCH 025/218] Revert "docker: disable iptables to fix bad security" This reverts commit 84e26f0573dc439336419562b13460b72ebe3d4e. --- system/containers.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/system/containers.nix b/system/containers.nix index 2e8e52a..19698e5 100644 --- a/system/containers.nix +++ b/system/containers.nix @@ -4,9 +4,6 @@ virtualisation.docker = { enable = true; - daemon.settings = { - "iptables" = false; - }; autoPrune = { enable = true; dates = "monthly"; From 9c853446088a8de027521bd287423dca60a3c28e Mon Sep 17 00:00:00 2001 From: lelgenio Date: Mon, 29 Jul 2024 15:07:13 -0300 Subject: [PATCH 026/218] gitlab-runner: update from registrationToken to authenticationToken --- ...thoreb-itinerario-registrationConfigFile.age | Bin 864 -> 717 bytes ...thoreb-itinerario-registrationConfigFile.age | Bin 836 -> 717 bytes system/gitlab-runner.nix | 4 ++-- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/secrets/monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.age b/secrets/monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.age index 9f9e0e3a368fc813f1a896b1a033da962cb49ae7..60c5c70e5ef67bac5524c21cf48bb7c14cc91239 100644 GIT binary patch delta 689 zcmaFBc9wO5Mtx+NqmxTvu4O^6Pe!FrqPLGra7n34W^sU5UZP8ZM_xflN=T@Qenoh? zi?N$Yx>0zxZ)I*~PDWxi9w`se!ZD9mrr(fc4TFEo>yjZcxgyv zs#Bz;sfTu2l1oORe`QWmmPdeLT1HS}S)oC0dWvU>m$yNBgn^$|RYXOmwnb!0M3PZhsA*oMnWw)~m5Yx_ zR;WitX1z&XT0t%Rkwtk}4i}fMuC9Wsp<#}xWlmXWMu1;cgkxk#dRVBZXQ*?!SFvkxu#0a> zo==!rk#=ElrX$zV)7`pip7mC@b_OSIh<|Xms$}Yq6<&($9z08Ss=wx8cTP|*z2i`P zk{wt?ndgCYJG8AmU^fARkzgfKM56=&6~chl7Cx& a-{sijlm86*^$$;14XfX~`rgEMp&bB@u=vpc delta 837 zcmX@h`habMM!l0!d9p!3pl@=NWnPG}PilpGa$04!Yhj>yO1e>~lY2mrM{rSjx{r2V zlwV|~aafUArFmF^kE^FiQdo$&Q81TTk!5k3zd?$3WoUS6YDrXtsjqW#gtuXOsd-g- zrE^NSlXhfMxOrAcVzEJKaAdH7vA0o}uVYGxnWJOF^2sX?93(c~x#jlx0AAxlw_yyNj8pXJKTBiC2J&hf8Tnu#sz6X<1f!UPekz zNT6$RZhcBxYEB_nWrTl5zGr4xL}a-|k!NICZi#+TX=-|akz;UjX+dgsQo2Ewd#PVY zrn6T?u2Zmyd1h#;zjvf@p08m>PI#y{S7~HKX<2Y;fvJm;PqK+`c}{Xps-KCwpJ`Z> zep#qdhD))5k7-dsZiQQ0TfMOmmzV17orM?q?Nab}jAet2YMsdt2jc|lcqP^MFk zQ+;4YxJR&wxkq7PF&CGvor0O0ZhBE_VsWa1Yq&xvmwSP1VM0#&=R$ivFvxj9ykz1L2N@SX0vY~6JSCpAkct%BFQh0uuzi&2Ib8VvT z|I;0k*XPXeFTFDF>8b^Ry(^`dH=K$-xTm^@`{(@6+ds+fjNI>*{r66j^dZk<2ZDnw z>|7h3zPxcnYSWpSuKK_3R5ky*KH-LgpaR3+L$?2(H>fo`F5mll{%QSbyEm^ft`#=5 Tlji&0J-6`h&K;~e_Kmp!3KA=@ diff --git a/secrets/rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.age b/secrets/rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.age index a1015ad6ff4fbaaceff1a7d5c6b3c73c9f10e774..03118e3abaad963bb9c2830f03a815001887a31c 100644 GIT binary patch delta 689 zcmX@Yc9wO5M!mOln43v(rHN&6iGONfu~BJhUZi(+Sz=0IYG!V3c#fAzX|k(VMOs9q zQI)oTc6L-jW<_XTc)FLXhf$t$q6wFukG`8hcxqKrVOfTDNNPoniCd0`pG823QMrDK zX?jY!zK?dAr%9Gmq;pwPQl^KaNpVVOdTvB`W_qMWReez?m#K$&q-Ab;l3}Ewxk;L% zSyftybGA{MM{c&Zw_{L#n2~v8QLs^3m3w|zU}iu@URjw%REVizs+*y!c2u#6Czp0) zNknQ!g{yyIWKNcscchnBo|~m>PF0#;qD5Y1fupl~Npe<*t3|47p@B zd7f{kb69X&0=A!e!(4mWPv`po@EjidN&_*?iK(K@Vdb4G9Y17l{QGL^ z(Fwu1OXuv_@u2;UUFU}l7hNVFVhxmP@#Ck%3EjaCwladwo(7mt(o1i@uqkPe?>kzPWjE zv2#(0YnXwhhgXWXbCkQjUx0U1MXp(BaHVO0rH7GrW?n&oM@nF7iIY#6YpAh%Bv)X* zS%`T^lygv~Te7*ES4x3lc5z^3dAehHuCI5vTZL(sVQ8vRN?E2?WvqL})=(F&CGvoq}q$rn+~TZhBE_VsWa1hkm|-c3_=NL?D+-PGx9Nj;mu* zN={&rNw&LBiKU-@c!5P)YD8*8uw_(~XJnC^Z)s4XPe!C=WMH9JL87mZXK8XtzME@) zn72Duj&r3^a#UEBnR7-(nvuJEU^$nrZoRHTezJE#K&okSwo7ECk58JDn?)@>K>kI5aq zx)U Date: Sun, 28 Jul 2024 00:38:32 -0300 Subject: [PATCH 027/218] waybar: fix stopped icon not appearing man waybar-mpd says {stateIcon} is not set when stopped --- user/waybar/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/user/waybar/default.nix b/user/waybar/default.nix index c94edf5..d33076e 100644 --- a/user/waybar/default.nix +++ b/user/waybar/default.nix @@ -137,9 +137,8 @@ in { format = "{stateIcon} {title} - {artist}"; format-paused = "{stateIcon}"; - format-stopped = "{stateIcon}"; + format-stopped = ""; state-icons = { - stopped = ""; paused = ""; playing = ""; }; From 48ab9a83f6c5ff2c5ef2aa995d935ee7d7176059 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sun, 28 Jul 2024 00:39:20 -0300 Subject: [PATCH 028/218] pass: install pass-export --- user/pass.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/user/pass.nix b/user/pass.nix index e1c5bb8..9a0082d 100644 --- a/user/pass.nix +++ b/user/pass.nix @@ -26,6 +26,7 @@ _gpg-unlock qtpass readQrCode + pass-export ]; }; } From 9c76e76cd158627fbf660bc92673451c450d162b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Thu, 1 Aug 2024 12:25:46 -0300 Subject: [PATCH 029/218] forgejo: fix email host address --- hosts/phantom/forgejo.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosts/phantom/forgejo.nix b/hosts/phantom/forgejo.nix index cd95461..2693ff4 100644 --- a/hosts/phantom/forgejo.nix +++ b/hosts/phantom/forgejo.nix @@ -34,7 +34,7 @@ in }; mailer = { ENABLED = true; - SMTP_ADDR = "mail.lelgenio.com"; + SMTP_ADDR = "lelgenio.com"; FROM = "noreply@git.lelgenio.com"; USER = "noreply@git.lelgenio.com"; }; From d49d18f659b8bf233b90ffc3a5abb325afcb6ad3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Thu, 8 Aug 2024 00:26:35 -0300 Subject: [PATCH 030/218] keyboard: remove config, too buggy --- system/configuration.nix | 1 - system/keyboard.nix | 25 ------------------------- 2 files changed, 26 deletions(-) delete mode 100644 system/keyboard.nix diff --git a/system/configuration.nix b/system/configuration.nix index 516a3ff..6661e40 100644 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -22,7 +22,6 @@ ./users.nix ./containers.nix ./network.nix - ./keyboard.nix ../settings ]; diff --git a/system/keyboard.nix b/system/keyboard.nix deleted file mode 100644 index bdb9f24..0000000 --- a/system/keyboard.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ pkgs, lib, ... }: -{ - services.keyd = { - enable = true; - keyboards.default = { - ids = [ "*" ]; - settings = { - "main" = { - # Some programs don't respect colemaks capslock bind, so we force it here - "capslock" = "backspace"; - - # keyd has incorrect defaults :/ - "leftshift" = "leftshift"; - "rightshift" = "rightshift"; - "leftalt" = "leftalt"; - "rightalt" = "rightalt"; - "leftcontrol" = "leftcontrol"; - "rightcontrol" = "rightcontrol"; - "leftmeta" = "leftmeta"; - "rightmeta" = "rightmeta"; - }; - }; - }; - }; -} From ad0b57f2b40b345e8cc0a3c7a83e98843b1df65f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Thu, 8 Aug 2024 00:26:57 -0300 Subject: [PATCH 031/218] gitlab: remove old configs --- system/gitlab-runner.nix | 1 - system/monolith-gitlab-runner.nix | 12 ------------ 2 files changed, 13 deletions(-) diff --git a/system/gitlab-runner.nix b/system/gitlab-runner.nix index fa426e2..c50e1b9 100644 --- a/system/gitlab-runner.nix +++ b/system/gitlab-runner.nix @@ -47,6 +47,5 @@ PATH = "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:/bin:/sbin:/usr/bin:/usr/sbin"; NIX_SSL_CERT_FILE = "/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt"; }; - tagList = [ "nix" ]; }; } diff --git a/system/monolith-gitlab-runner.nix b/system/monolith-gitlab-runner.nix index 8e419d1..f17fbe3 100644 --- a/system/monolith-gitlab-runner.nix +++ b/system/monolith-gitlab-runner.nix @@ -14,18 +14,6 @@ in enable = true; settings.concurrent = 4; services = { - # ci_test = { - # registrationConfigFile = "/srv/gitlab-runner/env/ci_test"; - # dockerImage = "debian"; - # dockerPrivileged = true; - # }; - thoreb_builder = { - registrationConfigFile = - config.age.secrets.monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.path; - dockerImage = "debian"; - dockerPrivileged = true; - }; - # runner for building in docker via host's nix-daemon # nix store will be readable in runner, might be insecure thoreb-telemetria-nix = mkNixRunner config.age.secrets.gitlab-runner-thoreb-telemetria-registrationConfigFile.path; From 7e3c4f804378d8109ca26644b645af3951d9f983 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Thu, 8 Aug 2024 00:27:08 -0300 Subject: [PATCH 032/218] update --- flake.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/flake.lock b/flake.lock index c9f3362..f7fc1e7 100644 --- a/flake.lock +++ b/flake.lock @@ -28,11 +28,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1720546205, - "narHash": "sha256-boCXsjYVxDviyzoEyAk624600f3ZBo/DKtUdvMTpbGY=", + "lastModified": 1722339003, + "narHash": "sha256-ZeS51uJI30ehNkcZ4uKqT4ZDARPyqrHADSKAwv5vVCU=", "owner": "ryantm", "repo": "agenix", - "rev": "de96bd907d5fbc3b14fc33ad37d1b9a3cb15edc6", + "rev": "3f1dae074a12feb7327b4bf43cbac0d124488bb7", "type": "github" }, "original": { @@ -176,11 +176,11 @@ ] }, "locked": { - "lastModified": 1721735625, - "narHash": "sha256-4T0FK0b3Q7Dd7oj79M7GhA9+YqKxxGT0iN+h8yqdP7s=", + "lastModified": 1723080788, + "narHash": "sha256-C5LbM5VMdcolt9zHeLQ0bYMRjUL+N+AL5pK7/tVTdes=", "owner": "nix-community", "repo": "disko", - "rev": "4698b1ef375e9c904037e0b2049aa73d39ac1b2d", + "rev": "ffc1f95f6c28e1c6d1e587b51a2147027a3e45ed", "type": "github" }, "original": { @@ -480,11 +480,11 @@ ] }, "locked": { - "lastModified": 1721531260, - "narHash": "sha256-O72uxk4gYFQDwNkoBioyrR3GK9EReZmexCStBaORMW8=", + "lastModified": 1722740924, + "narHash": "sha256-UQPgA5d8azLZuDHZMPmvDszhuKF1Ek89SrTRtqsQ4Ss=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "b6db9fd8dc59bb2ccb403f76d16ba8bbc1d5263d", + "rev": "97ca0a0fca0391de835f57e44f369a283e37890f", "type": "github" }, "original": { @@ -592,11 +592,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1721548954, - "narHash": "sha256-7cCC8+Tdq1+3OPyc3+gVo9dzUNkNIQfwSDJ2HSi2u3o=", + "lastModified": 1722869614, + "narHash": "sha256-7ojM1KSk3mzutD7SkrdSflHXEujPvW1u7QuqWoTLXQU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "63d37ccd2d178d54e7fb691d7ec76000740ea24a", + "rev": "883180e6550c1723395a3a342f830bfc5c371f6b", "type": "github" }, "original": { From 305bd6867a441a4c216367ad9a33381e42436877 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 9 Aug 2024 01:21:49 -0300 Subject: [PATCH 033/218] gnome: remove nixos-conf-editor and nix-software-center --- flake.lock | 229 +++---------------------------------------------- flake.nix | 10 --- user/gnome.nix | 3 - 3 files changed, 10 insertions(+), 232 deletions(-) diff --git a/flake.lock b/flake.lock index f7fc1e7..e10548a 100644 --- a/flake.lock +++ b/flake.lock @@ -266,36 +266,6 @@ } }, "flake-compat_2": { - "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", - "revCount": 57, - "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz" - }, - "original": { - "type": "tarball", - "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" - } - }, - "flake-compat_3": { - "flake": false, - "locked": { - "lastModified": 1650374568, - "narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "b4a34015c698c7793d592d66adbab377907a2be8", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_4": { "flake": false, "locked": { "lastModified": 1696426674, @@ -329,24 +299,6 @@ "type": "github" } }, - "flake-utils-plus": { - "inputs": { - "flake-utils": "flake-utils_4" - }, - "locked": { - "lastModified": 1696331477, - "narHash": "sha256-YkbRa/1wQWdWkVJ01JvV+75KIdM37UErqKgTf0L54Fk=", - "owner": "gytis-ivaskevicius", - "repo": "flake-utils-plus", - "rev": "bfc53579db89de750b25b0c5e7af299e0c06d7d3", - "type": "github" - }, - "original": { - "owner": "gytis-ivaskevicius", - "repo": "flake-utils-plus", - "type": "github" - } - }, "flake-utils_2": { "inputs": { "systems": "systems_3" @@ -385,11 +337,11 @@ "systems": "systems_5" }, "locked": { - "lastModified": 1694529238, - "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", + "lastModified": 1681202837, + "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", "owner": "numtide", "repo": "flake-utils", - "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", + "rev": "cfacdce06f30d2b68473a46042957675eebb3401", "type": "github" }, "original": { @@ -400,7 +352,7 @@ }, "flake-utils_5": { "inputs": { - "systems": "systems_7" + "systems": "systems_6" }, "locked": { "lastModified": 1681202837, @@ -418,25 +370,7 @@ }, "flake-utils_6": { "inputs": { - "systems": "systems_8" - }, - "locked": { - "lastModified": 1681202837, - "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "cfacdce06f30d2b68473a46042957675eebb3401", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_7": { - "inputs": { - "systems": "systems_9" + "systems": "systems_7" }, "locked": { "lastModified": 1710146030, @@ -493,87 +427,17 @@ "type": "github" } }, - "nix-software-center": { - "inputs": { - "nixos-appstream-data": "nixos-appstream-data", - "nixpkgs": [ - "nixpkgs" - ], - "utils": "utils" - }, - "locked": { - "lastModified": 1714856183, - "narHash": "sha256-Ue7xV+rZqImux4DDj3VMla4LIH2g8VeXbTJwgvX7wOo=", - "owner": "vlinkz", - "repo": "nix-software-center", - "rev": "b9e0f53536e1e94e7d8c3cda3c6866b3f9d01386", - "type": "github" - }, - "original": { - "owner": "vlinkz", - "repo": "nix-software-center", - "type": "github" - } - }, - "nixos-appstream-data": { - "inputs": { - "flake-utils": [ - "nix-software-center", - "utils" - ], - "nixpkgs": [ - "nix-software-center", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1712858390, - "narHash": "sha256-XE7gr+zU3N4SHPAhsgk8cVAFp1iBg+Lxxp3y4dUF1vE=", - "owner": "korfuri", - "repo": "nixos-appstream-data", - "rev": "0465d42a4433faa63b7a5eb0b8d397937c9fc13a", - "type": "github" - }, - "original": { - "owner": "korfuri", - "ref": "flake", - "repo": "nixos-appstream-data", - "type": "github" - } - }, - "nixos-conf-editor": { - "inputs": { - "flake-compat": "flake-compat_2", - "nixpkgs": [ - "nixpkgs" - ], - "snowfall-lib": "snowfall-lib" - }, - "locked": { - "lastModified": 1707338010, - "narHash": "sha256-UtLeZzDdk96sLTRcWsGrkWCslNUDytrGe0VmOTB/iig=", - "owner": "vlinkz", - "repo": "nixos-conf-editor", - "rev": "27b5e92f580f794c690093503869aab242f075ab", - "type": "github" - }, - "original": { - "owner": "vlinkz", - "repo": "nixos-conf-editor", - "type": "github" - } - }, "nixos-mailserver": { "inputs": { "blobs": "blobs", - "flake-compat": "flake-compat_4", + "flake-compat": "flake-compat_2", "nixpkgs": [ "nixpkgs" ], "nixpkgs-24_05": [ "nixpkgs" ], - "utils": "utils_2" + "utils": "utils" }, "locked": { "lastModified": 1718084203, @@ -646,8 +510,6 @@ "dzgui-nix": "dzgui-nix", "home-manager": "home-manager", "nix-index-database": "nix-index-database", - "nix-software-center": "nix-software-center", - "nixos-conf-editor": "nixos-conf-editor", "nixos-mailserver": "nixos-mailserver", "nixpkgs": "nixpkgs", "plymouth-themes": "plymouth-themes", @@ -701,29 +563,6 @@ "type": "github" } }, - "snowfall-lib": { - "inputs": { - "flake-compat": "flake-compat_3", - "flake-utils-plus": "flake-utils-plus", - "nixpkgs": [ - "nixos-conf-editor", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1696432959, - "narHash": "sha256-oJQZv2MYyJaVyVJY5IeevzqpGvMGKu5pZcCCJvb+xjc=", - "owner": "snowfallorg", - "repo": "lib", - "rev": "92803a029b5314d4436a8d9311d8707b71d9f0b6", - "type": "github" - }, - "original": { - "owner": "snowfallorg", - "repo": "lib", - "type": "github" - } - }, "systems": { "locked": { "lastModified": 1681028828, @@ -829,39 +668,9 @@ "type": "github" } }, - "systems_8": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_9": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, "tlauncher": { "inputs": { - "flake-utils": "flake-utils_5", + "flake-utils": "flake-utils_4", "nixpkgs": [ "nixpkgs" ] @@ -884,24 +693,6 @@ "inputs": { "systems": "systems_4" }, - "locked": { - "lastModified": 1689068808, - "narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "utils_2": { - "inputs": { - "systems": "systems_6" - }, "locked": { "lastModified": 1709126324, "narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=", @@ -919,7 +710,7 @@ "warthunder-leak-counter": { "inputs": { "crane": "crane_2", - "flake-utils": "flake-utils_6", + "flake-utils": "flake-utils_5", "nixpkgs": [ "nixpkgs" ] @@ -940,7 +731,7 @@ }, "wl-crosshair": { "inputs": { - "flake-utils": "flake-utils_7", + "flake-utils": "flake-utils_6", "nixpkgs": [ "nixpkgs" ] diff --git a/flake.nix b/flake.nix index 21caeb9..23ece59 100644 --- a/flake.nix +++ b/flake.nix @@ -58,16 +58,6 @@ url = "git+https://git.lelgenio.com/lelgenio/warthunder-leak-counter"; inputs.nixpkgs.follows = "nixpkgs"; }; - - # gnome stuff - nixos-conf-editor = { - url = "github:vlinkz/nixos-conf-editor"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - nix-software-center = { - url = "github:vlinkz/nix-software-center"; - inputs.nixpkgs.follows = "nixpkgs"; - }; }; outputs = inputs: diff --git a/user/gnome.nix b/user/gnome.nix index 4924158..e5ef257 100644 --- a/user/gnome.nix +++ b/user/gnome.nix @@ -28,9 +28,6 @@ lib.mkIf (config.my.desktop == "gnome") { }; home.packages = with pkgs; [ - inputs.nixos-conf-editor.packages.${pkgs.system}.nixos-conf-editor - inputs.nix-software-center.packages.${pkgs.system}.nix-software-center - adw-gtk3 newsflash From 1707e15e3d892ed1ec2715cdf005329c0bf28190 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 9 Aug 2024 01:22:18 -0300 Subject: [PATCH 034/218] gtk: force configuration replacement --- user/sway/theme.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/user/sway/theme.nix b/user/sway/theme.nix index 17ac73c..731d12a 100644 --- a/user/sway/theme.nix +++ b/user/sway/theme.nix @@ -49,6 +49,9 @@ lib.mkIf (desktop == "sway") { } ); + xdg.configFile."gtk-3.0/settings.ini".force = true; + xdg.configFile."gtk-4.0/settings.ini".force = true; + qt = { enable = true; platformTheme.name = "gtk3"; From b0155af10cba4ebc794f28fda5d86aa818980a1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 9 Aug 2024 01:41:01 -0300 Subject: [PATCH 035/218] sway: replace swappy with satty --- user/sway/default.nix | 3 ++- user/sway/sway-binds.nix | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/user/sway/default.nix b/user/sway/default.nix index 9fcf2a0..6b495d2 100644 --- a/user/sway/default.nix +++ b/user/sway/default.nix @@ -145,7 +145,8 @@ in wl-crosshair grim - swappy + satty + xdg-user-dirs (tesseract5.override { enableLanguages = [ "eng" diff --git a/user/sway/sway-binds.nix b/user/sway/sway-binds.nix index 7b33cd0..cd0ac9a 100644 --- a/user/sway/sway-binds.nix +++ b/user/sway/sway-binds.nix @@ -170,7 +170,9 @@ let "${mod}+c" = "exec ${pkgs.color_picker}/bin/color_picker"; "${mod}+Return" = "exec ${terminal}"; "${mod}+Ctrl+Return" = "exec thunar"; - "${mod}+Shift+s" = "exec grim - | swappy -f -"; + "${mod}+Shift+s" = '' + exec grim - | satty --filename - --fullscreen --output-filename "$(xdg-user-dir PICTURES)"/Screenshots/satty-$(date '+%Y%m%d-%H:%M:%S').png + ''; "${mod}+Ctrl+v" = "exec wl-paste | tesseract -l por - - | wl-copy"; "${mod}+k" = "exec showkeys"; "${mod}+Alt+x" = "exec pkill wl-crosshair || exec wl-crosshair"; From 11aa7e5d8176ed72e0da4ae525a2ce1b8901b6e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 9 Aug 2024 15:07:56 -0300 Subject: [PATCH 036/218] kakoune: add kak-tree-sitter --- pkgs/default.nix | 3 +- pkgs/kak-tree-sitter.nix | 34 ++++++++++ user/kakoune/colors.nix | 109 +++++++++++++++++++++++++++++++ user/kakoune/default.nix | 7 +- user/kakoune/kak-tree-sitter.nix | 64 ++++++++++++++++++ 5 files changed, 215 insertions(+), 2 deletions(-) create mode 100644 pkgs/kak-tree-sitter.nix create mode 100644 user/kakoune/kak-tree-sitter.nix diff --git a/pkgs/default.nix b/pkgs/default.nix index 73134c7..eccb020 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -2,11 +2,12 @@ # You can build them using 'nix build .#example' or (legacy) 'nix-build -A example' { pkgs, inputs }: -{ +rec { blade-formatter = pkgs.callPackage ./blade-formatter { }; cargo-checkmate = pkgs.callPackage ./cargo-checkmate.nix { }; lipsum = pkgs.callPackage ./lipsum.nix { }; emmet-cli = pkgs.callPackage ./emmet-cli.nix { }; material-wifi-icons = pkgs.callPackage ./material-wifi-icons.nix { }; gnome-pass-search-provider = pkgs.callPackage ./gnome-pass-search-provider.nix { }; + kak-tree-sitter = pkgs.callPackage ./kak-tree-sitter.nix { }; } diff --git a/pkgs/kak-tree-sitter.nix b/pkgs/kak-tree-sitter.nix new file mode 100644 index 0000000..1765977 --- /dev/null +++ b/pkgs/kak-tree-sitter.nix @@ -0,0 +1,34 @@ +{ + lib, + stdenv, + rustPlatform, + fetchFromSourcehut, + makeWrapper, +}: + +rustPlatform.buildRustPackage rec { + pname = "kak-tree-sitter"; + version = "1.1.2"; + + src = fetchFromSourcehut { + owner = "~hadronized"; + repo = "kak-tree-sitter"; + rev = "kak-tree-sitter-v${version}"; + hash = "sha256-wBWfSyR8LGtug/mCD0bJ4lbdN3trIA/03AnCxZoEOSA="; + }; + + cargoSha256 = "sha256-DDXMsH5wA6Q3jFGjYBkU3x9yOto3zeUSHP6ifkveJe0="; + + nativeBuildInputs = [ makeWrapper ]; + + postFixup = '' + wrapProgram "$out/bin/ktsctl" \ + --suffix PATH : ${stdenv.cc} + ''; + + meta = with lib; { + description = "Server that interfaces tree-sitter with kakoune"; + homepage = "https://git.sr.ht/~hadronized/kak-tree-sitter"; + license = with licenses; [ mit ]; + }; +} diff --git a/user/kakoune/colors.nix b/user/kakoune/colors.nix index e9b9d07..97ac236 100644 --- a/user/kakoune/colors.nix +++ b/user/kakoune/colors.nix @@ -114,3 +114,112 @@ with colors; Hint = "blue"; } )) ++ '' + # Color palette + declare-option str red "red" + declare-option str mauve "magenta" + declare-option str maroon "rgb:ee99a0" + declare-option str pink "rgb:f5bde6" + declare-option str cyan "cyan" + declare-option str yellow "yellow" + declare-option str green "green" + declare-option str white "white" + declare-option str blue "blue" + declare-option str sky "rgb:91d7e3" + declare-option str lavender "rgb:b7bdf8" + declare-option str black1 "rgb:202020" + declare-option str black2 "rgb:272727" + declare-option str black3 "rgb:3a3a3a" + declare-option str orange "rgb:f5a97f" + declare-option str teal "rgb:8bd5ca" + declare-option str flamingo "rgb:f0c6c6" + declare-option str gray0 "rgb:606060" + declare-option str gray1 "rgb:737373" + declare-option str bright_red "%opt{red}+b" + declare-option str bright_green "%opt{green}+b" + declare-option str bright_yellow "%opt{yellow}+b" + declare-option str bright_blue "%opt{blue}+b" + declare-option str bright_cyan "%opt{cyan}+b" + declare-option str foreground %opt{white} + declare-option str background %opt{black2} + declare-option str overlay0 "rgb:878787" + declare-option str overlay1 "rgb:9a9a9a" + + # Tree-sitter () + set-face global ts_attribute "%opt{blue}" + set-face global ts_comment "%opt{overlay0}+i" + set-face global ts_conceal "%opt{mauve}+i" + set-face global ts_constant "%opt{orange}" + set-face global ts_constant_builtin_boolean "%opt{sky}" + set-face global ts_constant_character "%opt{yellow}" + set-face global ts_constant_macro "%opt{mauve}" + set-face global ts_constructor "%opt{cyan}" + set-face global ts_diff_plus "%opt{green}" + set-face global ts_diff_minus "%opt{red}" + set-face global ts_diff_delta "%opt{blue}" + set-face global ts_diff_delta_moved "%opt{mauve}" + set-face global ts_error "%opt{red}+b" + set-face global ts_function "%opt{blue}" + set-face global ts_function_builtin "%opt{blue}+i" + set-face global ts_function_macro "%opt{mauve}" + set-face global ts_hint "%opt{blue}+b" + set-face global ts_info "%opt{green}+b" + set-face global ts_keyword "%opt{mauve}" + set-face global ts_keyword_conditional "%opt{mauve}+i" + set-face global ts_keyword_control_conditional "%opt{mauve}+i" + set-face global ts_keyword_control_directive "%opt{mauve}+i" + set-face global ts_keyword_control_import "%opt{mauve}+i" + set-face global ts_keyword_directive "%opt{mauve}+i" + set-face global ts_keyword_storage "%opt{mauve}" + set-face global ts_keyword_storage_modifier "%opt{mauve}" + set-face global ts_keyword_storage_modifier_mut "%opt{mauve}" + set-face global ts_keyword_storage_modifier_ref "%opt{teal}" + set-face global ts_label "%opt{cyan}+i" + set-face global ts_markup_bold "%opt{orange}+b" + set-face global ts_markup_heading "%opt{red}" + set-face global ts_markup_heading_1 "%opt{red}" + set-face global ts_markup_heading_2 "%opt{mauve}" + set-face global ts_markup_heading_3 "%opt{green}" + set-face global ts_markup_heading_4 "%opt{yellow}" + set-face global ts_markup_heading_5 "%opt{pink}" + set-face global ts_markup_heading_6 "%opt{teal}" + set-face global ts_markup_heading_marker "%opt{orange}+b" + set-face global ts_markup_italic "%opt{pink}+i" + set-face global ts_markup_list_checked "%opt{green}" + set-face global ts_markup_list_numbered "%opt{blue}+i" + set-face global ts_markup_list_unchecked "%opt{teal}" + set-face global ts_markup_list_unnumbered "%opt{mauve}" + set-face global ts_markup_link_label "%opt{blue}" + set-face global ts_markup_link_url "%opt{teal}+u" + set-face global ts_markup_link_uri "%opt{teal}+u" + set-face global ts_markup_link_text "%opt{blue}" + set-face global ts_markup_quote "%opt{gray1}" + set-face global ts_markup_raw "%opt{green}" + set-face global ts_markup_strikethrough "%opt{gray1}+s" + set-face global ts_namespace "%opt{blue}+i" + set-face global ts_operator "%opt{sky}" + set-face global ts_property "%opt{sky}" + set-face global ts_punctuation "%opt{overlay1}" + set-face global ts_punctuation_special "%opt{sky}" + set-face global ts_special "%opt{blue}" + set-face global ts_spell "%opt{mauve}" + set-face global ts_string "%opt{green}" + set-face global ts_string_regex "%opt{orange}" + set-face global ts_string_regexp "%opt{orange}" + set-face global ts_string_escape "%opt{mauve}" + set-face global ts_string_special "%opt{blue}" + set-face global ts_string_special_path "%opt{green}" + set-face global ts_string_special_symbol "%opt{mauve}" + set-face global ts_string_symbol "%opt{red}" + set-face global ts_tag "%opt{mauve}" + set-face global ts_tag_error "%opt{red}" + set-face global ts_text "%opt{white}" + set-face global ts_text_title "%opt{mauve}" + set-face global ts_type "%opt{yellow}" + set-face global ts_type_enum_variant "%opt{flamingo}" + set-face global ts_variable "%opt{white}" + set-face global ts_variable_builtin "%opt{red}" + set-face global ts_variable_other_member "%opt{teal}" + set-face global ts_variable_parameter "%opt{maroon}+i" + set-face global ts_warning "%opt{orange}+b" +'' diff --git a/user/kakoune/default.nix b/user/kakoune/default.nix index ebb17f5..051f21d 100644 --- a/user/kakoune/default.nix +++ b/user/kakoune/default.nix @@ -6,7 +6,6 @@ }: let inherit (config.my) - key dmenu editor theme @@ -17,6 +16,7 @@ let inherit (pkgs.kakouneUtils) buildKakounePlugin; in { + imports = [ ./kak-tree-sitter.nix ]; config = { programs.kakoune = { enable = true; @@ -100,6 +100,9 @@ in ) ) + '' + try %{ + eval %sh{ kak-tree-sitter -vvvv -dks --init $kak_session } + } set global scrolloff 10,20 set global autoreload yes @@ -118,11 +121,13 @@ in home.file = { ".config/kak-lsp/kak-lsp.toml".source = ./kak-lsp.toml; }; + home.packages = with pkgs; [ terminal ranger bmenu kak-lsp + kak-tree-sitter kak-pager kak-man-pager diff --git a/user/kakoune/kak-tree-sitter.nix b/user/kakoune/kak-tree-sitter.nix new file mode 100644 index 0000000..8818f1f --- /dev/null +++ b/user/kakoune/kak-tree-sitter.nix @@ -0,0 +1,64 @@ +{ pkgs, lib, ... }: +let + hx-src = pkgs.helix.src; + kts-src = pkgs.kak-tree-sitter.src; + inherit (pkgs) fetchFromGitHub; +in +with pkgs.tree-sitter-grammars; +{ + xdg.configFile."kak-tree-sitter/config.toml".text = + lib.foldlAttrs + ( + acc: name: vals: + acc + + '' + [language.${name}.grammar.source.local] + path = "${vals.parser}" + [language.${name}.grammar] + compile = "cc" + compile_args = ["-c", "-fpic", "../scanner.c", "../parser.c", "-I", ".."] + compile_flags = ["-O3"] + link = "cc" + link_args = ["-shared", "-fpic", "scanner.o", "parser.o", "-o", "typescript.so"] + link_flags = ["-O3"] + [language.${name}.queries.source.local] + path = "${vals.queries}" + [language.${name}.queries] + path = "${vals.queries}" + '' + ) + "" + { + nix = { + parser = tree-sitter-nix + "/parser"; + queries = tree-sitter-nix + "/queries"; + }; + + scss = { + parser = tree-sitter-scss + "/parser"; + queries = tree-sitter-scss + "/queries"; + }; + css = { + parser = tree-sitter-css + "/parser"; + queries = tree-sitter-css + "/queries"; + }; + + javascript = { + parser = tree-sitter-javascript + "/parser"; + queries = tree-sitter-javascript + "/queries"; + }; + typescript = { + parser = + tree-sitter-typescript.overrideAttrs (old: { + src = fetchFromGitHub { + owner = "tree-sitter"; + repo = "tree-sitter-typescript"; + rev = "b1bf4825d9eaa0f3bdeb1e52f099533328acfbdf"; + hash = "sha256-oZKit8kScXcOptmT2ckywL5JlAVe+wuwhuj6ThEI5OQ="; + }; + }) + + "/parser"; + queries = kts-src + "/runtime/queries/typescript"; + }; + }; +} From 6309c1dd083519f05e2e5aee4036090943e65b32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 14 Aug 2024 00:31:17 -0300 Subject: [PATCH 037/218] kakoune: update kak-tree-sitter config --- pkgs/kak-tree-sitter.nix | 2 +- user/kakoune/colors.nix | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/kak-tree-sitter.nix b/pkgs/kak-tree-sitter.nix index 1765977..3e3d9d1 100644 --- a/pkgs/kak-tree-sitter.nix +++ b/pkgs/kak-tree-sitter.nix @@ -17,7 +17,7 @@ rustPlatform.buildRustPackage rec { hash = "sha256-wBWfSyR8LGtug/mCD0bJ4lbdN3trIA/03AnCxZoEOSA="; }; - cargoSha256 = "sha256-DDXMsH5wA6Q3jFGjYBkU3x9yOto3zeUSHP6ifkveJe0="; + cargoSha256 = "sha256-OQPUWqJAts8DbFNSsC/CmMCbuZ9TVxRTR05O7oiodKI="; nativeBuildInputs = [ makeWrapper ]; diff --git a/user/kakoune/colors.nix b/user/kakoune/colors.nix index 97ac236..a0917d4 100644 --- a/user/kakoune/colors.nix +++ b/user/kakoune/colors.nix @@ -130,7 +130,7 @@ with colors; declare-option str black1 "rgb:202020" declare-option str black2 "rgb:272727" declare-option str black3 "rgb:3a3a3a" - declare-option str orange "rgb:f5a97f" + declare-option str orange ${orange} declare-option str teal "rgb:8bd5ca" declare-option str flamingo "rgb:f0c6c6" declare-option str gray0 "rgb:606060" @@ -146,7 +146,7 @@ with colors; declare-option str overlay1 "rgb:9a9a9a" # Tree-sitter () - set-face global ts_attribute "%opt{blue}" + set-face global ts_attribute "%opt{cyan}" set-face global ts_comment "%opt{overlay0}+i" set-face global ts_conceal "%opt{mauve}+i" set-face global ts_constant "%opt{orange}" @@ -208,7 +208,7 @@ with colors; set-face global ts_string_regexp "%opt{orange}" set-face global ts_string_escape "%opt{mauve}" set-face global ts_string_special "%opt{blue}" - set-face global ts_string_special_path "%opt{green}" + set-face global ts_string_special_path "%opt{orange}" set-face global ts_string_special_symbol "%opt{mauve}" set-face global ts_string_symbol "%opt{red}" set-face global ts_tag "%opt{mauve}" @@ -217,7 +217,7 @@ with colors; set-face global ts_text_title "%opt{mauve}" set-face global ts_type "%opt{yellow}" set-face global ts_type_enum_variant "%opt{flamingo}" - set-face global ts_variable "%opt{white}" + set-face global ts_variable "%opt{blue}" set-face global ts_variable_builtin "%opt{red}" set-face global ts_variable_other_member "%opt{teal}" set-face global ts_variable_parameter "%opt{maroon}+i" From ed076e1e76312d7418c4e839c1afb19377e21dd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 14 Aug 2024 00:34:06 -0300 Subject: [PATCH 038/218] steam: fix gamescope compatibility --- system/steam.nix | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/system/steam.nix b/system/steam.nix index ddc33c8..8b764d0 100644 --- a/system/steam.nix +++ b/system/steam.nix @@ -6,23 +6,28 @@ }: { programs.steam.enable = true; - programs.steam.package = pkgs.steam.override { - extraLibraries = - pkgs: - with config.hardware.opengl; - if pkgs.hostPlatform.is64bit then - [ package ] ++ extraPackages - else - [ package32 ] ++ extraPackages32; + programs.steam.extraPackages = + config.fonts.packages + ++ (with pkgs; [ + capitaine-cursors + bibata-cursors + mangohud + xdg-user-dirs + gamescope + + # gamescope compatibility?? + xorg.libXcursor + xorg.libXi + xorg.libXinerama + xorg.libXScrnSaver + libpng + libpulseaudio + libvorbis + stdenv.cc.cc.lib + libkrb5 + keyutils + ]); - extraPkgs = - pkgs: with pkgs; [ - capitaine-cursors - bibata-cursors - mangohud - xdg-user-dirs - ]; - }; environment.systemPackages = with pkgs; [ protontricks bottles From 2457164e1bd05bfd3939b34a7a4501618ea05220 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 14 Aug 2024 22:01:27 -0300 Subject: [PATCH 039/218] Revert "monolith: disable virtualbox while it's borked" This reverts commit 48c074f1f42b622fee8acdd9e733e63e058c9144. --- hosts/monolith/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hosts/monolith/default.nix b/hosts/monolith/default.nix index 4a8d69b..b45a935 100644 --- a/hosts/monolith/default.nix +++ b/hosts/monolith/default.nix @@ -143,6 +143,8 @@ in hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; networking.hostName = "monolith"; # Define your hostname. + virtualisation.virtualbox.host.enable = true; + services.udev.extraRules = '' # Fix broken suspend with Logitech USB dongle # `lsusb | grep Logitech` will return "vendor:product" From 9c664ca2ace7345caeb6a9b7d15fd6b85be76665 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Thu, 15 Aug 2024 01:49:10 -0300 Subject: [PATCH 040/218] sway: configure mouse --- system/configuration.nix | 1 + system/mouse.nix | 15 +++++++++++++++ user/sway/default.nix | 6 ++++++ 3 files changed, 22 insertions(+) create mode 100644 system/mouse.nix diff --git a/system/configuration.nix b/system/configuration.nix index 6661e40..c8095f6 100644 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -18,6 +18,7 @@ ./fonts.nix ./sound.nix ./bluetooth.nix + ./mouse.nix ./locale.nix ./users.nix ./containers.nix diff --git a/system/mouse.nix b/system/mouse.nix new file mode 100644 index 0000000..b5d5b16 --- /dev/null +++ b/system/mouse.nix @@ -0,0 +1,15 @@ +{ + # Allow configuring Logitech Peripherals + services.ratbagd.enable = true; + + # Sway does not undersand high resolution scroll wheels + # I don't need this, so I disable it + environment.etc."libinput/local-overrides.quirks".text = '' + [Logitech G502 X PLUS] + MatchUdevType=mouse + MatchBus=usb + MatchVendor=0x046D + MatchProduct=0x4099 + AttrEventCode=-REL_WHEEL_HI_RES + ''; +} diff --git a/user/sway/default.nix b/user/sway/default.nix index 6b495d2..a8ed460 100644 --- a/user/sway/default.nix +++ b/user/sway/default.nix @@ -79,6 +79,12 @@ in }; # Ignore PS4 controller touchpad events input."1356:2508:Wireless_Controller_Touchpad".events = "disabled"; + + input."1133:16537:Logitech_G502_X_PLUS" = { + accel_profile = "flat"; + pointer_accel = "0"; + }; + input."type:touchpad" = { # Disable While Typing dwt = "enabled"; From a4b7e8ca5a05dc28d2ae5dcfc0459b1d22195cdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 16 Aug 2024 21:21:39 -0300 Subject: [PATCH 041/218] update --- flake.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/flake.lock b/flake.lock index e10548a..a8868fa 100644 --- a/flake.lock +++ b/flake.lock @@ -28,11 +28,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1722339003, - "narHash": "sha256-ZeS51uJI30ehNkcZ4uKqT4ZDARPyqrHADSKAwv5vVCU=", + "lastModified": 1723293904, + "narHash": "sha256-b+uqzj+Wa6xgMS9aNbX4I+sXeb5biPDi39VgvSFqFvU=", "owner": "ryantm", "repo": "agenix", - "rev": "3f1dae074a12feb7327b4bf43cbac0d124488bb7", + "rev": "f6291c5935fdc4e0bef208cfc0dcab7e3f7a1c41", "type": "github" }, "original": { @@ -176,11 +176,11 @@ ] }, "locked": { - "lastModified": 1723080788, - "narHash": "sha256-C5LbM5VMdcolt9zHeLQ0bYMRjUL+N+AL5pK7/tVTdes=", + "lastModified": 1723685519, + "narHash": "sha256-GkXQIoZmW2zCPp1YFtAYGg/xHNyFH/Mgm79lcs81rq0=", "owner": "nix-community", "repo": "disko", - "rev": "ffc1f95f6c28e1c6d1e587b51a2147027a3e45ed", + "rev": "276a0d055a720691912c6a34abb724e395c8e38a", "type": "github" }, "original": { @@ -414,11 +414,11 @@ ] }, "locked": { - "lastModified": 1722740924, - "narHash": "sha256-UQPgA5d8azLZuDHZMPmvDszhuKF1Ek89SrTRtqsQ4Ss=", + "lastModified": 1723352546, + "narHash": "sha256-WTIrvp0yV8ODd6lxAq4F7EbrPQv0gscBnyfn559c3k8=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "97ca0a0fca0391de835f57e44f369a283e37890f", + "rev": "ec78079a904d7d55e81a0468d764d0fffb50ac06", "type": "github" }, "original": { @@ -456,11 +456,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1722869614, - "narHash": "sha256-7ojM1KSk3mzutD7SkrdSflHXEujPvW1u7QuqWoTLXQU=", + "lastModified": 1723556749, + "narHash": "sha256-+CHVZnTnIYRLYsARInHYoWkujzcRkLY/gXm3s5bE52o=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "883180e6550c1723395a3a342f830bfc5c371f6b", + "rev": "4a92571f9207810b559c9eac203d1f4d79830073", "type": "github" }, "original": { From 18448867793479f649410b40462857c250938dfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 16 Aug 2024 21:21:54 -0300 Subject: [PATCH 042/218] vscode: don't use fhs --- user/vscode/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user/vscode/default.nix b/user/vscode/default.nix index a477666..35d972b 100644 --- a/user/vscode/default.nix +++ b/user/vscode/default.nix @@ -3,7 +3,7 @@ programs.vscode = { enable = true; - package = pkgs.vscodium-fhs; + package = pkgs.vscodium; extensions = with pkgs.vscode-extensions; [ jnoortheen.nix-ide github.github-vscode-theme From dcfdac35169ebfa65e19496c156be66e6b2e761c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 17 Aug 2024 00:02:05 -0300 Subject: [PATCH 043/218] sway: suspend powerplay mousepad led in sync with mouse --- scripts/default.nix | 7 ++- scripts/powerplay-led-idle | 79 ++++++++++++++++++++++++++++++++ user/sway/default.nix | 1 + user/sway/powerplay-led-idle.nix | 17 +++++++ 4 files changed, 103 insertions(+), 1 deletion(-) create mode 100755 scripts/powerplay-led-idle create mode 100644 user/sway/powerplay-led-idle.nix diff --git a/scripts/default.nix b/scripts/default.nix index 01ce2b8..799403e 100644 --- a/scripts/default.nix +++ b/scripts/default.nix @@ -128,7 +128,12 @@ auto_connect_gamepad = [ bluez coreutils - gnugrep + final.gnugrep + ]; + powerplay-led-idle = [ + final.bash + libinput + libratbag ]; } // lib.mapAttrs import_script { diff --git a/scripts/powerplay-led-idle b/scripts/powerplay-led-idle new file mode 100755 index 0000000..a99905e --- /dev/null +++ b/scripts/powerplay-led-idle @@ -0,0 +1,79 @@ +#!/usr/bin/env bash + +set -e + +# Constants +SECONDS_UNTIL_FADE=$(( 1 * 60)) +SECONDS_UNTIL_OFF=$(( 5 * 60)) + +COLOR_ON=ff0000 +COLOR_FADE=880000 +COLOR_OFF=000000 + +# Logging + +if [[ "$1" = "debug" ]]; then + echo "Running with debugging" >&2 + DEBUG="true" + + SECONDS_UNTIL_FADE=$(( 3 )) + SECONDS_UNTIL_OFF=$(( 5 )) +fi + +log() { + if [[ "$DEBUG" = "true" ]]; then + echo "$@" >&2 + fi +} + +# Implementation + +main() { + CURRENT_STATE="UNKNOWN" + LAST_POINTER_MOTION="$(date +%s)" + + if [ "$(ratbagctl list | wc -l)" -ne 1 ]; then + echo "Not exactly one device found, exiting..." + exit 1 + fi + + DEVICE="$(ratbagctl list | cut -d: -f1)" + + while true; do + while read line; do + LAST_POINTER_MOTION="$(date +%s)" + break + done < <( + timeout 5s \ + libinput debug-events \ + | grep POINTER_MOTION + ) + TIME_SINCE_LAST=$(( "$(date +%s)" - "$LAST_POINTER_MOTION" )) + log "Last pointer motion was $TIME_SINCE_LAST seconds ago" + if [ "$TIME_SINCE_LAST" -gt "$SECONDS_UNTIL_OFF" ]; then + setState OFF "$COLOR_OFF" + elif [ "$TIME_SINCE_LAST" -gt "$SECONDS_UNTIL_FADE" ]; then + setState FADE "$COLOR_FADE" + else + setState ON "$COLOR_ON" + fi + done +} + +setState() { + STATE="$1" + COLOR="$2" + MODE="$3" + + if [[ "$STATE" = "$CURRENT_STATE" ]]; then + log "Already in $STATE state" + return + fi + log "Changing state to $STATE" + CURRENT_STATE="$STATE" + + ratbagctl "$DEVICE" led 0 set mode on + ratbagctl "$DEVICE" led 0 set color "$COLOR" +} + +main diff --git a/user/sway/default.nix b/user/sway/default.nix index a8ed460..af61969 100644 --- a/user/sway/default.nix +++ b/user/sway/default.nix @@ -23,6 +23,7 @@ in ./swayidle.nix ./swaylock.nix ./theme.nix + ./powerplay-led-idle.nix ]; config = lib.mkIf (config.my.desktop == "sway") { services.mako.enable = true; diff --git a/user/sway/powerplay-led-idle.nix b/user/sway/powerplay-led-idle.nix new file mode 100644 index 0000000..a6aa3e0 --- /dev/null +++ b/user/sway/powerplay-led-idle.nix @@ -0,0 +1,17 @@ +{ pkgs, lib, ... }: +{ + systemd.user.services.powerplay-led-idle = { + Unit = { + Description = "Autosuspend Powerplay mousepad led"; + PartOf = [ "graphical-session.target" ]; + After = [ "graphical-session.target" ]; + }; + Service = { + ExecStart = lib.getExe pkgs.powerplay-led-idle; + Restart = "on-failure"; + }; + Install = { + WantedBy = [ "sway-session.target" ]; + }; + }; +} From 6f832e601c4109e3edee16c6370620a8219a0bfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 17 Aug 2024 02:40:11 -0300 Subject: [PATCH 044/218] firefox: remove github autoload extension --- user/firefox.nix | 5 ----- 1 file changed, 5 deletions(-) diff --git a/user/firefox.nix b/user/firefox.nix index 7ea410b..b23616a 100644 --- a/user/firefox.nix +++ b/user/firefox.nix @@ -49,11 +49,6 @@ in url = "https://github.com/OhMyGuus/I-Still-Dont-Care-About-Cookies/releases/download/v1.1.4/istilldontcareaboutcookies-1.1.4.xpi"; hash = "sha256-yt6yRiLTuaK4K/QwgkL9gCVGsSa7ndFOHqZvKqIGZ5U="; }) - (pkgs.fetchFirefoxAddon { - name = "github_no_more"; - url = "https://addons.mozilla.org/firefox/downloads/file/4293306/github_no_more-0.0.1.xpi"; - hash = "sha256-1vzgo7z4K6aZAVAo5VqihYQi77mZ0rE68xbt7Oqz29s="; - }) (pkgs.fetchFirefoxAddon { name = "vimium_ff"; From 00b20bdd5189c6f3c0b92e6dadf45a6e39f3476b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 17 Aug 2024 11:47:48 -0300 Subject: [PATCH 045/218] scripts: fixup infinite recursion and recompilations --- scripts/_diffr | 0 scripts/_sway_idle_toggle | 0 scripts/bmenu | 0 scripts/br | 0 scripts/default.nix | 76 +++++++++++++++++++-------------------- scripts/helix-pager | 0 scripts/kak-pager | 0 scripts/playerctl-status | 0 scripts/pulse_sink | 0 scripts/screenshotsh | 0 scripts/showkeys | 0 scripts/terminal | 0 scripts/wl-copy-file | 0 scripts/wpass | 0 14 files changed, 37 insertions(+), 39 deletions(-) mode change 100644 => 100755 scripts/_diffr mode change 100644 => 100755 scripts/_sway_idle_toggle mode change 100644 => 100755 scripts/bmenu mode change 100644 => 100755 scripts/br mode change 100644 => 100755 scripts/helix-pager mode change 100644 => 100755 scripts/kak-pager mode change 100644 => 100755 scripts/playerctl-status mode change 100644 => 100755 scripts/pulse_sink mode change 100644 => 100755 scripts/screenshotsh mode change 100644 => 100755 scripts/showkeys mode change 100644 => 100755 scripts/terminal mode change 100644 => 100755 scripts/wl-copy-file mode change 100644 => 100755 scripts/wpass diff --git a/scripts/_diffr b/scripts/_diffr old mode 100644 new mode 100755 diff --git a/scripts/_sway_idle_toggle b/scripts/_sway_idle_toggle old mode 100644 new mode 100755 diff --git a/scripts/bmenu b/scripts/bmenu old mode 100644 new mode 100755 diff --git a/scripts/br b/scripts/br old mode 100644 new mode 100755 diff --git a/scripts/default.nix b/scripts/default.nix index 799403e..c254599 100644 --- a/scripts/default.nix +++ b/scripts/default.nix @@ -1,34 +1,32 @@ ( final: prev: - with prev; let - import_script = (_: path: import (path) { inherit pkgs lib; }); - create_script = ( - name: text: runtimeInputs: - let - script_body = pkgs.writeTextFile { - inherit name; - executable = true; - text = '' - ${builtins.readFile text} - ''; - }; - in - (pkgs.writeShellApplication { - inherit name runtimeInputs; - text = ''exec ${script_body} "$@"''; - checkPhase = ""; - }) - ); - create_scripts = lib.mapAttrs (name: deps: create_script name ./${name} deps); + lib = prev.lib; - pass = pkgs.pass.withExtensions (ex: with ex; [ pass-otp ]); + importScript = (_: path: import (path) { inherit (final) pkgs lib; }); + wrapScript = + name: text: runtimeInputs: + final.runCommand name + { + nativeBuildInputs = [ final.makeWrapper ]; + meta.mainProgram = name; + } + '' + mkdir -p $out/bin + cp ${text} $out/bin/${name} + wrapProgram $out/bin/${name} \ + --suffix PATH : ${lib.makeBinPath runtimeInputs} + ''; + createScripts = lib.mapAttrs (name: deps: wrapScript name ./${name} deps); + + myPass = final.pass.withExtensions (ex: with ex; [ pass-otp ]); in - create_scripts { + with final; + createScripts { br = [ ]; bmenu = [ - final.bemenu - final.dhist + bemenu + dhist fish j4-dmenu-desktop jq @@ -44,21 +42,21 @@ fish ]; _diffr = [ diffr ]; - _thunar-terminal = [ final.terminal ]; - _sway_idle_toggle = [ final.swayidle ]; + _thunar-terminal = [ terminal ]; + _sway_idle_toggle = [ swayidle ]; kak-pager = [ fish - final._diffr + _diffr ]; - kak-man-pager = [ final.kak-pager ]; + kak-man-pager = [ kak-pager ]; helix-pager = [ fish - final._diffr + _diffr ]; - helix-man-pager = [ final.helix-pager ]; + helix-man-pager = [ helix-pager ]; musmenu = [ mpc-cli - final.wdmenu + wdmenu trash-cli xdg-user-dirs libnotify @@ -73,9 +71,9 @@ gnupg ]; wpass = [ - final.wdmenu + wdmenu fd - pass + myPass sd wl-clipboard wtype @@ -96,7 +94,7 @@ pulse_sink = [ pulseaudio pamixer - final.wdmenu + wdmenu ]; color_picker = [ grim @@ -108,13 +106,13 @@ dzadd = [ procps libnotify - final.wdmenu + wdmenu jq mpv pqiv python3Packages.deemix mpc-cli - final.mpdDup + mpdDup ]; mpdDup = [ mpc-cli @@ -128,15 +126,15 @@ auto_connect_gamepad = [ bluez coreutils - final.gnugrep + gnugrep ]; powerplay-led-idle = [ - final.bash + bash libinput libratbag ]; } - // lib.mapAttrs import_script { + // lib.mapAttrs importScript { wdmenu = ./wdmenu.nix; wlauncher = ./wlauncher.nix; _gpg-unlock = ./_gpg-unlock.nix; diff --git a/scripts/helix-pager b/scripts/helix-pager old mode 100644 new mode 100755 diff --git a/scripts/kak-pager b/scripts/kak-pager old mode 100644 new mode 100755 diff --git a/scripts/playerctl-status b/scripts/playerctl-status old mode 100644 new mode 100755 diff --git a/scripts/pulse_sink b/scripts/pulse_sink old mode 100644 new mode 100755 diff --git a/scripts/screenshotsh b/scripts/screenshotsh old mode 100644 new mode 100755 diff --git a/scripts/showkeys b/scripts/showkeys old mode 100644 new mode 100755 diff --git a/scripts/terminal b/scripts/terminal old mode 100644 new mode 100755 diff --git a/scripts/wl-copy-file b/scripts/wl-copy-file old mode 100644 new mode 100755 diff --git a/scripts/wpass b/scripts/wpass old mode 100644 new mode 100755 From 1e4fd37cff0f82330b7edd6f96a72a8214d342dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 17 Aug 2024 18:05:39 -0300 Subject: [PATCH 046/218] sway: fix mousepad led timeout --- scripts/powerplay-led-idle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/powerplay-led-idle b/scripts/powerplay-led-idle index a99905e..888abde 100755 --- a/scripts/powerplay-led-idle +++ b/scripts/powerplay-led-idle @@ -4,7 +4,7 @@ set -e # Constants SECONDS_UNTIL_FADE=$(( 1 * 60)) -SECONDS_UNTIL_OFF=$(( 5 * 60)) +SECONDS_UNTIL_OFF=$(( 6 * 60)) COLOR_ON=ff0000 COLOR_FADE=880000 From fc3c07c09344fb7c8b62004b4dcbde38304bfe77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Mon, 19 Aug 2024 00:01:40 -0300 Subject: [PATCH 047/218] hardware: always enable powerplay led idle --- user/home.nix | 1 + user/{sway => }/powerplay-led-idle.nix | 2 +- user/sway/default.nix | 1 - 3 files changed, 2 insertions(+), 2 deletions(-) rename user/{sway => }/powerplay-led-idle.nix (88%) diff --git a/user/home.nix b/user/home.nix index 30f556e..e606b4f 100644 --- a/user/home.nix +++ b/user/home.nix @@ -42,6 +42,7 @@ ./xdg-dirs.nix inputs.nix-index-database.hmModules.nix-index ../settings + ./powerplay-led-idle.nix ]; my = import ./variables.nix; diff --git a/user/sway/powerplay-led-idle.nix b/user/powerplay-led-idle.nix similarity index 88% rename from user/sway/powerplay-led-idle.nix rename to user/powerplay-led-idle.nix index a6aa3e0..a34990e 100644 --- a/user/sway/powerplay-led-idle.nix +++ b/user/powerplay-led-idle.nix @@ -11,7 +11,7 @@ Restart = "on-failure"; }; Install = { - WantedBy = [ "sway-session.target" ]; + WantedBy = [ "graphical-session.target" ]; }; }; } diff --git a/user/sway/default.nix b/user/sway/default.nix index af61969..a8ed460 100644 --- a/user/sway/default.nix +++ b/user/sway/default.nix @@ -23,7 +23,6 @@ in ./swayidle.nix ./swaylock.nix ./theme.nix - ./powerplay-led-idle.nix ]; config = lib.mkIf (config.my.desktop == "sway") { services.mako.enable = true; From 1af0c86c5e947a91d81cb1e8c5c48cf703d4e3e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Mon, 19 Aug 2024 00:02:36 -0300 Subject: [PATCH 048/218] scripts: fix pass-export TOTP containing too much information for keepassxc --- scripts/default.nix | 1 + scripts/pass-export | 3 +++ 2 files changed, 4 insertions(+) diff --git a/scripts/default.nix b/scripts/default.nix index c254599..47aaac5 100644 --- a/scripts/default.nix +++ b/scripts/default.nix @@ -69,6 +69,7 @@ pass-export = [ pass2csv gnupg + sd ]; wpass = [ wdmenu diff --git a/scripts/pass-export b/scripts/pass-export index 658f803..27596fc 100755 --- a/scripts/pass-export +++ b/scripts/pass-export @@ -8,3 +8,6 @@ pass2csv "$PASSWORD_STORE_DIR" "$HOME/passwords.csv" \ -f User '(user|login)(:\s*)?' \ -f TOTP 'otpauth(:)?' \ -f URL 'url(:\s*)?' + +# Fix TOTP format for keepass +sd '"//totp/.*?secret=(.*?)(&.*?)?"' '"$1"' "$HOME/passwords.csv" \ No newline at end of file From 87871fa0a85c61c01fde1f6ed1a26118b48c9159 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Mon, 19 Aug 2024 00:04:42 -0300 Subject: [PATCH 049/218] gnome: use keepass as password manager --- user/gnome.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user/gnome.nix b/user/gnome.nix index e5ef257..5a37f04 100644 --- a/user/gnome.nix +++ b/user/gnome.nix @@ -34,7 +34,7 @@ lib.mkIf (config.my.desktop == "gnome") { foliate amberol pitivi - gnome-passwordsafe + keepassxc libsForQt5.qt5ct libsForQt5.qtstyleplugin-kvantum From df51258918c4b6a5ca673878d719fd0b9c0a5665 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Mon, 19 Aug 2024 00:05:28 -0300 Subject: [PATCH 050/218] gnome: don't hardcode qt program styles --- user/gnome.nix | 4 ---- 1 file changed, 4 deletions(-) diff --git a/user/gnome.nix b/user/gnome.nix index 5a37f04..443f1fe 100644 --- a/user/gnome.nix +++ b/user/gnome.nix @@ -42,10 +42,6 @@ lib.mkIf (config.my.desktop == "gnome") { qt6Packages.qtstyleplugin-kvantum ]; - home.sessionVariables = { - QT_QPA_PLATFORMTHEME = "qt5ct"; - }; - services.gpg-agent.pinentryPackage = pkgs.pinentry-gnome3; xdg.defaultApplications = { From 436188d4607b5c0a5f2e4633bd212b1c32e6a386 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Mon, 19 Aug 2024 11:51:40 -0300 Subject: [PATCH 051/218] firefox: fix tab bar style on gnome --- user/firefox.nix | 51 ++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 47 insertions(+), 4 deletions(-) diff --git a/user/firefox.nix b/user/firefox.nix index b23616a..48c4fc9 100644 --- a/user/firefox.nix +++ b/user/firefox.nix @@ -124,10 +124,53 @@ in "devtools.chrome.enabled" = true; "devtools.debugger.remote-enabled" = true; }; - userChrome = lib.mkIf (desktop == "sway") '' - #titlebar { display: none !important; } - #sidebar-header { display: none !important; } - ''; + userChrome = + if desktop == "sway" then + '' + #titlebar { display: none !important; } + #sidebar-header { display: none !important; } + '' + else + '' + /* Element | chrome://browser/content/browser.xhtml */ + + #navigator-toolbox { + display: grid; + grid-template-columns: 1fr 50px; + overflow: hidden; + } + + /* Element | chrome://browser/content/browser.xhtml */ + + #nav-bar { + flex: 1; + width: 100%; + grid-column: 1 / 3; + grid-row: 1; + z-index: 0; + padding-right: 29px !important; + } + + /* Element | chrome://browser/content/browser.xhtml */ + + .toolbar-items { + display: none; + } + + /* Element | chrome://browser/content/browser.xhtml */ + + #TabsToolbar { + max-width: 50px; + } + + /* Element | chrome://browser/content/browser.xhtml */ + + #titlebar { + max-width: 50px; + grid-area: 1 / 2; + z-index: 10; + } + ''; }; }; }; From 5abc32d0f4919d51c0443a4249baa1779c8e0d50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Tue, 20 Aug 2024 01:16:36 -0300 Subject: [PATCH 052/218] add user davikiwi --- hosts/phantom/users.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/hosts/phantom/users.nix b/hosts/phantom/users.nix index 6291321..493f913 100644 --- a/hosts/phantom/users.nix +++ b/hosts/phantom/users.nix @@ -40,6 +40,23 @@ ]; initialHashedPassword = "$y$j9T$E3aBBSSq0Gma8hZD9L7ov0$iCGDW4fqrXWfHO0qodBYYgMFA9CpIraoklHcPbJJrM3"; }; + + users.users.davikiwi = { + isNormalUser = true; + description = "Davi"; + hashedPassword = "$y$j9T$0e/rczjOVCy7PuwC3pG0V/$gTHZhfO4wQSlFvbDyfghbCnGI2uDI0a52zSrQ/yOA5A"; + openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGgZDBnj+gVMHqoNvjpx2T/HqnxUDbLPshu+t7301gXd Davi@DESKTOP-EVHFGJ9" + ]; + extraGroups = [ "docker" ]; + packages = with pkgs; [ + (pkgs.python3.withPackages (python-pkgs: [ + python-pkgs.pip + python-pkgs.wheel + ])) + ]; + }; + security.sudo.wheelNeedsPassword = false; programs.fish.enable = true; From b18d3b52c2bf5316412f1bf866097487eb55850c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Tue, 20 Aug 2024 10:50:40 -0300 Subject: [PATCH 053/218] davi: extract configuration --- hosts/phantom/davi.nix | 26 ++++++++++++++++++++++++++ hosts/phantom/default.nix | 1 + hosts/phantom/users.nix | 16 ---------------- 3 files changed, 27 insertions(+), 16 deletions(-) create mode 100644 hosts/phantom/davi.nix diff --git a/hosts/phantom/davi.nix b/hosts/phantom/davi.nix new file mode 100644 index 0000000..876aee7 --- /dev/null +++ b/hosts/phantom/davi.nix @@ -0,0 +1,26 @@ +{ pkgs, ... }: +{ + users.users.davikiwi = { + isNormalUser = true; + description = "Davi"; + hashedPassword = "$y$j9T$0e/rczjOVCy7PuwC3pG0V/$gTHZhfO4wQSlFvbDyfghbCnGI2uDI0a52zSrQ/yOA5A"; + openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGgZDBnj+gVMHqoNvjpx2T/HqnxUDbLPshu+t7301gXd Davi@DESKTOP-EVHFGJ9" + ]; + extraGroups = [ "docker" ]; + packages = with pkgs; [ + (pkgs.python3.withPackages (python-pkgs: [ + python-pkgs.pip + python-pkgs.wheel + ])) + ]; + }; + + services.nginx.virtualHosts."davikiwi.lelgenio.com" = { + enableACME = true; + forceSSL = true; + locations."/" = { + proxyPass = "http://127.0.0.1:24618"; + }; + }; +} diff --git a/hosts/phantom/default.nix b/hosts/phantom/default.nix index a0bf560..6c135d9 100644 --- a/hosts/phantom/default.nix +++ b/hosts/phantom/default.nix @@ -20,6 +20,7 @@ ./forgejo.nix ./warthunder-leak-counter.nix ./invidious.nix + ./davi.nix ]; networking.hostName = "phantom"; diff --git a/hosts/phantom/users.nix b/hosts/phantom/users.nix index 493f913..a881f50 100644 --- a/hosts/phantom/users.nix +++ b/hosts/phantom/users.nix @@ -41,22 +41,6 @@ initialHashedPassword = "$y$j9T$E3aBBSSq0Gma8hZD9L7ov0$iCGDW4fqrXWfHO0qodBYYgMFA9CpIraoklHcPbJJrM3"; }; - users.users.davikiwi = { - isNormalUser = true; - description = "Davi"; - hashedPassword = "$y$j9T$0e/rczjOVCy7PuwC3pG0V/$gTHZhfO4wQSlFvbDyfghbCnGI2uDI0a52zSrQ/yOA5A"; - openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGgZDBnj+gVMHqoNvjpx2T/HqnxUDbLPshu+t7301gXd Davi@DESKTOP-EVHFGJ9" - ]; - extraGroups = [ "docker" ]; - packages = with pkgs; [ - (pkgs.python3.withPackages (python-pkgs: [ - python-pkgs.pip - python-pkgs.wheel - ])) - ]; - }; - security.sudo.wheelNeedsPassword = false; programs.fish.enable = true; From 630660afcff654a31b2142bee951400bb5537198 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 28 Aug 2024 19:56:54 -0300 Subject: [PATCH 054/218] hardware: remove controller hacks --- scripts/auto_connect_gamepad | 27 --------------------------- scripts/default.nix | 5 ----- system/bluetooth.nix | 2 +- user/controller.nix | 26 -------------------------- user/home.nix | 1 - 5 files changed, 1 insertion(+), 60 deletions(-) delete mode 100755 scripts/auto_connect_gamepad delete mode 100644 user/controller.nix diff --git a/scripts/auto_connect_gamepad b/scripts/auto_connect_gamepad deleted file mode 100755 index d373281..0000000 --- a/scripts/auto_connect_gamepad +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh - -list_paired_controllers() { - bluetoothctl devices Paired | grep 'Controller' | cut -d' ' -f2 -} - -count_connected_controllers() { - bluetoothctl devices Connected | grep 'Controller' | wc -l -} - -try_to_connect_to_all_controllers() { - list_paired_controllers | while read paired_controller; do - echo "Trying to connect to controller $paired_controller" - bluetoothctl connect "$paired_controller" - done -} - -while true; do - echo "looping" - if test "$(count_connected_controllers)" -ne 0 ; then - echo "there is a controller connected, not attempting to connect to any other" - sleep 10s - continue - fi - sleep 1s - try_to_connect_to_all_controllers -done diff --git a/scripts/default.nix b/scripts/default.nix index 47aaac5..0e88436 100644 --- a/scripts/default.nix +++ b/scripts/default.nix @@ -124,11 +124,6 @@ zbar wl-clipboard ]; - auto_connect_gamepad = [ - bluez - coreutils - gnugrep - ]; powerplay-led-idle = [ bash libinput diff --git a/system/bluetooth.nix b/system/bluetooth.nix index 1bcea1f..a5d00c0 100644 --- a/system/bluetooth.nix +++ b/system/bluetooth.nix @@ -6,7 +6,7 @@ settings = { General = { DiscoverableTimeout = 0; - # Discoverable = true; + Discoverable = true; AlwaysPairable = true; }; Policy = { diff --git a/user/controller.nix b/user/controller.nix deleted file mode 100644 index fe08a98..0000000 --- a/user/controller.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ pkgs, lib, ... }: -{ - systemd.user.services = { - autoconnect-gamepad = { - Unit = { - Description = "Attempt to connect to game controllers"; - PartOf = [ "graphical-session.target" ]; - After = [ "graphical-session.target" ]; - }; - Service = { - ExecStart = lib.getExe pkgs.auto_connect_gamepad; - }; - Install = { - WantedBy = [ "sway-session.target" ]; - }; - }; - }; - - xdg.desktopEntries = { - disconnect-controller = { - name = "Disconnect Controller"; - exec = "bluetoothctl disconnect 84:30:95:97:1A:79"; - terminal = false; - }; - }; -} diff --git a/user/home.nix b/user/home.nix index e606b4f..315ea4b 100644 --- a/user/home.nix +++ b/user/home.nix @@ -8,7 +8,6 @@ }: { imports = [ - ./controller.nix ./waybar ./helix.nix ./kakoune From c273dbcb1eac3db86bf6cc5292f44e04e1deae1c Mon Sep 17 00:00:00 2001 From: lelgenio Date: Sat, 14 Sep 2024 15:23:01 -0300 Subject: [PATCH 055/218] update --- flake.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/flake.lock b/flake.lock index a8868fa..d22245c 100644 --- a/flake.lock +++ b/flake.lock @@ -176,11 +176,11 @@ ] }, "locked": { - "lastModified": 1723685519, - "narHash": "sha256-GkXQIoZmW2zCPp1YFtAYGg/xHNyFH/Mgm79lcs81rq0=", + "lastModified": 1726325969, + "narHash": "sha256-Mlw7009cdFry9OHpS6jy294lXhb+gcRa0iS2hYhkC6s=", "owner": "nix-community", "repo": "disko", - "rev": "276a0d055a720691912c6a34abb724e395c8e38a", + "rev": "3632080c41d7a657995807689a08ef6c4bcb2c72", "type": "github" }, "original": { @@ -393,11 +393,11 @@ ] }, "locked": { - "lastModified": 1720042825, - "narHash": "sha256-A0vrUB6x82/jvf17qPCpxaM+ulJnD8YZwH9Ci0BsAzE=", + "lastModified": 1725703823, + "narHash": "sha256-tDgM4d8mLK0Hd6YMB2w1BqMto1XBXADOzPEaLl10VI4=", "owner": "nix-community", "repo": "home-manager", - "rev": "e1391fb22e18a36f57e6999c7a9f966dc80ac073", + "rev": "208df2e558b73b6a1f0faec98493cb59a25f62ba", "type": "github" }, "original": { @@ -414,11 +414,11 @@ ] }, "locked": { - "lastModified": 1723352546, - "narHash": "sha256-WTIrvp0yV8ODd6lxAq4F7EbrPQv0gscBnyfn559c3k8=", + "lastModified": 1725765290, + "narHash": "sha256-hwX53i24KyWzp2nWpQsn8lfGQNCP0JoW/bvQmcR1DPY=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "ec78079a904d7d55e81a0468d764d0fffb50ac06", + "rev": "642275444c5a9defce57219c944b3179bf2adaa9", "type": "github" }, "original": { @@ -456,11 +456,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1723556749, - "narHash": "sha256-+CHVZnTnIYRLYsARInHYoWkujzcRkLY/gXm3s5bE52o=", + "lastModified": 1726062281, + "narHash": "sha256-PyFVySdGj3enKqm8RQuo4v1KLJLmNLOq2yYOHsI6e2Q=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "4a92571f9207810b559c9eac203d1f4d79830073", + "rev": "e65aa8301ba4f0ab8cb98f944c14aa9da07394f8", "type": "github" }, "original": { From 93ba59ccfbd8a089cfceee07b24c6ea8e1d2c69a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sun, 15 Sep 2024 20:22:24 -0300 Subject: [PATCH 056/218] pass: install import extension --- user/pass.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/user/pass.nix b/user/pass.nix index 9a0082d..4a69d12 100644 --- a/user/pass.nix +++ b/user/pass.nix @@ -9,7 +9,12 @@ config = { programs.password-store = { enable = true; - package = pkgs.pass.withExtensions (ex: with ex; [ pass-otp ]); + package = pkgs.pass.withExtensions ( + ex: with ex; [ + pass-otp + pass-import + ] + ); }; services = { pass-secret-service.enable = true; From 5ea6c66347a2b480f6bad96050b4ce06b706be1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Mon, 16 Sep 2024 01:13:56 -0300 Subject: [PATCH 057/218] sway: enable adaptive sync --- user/sway/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/user/sway/default.nix b/user/sway/default.nix index a8ed460..42e26af 100644 --- a/user/sway/default.nix +++ b/user/sway/default.nix @@ -71,6 +71,7 @@ in "*" = { bg = "${theme.background} fill"; mode = "1920x1080@144.000Hz"; + adaptive_sync = "on"; }; }; fonts = { From 4f044c97cf8eddc217cb187b4e5866ad5b3c849d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 18 Sep 2024 12:58:31 -0300 Subject: [PATCH 058/218] update --- flake.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/flake.lock b/flake.lock index d22245c..689e9af 100644 --- a/flake.lock +++ b/flake.lock @@ -176,11 +176,11 @@ ] }, "locked": { - "lastModified": 1726325969, - "narHash": "sha256-Mlw7009cdFry9OHpS6jy294lXhb+gcRa0iS2hYhkC6s=", + "lastModified": 1726590912, + "narHash": "sha256-5bxY85siOIqOcQ8TOMAWLkMUZvLUADS2i5TsZhzUIZY=", "owner": "nix-community", "repo": "disko", - "rev": "3632080c41d7a657995807689a08ef6c4bcb2c72", + "rev": "d32d1504c77d7f6ba7e033357dcf638baceab9b7", "type": "github" }, "original": { @@ -393,11 +393,11 @@ ] }, "locked": { - "lastModified": 1725703823, - "narHash": "sha256-tDgM4d8mLK0Hd6YMB2w1BqMto1XBXADOzPEaLl10VI4=", + "lastModified": 1726592409, + "narHash": "sha256-2Y6CDvD/BD43WLS77PHu6dUHbdUfFhuzkY8oJAecD/U=", "owner": "nix-community", "repo": "home-manager", - "rev": "208df2e558b73b6a1f0faec98493cb59a25f62ba", + "rev": "2ab00f89dd3ecf8012f5090e6d7ca1a7ea30f594", "type": "github" }, "original": { @@ -414,11 +414,11 @@ ] }, "locked": { - "lastModified": 1725765290, - "narHash": "sha256-hwX53i24KyWzp2nWpQsn8lfGQNCP0JoW/bvQmcR1DPY=", + "lastModified": 1726449931, + "narHash": "sha256-1AX7MyYzP7sNgZiGF8jwehCCI75y2kBGwACeryJs+yE=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "642275444c5a9defce57219c944b3179bf2adaa9", + "rev": "c1b0fa0bec5478185eae2fd3f39b9e906fc83995", "type": "github" }, "original": { @@ -456,11 +456,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1726062281, - "narHash": "sha256-PyFVySdGj3enKqm8RQuo4v1KLJLmNLOq2yYOHsI6e2Q=", + "lastModified": 1726447378, + "narHash": "sha256-2yV8nmYE1p9lfmLHhOCbYwQC/W8WYfGQABoGzJOb1JQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e65aa8301ba4f0ab8cb98f944c14aa9da07394f8", + "rev": "086b448a5d54fd117f4dc2dee55c9f0ff461bdc1", "type": "github" }, "original": { From 3b70708469240cb46708ac750696e4ee737933c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 18 Sep 2024 22:52:28 -0300 Subject: [PATCH 059/218] fish: fix git prompt not showing staged changes if there's no commit --- user/fish/fish_prompt.fish | 40 +++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/user/fish/fish_prompt.fish b/user/fish/fish_prompt.fish index 2cba6be..e5784bd 100644 --- a/user/fish/fish_prompt.fish +++ b/user/fish/fish_prompt.fish @@ -103,29 +103,29 @@ function fish_git_prompt _fish_prompt_warn "init" end - git rev-parse HEAD -- &>/dev/null - or return + # if we have at least one commit + if git rev-parse HEAD -- &>/dev/null + # print a "↑" if ahead of origin + test 0 -ne (git log --oneline "$git_remote_branch"..HEAD -- | wc -l) + and set -f _git_sync_ahead '↑' - # print a "↑" if ahead of origin - test 0 -ne (git log --oneline "$git_remote_branch"..HEAD -- | wc -l) - and set -f _git_sync_ahead '↑' + # print a "↓" if behind of origin + test 0 -lt (git log --oneline HEAD.."$git_remote_branch" -- | wc -l) + and set -l _git_sync_behind '↓' - # print a "↓" if behind of origin - test 0 -lt (git log --oneline HEAD.."$git_remote_branch" -- | wc -l) - and set -l _git_sync_behind '↓' + if set -q _git_sync_ahead _git_sync_behind + _fish_prompt_normal '⇅' + else if set -q _git_sync_ahead + _fish_prompt_normal '↑' + else if set -q _git_sync_behind + _fish_prompt_normal '↓' + end - if set -q _git_sync_ahead _git_sync_behind - _fish_prompt_normal '⇅' - else if set -q _git_sync_ahead - _fish_prompt_normal '↑' - else if set -q _git_sync_behind - _fish_prompt_normal '↓' - end - - if test -n "$git_log_unpushed" - and not string match -qr "$git_branch" "$git_log_unpushed" - _fish_prompt_normal '↻' - _fish_prompt_warn $git_log_unpushed[1] + if test -n "$git_log_unpushed" + and not string match -qr "$git_branch" "$git_log_unpushed" + _fish_prompt_normal '↻' + _fish_prompt_warn $git_log_unpushed[1] + end end ############################################################ From deec0c5653ff6289a11c679103a2991e216d409e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Thu, 19 Sep 2024 11:09:23 -0300 Subject: [PATCH 060/218] Revert "sway: disable vrr" This reverts commit 752f029bce075d605d22e1a0b40c016801467e13. --- scripts/default.nix | 1 + scripts/vrr-fullscreen | 28 ++++++++++++++++++++++++++++ user/sway/default.nix | 17 ++++++++++++++++- 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100755 scripts/vrr-fullscreen diff --git a/scripts/default.nix b/scripts/default.nix index 0e88436..1e3290e 100644 --- a/scripts/default.nix +++ b/scripts/default.nix @@ -129,6 +129,7 @@ libinput libratbag ]; + vrr-fullscreen = [ ]; } // lib.mapAttrs importScript { wdmenu = ./wdmenu.nix; diff --git a/scripts/vrr-fullscreen b/scripts/vrr-fullscreen new file mode 100755 index 0000000..8413923 --- /dev/null +++ b/scripts/vrr-fullscreen @@ -0,0 +1,28 @@ +#!/usr/bin/env bash + +# List of supported outputs for VRR +output_vrr_whitelist=( + "DP-1" + "DP-2" +) + +# Toggle VRR for fullscreened apps in prespecified displays to avoid stutters while in desktop +swaymsg -t subscribe -m '[ "window" ]' | while read window_json; do + window_event=$(echo ${window_json} | jq -r '.change') + + # Process only focus change and fullscreen toggle + if [[ $window_event = "focus" || $window_event = "fullscreen_mode" ]]; then + output_json=$(swaymsg -t get_outputs | jq -r '.[] | select(.focused == true)') + output_name=$(echo ${output_json} | jq -r '.name') + + # Use only VRR in whitelisted outputs + if [[ ${output_vrr_whitelist[*]} =~ ${output_name} ]]; then + output_vrr_status=$(echo ${output_json} | jq -r '.adaptive_sync_status') + window_fullscreen_status=$(echo ${window_json} | jq -r '.container.fullscreen_mode') + + # Only update output if nesseccary to avoid flickering + [[ $output_vrr_status = "disabled" && $window_fullscreen_status = "1" ]] && swaymsg output "${output_name}" adaptive_sync 1 + [[ $output_vrr_status = "enabled" && $window_fullscreen_status = "0" ]] && swaymsg output "${output_name}" adaptive_sync 0 + fi + fi +done diff --git a/user/sway/default.nix b/user/sway/default.nix index 42e26af..2a6dc70 100644 --- a/user/sway/default.nix +++ b/user/sway/default.nix @@ -69,9 +69,9 @@ in }; output = { "*" = { + adaptive_sync = "off"; bg = "${theme.background} fill"; mode = "1920x1080@144.000Hz"; - adaptive_sync = "on"; }; }; fonts = { @@ -122,6 +122,21 @@ in indicator = true; }; + systemd.user.services.vrr-fullscreen = { + Unit = { + Description = "Enable VRR for fullscreen windows"; + PartOf = [ "graphical-session.target" ]; + After = [ "graphical-session.target" ]; + }; + Service = { + ExecStart = "${lib.getExe pkgs.vrr-fullscreen}"; + Restart = "on-failure"; + }; + Install = { + WantedBy = [ "sway-session.target" ]; + }; + }; + services.gpg-agent.pinentryPackage = pkgs.pinentry-all; xdg.configFile."OpenTabletDriver/settings.json".source = ./open-tablet-driver.json; From b9fd4e0b7e2d23efec28080a764810bb840102aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 30 Aug 2024 19:25:36 -0300 Subject: [PATCH 061/218] monolith: switch to latest kernel --- hosts/monolith/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hosts/monolith/default.nix b/hosts/monolith/default.nix index b45a935..3350e0d 100644 --- a/hosts/monolith/default.nix +++ b/hosts/monolith/default.nix @@ -36,6 +36,8 @@ in hardware.opentabletdriver.enable = true; + boot.kernelPackages = pkgs.linuxPackages_latest; + boot.extraModulePackages = with config.boot.kernelPackages; [ zenpower ]; boot.initrd.kernelModules = [ "amdgpu" ]; boot.kernelModules = [ From e10fc81ebb74b3c1029dad8d61205ca2932c102c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 25 Sep 2024 22:24:46 -0300 Subject: [PATCH 062/218] flake: add unstable --- flake.lock | 16 ++++++++++++++++ flake.nix | 7 ++++++- overlays/default.nix | 5 +++++ 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/flake.lock b/flake.lock index 689e9af..a76aa8d 100644 --- a/flake.lock +++ b/flake.lock @@ -469,6 +469,21 @@ "type": "indirect" } }, + "nixpkgs-unstable": { + "locked": { + "lastModified": 1726937504, + "narHash": "sha256-bvGoiQBvponpZh8ClUcmJ6QnsNKw0EMrCQJARK3bI1c=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "9357f4f23713673f310988025d9dc261c20e70c6", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-unstable", + "type": "indirect" + } + }, "plymouth-themes": { "flake": false, "locked": { @@ -512,6 +527,7 @@ "nix-index-database": "nix-index-database", "nixos-mailserver": "nixos-mailserver", "nixpkgs": "nixpkgs", + "nixpkgs-unstable": "nixpkgs-unstable", "plymouth-themes": "plymouth-themes", "ranger-icons": "ranger-icons", "tlauncher": "tlauncher", diff --git a/flake.nix b/flake.nix index 23ece59..ec2011f 100644 --- a/flake.nix +++ b/flake.nix @@ -2,6 +2,8 @@ description = "My system config"; inputs = { nixpkgs.url = "nixpkgs/nixos-24.05"; + nixpkgs-unstable.url = "nixpkgs/nixos-unstable"; + home-manager.url = "github:nix-community/home-manager/release-24.05"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; @@ -157,7 +159,10 @@ }; phantom = lib.nixosSystem { inherit system specialArgs; - modules = [ ./hosts/phantom ]; + modules = [ + { nixpkgs.pkgs = pkgs; } + ./hosts/phantom + ]; }; }; diff --git a/overlays/default.nix b/overlays/default.nix index 2ac2ae1..8886897 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -2,6 +2,7 @@ rec { all = [ scripts + unstable themes new-packages patches @@ -11,6 +12,10 @@ rec { scripts = (import ../scripts); + unstable = final: prev: { + unstable = import inputs.nixpkgs-unstable { inherit (final) system config; }; + }; + themes = ( final: prev: { papirus_red = (final.papirus-icon-theme.override { color = "red"; }); From 0809764c5868a41178279a363c7eabd7227b6d7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 25 Sep 2024 22:08:10 -0300 Subject: [PATCH 063/218] invidious: install many helpers --- hosts/phantom/invidious.nix | 34 +++++++++++++++++++++++--- secrets/phantom-invidious-settings.age | 16 ++++++++++++ secrets/secrets.nix | 1 + 3 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 secrets/phantom-invidious-settings.age diff --git a/hosts/phantom/invidious.nix b/hosts/phantom/invidious.nix index 8c1e0f6..60c1dca 100644 --- a/hosts/phantom/invidious.nix +++ b/hosts/phantom/invidious.nix @@ -1,12 +1,40 @@ { + inputs, + pkgs, + config, + ... +}: +{ + # Replace with unstable, since 24.05 does not have sig-helper + disabledModules = [ "services/web-apps/invidious.nix" ]; + imports = [ (inputs.nixpkgs-unstable + "/nixos/modules/services/web-apps/invidious.nix") ]; + services.invidious = { enable = true; domain = "invidious.lelgenio.com"; nginx.enable = true; port = 10601; - settings.db = { - user = "invidious"; - dbname = "invidious"; + http3-ytproxy.enable = true; + sig-helper = { + enable = true; + package = pkgs.unstable.inv-sig-helper; + }; + # { + # "visitor_data": "...", + # "po_token": "..." + # } + extraSettingsFile = config.age.secrets.phantom-invidious-settings.path; + settings = { + force_resolve = "ipv6"; + db = { + user = "invidious"; + dbname = "invidious"; + }; }; }; + + age.secrets.phantom-invidious-settings = { + file = ../../secrets/phantom-invidious-settings.age; + mode = "666"; + }; } diff --git a/secrets/phantom-invidious-settings.age b/secrets/phantom-invidious-settings.age new file mode 100644 index 0000000..6ca9077 --- /dev/null +++ b/secrets/phantom-invidious-settings.age @@ -0,0 +1,16 @@ +age-encryption.org/v1 +-> ssh-rsa BwwxHg +iTcgtxF1IxopbtF+aw7V8IQfH7tWiMk9lE/eWlVHVjeaRvER5W6Y3xZNOFCjtbqY +VwEyV6ibfZ4GJt1jRu2icEH/AnLUJFFGQnxu/K/rtoZ3tqSIk9WCBv3aPo4oZRiU +uaaxi2gD8qo1RLyl/Ij7Djw4i/isUOO1EON5sgx1d39k6qUD4Mak0DSU4EtGdTsr +OaxDAc0kAxhxZQOUH/QlKa0HLonaFcy1LHqvttOcw3UZuZnaYfZiPlcqe3USS9cm +96aIC5cS9pHr4JFrqRYvfpla2TY5jlCB/xBGw3KjGEIQoBPXSsJZA6BCMZyp00++ +tdfS2aomt9HFmb1wZDS0jWAxkVF6nXXBbolFVih+58h0nYLljtHIQ3SizRoXY459 +x3JE9NReHp2OO3SlIeO03Kv8YMBvj7nSSd1C1PMpu+hJ/eCXi1WQxD6QY+40muk6 +KhqE3PZ8BCY2b+VpywUF5gVH28mo3jscqAzhf2dZ3SQlzldI+hFyKPxTdAqkfUOH + +--- cinb+wzjVfTkpfm1CtFIFaepwoQVCj1MquB5rAC45Ew + +6 +ZCHS0 7 EX* qb=OwuP ǖѳ/mv2Vī +xv[̂A~evd0ni1қQ"@ٹ{Kp:ϵusB(Xr[QVgT@*B .hE鲟뒭zlz|k`l88McchZ` ?yeo+M-:/**cZD2&Ǣ e*Hn"~+|ua(6J \ No newline at end of file diff --git a/secrets/secrets.nix b/secrets/secrets.nix index 368b837..7b5fdd8 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix @@ -17,4 +17,5 @@ in "phantom-renawiki.age".publicKeys = [ main_ssh_public_key ]; "phantom-forgejo-mailer-password.age".publicKeys = [ main_ssh_public_key ]; "phantom-mastodon-mailer-password.age".publicKeys = [ main_ssh_public_key ]; + "phantom-invidious-settings.age".publicKeys = [ main_ssh_public_key ]; } From 8d85dd15d78c9992b7fb7a089874bad45f96a72d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 27 Sep 2024 20:08:08 -0300 Subject: [PATCH 064/218] phantom: use NAS for syncthing data --- hosts/phantom/hardware-config.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hosts/phantom/hardware-config.nix b/hosts/phantom/hardware-config.nix index 683a684..4df34c8 100644 --- a/hosts/phantom/hardware-config.nix +++ b/hosts/phantom/hardware-config.nix @@ -5,6 +5,12 @@ ... }: { + fileSystems."/var/lib/syncthing-data" = { + device = "172.16.130.7:/nas/5749/syncthinng_data"; + fsType = "nfs"; + options = [ "nofail" ]; + }; + swapDevices = [ { device = "/swap/swapfile"; From f0af06970caf96d0450e59ca99d26050bfdbae72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 27 Sep 2024 20:26:11 -0300 Subject: [PATCH 065/218] phantom: load vpsfreecz configuration from upstream instead of duplicating --- flake.lock | 16 ++++++++ flake.nix | 2 + hosts/phantom/default.nix | 2 +- hosts/phantom/vpsadminos.nix | 76 ------------------------------------ 4 files changed, 19 insertions(+), 77 deletions(-) delete mode 100644 hosts/phantom/vpsadminos.nix diff --git a/flake.lock b/flake.lock index a76aa8d..2df61ec 100644 --- a/flake.lock +++ b/flake.lock @@ -531,6 +531,7 @@ "plymouth-themes": "plymouth-themes", "ranger-icons": "ranger-icons", "tlauncher": "tlauncher", + "vpsadminos": "vpsadminos", "warthunder-leak-counter": "warthunder-leak-counter", "wl-crosshair": "wl-crosshair" } @@ -723,6 +724,21 @@ "type": "github" } }, + "vpsadminos": { + "locked": { + "lastModified": 1727306253, + "narHash": "sha256-PdVXdZvhAqQFALZiACXIjwFRSo0EhEKMm94uxvyFyPk=", + "owner": "vpsfreecz", + "repo": "vpsadminos", + "rev": "bd2b87cbcb75a9e9aa25f76fb7e1f0f625963277", + "type": "github" + }, + "original": { + "owner": "vpsfreecz", + "repo": "vpsadminos", + "type": "github" + } + }, "warthunder-leak-counter": { "inputs": { "crane": "crane_2", diff --git a/flake.nix b/flake.nix index ec2011f..1150434 100644 --- a/flake.nix +++ b/flake.nix @@ -7,6 +7,8 @@ home-manager.url = "github:nix-community/home-manager/release-24.05"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; + vpsadminos.url = "github:vpsfreecz/vpsadminos"; + nix-index-database = { url = "github:Mic92/nix-index-database"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/hosts/phantom/default.nix b/hosts/phantom/default.nix index 6c135d9..ad4c42e 100644 --- a/hosts/phantom/default.nix +++ b/hosts/phantom/default.nix @@ -6,7 +6,7 @@ }: { imports = [ - ./vpsadminos.nix + inputs.vpsadminos.nixosConfigurations.container inputs.agenix.nixosModules.default ../../system/nix.nix ./hardware-config.nix diff --git a/hosts/phantom/vpsadminos.nix b/hosts/phantom/vpsadminos.nix deleted file mode 100644 index 8102fbb..0000000 --- a/hosts/phantom/vpsadminos.nix +++ /dev/null @@ -1,76 +0,0 @@ -# This file provides compatibility for NixOS to run in a container on vpsAdminOS -# hosts. -# -# If you're experiencing issues, try updating this file to the latest version -# from vpsAdminOS repository: -# -# https://github.com/vpsfreecz/vpsadminos/blob/staging/os/lib/nixos-container/vpsadminos.nix - -{ - config, - pkgs, - lib, - ... -}: -with lib; -let - nameservers = [ - "1.1.1.1" - "2606:4700:4700::1111" - ]; -in -{ - networking.nameservers = mkDefault nameservers; - services.resolved = mkDefault { fallbackDns = nameservers; }; - networking.dhcpcd.extraConfig = "noipv4ll"; - - systemd.services.systemd-sysctl.enable = false; - systemd.services.systemd-oomd.enable = false; - systemd.sockets."systemd-journald-audit".enable = false; - systemd.mounts = [ - { - where = "/sys/kernel/debug"; - enable = false; - } - ]; - systemd.services.rpc-gssd.enable = false; - - # Due to our restrictions in /sys, the default systemd-udev-trigger fails - # on accessing PCI devices, etc. Override it to match only network devices. - # In addition, boot.isContainer prevents systemd-udev-trigger.service from - # being enabled at all, so add it explicitly. - systemd.additionalUpstreamSystemUnits = [ "systemd-udev-trigger.service" ]; - systemd.services.systemd-udev-trigger.serviceConfig.ExecStart = [ - "" - "-udevadm trigger --subsystem-match=net --action=add" - ]; - - boot.isContainer = true; - boot.enableContainers = mkDefault true; - boot.loader.initScript.enable = true; - boot.specialFileSystems."/run/keys".fsType = mkForce "tmpfs"; - boot.systemdExecutable = mkDefault "/run/current-system/systemd/lib/systemd/systemd systemd.unified_cgroup_hierarchy=0"; - - # Overrides for - documentation.enable = mkOverride 500 true; - documentation.nixos.enable = mkOverride 500 true; - networking.useHostResolvConf = mkOverride 500 false; - services.openssh.startWhenNeeded = mkOverride 500 false; - - # Bring up the network, /ifcfg.{add,del} are supplied by the vpsAdminOS host - systemd.services.networking-setup = { - description = "Load network configuration provided by the vpsAdminOS host"; - before = [ "network.target" ]; - wantedBy = [ "network.target" ]; - after = [ "network-pre.target" ]; - path = [ pkgs.iproute2 ]; - serviceConfig = { - Type = "oneshot"; - RemainAfterExit = true; - ExecStart = "${pkgs.bash}/bin/bash /ifcfg.add"; - ExecStop = "${pkgs.bash}/bin/bash /ifcfg.del"; - }; - unitConfig.ConditionPathExists = "/ifcfg.add"; - restartIfChanged = false; - }; -} From 653f016b5152f9b27d1f0f02471213a7c1742629 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 27 Sep 2024 21:27:27 -0300 Subject: [PATCH 066/218] home: cleanup unused packages --- user/home.nix | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/user/home.nix b/user/home.nix index 315ea4b..b9fcc4c 100644 --- a/user/home.nix +++ b/user/home.nix @@ -54,9 +54,7 @@ # Let Home Manager install and manage itself. programs.home-manager.enable = true; home.packages = with pkgs; [ - # home-manager - - terminal # see flake.nix + terminal pulse_sink pulseaudio @@ -81,7 +79,6 @@ amdgpu_top inxi dmidecode - ncdu ## text manipulation sd @@ -110,7 +107,6 @@ ## Network speedtest-cli nmap - httpie miniupnpc deluge nicotine-plus @@ -122,7 +118,6 @@ # rustup docker-compose - gnumake mariadb nodePackages.intelephense From 7eedcdcd03fa6d315d72d704cb85acacd70323ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sun, 29 Sep 2024 00:11:28 -0300 Subject: [PATCH 067/218] switch: update switch script --- switch | 5 ++--- user/fish/default.nix | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/switch b/switch index 65782ae..1b114fc 100755 --- a/switch +++ b/switch @@ -4,10 +4,9 @@ nix fmt git --no-pager diff -sudo nice ionice \ - nixos-rebuild \ +nixos-rebuild \ switch \ - --verbose \ + --use-remote-sudo \ --print-build-logs \ --flake .# \ $@ diff --git a/user/fish/default.nix b/user/fish/default.nix index a744d02..30893ee 100644 --- a/user/fish/default.nix +++ b/user/fish/default.nix @@ -36,7 +36,6 @@ in shellAliases = { rm = "trash"; tree = "eza -T"; - kill_yourself = "shutdown now"; }; shellAbbrs = { off = "shutdown now"; @@ -51,7 +50,7 @@ in c = "cargo"; # system sv = "sudo systemct"; - suv = "sudo systemct --user"; + suv = "systemct --user"; # docker abbrs d = "docker"; dc = "docker-compose"; From 0ca0475dd459e248c7f0e1122dca43653237f74f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Mon, 30 Sep 2024 11:49:48 -0300 Subject: [PATCH 068/218] phantom: add docker --- hosts/phantom/default.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/hosts/phantom/default.nix b/hosts/phantom/default.nix index ad4c42e..84b2a5d 100644 --- a/hosts/phantom/default.nix +++ b/hosts/phantom/default.nix @@ -56,6 +56,18 @@ identityPaths = [ "/root/.ssh/id_rsa" ]; }; + virtualisation.docker = { + enable = true; + daemon.settings = { + # needed by bitbucket runner ??? + log-driver = "json-file"; + log-opts = { + max-size = "10m"; + max-file = "3"; + }; + }; + }; + nix.settings = { cores = 1; max-jobs = 1; From 53894b285473957ef13fdd792245cbbb6ec2f9d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Tue, 1 Oct 2024 11:00:26 -0300 Subject: [PATCH 069/218] nixos: workaround for nm-wait-online hanging during nixos switch --- system/configuration.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/system/configuration.nix b/system/configuration.nix index c8095f6..b905240 100644 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -48,6 +48,15 @@ services.geoclue2.enable = true; + # Workaround for nm-wait-online hanging?? + # Ref: https://github.com/NixOS/nixpkgs/issues/180175 + systemd.services.NetworkManager-wait-online = { + serviceConfig.ExecStart = [ + "" + "${pkgs.networkmanager}/bin/nm-online -q" + ]; + }; + systemd.extraConfig = '' DefaultTimeoutStopSec=10s ''; From cfe08e3b20d18531d8d634a9089c75c8b69bf982 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Tue, 1 Oct 2024 10:50:43 -0300 Subject: [PATCH 070/218] pkgs: use upstream kak-tree-sitter --- pkgs/default.nix | 1 - pkgs/kak-tree-sitter.nix | 34 -------------------------------- user/kakoune/default.nix | 2 +- user/kakoune/kak-tree-sitter.nix | 2 +- 4 files changed, 2 insertions(+), 37 deletions(-) delete mode 100644 pkgs/kak-tree-sitter.nix diff --git a/pkgs/default.nix b/pkgs/default.nix index eccb020..1332030 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -9,5 +9,4 @@ rec { emmet-cli = pkgs.callPackage ./emmet-cli.nix { }; material-wifi-icons = pkgs.callPackage ./material-wifi-icons.nix { }; gnome-pass-search-provider = pkgs.callPackage ./gnome-pass-search-provider.nix { }; - kak-tree-sitter = pkgs.callPackage ./kak-tree-sitter.nix { }; } diff --git a/pkgs/kak-tree-sitter.nix b/pkgs/kak-tree-sitter.nix deleted file mode 100644 index 3e3d9d1..0000000 --- a/pkgs/kak-tree-sitter.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ - lib, - stdenv, - rustPlatform, - fetchFromSourcehut, - makeWrapper, -}: - -rustPlatform.buildRustPackage rec { - pname = "kak-tree-sitter"; - version = "1.1.2"; - - src = fetchFromSourcehut { - owner = "~hadronized"; - repo = "kak-tree-sitter"; - rev = "kak-tree-sitter-v${version}"; - hash = "sha256-wBWfSyR8LGtug/mCD0bJ4lbdN3trIA/03AnCxZoEOSA="; - }; - - cargoSha256 = "sha256-OQPUWqJAts8DbFNSsC/CmMCbuZ9TVxRTR05O7oiodKI="; - - nativeBuildInputs = [ makeWrapper ]; - - postFixup = '' - wrapProgram "$out/bin/ktsctl" \ - --suffix PATH : ${stdenv.cc} - ''; - - meta = with lib; { - description = "Server that interfaces tree-sitter with kakoune"; - homepage = "https://git.sr.ht/~hadronized/kak-tree-sitter"; - license = with licenses; [ mit ]; - }; -} diff --git a/user/kakoune/default.nix b/user/kakoune/default.nix index 051f21d..337e007 100644 --- a/user/kakoune/default.nix +++ b/user/kakoune/default.nix @@ -127,7 +127,7 @@ in ranger bmenu kak-lsp - kak-tree-sitter + unstable.kak-tree-sitter kak-pager kak-man-pager diff --git a/user/kakoune/kak-tree-sitter.nix b/user/kakoune/kak-tree-sitter.nix index 8818f1f..59ab3e0 100644 --- a/user/kakoune/kak-tree-sitter.nix +++ b/user/kakoune/kak-tree-sitter.nix @@ -1,7 +1,7 @@ { pkgs, lib, ... }: let hx-src = pkgs.helix.src; - kts-src = pkgs.kak-tree-sitter.src; + kts-src = pkgs.unstable.kak-tree-sitter-unwrapped.src; inherit (pkgs) fetchFromGitHub; in with pkgs.tree-sitter-grammars; From 1fb1bec2247772036bfea4118f33966da89887d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Tue, 1 Oct 2024 11:00:59 -0300 Subject: [PATCH 071/218] pkgs: use upstream blade-formatter --- pkgs/blade-formatter/default.nix | 64 ---------------- pkgs/blade-formatter/package.json | 120 ------------------------------ pkgs/default.nix | 1 - user/home.nix | 2 +- 4 files changed, 1 insertion(+), 186 deletions(-) delete mode 100644 pkgs/blade-formatter/default.nix delete mode 100755 pkgs/blade-formatter/package.json diff --git a/pkgs/blade-formatter/default.nix b/pkgs/blade-formatter/default.nix deleted file mode 100644 index f824066..0000000 --- a/pkgs/blade-formatter/default.nix +++ /dev/null @@ -1,64 +0,0 @@ -{ - lib, - mkYarnPackage, - fetchFromGitHub, - fetchYarnDeps, - testers, - writeText, - runCommand, - blade-formatter, -}: - -mkYarnPackage rec { - pname = "blade-formatter"; - version = "1.38.2"; - - src = fetchFromGitHub { - owner = "shufo"; - repo = pname; - rev = "v${version}"; - hash = "sha256-JvILLw7Yp4g/dSsYtZ2ylmlXfS9t+2KADlBrYOJWTpg="; - }; - - packageJSON = ./package.json; - offlineCache = fetchYarnDeps { - yarnLock = "${src}/yarn.lock"; - hash = "sha256-UFDxw3fYMzSUhZw+TCEh/dN7OioKI75LzKSnEwGPKDA="; - }; - - postBuild = "yarn build"; - - passthru.tests = { - version = testers.testVersion { - package = blade-formatter; - command = "blade-formatter --version"; - }; - - simple = testers.testEqualContents { - assertion = "blade-formatter formats a basic blade file"; - expected = writeText "expected" '' - @if (true) - Hello world! - @endif - ''; - actual = - runCommand "actual" - { - nativeBuildInputs = [ blade-formatter ]; - base = writeText "base" '' - @if( true ) Hello world! @endif - ''; - } - '' - blade-formatter $base > $out - ''; - }; - }; - - meta = with lib; { - description = "Laravel Blade template formatter"; - homepage = "https://github.com/shufo/blade-formatter"; - license = licenses.mit; - maintainers = with maintainers; [ lelgenio ]; - }; -} diff --git a/pkgs/blade-formatter/package.json b/pkgs/blade-formatter/package.json deleted file mode 100755 index b43fa5c..0000000 --- a/pkgs/blade-formatter/package.json +++ /dev/null @@ -1,120 +0,0 @@ -{ - "name": "blade-formatter", - "engines": { - "node": ">= 14.0.0" - }, - "keywords": [ - "php", - "formatter", - "laravel" - ], - "version": "1.38.2", - "description": "An opinionated blade template formatter for Laravel", - "main": "./dist/bundle.cjs", - "types": "./dist/types/main.d.ts", - "type": "module", - "exports": { - ".": { - "import": "./dist/bundle.js", - "require": "./dist/bundle.cjs", - "default": "./dist/bundle.js" - }, - "./*": "./*" - }, - "scripts": { - "build": "cross-env NODE_ENV=production node esbuild.js && cross-env NODE_ENV=production ESM_BUILD=true node esbuild.js", - "prepublish": "tsc src/main.ts --declaration --emitDeclarationOnly --outDir ./dist/types || true", - "watch": "node esbuild.js", - "test": "yarn run build && node --experimental-vm-modules node_modules/.bin/jest", - "lint": "eslint src -c .eslintrc.json --ext ts", - "fix": "prettier {src,__tests__}/**/*.ts --write", - "check_formatted": "prettier **/*.ts -c", - "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0", - "prepare": "husky install", - "bin": "cross-env ./bin/blade-formatter.cjs" - }, - "bin": { - "blade-formatter": "bin/blade-formatter.cjs" - }, - "author": "Shuhei Hayashibara", - "license": "MIT", - "dependencies": { - "@prettier/plugin-php": "^0.19.7", - "@shufo/tailwindcss-class-sorter": "3.0.1", - "aigle": "^1.14.1", - "ajv": "^8.9.0", - "chalk": "^4.1.0", - "concat-stream": "^2.0.0", - "detect-indent": "^6.0.0", - "find-config": "^1.0.0", - "glob": "^8.0.1", - "html-attribute-sorter": "^0.4.3", - "ignore": "^5.1.8", - "js-beautify": "^1.14.8", - "lodash": "^4.17.19", - "php-parser": "3.1.5", - "prettier": "^2.2.0", - "tailwindcss": "^3.1.8", - "vscode-oniguruma": "1.7.0", - "vscode-textmate": "^7.0.1", - "xregexp": "^5.0.1", - "yargs": "^17.3.1" - }, - "devDependencies": { - "@babel/core": "^7.6.4", - "@babel/plugin-transform-modules-commonjs": "^7.16.5", - "@babel/preset-env": "^7.13.12", - "@babel/preset-typescript": "^7.16.5", - "@types/concat-stream": "^2.0.0", - "@types/find-config": "^1.0.1", - "@types/fs-extra": "^11.0.0", - "@types/glob": "^8.0.0", - "@types/jest": "^29.0.0", - "@types/js-beautify": "^1.13.3", - "@types/lodash": "^4.14.178", - "@types/mocha": "^10.0.0", - "@types/node": "^18.0.0", - "@types/xregexp": "^4.4.0", - "@typescript-eslint/eslint-plugin": "^5.8.1", - "@typescript-eslint/parser": "^5.8.1", - "app-root-path": "^3.0.0", - "babel-jest": "^29.0.0", - "codecov": "^3.8.3", - "cross-env": "^7.0.3", - "esbuild": "^0.19.0", - "esbuild-node-externals": "^1.4.1", - "eslint": "^8.5.0", - "eslint-config-airbnb-base": "^15.0.0", - "eslint-config-airbnb-typescript": "^17.0.0", - "eslint-config-prettier": "^9.0.0", - "eslint-import-resolver-typescript": "^3.0.0", - "eslint-plugin-import": "^2.25.3", - "eslint-plugin-jest": "^26.0.0", - "eslint-plugin-prettier": "^5.0.0", - "fs-extra": "^11.0.0", - "husky": "^8.0.0", - "jest": "^29.0.0", - "lint-staged": ">=10", - "source-map-loader": "^4.0.0", - "ts-jest": "^29.0.0", - "ts-loader": "^9.2.6", - "ts-migrate": "^0.1.27", - "ts-node": "^10.4.0", - "typescript": "^5.0.0" - }, - "repository": { - "type": "git", - "url": "https://github.com/shufo/blade-formatter.git" - }, - "files": [ - "dist", - "src", - "bin", - "wasm", - "syntaxes", - "CHANGELOG.md" - ], - "lint-staged": { - "*.ts": "yarn run fix" - } -} diff --git a/pkgs/default.nix b/pkgs/default.nix index 1332030..b3f1b79 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -3,7 +3,6 @@ { pkgs, inputs }: rec { - blade-formatter = pkgs.callPackage ./blade-formatter { }; cargo-checkmate = pkgs.callPackage ./cargo-checkmate.nix { }; lipsum = pkgs.callPackage ./lipsum.nix { }; emmet-cli = pkgs.callPackage ./emmet-cli.nix { }; diff --git a/user/home.nix b/user/home.nix index b9fcc4c..aef10ad 100644 --- a/user/home.nix +++ b/user/home.nix @@ -127,7 +127,7 @@ clang-tools # c/c++ lsp server rust-analyzer # rust analyzer - blade-formatter + unstable.blade-formatter nixfmt-rfc-style ]; From 9eaabe5146bff6c9515654262002ca6691b53183 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Tue, 1 Oct 2024 10:46:58 -0300 Subject: [PATCH 072/218] update --- flake.lock | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/flake.lock b/flake.lock index 2df61ec..b031598 100644 --- a/flake.lock +++ b/flake.lock @@ -176,11 +176,11 @@ ] }, "locked": { - "lastModified": 1726590912, - "narHash": "sha256-5bxY85siOIqOcQ8TOMAWLkMUZvLUADS2i5TsZhzUIZY=", + "lastModified": 1727531434, + "narHash": "sha256-b+GBgCWd2N6pkiTkRZaMFOPztPO4IVTaclYPrQl2uLk=", "owner": "nix-community", "repo": "disko", - "rev": "d32d1504c77d7f6ba7e033357dcf638baceab9b7", + "rev": "b709e1cc33fcde71c7db43850a55ebe6449d0959", "type": "github" }, "original": { @@ -393,11 +393,11 @@ ] }, "locked": { - "lastModified": 1726592409, - "narHash": "sha256-2Y6CDvD/BD43WLS77PHu6dUHbdUfFhuzkY8oJAecD/U=", + "lastModified": 1726989464, + "narHash": "sha256-Vl+WVTJwutXkimwGprnEtXc/s/s8sMuXzqXaspIGlwM=", "owner": "nix-community", "repo": "home-manager", - "rev": "2ab00f89dd3ecf8012f5090e6d7ca1a7ea30f594", + "rev": "2f23fa308a7c067e52dfcc30a0758f47043ec176", "type": "github" }, "original": { @@ -414,11 +414,11 @@ ] }, "locked": { - "lastModified": 1726449931, - "narHash": "sha256-1AX7MyYzP7sNgZiGF8jwehCCI75y2kBGwACeryJs+yE=", + "lastModified": 1727658919, + "narHash": "sha256-YAePt2GldkkRJ08LvZNHcuS6shIVStj+K+1DZN3gbnM=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "c1b0fa0bec5478185eae2fd3f39b9e906fc83995", + "rev": "f9fdf8285690a351e8998f1e703ebdf9cdf51dee", "type": "github" }, "original": { @@ -456,11 +456,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1726447378, - "narHash": "sha256-2yV8nmYE1p9lfmLHhOCbYwQC/W8WYfGQABoGzJOb1JQ=", + "lastModified": 1727540905, + "narHash": "sha256-40J9tW7Y794J7Uw4GwcAKlMxlX2xISBl6IBigo83ih8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "086b448a5d54fd117f4dc2dee55c9f0ff461bdc1", + "rev": "fbca5e745367ae7632731639de5c21f29c8744ed", "type": "github" }, "original": { @@ -471,11 +471,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1726937504, - "narHash": "sha256-bvGoiQBvponpZh8ClUcmJ6QnsNKw0EMrCQJARK3bI1c=", + "lastModified": 1727634051, + "narHash": "sha256-S5kVU7U82LfpEukbn/ihcyNt2+EvG7Z5unsKW9H/yFA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9357f4f23713673f310988025d9dc261c20e70c6", + "rev": "06cf0e1da4208d3766d898b7fdab6513366d45b9", "type": "github" }, "original": { From 531bf80cf2ffb05529e7713e6b5f8d7f0ffa6c7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 2 Oct 2024 10:57:45 -0300 Subject: [PATCH 073/218] update dzgui --- flake.lock | 24 +++--------------------- flake.nix | 2 +- system/steam.nix | 1 - 3 files changed, 4 insertions(+), 23 deletions(-) diff --git a/flake.lock b/flake.lock index b031598..6b892ec 100644 --- a/flake.lock +++ b/flake.lock @@ -189,40 +189,22 @@ "type": "github" } }, - "dzgui": { - "flake": false, - "locked": { - "lastModified": 1702780245, - "narHash": "sha256-cdW5LN2Q7eYW8xIqKPQfeYPd7e6VdJGaoA9NMHesCrE=", - "owner": "aclist", - "repo": "dztui", - "rev": "28323f3edb8fa747dc559d1939ccdd7729e4e3a1", - "type": "github" - }, - "original": { - "owner": "aclist", - "repo": "dztui", - "type": "github" - } - }, "dzgui-nix": { "inputs": { - "dzgui": "dzgui", "nixpkgs": [ "nixpkgs" ] }, "locked": { - "lastModified": 1702850463, - "narHash": "sha256-qR/c/GjsLUzrCyHN/Q9nnClduf6OqTg26S1AFYKPzxA=", + "lastModified": 1727831626, + "narHash": "sha256-Gvt5lapgNRRTL95gFH8vm48f8gjsk7GYM4Qo5aUOzzo=", "owner": "lelgenio", "repo": "dzgui-nix", - "rev": "2ed6515b27d8186b9fedfe1dcaf861f07e796a0d", + "rev": "38cf2b507d75cc36ec127b21fc5a4144fc821525", "type": "github" }, "original": { "owner": "lelgenio", - "ref": "dzgui-4.1.0", "repo": "dzgui-nix", "type": "github" } diff --git a/flake.nix b/flake.nix index 1150434..594ceda 100644 --- a/flake.nix +++ b/flake.nix @@ -33,7 +33,7 @@ }; dzgui-nix = { - url = "github:lelgenio/dzgui-nix/dzgui-4.1.0"; + url = "github:lelgenio/dzgui-nix"; inputs.nixpkgs.follows = "nixpkgs"; }; diff --git a/system/steam.nix b/system/steam.nix index 8b764d0..1d8b412 100644 --- a/system/steam.nix +++ b/system/steam.nix @@ -34,5 +34,4 @@ ]; programs.dzgui.enable = true; - programs.dzgui.package = inputs.dzgui-nix.packages.${pkgs.system}.default; } From 63953f0e3d2d3d7730501566baf5aac6cbb68526 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 4 Oct 2024 12:34:04 -0300 Subject: [PATCH 074/218] update --- flake.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/flake.lock b/flake.lock index 6b892ec..36c8be4 100644 --- a/flake.lock +++ b/flake.lock @@ -176,11 +176,11 @@ ] }, "locked": { - "lastModified": 1727531434, - "narHash": "sha256-b+GBgCWd2N6pkiTkRZaMFOPztPO4IVTaclYPrQl2uLk=", + "lastModified": 1727977578, + "narHash": "sha256-DBORKcmQ7ZjA4qE1MsnF1MmZSokOGrw4W9vTCioOv2U=", "owner": "nix-community", "repo": "disko", - "rev": "b709e1cc33fcde71c7db43850a55ebe6449d0959", + "rev": "574400001b3ffe555c7a21e0ff846230759be2ed", "type": "github" }, "original": { @@ -438,11 +438,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1727540905, - "narHash": "sha256-40J9tW7Y794J7Uw4GwcAKlMxlX2xISBl6IBigo83ih8=", + "lastModified": 1727907660, + "narHash": "sha256-QftbyPoieM5M50WKUMzQmWtBWib/ZJbHo7mhj5riQec=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "fbca5e745367ae7632731639de5c21f29c8744ed", + "rev": "5966581aa04be7eff830b9e1457d56dc70a0b798", "type": "github" }, "original": { @@ -453,11 +453,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1727634051, - "narHash": "sha256-S5kVU7U82LfpEukbn/ihcyNt2+EvG7Z5unsKW9H/yFA=", + "lastModified": 1727802920, + "narHash": "sha256-HP89HZOT0ReIbI7IJZJQoJgxvB2Tn28V6XS3MNKnfLs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "06cf0e1da4208d3766d898b7fdab6513366d45b9", + "rev": "27e30d177e57d912d614c88c622dcfdb2e6e6515", "type": "github" }, "original": { @@ -708,11 +708,11 @@ }, "vpsadminos": { "locked": { - "lastModified": 1727306253, - "narHash": "sha256-PdVXdZvhAqQFALZiACXIjwFRSo0EhEKMm94uxvyFyPk=", + "lastModified": 1727870662, + "narHash": "sha256-YWXD5ye8keD/RRXucTE7zlx+UcrXLMMJJMEF+habAA8=", "owner": "vpsfreecz", "repo": "vpsadminos", - "rev": "bd2b87cbcb75a9e9aa25f76fb7e1f0f625963277", + "rev": "28237ec2fae4502f4e96a9b801b182631de4360d", "type": "github" }, "original": { From 41fe2f92ea2158b8c95a4b100033eb3fb7310254 Mon Sep 17 00:00:00 2001 From: lelgenio Date: Fri, 4 Oct 2024 14:34:45 -0300 Subject: [PATCH 075/218] rainbow: disable docker gitlab runner --- system/rainbow-gitlab-runner.nix | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/system/rainbow-gitlab-runner.nix b/system/rainbow-gitlab-runner.nix index aa177de..3230c8b 100644 --- a/system/rainbow-gitlab-runner.nix +++ b/system/rainbow-gitlab-runner.nix @@ -14,18 +14,6 @@ in enable = true; settings.concurrent = 1; services = { - # ci_test = { - # registrationConfigFile = "/srv/gitlab-runner/env/ci_test"; - # dockerImage = "debian"; - # dockerPrivileged = true; - # }; - thoreb_builder = { - registrationConfigFile = - config.age.secrets.rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.path; - dockerImage = "debian"; - dockerPrivileged = true; - }; - thoreb-telemetria-nix = mkNixRunner config.age.secrets.gitlab-runner-thoreb-telemetria-registrationConfigFile.path; thoreb-itinerario-nix = mkNixRunner config.age.secrets.rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.path; }; From 3c980261334a7e252082e26609c221c260c1816b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 5 Oct 2024 10:50:17 -0300 Subject: [PATCH 076/218] goofs --- flake.lock | 34 ++++++++++++++++++++++++++++++++++ flake.nix | 8 ++++++++ hosts/phantom/default.nix | 1 + hosts/phantom/goofs.nix | 13 +++++++++++++ 4 files changed, 56 insertions(+) create mode 100644 hosts/phantom/goofs.nix diff --git a/flake.lock b/flake.lock index 36c8be4..6383872 100644 --- a/flake.lock +++ b/flake.lock @@ -57,6 +57,22 @@ "type": "gitlab" } }, + "catboy-spinner": { + "flake": false, + "locked": { + "lastModified": 1728098748, + "narHash": "sha256-FHM/a+wqctmg1LXf/XB6TcXowL0Wzbq1kSCGVnxGgL8=", + "ref": "refs/heads/main", + "rev": "c6fc11b0900826508f6a766c65cf92e0c7c4eab9", + "revCount": 4, + "type": "git", + "url": "https://git.lelgenio.com/lelgenio/catboy-spinner" + }, + "original": { + "type": "git", + "url": "https://git.lelgenio.com/lelgenio/catboy-spinner" + } + }, "crane": { "inputs": { "flake-compat": "flake-compat", @@ -501,6 +517,7 @@ "root": { "inputs": { "agenix": "agenix", + "catboy-spinner": "catboy-spinner", "demoji": "demoji", "dhist": "dhist", "disko": "disko", @@ -513,6 +530,7 @@ "plymouth-themes": "plymouth-themes", "ranger-icons": "ranger-icons", "tlauncher": "tlauncher", + "tomater": "tomater", "vpsadminos": "vpsadminos", "warthunder-leak-counter": "warthunder-leak-counter", "wl-crosshair": "wl-crosshair" @@ -688,6 +706,22 @@ "url": "https://git.lelgenio.xyz/lelgenio/tlauncher-nix" } }, + "tomater": { + "flake": false, + "locked": { + "lastModified": 1728089744, + "narHash": "sha256-WOz/qUKyao7lM2qcwqqcJDw4jI8mUJL6kNUNm0sxPKk=", + "ref": "refs/heads/main", + "rev": "efff561c745514a7874e3f5de95307a74efc7df9", + "revCount": 1, + "type": "git", + "url": "https://git.lelgenio.com/lelgenio/tomater" + }, + "original": { + "type": "git", + "url": "https://git.lelgenio.com/lelgenio/tomater" + } + }, "utils": { "inputs": { "systems": "systems_4" diff --git a/flake.nix b/flake.nix index 594ceda..a07cd8c 100644 --- a/flake.nix +++ b/flake.nix @@ -62,6 +62,14 @@ url = "git+https://git.lelgenio.com/lelgenio/warthunder-leak-counter"; inputs.nixpkgs.follows = "nixpkgs"; }; + catboy-spinner = { + url = "git+https://git.lelgenio.com/lelgenio/catboy-spinner"; + flake = false; + }; + tomater = { + url = "git+https://git.lelgenio.com/lelgenio/tomater"; + flake = false; + }; }; outputs = inputs: diff --git a/hosts/phantom/default.nix b/hosts/phantom/default.nix index 84b2a5d..a057af7 100644 --- a/hosts/phantom/default.nix +++ b/hosts/phantom/default.nix @@ -21,6 +21,7 @@ ./warthunder-leak-counter.nix ./invidious.nix ./davi.nix + ./goofs.nix ]; networking.hostName = "phantom"; diff --git a/hosts/phantom/goofs.nix b/hosts/phantom/goofs.nix new file mode 100644 index 0000000..1629ab5 --- /dev/null +++ b/hosts/phantom/goofs.nix @@ -0,0 +1,13 @@ +{ inputs, ... }: +{ + services.nginx.virtualHosts."catboy-spinner.lelgenio.com" = { + enableACME = true; + forceSSL = true; + root = inputs.catboy-spinner; + }; + services.nginx.virtualHosts."tomater.lelgenio.com" = { + enableACME = true; + forceSSL = true; + root = inputs.tomater; + }; +} From 576d276c13a130f2c0915380a40b52a6cef96872 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 5 Oct 2024 14:10:33 -0300 Subject: [PATCH 077/218] forgejo: enable push to create --- hosts/phantom/forgejo.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hosts/phantom/forgejo.nix b/hosts/phantom/forgejo.nix index 2693ff4..dbb63d3 100644 --- a/hosts/phantom/forgejo.nix +++ b/hosts/phantom/forgejo.nix @@ -27,6 +27,9 @@ in ENABLED = true; DEFAULT_ACTIONS_URL = "github"; }; + repository = { + ENABLE_PUSH_CREATE_USER = true; + }; server = { DOMAIN = "git.lelgenio.com"; HTTP_PORT = 3000; From 28f47361a0e1a76f82f043a27fd8cee2e54d6144 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 5 Oct 2024 14:11:33 -0300 Subject: [PATCH 078/218] add goofs --- flake.lock | 89 ++++++++++++++++++++++++++++++++++++++--- flake.nix | 4 ++ hosts/phantom/goofs.nix | 25 +++++++++++- 3 files changed, 111 insertions(+), 7 deletions(-) diff --git a/flake.lock b/flake.lock index 6383872..0d88871 100644 --- a/flake.lock +++ b/flake.lock @@ -98,6 +98,27 @@ } }, "crane_2": { + "inputs": { + "nixpkgs": [ + "made-you-look", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1718730147, + "narHash": "sha256-QmD6B6FYpuoCqu6ZuPJH896ItNquDkn0ulQlOn4ykN8=", + "owner": "ipetkov", + "repo": "crane", + "rev": "32c21c29b034d0a93fdb2379d6fabc40fc3d0e6c", + "type": "github" + }, + "original": { + "owner": "ipetkov", + "repo": "crane", + "type": "github" + } + }, + "crane_3": { "inputs": { "nixpkgs": [ "warthunder-leak-counter", @@ -332,7 +353,7 @@ }, "flake-utils_4": { "inputs": { - "systems": "systems_5" + "systems": "systems_4" }, "locked": { "lastModified": 1681202837, @@ -370,6 +391,24 @@ "inputs": { "systems": "systems_7" }, + "locked": { + "lastModified": 1681202837, + "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "cfacdce06f30d2b68473a46042957675eebb3401", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_7": { + "inputs": { + "systems": "systems_8" + }, "locked": { "lastModified": 1710146030, "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", @@ -405,6 +444,28 @@ "type": "github" } }, + "made-you-look": { + "inputs": { + "crane": "crane_2", + "flake-utils": "flake-utils_4", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1728148016, + "narHash": "sha256-63w9Nt1bt2l7HSGHca99rcDXsk8giISsWlRhiEp1XtY=", + "ref": "refs/heads/main", + "rev": "acd877886420f4e0b00af1548a6cbda8dc89632f", + "revCount": 2, + "type": "git", + "url": "https://git.lelgenio.com/lelgenio/made-you-look" + }, + "original": { + "type": "git", + "url": "https://git.lelgenio.com/lelgenio/made-you-look" + } + }, "nix-index-database": { "inputs": { "nixpkgs": [ @@ -523,6 +584,7 @@ "disko": "disko", "dzgui-nix": "dzgui-nix", "home-manager": "home-manager", + "made-you-look": "made-you-look", "nix-index-database": "nix-index-database", "nixos-mailserver": "nixos-mailserver", "nixpkgs": "nixpkgs", @@ -685,9 +747,24 @@ "type": "github" } }, + "systems_8": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "tlauncher": { "inputs": { - "flake-utils": "flake-utils_4", + "flake-utils": "flake-utils_5", "nixpkgs": [ "nixpkgs" ] @@ -724,7 +801,7 @@ }, "utils": { "inputs": { - "systems": "systems_4" + "systems": "systems_5" }, "locked": { "lastModified": 1709126324, @@ -757,8 +834,8 @@ }, "warthunder-leak-counter": { "inputs": { - "crane": "crane_2", - "flake-utils": "flake-utils_5", + "crane": "crane_3", + "flake-utils": "flake-utils_6", "nixpkgs": [ "nixpkgs" ] @@ -779,7 +856,7 @@ }, "wl-crosshair": { "inputs": { - "flake-utils": "flake-utils_6", + "flake-utils": "flake-utils_7", "nixpkgs": [ "nixpkgs" ] diff --git a/flake.nix b/flake.nix index a07cd8c..652aa6c 100644 --- a/flake.nix +++ b/flake.nix @@ -62,6 +62,10 @@ url = "git+https://git.lelgenio.com/lelgenio/warthunder-leak-counter"; inputs.nixpkgs.follows = "nixpkgs"; }; + made-you-look = { + url = "git+https://git.lelgenio.com/lelgenio/made-you-look"; + inputs.nixpkgs.follows = "nixpkgs"; + }; catboy-spinner = { url = "git+https://git.lelgenio.com/lelgenio/catboy-spinner"; flake = false; diff --git a/hosts/phantom/goofs.nix b/hosts/phantom/goofs.nix index 1629ab5..771904b 100644 --- a/hosts/phantom/goofs.nix +++ b/hosts/phantom/goofs.nix @@ -1,5 +1,28 @@ -{ inputs, ... }: +{ inputs, config, ... }: { + imports = [ + inputs.warthunder-leak-counter.nixosModules.default + inputs.made-you-look.nixosModules.default + ]; + + services.warthunder-leak-counter.enable = true; + services.nginx.virtualHosts."warthunder-leak-counter.lelgenio.com" = { + enableACME = true; + forceSSL = true; + locations."/" = { + proxyPass = "http://127.0.0.1:${toString config.services.warthunder-leak-counter.port}"; + }; + }; + + services.made-you-look.enable = true; + services.nginx.virtualHosts."coolest-thing-ever.lelgenio.com" = { + enableACME = true; + forceSSL = true; + locations."/" = { + proxyPass = "http://127.0.0.1:${toString config.services.made-you-look.port}"; + }; + }; + services.nginx.virtualHosts."catboy-spinner.lelgenio.com" = { enableACME = true; forceSSL = true; From d49b17879d2e46db898f5b0260b747c8afb2e460 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 5 Oct 2024 17:26:45 -0300 Subject: [PATCH 079/218] update goofs --- flake.lock | 45 ++++++++++++++++------- flake.nix | 4 ++ hosts/phantom/default.nix | 1 - hosts/phantom/goofs.nix | 5 +++ hosts/phantom/warthunder-leak-counter.nix | 19 ---------- 5 files changed, 40 insertions(+), 34 deletions(-) delete mode 100644 hosts/phantom/warthunder-leak-counter.nix diff --git a/flake.lock b/flake.lock index 0d88871..c7313d6 100644 --- a/flake.lock +++ b/flake.lock @@ -213,11 +213,11 @@ ] }, "locked": { - "lastModified": 1727977578, - "narHash": "sha256-DBORKcmQ7ZjA4qE1MsnF1MmZSokOGrw4W9vTCioOv2U=", + "lastModified": 1728109432, + "narHash": "sha256-wmbErh8FG7dRKOtMMpHUqDtFjeqt9Zjx4zssSeTalwU=", "owner": "nix-community", "repo": "disko", - "rev": "574400001b3ffe555c7a21e0ff846230759be2ed", + "rev": "48ebb577855fb2398653f033b3b2208a9249203d", "type": "github" }, "original": { @@ -453,11 +453,11 @@ ] }, "locked": { - "lastModified": 1728148016, - "narHash": "sha256-63w9Nt1bt2l7HSGHca99rcDXsk8giISsWlRhiEp1XtY=", + "lastModified": 1728159958, + "narHash": "sha256-r/h/ch70KfOQ8moftDhHagu3WajglaqU+hrEzUtTM1Y=", "ref": "refs/heads/main", - "rev": "acd877886420f4e0b00af1548a6cbda8dc89632f", - "revCount": 2, + "rev": "96e978aa2f414d4b92b78e7ae975d7ff7db95a91", + "revCount": 3, "type": "git", "url": "https://git.lelgenio.com/lelgenio/made-you-look" }, @@ -515,11 +515,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1727907660, - "narHash": "sha256-QftbyPoieM5M50WKUMzQmWtBWib/ZJbHo7mhj5riQec=", + "lastModified": 1728067476, + "narHash": "sha256-/uJcVXuBt+VFCPQIX+4YnYrHaubJSx4HoNsJVNRgANM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5966581aa04be7eff830b9e1457d56dc70a0b798", + "rev": "6e6b3dd395c3b1eb9be9f2d096383a8d05add030", "type": "github" }, "original": { @@ -530,11 +530,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1727802920, - "narHash": "sha256-HP89HZOT0ReIbI7IJZJQoJgxvB2Tn28V6XS3MNKnfLs=", + "lastModified": 1728018373, + "narHash": "sha256-NOiTvBbRLIOe5F6RbHaAh6++BNjsb149fGZd1T4+KBg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "27e30d177e57d912d614c88c622dcfdb2e6e6515", + "rev": "bc947f541ae55e999ffdb4013441347d83b00feb", "type": "github" }, "original": { @@ -595,7 +595,8 @@ "tomater": "tomater", "vpsadminos": "vpsadminos", "warthunder-leak-counter": "warthunder-leak-counter", - "wl-crosshair": "wl-crosshair" + "wl-crosshair": "wl-crosshair", + "youre-wrong": "youre-wrong" } }, "rust-analyzer-src": { @@ -874,6 +875,22 @@ "repo": "wl-crosshair", "type": "github" } + }, + "youre-wrong": { + "flake": false, + "locked": { + "lastModified": 1728148764, + "narHash": "sha256-JhYA4YBS9Cpm4i80KK95Fg6doZhdydZ4W/bEG1M1FJU=", + "ref": "refs/heads/main", + "rev": "b206caa7b7efbd2d4b68d3a8fc50c224f6629d39", + "revCount": 1, + "type": "git", + "url": "https://git.lelgenio.com/lelgenio/youre-wrong" + }, + "original": { + "type": "git", + "url": "https://git.lelgenio.com/lelgenio/youre-wrong" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 652aa6c..7c5709b 100644 --- a/flake.nix +++ b/flake.nix @@ -74,6 +74,10 @@ url = "git+https://git.lelgenio.com/lelgenio/tomater"; flake = false; }; + youre-wrong = { + url = "git+https://git.lelgenio.com/lelgenio/youre-wrong"; + flake = false; + }; }; outputs = inputs: diff --git a/hosts/phantom/default.nix b/hosts/phantom/default.nix index a057af7..e5570ee 100644 --- a/hosts/phantom/default.nix +++ b/hosts/phantom/default.nix @@ -18,7 +18,6 @@ ./writefreely.nix ./email.nix ./forgejo.nix - ./warthunder-leak-counter.nix ./invidious.nix ./davi.nix ./goofs.nix diff --git a/hosts/phantom/goofs.nix b/hosts/phantom/goofs.nix index 771904b..8eb7f69 100644 --- a/hosts/phantom/goofs.nix +++ b/hosts/phantom/goofs.nix @@ -33,4 +33,9 @@ forceSSL = true; root = inputs.tomater; }; + services.nginx.virtualHosts."youre-wrong.lelgenio.com" = { + enableACME = true; + forceSSL = true; + root = inputs.youre-wrong; + }; } diff --git a/hosts/phantom/warthunder-leak-counter.nix b/hosts/phantom/warthunder-leak-counter.nix deleted file mode 100644 index acdbc0b..0000000 --- a/hosts/phantom/warthunder-leak-counter.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ - inputs, - pkgs, - config, - ... -}: -{ - imports = [ inputs.warthunder-leak-counter.nixosModules.default ]; - - services.warthunder-leak-counter.enable = true; - - services.nginx.virtualHosts."warthunder-leak-counter.lelgenio.com" = { - enableACME = true; - forceSSL = true; - locations."/" = { - proxyPass = "http://127.0.0.1:${toString config.services.warthunder-leak-counter.port}"; - }; - }; -} From 55ab02f3cef42fd948f67ff235222b92e28b8d82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sun, 6 Oct 2024 12:21:54 -0300 Subject: [PATCH 080/218] update youre-wrong --- flake.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/flake.lock b/flake.lock index c7313d6..4bb7f11 100644 --- a/flake.lock +++ b/flake.lock @@ -879,11 +879,11 @@ "youre-wrong": { "flake": false, "locked": { - "lastModified": 1728148764, - "narHash": "sha256-JhYA4YBS9Cpm4i80KK95Fg6doZhdydZ4W/bEG1M1FJU=", + "lastModified": 1728228087, + "narHash": "sha256-W40rQbQAo3lGrKlfenSA8JaGwZMSx/X4lP71enQtK7Y=", "ref": "refs/heads/main", - "rev": "b206caa7b7efbd2d4b68d3a8fc50c224f6629d39", - "revCount": 1, + "rev": "64e7876233e99ad7223cae29688374a1c1ff569a", + "revCount": 2, "type": "git", "url": "https://git.lelgenio.com/lelgenio/youre-wrong" }, From 35ce459191079553bf24d409b1db15408bad9441 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sun, 6 Oct 2024 13:35:13 -0300 Subject: [PATCH 081/218] add hello-fonts --- flake.lock | 17 +++++++++++++++++ flake.nix | 4 ++++ hosts/phantom/goofs.nix | 5 +++++ 3 files changed, 26 insertions(+) diff --git a/flake.lock b/flake.lock index 4bb7f11..c006e3e 100644 --- a/flake.lock +++ b/flake.lock @@ -423,6 +423,22 @@ "type": "github" } }, + "hello-fonts": { + "flake": false, + "locked": { + "lastModified": 1728232065, + "narHash": "sha256-1DUW1YqZALPFxBM7HYcNZiCZQvMqUiJ1m04NU4IIe3I=", + "ref": "refs/heads/main", + "rev": "10f7485fea930bb45e97fbda0cd68f199a7e8f59", + "revCount": 1, + "type": "git", + "url": "https://git.lelgenio.com/lelgenio/hello-fonts" + }, + "original": { + "type": "git", + "url": "https://git.lelgenio.com/lelgenio/hello-fonts" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -583,6 +599,7 @@ "dhist": "dhist", "disko": "disko", "dzgui-nix": "dzgui-nix", + "hello-fonts": "hello-fonts", "home-manager": "home-manager", "made-you-look": "made-you-look", "nix-index-database": "nix-index-database", diff --git a/flake.nix b/flake.nix index 7c5709b..dbbf16e 100644 --- a/flake.nix +++ b/flake.nix @@ -78,6 +78,10 @@ url = "git+https://git.lelgenio.com/lelgenio/youre-wrong"; flake = false; }; + hello-fonts = { + url = "git+https://git.lelgenio.com/lelgenio/hello-fonts"; + flake = false; + }; }; outputs = inputs: diff --git a/hosts/phantom/goofs.nix b/hosts/phantom/goofs.nix index 8eb7f69..c0b670a 100644 --- a/hosts/phantom/goofs.nix +++ b/hosts/phantom/goofs.nix @@ -38,4 +38,9 @@ forceSSL = true; root = inputs.youre-wrong; }; + services.nginx.virtualHosts."hello-fonts.lelgenio.com" = { + enableACME = true; + forceSSL = true; + root = inputs.hello-fonts; + }; } From 44eb8af347c634a9a4d19d42ca606f0243bb920d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Tue, 8 Oct 2024 19:03:16 -0300 Subject: [PATCH 082/218] update --- flake.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/flake.lock b/flake.lock index c006e3e..5e74698 100644 --- a/flake.lock +++ b/flake.lock @@ -213,11 +213,11 @@ ] }, "locked": { - "lastModified": 1728109432, - "narHash": "sha256-wmbErh8FG7dRKOtMMpHUqDtFjeqt9Zjx4zssSeTalwU=", + "lastModified": 1728334376, + "narHash": "sha256-CTKEKPzD/j8FK6H4DO3EjyixZd3HHvgAgfnCwpGFP5c=", "owner": "nix-community", "repo": "disko", - "rev": "48ebb577855fb2398653f033b3b2208a9249203d", + "rev": "d39ee334984fcdae6244f5a8e6ab857479cbaefe", "type": "github" }, "original": { @@ -489,11 +489,11 @@ ] }, "locked": { - "lastModified": 1727658919, - "narHash": "sha256-YAePt2GldkkRJ08LvZNHcuS6shIVStj+K+1DZN3gbnM=", + "lastModified": 1728263287, + "narHash": "sha256-GJDtsxz2/zw6g/Nrp4XVWBS5IaZ7ZUkuvxPOBEDe7pg=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "f9fdf8285690a351e8998f1e703ebdf9cdf51dee", + "rev": "5fce10c871bab6d7d5ac9e5e7efbb3a2783f5259", "type": "github" }, "original": { @@ -531,11 +531,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1728067476, - "narHash": "sha256-/uJcVXuBt+VFCPQIX+4YnYrHaubJSx4HoNsJVNRgANM=", + "lastModified": 1728193676, + "narHash": "sha256-PbDWAIjKJdlVg+qQRhzdSor04bAPApDqIv2DofTyynk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "6e6b3dd395c3b1eb9be9f2d096383a8d05add030", + "rev": "ecbc1ca8ffd6aea8372ad16be9ebbb39889e55b6", "type": "github" }, "original": { @@ -837,11 +837,11 @@ }, "vpsadminos": { "locked": { - "lastModified": 1727870662, - "narHash": "sha256-YWXD5ye8keD/RRXucTE7zlx+UcrXLMMJJMEF+habAA8=", + "lastModified": 1728335559, + "narHash": "sha256-95/KJBA449oAjf6bLwaCvDgys7yE8vKXY3wHe/uUkiw=", "owner": "vpsfreecz", "repo": "vpsadminos", - "rev": "28237ec2fae4502f4e96a9b801b182631de4360d", + "rev": "c928bdec26484e99621cc76cb165abb73aa7d029", "type": "github" }, "original": { From 8273c5898061e0ab3539155f77be1fe5aae8430d Mon Sep 17 00:00:00 2001 From: lelgenio Date: Wed, 9 Oct 2024 17:36:43 -0300 Subject: [PATCH 083/218] sway: disable acceleration for all pointers --- user/sway/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user/sway/default.nix b/user/sway/default.nix index 2a6dc70..6679134 100644 --- a/user/sway/default.nix +++ b/user/sway/default.nix @@ -81,7 +81,7 @@ in # Ignore PS4 controller touchpad events input."1356:2508:Wireless_Controller_Touchpad".events = "disabled"; - input."1133:16537:Logitech_G502_X_PLUS" = { + input."type:pointer" = { accel_profile = "flat"; pointer_accel = "0"; }; From 4d6d6357e385319451af0326ddceadf30c2771c1 Mon Sep 17 00:00:00 2001 From: lelgenio Date: Wed, 9 Oct 2024 17:37:06 -0300 Subject: [PATCH 084/218] rainbow: add swap --- hosts/double-rainbow.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosts/double-rainbow.nix b/hosts/double-rainbow.nix index e33b612..4c8636a 100644 --- a/hosts/double-rainbow.nix +++ b/hosts/double-rainbow.nix @@ -44,7 +44,7 @@ in fsType = "vfat"; }; - swapDevices = [ ]; + swapDevices = [ { device = "/swapfile"; } ]; services.udev.extraRules = '' # Force all disks to use mq-deadline scheduler From 62379e3a626d1c27310144afba8297a26a6d1726 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Thu, 10 Oct 2024 01:42:06 -0300 Subject: [PATCH 085/218] waybar: add controller battery status --- scripts/controller-battery | 38 ++++++++++++++++++++++++++++++++++++++ scripts/default.nix | 1 + user/waybar/default.nix | 7 +++++++ user/waybar/style.css | 1 + 4 files changed, 47 insertions(+) create mode 100755 scripts/controller-battery diff --git a/scripts/controller-battery b/scripts/controller-battery new file mode 100755 index 0000000..b8ed4f2 --- /dev/null +++ b/scripts/controller-battery @@ -0,0 +1,38 @@ +#!/bin/sh + +set -e + +CONTROLLER=$(find /sys/class/power_supply -maxdepth 1 -name '*controller*' || true) + +if test -z "$CONTROLLER"; then + echo + exit 0 +fi + +CAPACITY=$(cat "$CONTROLLER/capacity") + +echo -n '󰊴' + +if test "$CAPACITY" -ge 90; then + echo '󰁹' +elif test "$CAPACITY" -ge 90; then + echo '󰂂' +elif test "$CAPACITY" -ge 80; then + echo '󰂁' +elif test "$CAPACITY" -ge 70; then + echo '󰂀' +elif test "$CAPACITY" -ge 60; then + echo '󰁿' +elif test "$CAPACITY" -ge 50; then + echo '󰁾' +elif test "$CAPACITY" -ge 40; then + echo '󰁽' +elif test "$CAPACITY" -ge 30; then + echo '󰁼' +elif test "$CAPACITY" -ge 20; then + echo '󰁻' +elif test "$CAPACITY" -ge 10; then + echo '󰁺' +else + echo '󰂎' +fi diff --git a/scripts/default.nix b/scripts/default.nix index 1e3290e..99b6635 100644 --- a/scripts/default.nix +++ b/scripts/default.nix @@ -130,6 +130,7 @@ libratbag ]; vrr-fullscreen = [ ]; + controller-battery = [ ]; } // lib.mapAttrs importScript { wdmenu = ./wdmenu.nix; diff --git a/user/waybar/default.nix b/user/waybar/default.nix index d33076e..b36dfce 100644 --- a/user/waybar/default.nix +++ b/user/waybar/default.nix @@ -35,6 +35,7 @@ in "mpd" "custom/playerctl" "tray" + "custom/controller-battery" "custom/caffeine" "pulseaudio" (lib.optional (osConfig.services.vpn.enable or false) "custom/vpn") @@ -157,6 +158,12 @@ in "sway/language" = { format = "{short} {variant}"; }; + "custom/controller-battery" = { + format = "{}"; + exec = lib.getExe pkgs.controller-battery; + interval = 1; + tooltip = false; + }; "custom/caffeine" = { format = "{}"; exec = "systemctl --user status swayidle > /dev/null && echo 󰒲 || echo 󰒳"; diff --git a/user/waybar/style.css b/user/waybar/style.css index f9c0fb1..36c6ebd 100644 --- a/user/waybar/style.css +++ b/user/waybar/style.css @@ -37,6 +37,7 @@ window#waybar.solo { #mpd, #custom-mpd, #custom-playerctl, +#custom-controller-battery, #tray, #clock, #network, From c08d6295d70613f13de37e8a98f88bcdd87b1178 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Thu, 10 Oct 2024 23:04:59 -0300 Subject: [PATCH 086/218] switch: fix quoting --- switch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/switch b/switch index 1b114fc..93bd80a 100755 --- a/switch +++ b/switch @@ -9,4 +9,4 @@ nixos-rebuild \ --use-remote-sudo \ --print-build-logs \ --flake .# \ - $@ + "$@" From 1e2d64a1c7c3629c9828f1ec460a0608ce8a8f23 Mon Sep 17 00:00:00 2001 From: lelgenio Date: Mon, 14 Oct 2024 17:27:55 -0300 Subject: [PATCH 087/218] rainbow: cleanup --- flake.nix | 12 +-- hosts/rainbow/default.nix | 85 ------------------- ...oreb-itinerario-registrationConfigFile.age | 13 --- secrets/secrets.nix | 3 - system/rainbow-gitlab-runner.nix | 22 ----- system/secrets.nix | 1 - 6 files changed, 1 insertion(+), 135 deletions(-) delete mode 100644 hosts/rainbow/default.nix delete mode 100644 secrets/rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.age delete mode 100644 system/rainbow-gitlab-runner.nix diff --git a/flake.nix b/flake.nix index dbbf16e..54c9a44 100644 --- a/flake.nix +++ b/flake.nix @@ -152,19 +152,9 @@ ./system/steam.nix ] ++ common_modules; }; - rainbow = lib.nixosSystem { - inherit system specialArgs; - modules = [ - ./hosts/rainbow - ./system/rainbow-gitlab-runner.nix - ] ++ common_modules; - }; double-rainbow = lib.nixosSystem { inherit system specialArgs; - modules = [ - ./hosts/double-rainbow.nix - ./system/rainbow-gitlab-runner.nix - ] ++ common_modules; + modules = [ ./hosts/double-rainbow.nix ] ++ common_modules; }; pixie = lib.nixosSystem { inherit system specialArgs; diff --git a/hosts/rainbow/default.nix b/hosts/rainbow/default.nix deleted file mode 100644 index b977ee6..0000000 --- a/hosts/rainbow/default.nix +++ /dev/null @@ -1,85 +0,0 @@ -# Do not modify this file! It was generated by ‘nixos-generate-config’ -# and may be overwritten by future invocations. Please make changes -# to /etc/nixos/configuration.nix instead. -{ - config, - lib, - pkgs, - modulesPath, - ... -}: -let - btrfs_options = [ - "compress=zstd:3" - "noatime" - "x-systemd.device-timeout=0" - ]; - btrfs_ssd = [ - "ssd" - "discard=async" - ]; -in -{ - imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - - boot.initrd.availableKernelModules = [ - "xhci_pci" - "ahci" - "usb_storage" - "usbhid" - "sd_mod" - ]; - boot.initrd.kernelModules = [ "i915" ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = { - device = "/dev/disk/by-label/BTRFS_ROOT"; - fsType = "btrfs"; - options = [ "subvol=@nixos" ] ++ btrfs_options ++ btrfs_ssd; - }; - - boot.initrd.luks.devices = { - "main" = { - bypassWorkqueues = true; - device = "/dev/disk/by-label/CRYPT_ROOT"; - }; - }; - - fileSystems."/home" = { - device = "/dev/disk/by-label/BTRFS_ROOT"; - fsType = "btrfs"; - options = [ "subvol=@home" ] ++ btrfs_options ++ btrfs_ssd; - }; - - boot.loader.efi.efiSysMountPoint = "/boot/efi"; - fileSystems."/boot/efi" = { - device = "/dev/disk/by-uuid/DC3B-5753"; - fsType = "vfat"; - }; - - fileSystems."/swap" = { - device = "/dev/disk/by-label/BTRFS_ROOT"; - fsType = "btrfs"; - options = [ "subvol=@swap" ] ++ btrfs_ssd; - }; - - swapDevices = [ - { - device = "/swap/swapfile"; - size = (1024 * 8); - } - ]; - - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking - # (the default) this is the recommended approach. When using systemd-networkd it's - # still possible to use this option, but it's recommended to use it in conjunction - # with explicit per-interface declarations with `networking.interfaces..useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.enp1s0.useDHCP = lib.mkDefault true; - - powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; - - networking.hostName = "rainbow"; # Define your hostname. -} diff --git a/secrets/rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.age b/secrets/rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.age deleted file mode 100644 index 03118e3..0000000 --- a/secrets/rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.age +++ /dev/null @@ -1,13 +0,0 @@ -age-encryption.org/v1 --> ssh-rsa BwwxHg -KCVF4Sy49stOeQs2uunYKkvadqeimmWlJ4ucEJxfXy2z+OkkZpixUnWgJEH2nCa4 -NL/F0Wezbqvh+Texl4FlHN8PT2w/d5gdg/L+fI4jBYCvbbiHA4sdUgmXWigY8zrU -5H7Y9mgb1Y174fA6zfTCk2fHmk+KARoV27YrS2fzGoVQiPhnvv8ZT51eF1E+Zs4I -+YtXehxEOqYljJKYJJnF9ElzfNa8nypACGtcjTE8eEq0DlZu2U7qV+QWwQudHbcs -MbFR2VtkHWQaNdK1vVBGND1CMlfshSCqbUzGcexownMiCVSal1RKA2uAWnYdOEc/ -QSR8cKn8QQ5dyPFCqZ8RnlCMUegCVLg5cC0/rlTUD0C/Ti2SRBYTH3HvJjmSNk8k -3LdcNwK4YtG4d1gkqLVjwCM1Yg8I/UICb5nQYclvBz5VQ2drvL/gU/+Vc7Z5KUFI -0G/7uNmeJ16Eky+X9c73ZZxVqm0TzDENE2GzkPhBHEfXBR+4j6m8KKEWxQmA2ZSg - ---- Oq9wU0h90iU/8g1XTNI+LuAg7t09hngj9DCK91V1+pg -χvP}N,Wl ?y0)eVwAiŐSm>DQC-B0V|=X6 W>~-qI% \ No newline at end of file diff --git a/secrets/secrets.nix b/secrets/secrets.nix index 7b5fdd8..5582393 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix @@ -2,9 +2,6 @@ let main_ssh_public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCxR/w+38b2lX90yNBqhq3mUmkn1WGu6GAPhN1tVp2ZjYRJNV/+5gWCnTtOWYtDx35HmK/spQ2Qy8X9ttkzORa24fysNx1Iqn/TiXhD7eIJjbGPnrOpIKTkW5/uB3SD/P5NBSa06//BaqJU4sBlG79hoXRpod052hQtdpTVDiMCIV+iboWPKqopmJJfWdBtVnHXs9rep0htPRExxGslImFk7Z6xjcaHyCpIQZPlOGf+sGsmUU7jRqzvZFV8ucIdbnAlMHrU4pepNFhuraESyZVTa/bi9sw0iozXp5Q5+5thMebEslmT1Z771kI4sieDy+O4r8c0Sx2/VY1UAzcpq1faggc3YB01MTh+tiEC6xdMvZLrQGL1NBWjHleMyL53GU5ERluC0vXJF3Hv3BGGBDfXWbrEm5n06DHr2apRVJGC0LwiQ7Woud1X4V4X1pKSusxCVMjT2lmcOwV6YhKhB2sowJc1OdMx4+tL0UWE+YKSZgBHfolwk6ml0F4EO9nnUHc= lelgenio@i15"; in { - "rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.age".publicKeys = [ - main_ssh_public_key - ]; "monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.age".publicKeys = [ main_ssh_public_key ]; diff --git a/system/rainbow-gitlab-runner.nix b/system/rainbow-gitlab-runner.nix deleted file mode 100644 index 3230c8b..0000000 --- a/system/rainbow-gitlab-runner.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ - config, - pkgs, - lib, - ... -}: -let - inherit (pkgs.callPackage ./gitlab-runner.nix { }) mkNixRunner; -in -{ - boot.kernel.sysctl."net.ipv4.ip_forward" = true; - virtualisation.docker.enable = true; - services.gitlab-runner = { - enable = true; - settings.concurrent = 1; - services = { - thoreb-telemetria-nix = mkNixRunner config.age.secrets.gitlab-runner-thoreb-telemetria-registrationConfigFile.path; - thoreb-itinerario-nix = mkNixRunner config.age.secrets.rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.path; - }; - }; - systemd.services.gitlab-runner.serviceConfig.Nice = 10; -} diff --git a/system/secrets.nix b/system/secrets.nix index ca11fb4..fdf14e8 100644 --- a/system/secrets.nix +++ b/system/secrets.nix @@ -6,7 +6,6 @@ secrets.monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.file = ../secrets/monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.age; secrets.gitlab-runner-thoreb-telemetria-registrationConfigFile.file = ../secrets/gitlab-runner-thoreb-telemetria-registrationConfigFile.age; secrets.monolith-forgejo-runner-token.file = ../secrets/monolith-forgejo-runner-token.age; - secrets.rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.file = ../secrets/rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.age; secrets.monolith-nix-serve-privkey.file = ../secrets/monolith-nix-serve-privkey.age; secrets.phantom-forgejo-mailer-password.file = ../secrets/phantom-forgejo-mailer-password.age; }; From 6b655dded4e607ec7c88a4e52b8ea65de3b45dc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Thu, 17 Oct 2024 20:31:28 -0300 Subject: [PATCH 088/218] monolith: use nproc as gitlab runner count --- system/monolith-gitlab-runner.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/monolith-gitlab-runner.nix b/system/monolith-gitlab-runner.nix index f17fbe3..3e63d98 100644 --- a/system/monolith-gitlab-runner.nix +++ b/system/monolith-gitlab-runner.nix @@ -12,7 +12,7 @@ in virtualisation.docker.enable = true; services.gitlab-runner = { enable = true; - settings.concurrent = 4; + settings.concurrent = 12; services = { # runner for building in docker via host's nix-daemon # nix store will be readable in runner, might be insecure From 56949d92382ee65e768a11b5058b3a4ced0ef334 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 18 Oct 2024 00:01:43 -0300 Subject: [PATCH 089/218] monolith: fix bluetooth dongle --- hosts/monolith/default.nix | 9 +++- ...b-Fix-regression-with-CSR-controllers.diff | 24 ++++++++++ pkgs/default.nix | 1 + pkgs/linux-bluetooth.nix | 47 +++++++++++++++++++ 4 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 patches/linux/v2-Bluetooth-btusb-Fix-regression-with-CSR-controllers.diff create mode 100644 pkgs/linux-bluetooth.nix diff --git a/hosts/monolith/default.nix b/hosts/monolith/default.nix index 3350e0d..ff2b193 100644 --- a/hosts/monolith/default.nix +++ b/hosts/monolith/default.nix @@ -38,7 +38,14 @@ in boot.kernelPackages = pkgs.linuxPackages_latest; - boot.extraModulePackages = with config.boot.kernelPackages; [ zenpower ]; + boot.extraModulePackages = with config.boot.kernelPackages; [ + zenpower + (pkgs.linux-bluetooth.override { + kernel = config.boot.kernelPackages.kernel; + patches = [ ../../patches/linux/v2-Bluetooth-btusb-Fix-regression-with-CSR-controllers.diff ]; + }) + ]; + boot.initrd.kernelModules = [ "amdgpu" ]; boot.kernelModules = [ "kvm-amd" diff --git a/patches/linux/v2-Bluetooth-btusb-Fix-regression-with-CSR-controllers.diff b/patches/linux/v2-Bluetooth-btusb-Fix-regression-with-CSR-controllers.diff new file mode 100644 index 0000000..ae1adeb --- /dev/null +++ b/patches/linux/v2-Bluetooth-btusb-Fix-regression-with-CSR-controllers.diff @@ -0,0 +1,24 @@ +diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c +index c0b6ef8ee5da..f72218c1037e 100644 +--- a/drivers/bluetooth/btusb.c ++++ b/drivers/bluetooth/btusb.c +@@ -1366,10 +1366,15 @@ static int btusb_submit_intr_urb(struct hci_dev *hdev, gfp_t mem_flags) + if (!urb) + return -ENOMEM; + +- /* Use maximum HCI Event size so the USB stack handles +- * ZPL/short-transfer automatically. +- */ +- size = HCI_MAX_EVENT_SIZE; ++ if (le16_to_cpu(data->udev->descriptor.idVendor) == 0x0a12 && ++ le16_to_cpu(data->udev->descriptor.idProduct) == 0x0001) ++ /* Fake CSR devices don't seem to support sort-transter */ ++ size = le16_to_cpu(data->intr_ep->wMaxPacketSize); ++ else ++ /* Use maximum HCI Event size so the USB stack handles ++ * ZPL/short-transfer automatically. ++ */ ++ size = HCI_MAX_EVENT_SIZE; + + buf = kmalloc(size, mem_flags); + if (!buf) { diff --git a/pkgs/default.nix b/pkgs/default.nix index b3f1b79..530d1cb 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -8,4 +8,5 @@ rec { emmet-cli = pkgs.callPackage ./emmet-cli.nix { }; material-wifi-icons = pkgs.callPackage ./material-wifi-icons.nix { }; gnome-pass-search-provider = pkgs.callPackage ./gnome-pass-search-provider.nix { }; + linux-bluetooth = pkgs.callPackage ./linux-bluetooth.nix { }; } diff --git a/pkgs/linux-bluetooth.nix b/pkgs/linux-bluetooth.nix new file mode 100644 index 0000000..609e775 --- /dev/null +++ b/pkgs/linux-bluetooth.nix @@ -0,0 +1,47 @@ +{ + pkgs, + lib, + kernel ? pkgs.linuxPackages_latest.kernel, + patches ? [ ], +}: + +pkgs.stdenv.mkDerivation { + pname = "bluetooth-kernel-module"; + inherit (kernel) + src + version + postPatch + nativeBuildInputs + ; + + inherit patches; + + kernel_dev = kernel.dev; + kernelVersion = kernel.modDirVersion; + + modulePath = "drivers/bluetooth"; + + buildPhase = '' + BUILT_KERNEL=$kernel_dev/lib/modules/$kernelVersion/build + + cp $BUILT_KERNEL/Module.symvers . + cp $BUILT_KERNEL/.config . + cp $kernel_dev/vmlinux . + + make "-j$NIX_BUILD_CORES" modules_prepare + make "-j$NIX_BUILD_CORES" M=$modulePath modules + ''; + + installPhase = '' + make \ + INSTALL_MOD_PATH="$out" \ + XZ="xz -T$NIX_BUILD_CORES" \ + M="$modulePath" \ + modules_install + ''; + + meta = { + description = "Bluetooth kernel module"; + license = lib.licenses.gpl3; + }; +} From 5da937fb46aea1ca5d204c57c554355e5f152cc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Thu, 5 Sep 2024 22:14:15 -0300 Subject: [PATCH 090/218] monolith: undervolt to -120 --- hosts/monolith/undervolt.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosts/monolith/undervolt.nix b/hosts/monolith/undervolt.nix index 1bd6c28..9f60aee 100644 --- a/hosts/monolith/undervolt.nix +++ b/hosts/monolith/undervolt.nix @@ -6,7 +6,7 @@ let echo "manual" > power_dpm_force_performance_level echo "1" > pp_power_profile_mode test -e pp_od_clk_voltage - echo "vo -100" > pp_od_clk_voltage + echo "vo -120" > pp_od_clk_voltage echo "c" > pp_od_clk_voltage ''; in From cc0ddda78a0bdbdd0dd4cdc238c705dc67bdd7fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 23 Oct 2024 12:35:07 -0300 Subject: [PATCH 091/218] kakoune: add pint as formatter --- scripts/default.nix | 1 + scripts/pint-fmt | 7 +++++++ user/kakoune/default.nix | 1 + user/kakoune/filetypes.kak | 4 ++++ 4 files changed, 13 insertions(+) create mode 100755 scripts/pint-fmt diff --git a/scripts/default.nix b/scripts/default.nix index 99b6635..79fe4c6 100644 --- a/scripts/default.nix +++ b/scripts/default.nix @@ -124,6 +124,7 @@ zbar wl-clipboard ]; + pint-fmt = [ ]; powerplay-led-idle = [ bash libinput diff --git a/scripts/pint-fmt b/scripts/pint-fmt new file mode 100755 index 0000000..85ea6cd --- /dev/null +++ b/scripts/pint-fmt @@ -0,0 +1,7 @@ +#!/bin/sh + +file="$(mktemp --tmpdir=/dev/shm).php" +cat - >"$file" +./vendor/bin/pint --quiet "$file" +cat "$file" +rm "$file" diff --git a/user/kakoune/default.nix b/user/kakoune/default.nix index 337e007..9963f26 100644 --- a/user/kakoune/default.nix +++ b/user/kakoune/default.nix @@ -133,6 +133,7 @@ in emmet-cli nodePackages.prettier + pint-fmt aspell aspellDicts.en diff --git a/user/kakoune/filetypes.kak b/user/kakoune/filetypes.kak index fd0b87c..293293c 100644 --- a/user/kakoune/filetypes.kak +++ b/user/kakoune/filetypes.kak @@ -30,6 +30,10 @@ hook global WinSetOption filetype=angular %[ add-highlighter buffer/angular ref html ] +hook global BufCreate .*\.php %{ + set buffer formatcmd 'pint-fmt' +} + hook global BufCreate .*\.js %{ set buffer formatcmd 'prettier --parser babel' } From a767f8a0a6ea2ffb232a80c50d2197717cb119c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 25 Oct 2024 16:33:21 -0300 Subject: [PATCH 092/218] docker: fix logging for bitbucket runner --- system/containers.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/system/containers.nix b/system/containers.nix index 19698e5..37844f7 100644 --- a/system/containers.nix +++ b/system/containers.nix @@ -12,6 +12,14 @@ "--volumes" ]; }; + daemon.settings = { + # needed by bitbucket runner ??? + log-driver = "json-file"; + log-opts = { + max-size = "10m"; + max-file = "3"; + }; + }; }; programs.extra-container.enable = true; From 569298b04a8f3b4172a2aaca305dde337a065cab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 25 Oct 2024 16:43:20 -0300 Subject: [PATCH 093/218] scripts: update pint-fmt --- scripts/pint-fmt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/pint-fmt b/scripts/pint-fmt index 85ea6cd..4d84c88 100755 --- a/scripts/pint-fmt +++ b/scripts/pint-fmt @@ -1,6 +1,6 @@ #!/bin/sh -file="$(mktemp --tmpdir=/dev/shm).php" +file="$(mktemp)" cat - >"$file" ./vendor/bin/pint --quiet "$file" cat "$file" From f792fba54452ae6baaec198d1f1c564b2f7d6f06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 25 Oct 2024 16:43:53 -0300 Subject: [PATCH 094/218] ssh: include private configs --- user/ssh.nix | 34 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/user/ssh.nix b/user/ssh.nix index 60649ba..4747bb4 100644 --- a/user/ssh.nix +++ b/user/ssh.nix @@ -1,26 +1,20 @@ -{ - config, - pkgs, - lib, - ... -}: -let - inherit (config.my) username mail; -in { config = { - programs.ssh.enable = true; - programs.ssh.matchBlocks = { - monolith = { - user = "lelgenio"; - hostname = "monolith.lelgenio.com"; - port = 9022; - }; - phantom = { - user = "root"; - hostname = "phantom.lelgenio.com"; - port = 9022; + programs.ssh = { + enable = true; + matchBlocks = { + monolith = { + user = "lelgenio"; + hostname = "monolith.lelgenio.com"; + port = 9022; + }; + phantom = { + user = "root"; + hostname = "phantom.lelgenio.com"; + port = 9022; + }; }; + includes = [ "~/Wopus/.ssh.config" ]; }; }; } From 0b7bb0a69b6fa811bffa6c45e1367e40a40dcbd0 Mon Sep 17 00:00:00 2001 From: lelgenio Date: Thu, 24 Oct 2024 16:15:32 -0300 Subject: [PATCH 095/218] rainbow: Partial Revert "rainbow: cleanup" This reverts commit feafc57514ec26979979a6c0d6627251f27b662b. --- flake.nix | 5 ++++- ...oreb-itinerario-registrationConfigFile.age | 13 +++++++++++ secrets/secrets.nix | 3 +++ system/rainbow-gitlab-runner.nix | 22 +++++++++++++++++++ system/secrets.nix | 1 + 5 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 secrets/rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.age create mode 100644 system/rainbow-gitlab-runner.nix diff --git a/flake.nix b/flake.nix index 54c9a44..e7f5813 100644 --- a/flake.nix +++ b/flake.nix @@ -154,7 +154,10 @@ }; double-rainbow = lib.nixosSystem { inherit system specialArgs; - modules = [ ./hosts/double-rainbow.nix ] ++ common_modules; + modules = [ + ./hosts/double-rainbow.nix + ./system/rainbow-gitlab-runner.nix + ] ++ common_modules; }; pixie = lib.nixosSystem { inherit system specialArgs; diff --git a/secrets/rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.age b/secrets/rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.age new file mode 100644 index 0000000..03118e3 --- /dev/null +++ b/secrets/rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.age @@ -0,0 +1,13 @@ +age-encryption.org/v1 +-> ssh-rsa BwwxHg +KCVF4Sy49stOeQs2uunYKkvadqeimmWlJ4ucEJxfXy2z+OkkZpixUnWgJEH2nCa4 +NL/F0Wezbqvh+Texl4FlHN8PT2w/d5gdg/L+fI4jBYCvbbiHA4sdUgmXWigY8zrU +5H7Y9mgb1Y174fA6zfTCk2fHmk+KARoV27YrS2fzGoVQiPhnvv8ZT51eF1E+Zs4I ++YtXehxEOqYljJKYJJnF9ElzfNa8nypACGtcjTE8eEq0DlZu2U7qV+QWwQudHbcs +MbFR2VtkHWQaNdK1vVBGND1CMlfshSCqbUzGcexownMiCVSal1RKA2uAWnYdOEc/ +QSR8cKn8QQ5dyPFCqZ8RnlCMUegCVLg5cC0/rlTUD0C/Ti2SRBYTH3HvJjmSNk8k +3LdcNwK4YtG4d1gkqLVjwCM1Yg8I/UICb5nQYclvBz5VQ2drvL/gU/+Vc7Z5KUFI +0G/7uNmeJ16Eky+X9c73ZZxVqm0TzDENE2GzkPhBHEfXBR+4j6m8KKEWxQmA2ZSg + +--- Oq9wU0h90iU/8g1XTNI+LuAg7t09hngj9DCK91V1+pg +χvP}N,Wl ?y0)eVwAiŐSm>DQC-B0V|=X6 W>~-qI% \ No newline at end of file diff --git a/secrets/secrets.nix b/secrets/secrets.nix index 5582393..7b5fdd8 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix @@ -2,6 +2,9 @@ let main_ssh_public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCxR/w+38b2lX90yNBqhq3mUmkn1WGu6GAPhN1tVp2ZjYRJNV/+5gWCnTtOWYtDx35HmK/spQ2Qy8X9ttkzORa24fysNx1Iqn/TiXhD7eIJjbGPnrOpIKTkW5/uB3SD/P5NBSa06//BaqJU4sBlG79hoXRpod052hQtdpTVDiMCIV+iboWPKqopmJJfWdBtVnHXs9rep0htPRExxGslImFk7Z6xjcaHyCpIQZPlOGf+sGsmUU7jRqzvZFV8ucIdbnAlMHrU4pepNFhuraESyZVTa/bi9sw0iozXp5Q5+5thMebEslmT1Z771kI4sieDy+O4r8c0Sx2/VY1UAzcpq1faggc3YB01MTh+tiEC6xdMvZLrQGL1NBWjHleMyL53GU5ERluC0vXJF3Hv3BGGBDfXWbrEm5n06DHr2apRVJGC0LwiQ7Woud1X4V4X1pKSusxCVMjT2lmcOwV6YhKhB2sowJc1OdMx4+tL0UWE+YKSZgBHfolwk6ml0F4EO9nnUHc= lelgenio@i15"; in { + "rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.age".publicKeys = [ + main_ssh_public_key + ]; "monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.age".publicKeys = [ main_ssh_public_key ]; diff --git a/system/rainbow-gitlab-runner.nix b/system/rainbow-gitlab-runner.nix new file mode 100644 index 0000000..3230c8b --- /dev/null +++ b/system/rainbow-gitlab-runner.nix @@ -0,0 +1,22 @@ +{ + config, + pkgs, + lib, + ... +}: +let + inherit (pkgs.callPackage ./gitlab-runner.nix { }) mkNixRunner; +in +{ + boot.kernel.sysctl."net.ipv4.ip_forward" = true; + virtualisation.docker.enable = true; + services.gitlab-runner = { + enable = true; + settings.concurrent = 1; + services = { + thoreb-telemetria-nix = mkNixRunner config.age.secrets.gitlab-runner-thoreb-telemetria-registrationConfigFile.path; + thoreb-itinerario-nix = mkNixRunner config.age.secrets.rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.path; + }; + }; + systemd.services.gitlab-runner.serviceConfig.Nice = 10; +} diff --git a/system/secrets.nix b/system/secrets.nix index fdf14e8..ca11fb4 100644 --- a/system/secrets.nix +++ b/system/secrets.nix @@ -6,6 +6,7 @@ secrets.monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.file = ../secrets/monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.age; secrets.gitlab-runner-thoreb-telemetria-registrationConfigFile.file = ../secrets/gitlab-runner-thoreb-telemetria-registrationConfigFile.age; secrets.monolith-forgejo-runner-token.file = ../secrets/monolith-forgejo-runner-token.age; + secrets.rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.file = ../secrets/rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.age; secrets.monolith-nix-serve-privkey.file = ../secrets/monolith-nix-serve-privkey.age; secrets.phantom-forgejo-mailer-password.file = ../secrets/phantom-forgejo-mailer-password.age; }; From 26993eadbc4fbe968687684da717b3374a50031f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Mon, 28 Oct 2024 12:02:31 -0300 Subject: [PATCH 096/218] monolith: extract amdgpu config --- hosts/monolith/amdgpu.nix | 37 ++++++++++++++++++++++++++++++++++++ hosts/monolith/default.nix | 20 ++----------------- hosts/monolith/undervolt.nix | 18 ------------------ 3 files changed, 39 insertions(+), 36 deletions(-) create mode 100644 hosts/monolith/amdgpu.nix delete mode 100644 hosts/monolith/undervolt.nix diff --git a/hosts/monolith/amdgpu.nix b/hosts/monolith/amdgpu.nix new file mode 100644 index 0000000..c02af7e --- /dev/null +++ b/hosts/monolith/amdgpu.nix @@ -0,0 +1,37 @@ +{ pkgs, ... }: +let + undervoltGpu = pkgs.writeShellScript "undervolt-gpu" '' + set -xe + cd $1 + echo "manual" > power_dpm_force_performance_level + echo "1" > pp_power_profile_mode + test -e pp_od_clk_voltage + echo "vo -120" > pp_od_clk_voltage + echo "c" > pp_od_clk_voltage + ''; +in +{ + boot.initrd.kernelModules = [ "amdgpu" ]; + boot.kernelParams = [ + "amdgpu.dcdebugmask=0x10" # amdgpu undervolting bug + "video=DP-1:1920x1080@144" + "amdgpu.ppfeaturemask=0xfffd7fff" # enable undervolting + ]; + + hardware.opengl.driSupport = true; + # # For 32 bit applications + hardware.opengl.driSupport32Bit = true; + + hardware.opengl.extraPackages = with pkgs; [ + libva + libvdpau + vaapiVdpau + rocm-opencl-icd + rocm-opencl-runtime + rocmPackages.rocm-smi + ]; + + services.udev.extraRules = '' + ACTION=="add", SUBSYSTEM=="hwmon", ATTR{name}=="amdgpu", ATTR{power1_cap}="186000000", RUN+="${undervoltGpu} %S%p/device" + ''; +} diff --git a/hosts/monolith/default.nix b/hosts/monolith/default.nix index ff2b193..962addc 100644 --- a/hosts/monolith/default.nix +++ b/hosts/monolith/default.nix @@ -23,7 +23,7 @@ in imports = [ (modulesPath + "/installer/scan/not-detected.nix") ./partition.nix - ./undervolt.nix + ./amdgpu.nix ]; boot.initrd.availableKernelModules = [ "nvme" @@ -52,28 +52,12 @@ in "amdgpu" "zenpower" ]; - boot.kernelParams = [ - "amdgpu.dcdebugmask=0x10" # amdgpu undervolting bug - "video=DP-1:1920x1080@144" - ]; + systemd.sleep.extraConfig = '' HibernateDelaySec=30s SuspendState=mem ''; - hardware.opengl.driSupport = true; - # # For 32 bit applications - hardware.opengl.driSupport32Bit = true; - - hardware.opengl.extraPackages = with pkgs; [ - libva - libvdpau - vaapiVdpau - rocm-opencl-icd - rocm-opencl-runtime - rocmPackages.rocm-smi - ]; - fileSystems."/mnt/old" = { device = "/dev/disk/by-label/BTRFS_ROOT"; fsType = "btrfs"; diff --git a/hosts/monolith/undervolt.nix b/hosts/monolith/undervolt.nix deleted file mode 100644 index 9f60aee..0000000 --- a/hosts/monolith/undervolt.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ pkgs, ... }: -let - undervoltGpu = pkgs.writeShellScript "undervolt-gpu" '' - set -xe - cd $1 - echo "manual" > power_dpm_force_performance_level - echo "1" > pp_power_profile_mode - test -e pp_od_clk_voltage - echo "vo -120" > pp_od_clk_voltage - echo "c" > pp_od_clk_voltage - ''; -in -{ - boot.kernelParams = [ "amdgpu.ppfeaturemask=0xfffd7fff" ]; - services.udev.extraRules = '' - ACTION=="add", SUBSYSTEM=="hwmon", ATTR{name}=="amdgpu", ATTR{power1_cap}="186000000", RUN+="${undervoltGpu} %S%p/device" - ''; -} From 356a886fb2a4ceb005680441c617b16dc7a2e3b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 30 Oct 2024 01:44:43 -0300 Subject: [PATCH 097/218] phantom: add factorio server --- hosts/phantom/default.nix | 1 + hosts/phantom/factorio-server.nix | 24 ++++++++++++++++++++++++ secrets/phantom-factorio-settings.age | Bin 0 -> 847 bytes secrets/secrets.nix | 1 + 4 files changed, 26 insertions(+) create mode 100644 hosts/phantom/factorio-server.nix create mode 100644 secrets/phantom-factorio-settings.age diff --git a/hosts/phantom/default.nix b/hosts/phantom/default.nix index e5570ee..6a246e4 100644 --- a/hosts/phantom/default.nix +++ b/hosts/phantom/default.nix @@ -21,6 +21,7 @@ ./invidious.nix ./davi.nix ./goofs.nix + ./factorio-server.nix ]; networking.hostName = "phantom"; diff --git a/hosts/phantom/factorio-server.nix b/hosts/phantom/factorio-server.nix new file mode 100644 index 0000000..a4b13b5 --- /dev/null +++ b/hosts/phantom/factorio-server.nix @@ -0,0 +1,24 @@ +{ config, pkgs, ... }: +{ + services.factorio = { + enable = true; + package = pkgs.unstable.factorio-headless.overrideAttrs (_: rec { + version = "2.0.12"; + src = pkgs.fetchurl { + name = "factorio_headless_x64-${version}.tar.xz"; + url = "https://www.factorio.com/get-download/${version}/headless/linux64"; + hash = "sha256-0vgg5eJ6ZEFO0TUixNsByCs8YyPGOArgqnXbT5RIjTE="; + }; + }); + public = true; + lan = true; + openFirewall = true; + admins = [ "lelgenio" ]; + extraSettingsFile = config.age.secrets.phantom-factorio-settings.path; + }; + + age.secrets.phantom-factorio-settings = { + file = ../../secrets/phantom-factorio-settings.age; + mode = "777"; + }; +} diff --git a/secrets/phantom-factorio-settings.age b/secrets/phantom-factorio-settings.age new file mode 100644 index 0000000000000000000000000000000000000000..77eb8bddbb17ce598bbd018de5232c281bc213e4 GIT binary patch literal 847 zcmYdHPt{G$OD?J`D9Oyv)5|YP*Do{V(zR14F3!*`Do#{zDlf0_NaqSEF>&$JcCGNy z&n$2X3P?#TaHv&_x14AR!;GS5lX&&YHSb@UDjFD(nJbT4rFs-Qc zHFe4e&eYCKb20Xf^7J*!FR#=tOtVM~wlEJU<1+QNFf?>_O)f6?Eceed@=Pl%$%^nu zNzeAvcQG(`b*ZY12uvxdFfTB0^3e7U$ck{*Hcu-EDNe0O_l*jQu;k*>)zww7^zigc zcC7T$cTF@*cJy{BD)I7-Fe&p5@pIEpstgMB%&n*71%&$Rn^tA#L&$4QB zy@}&2VLov>){?RLtkr#Ufk$lnK8sIc6V1M{wPuU!T7Hj;EQXI6`}bL={+TJ3XQ#=P z?R#&@*Py@LvCa9NYlAn`efAQT-eux>d;V!}e- literal 0 HcmV?d00001 diff --git a/secrets/secrets.nix b/secrets/secrets.nix index 7b5fdd8..65f495a 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix @@ -12,6 +12,7 @@ in "monolith-forgejo-runner-token.age".publicKeys = [ main_ssh_public_key ]; "lelgenio-cachix.age".publicKeys = [ main_ssh_public_key ]; "monolith-nix-serve-privkey.age".publicKeys = [ main_ssh_public_key ]; + "phantom-factorio-settings.age".publicKeys = [ main_ssh_public_key ]; "phantom-nextcloud.age".publicKeys = [ main_ssh_public_key ]; "phantom-writefreely.age".publicKeys = [ main_ssh_public_key ]; "phantom-renawiki.age".publicKeys = [ main_ssh_public_key ]; From 8a3046786cf96c8929d8ef9e1e9f3bd8d30b8da5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 30 Oct 2024 20:51:43 -0300 Subject: [PATCH 098/218] factorio: move hosting to monolith --- hosts/monolith/default.nix | 1 + hosts/{phantom => monolith}/factorio-server.nix | 6 +++--- hosts/phantom/default.nix | 1 - ...-factorio-settings.age => factorio-settings.age} | Bin secrets/secrets.nix | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) rename hosts/{phantom => monolith}/factorio-server.nix (75%) rename secrets/{phantom-factorio-settings.age => factorio-settings.age} (100%) diff --git a/hosts/monolith/default.nix b/hosts/monolith/default.nix index 962addc..8aa63b8 100644 --- a/hosts/monolith/default.nix +++ b/hosts/monolith/default.nix @@ -24,6 +24,7 @@ in (modulesPath + "/installer/scan/not-detected.nix") ./partition.nix ./amdgpu.nix + ./factorio-server.nix ]; boot.initrd.availableKernelModules = [ "nvme" diff --git a/hosts/phantom/factorio-server.nix b/hosts/monolith/factorio-server.nix similarity index 75% rename from hosts/phantom/factorio-server.nix rename to hosts/monolith/factorio-server.nix index a4b13b5..0de34b1 100644 --- a/hosts/phantom/factorio-server.nix +++ b/hosts/monolith/factorio-server.nix @@ -14,11 +14,11 @@ lan = true; openFirewall = true; admins = [ "lelgenio" ]; - extraSettingsFile = config.age.secrets.phantom-factorio-settings.path; + extraSettingsFile = config.age.secrets.factorio-settings.path; }; - age.secrets.phantom-factorio-settings = { - file = ../../secrets/phantom-factorio-settings.age; + age.secrets.factorio-settings = { + file = ../../secrets/factorio-settings.age; mode = "777"; }; } diff --git a/hosts/phantom/default.nix b/hosts/phantom/default.nix index 6a246e4..e5570ee 100644 --- a/hosts/phantom/default.nix +++ b/hosts/phantom/default.nix @@ -21,7 +21,6 @@ ./invidious.nix ./davi.nix ./goofs.nix - ./factorio-server.nix ]; networking.hostName = "phantom"; diff --git a/secrets/phantom-factorio-settings.age b/secrets/factorio-settings.age similarity index 100% rename from secrets/phantom-factorio-settings.age rename to secrets/factorio-settings.age diff --git a/secrets/secrets.nix b/secrets/secrets.nix index 65f495a..f64fb4b 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix @@ -12,7 +12,7 @@ in "monolith-forgejo-runner-token.age".publicKeys = [ main_ssh_public_key ]; "lelgenio-cachix.age".publicKeys = [ main_ssh_public_key ]; "monolith-nix-serve-privkey.age".publicKeys = [ main_ssh_public_key ]; - "phantom-factorio-settings.age".publicKeys = [ main_ssh_public_key ]; + "factorio-settings.age".publicKeys = [ main_ssh_public_key ]; "phantom-nextcloud.age".publicKeys = [ main_ssh_public_key ]; "phantom-writefreely.age".publicKeys = [ main_ssh_public_key ]; "phantom-renawiki.age".publicKeys = [ main_ssh_public_key ]; From 672b963bcc7d016c1952acff3b870c7f80ec9791 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Thu, 31 Oct 2024 01:40:13 -0300 Subject: [PATCH 099/218] monolith: remove bluetooth dongle patch --- hosts/monolith/default.nix | 8 +--- ...b-Fix-regression-with-CSR-controllers.diff | 24 ---------- pkgs/default.nix | 1 - pkgs/linux-bluetooth.nix | 47 ------------------- 4 files changed, 1 insertion(+), 79 deletions(-) delete mode 100644 patches/linux/v2-Bluetooth-btusb-Fix-regression-with-CSR-controllers.diff delete mode 100644 pkgs/linux-bluetooth.nix diff --git a/hosts/monolith/default.nix b/hosts/monolith/default.nix index 8aa63b8..f4fde3a 100644 --- a/hosts/monolith/default.nix +++ b/hosts/monolith/default.nix @@ -39,13 +39,7 @@ in boot.kernelPackages = pkgs.linuxPackages_latest; - boot.extraModulePackages = with config.boot.kernelPackages; [ - zenpower - (pkgs.linux-bluetooth.override { - kernel = config.boot.kernelPackages.kernel; - patches = [ ../../patches/linux/v2-Bluetooth-btusb-Fix-regression-with-CSR-controllers.diff ]; - }) - ]; + boot.extraModulePackages = with config.boot.kernelPackages; [ zenpower ]; boot.initrd.kernelModules = [ "amdgpu" ]; boot.kernelModules = [ diff --git a/patches/linux/v2-Bluetooth-btusb-Fix-regression-with-CSR-controllers.diff b/patches/linux/v2-Bluetooth-btusb-Fix-regression-with-CSR-controllers.diff deleted file mode 100644 index ae1adeb..0000000 --- a/patches/linux/v2-Bluetooth-btusb-Fix-regression-with-CSR-controllers.diff +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c -index c0b6ef8ee5da..f72218c1037e 100644 ---- a/drivers/bluetooth/btusb.c -+++ b/drivers/bluetooth/btusb.c -@@ -1366,10 +1366,15 @@ static int btusb_submit_intr_urb(struct hci_dev *hdev, gfp_t mem_flags) - if (!urb) - return -ENOMEM; - -- /* Use maximum HCI Event size so the USB stack handles -- * ZPL/short-transfer automatically. -- */ -- size = HCI_MAX_EVENT_SIZE; -+ if (le16_to_cpu(data->udev->descriptor.idVendor) == 0x0a12 && -+ le16_to_cpu(data->udev->descriptor.idProduct) == 0x0001) -+ /* Fake CSR devices don't seem to support sort-transter */ -+ size = le16_to_cpu(data->intr_ep->wMaxPacketSize); -+ else -+ /* Use maximum HCI Event size so the USB stack handles -+ * ZPL/short-transfer automatically. -+ */ -+ size = HCI_MAX_EVENT_SIZE; - - buf = kmalloc(size, mem_flags); - if (!buf) { diff --git a/pkgs/default.nix b/pkgs/default.nix index 530d1cb..b3f1b79 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -8,5 +8,4 @@ rec { emmet-cli = pkgs.callPackage ./emmet-cli.nix { }; material-wifi-icons = pkgs.callPackage ./material-wifi-icons.nix { }; gnome-pass-search-provider = pkgs.callPackage ./gnome-pass-search-provider.nix { }; - linux-bluetooth = pkgs.callPackage ./linux-bluetooth.nix { }; } diff --git a/pkgs/linux-bluetooth.nix b/pkgs/linux-bluetooth.nix deleted file mode 100644 index 609e775..0000000 --- a/pkgs/linux-bluetooth.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ - pkgs, - lib, - kernel ? pkgs.linuxPackages_latest.kernel, - patches ? [ ], -}: - -pkgs.stdenv.mkDerivation { - pname = "bluetooth-kernel-module"; - inherit (kernel) - src - version - postPatch - nativeBuildInputs - ; - - inherit patches; - - kernel_dev = kernel.dev; - kernelVersion = kernel.modDirVersion; - - modulePath = "drivers/bluetooth"; - - buildPhase = '' - BUILT_KERNEL=$kernel_dev/lib/modules/$kernelVersion/build - - cp $BUILT_KERNEL/Module.symvers . - cp $BUILT_KERNEL/.config . - cp $kernel_dev/vmlinux . - - make "-j$NIX_BUILD_CORES" modules_prepare - make "-j$NIX_BUILD_CORES" M=$modulePath modules - ''; - - installPhase = '' - make \ - INSTALL_MOD_PATH="$out" \ - XZ="xz -T$NIX_BUILD_CORES" \ - M="$modulePath" \ - modules_install - ''; - - meta = { - description = "Bluetooth kernel module"; - license = lib.licenses.gpl3; - }; -} From 4e1ca64d0e560249e46f3f19bb4eb15b63b4c937 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Thu, 31 Oct 2024 01:40:45 -0300 Subject: [PATCH 100/218] update --- flake.lock | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/flake.lock b/flake.lock index 5e74698..54aac8d 100644 --- a/flake.lock +++ b/flake.lock @@ -213,11 +213,11 @@ ] }, "locked": { - "lastModified": 1728334376, - "narHash": "sha256-CTKEKPzD/j8FK6H4DO3EjyixZd3HHvgAgfnCwpGFP5c=", + "lastModified": 1730190761, + "narHash": "sha256-o5m5WzvY6cGIDupuOvjgNSS8AN6yP2iI9MtUC6q/uos=", "owner": "nix-community", "repo": "disko", - "rev": "d39ee334984fcdae6244f5a8e6ab857479cbaefe", + "rev": "3979285062d6781525cded0f6c4ff92e71376b55", "type": "github" }, "original": { @@ -489,11 +489,11 @@ ] }, "locked": { - "lastModified": 1728263287, - "narHash": "sha256-GJDtsxz2/zw6g/Nrp4XVWBS5IaZ7ZUkuvxPOBEDe7pg=", + "lastModified": 1729999765, + "narHash": "sha256-LYsavZXitFjjyETZoij8usXjTa7fa9AIF3Sk3MJSX+Y=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "5fce10c871bab6d7d5ac9e5e7efbb3a2783f5259", + "rev": "0e3a8778c2ee218eff8de6aacf3d2fa6c33b2d4f", "type": "github" }, "original": { @@ -531,11 +531,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1728193676, - "narHash": "sha256-PbDWAIjKJdlVg+qQRhzdSor04bAPApDqIv2DofTyynk=", + "lastModified": 1730137625, + "narHash": "sha256-9z8oOgFZiaguj+bbi3k4QhAD6JabWrnv7fscC/mt0KE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ecbc1ca8ffd6aea8372ad16be9ebbb39889e55b6", + "rev": "64b80bfb316b57cdb8919a9110ef63393d74382a", "type": "github" }, "original": { @@ -546,11 +546,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1728018373, - "narHash": "sha256-NOiTvBbRLIOe5F6RbHaAh6++BNjsb149fGZd1T4+KBg=", + "lastModified": 1729880355, + "narHash": "sha256-RP+OQ6koQQLX5nw0NmcDrzvGL8HDLnyXt/jHhL1jwjM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "bc947f541ae55e999ffdb4013441347d83b00feb", + "rev": "18536bf04cd71abd345f9579158841376fdd0c5a", "type": "github" }, "original": { @@ -837,11 +837,11 @@ }, "vpsadminos": { "locked": { - "lastModified": 1728335559, - "narHash": "sha256-95/KJBA449oAjf6bLwaCvDgys7yE8vKXY3wHe/uUkiw=", + "lastModified": 1730290190, + "narHash": "sha256-a+op2lnWrCytuEhLOE24SKR/irRfjwDEHkpLyAL5P90=", "owner": "vpsfreecz", "repo": "vpsadminos", - "rev": "c928bdec26484e99621cc76cb165abb73aa7d029", + "rev": "63ac771b9667b45ab2ea87363f69ca7f85668e9b", "type": "github" }, "original": { From 7ccbca83bcd903601927d4c5ce937db2a59db6eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Thu, 31 Oct 2024 19:59:35 -0300 Subject: [PATCH 101/218] factorio: automate updating server --- hosts/monolith/factorio-server.nix | 9 +-------- pkgs/default.nix | 3 +++ pkgs/factorio-headless/default.nix | 10 ++++++++++ pkgs/factorio-headless/update.sh | 14 ++++++++++++++ 4 files changed, 28 insertions(+), 8 deletions(-) create mode 100644 pkgs/factorio-headless/default.nix create mode 100755 pkgs/factorio-headless/update.sh diff --git a/hosts/monolith/factorio-server.nix b/hosts/monolith/factorio-server.nix index 0de34b1..3c893a5 100644 --- a/hosts/monolith/factorio-server.nix +++ b/hosts/monolith/factorio-server.nix @@ -2,14 +2,7 @@ { services.factorio = { enable = true; - package = pkgs.unstable.factorio-headless.overrideAttrs (_: rec { - version = "2.0.12"; - src = pkgs.fetchurl { - name = "factorio_headless_x64-${version}.tar.xz"; - url = "https://www.factorio.com/get-download/${version}/headless/linux64"; - hash = "sha256-0vgg5eJ6ZEFO0TUixNsByCs8YyPGOArgqnXbT5RIjTE="; - }; - }); + package = pkgs.factorio-headless; # I override this in ./pkgs public = true; lan = true; openFirewall = true; diff --git a/pkgs/default.nix b/pkgs/default.nix index b3f1b79..b702886 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -8,4 +8,7 @@ rec { emmet-cli = pkgs.callPackage ./emmet-cli.nix { }; material-wifi-icons = pkgs.callPackage ./material-wifi-icons.nix { }; gnome-pass-search-provider = pkgs.callPackage ./gnome-pass-search-provider.nix { }; + factorio-headless = pkgs.callPackage ./factorio-headless { + inherit (pkgs.unstable) factorio-headless; + }; } diff --git a/pkgs/factorio-headless/default.nix b/pkgs/factorio-headless/default.nix new file mode 100644 index 0000000..b6d34ef --- /dev/null +++ b/pkgs/factorio-headless/default.nix @@ -0,0 +1,10 @@ +{ factorio-headless, pkgs }: + +factorio-headless.overrideAttrs (_: rec { + version = "2.0.13"; + src = pkgs.fetchurl { + name = "factorio_headless_x64-${version}.tar.xz"; + url = "https://www.factorio.com/get-download/${version}/headless/linux64"; + hash = "sha256-J7NpAaOeWTrfKEGMAoYULGx6n4PRVpY8c2m9QFolx9E="; + }; +}) diff --git a/pkgs/factorio-headless/update.sh b/pkgs/factorio-headless/update.sh new file mode 100755 index 0000000..9f7bce9 --- /dev/null +++ b/pkgs/factorio-headless/update.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +set -xe + +cd "$(dirname $0)" + +current_version="$(rg '^.*?version\s*=\s*"(.+)".*?$' --replace '$1' ./default.nix)" +current_hash="$(rg '^.*?hash\s*=\s*"(.+)".*?$' --replace '$1' ./default.nix)" + +new_version="$(curl https://factorio.com/api/latest-releases | jq -r .stable.headless)" +new_hash="$(nix-hash --to-sri --type sha256 $(nix-prefetch-url --type sha256 https://www.factorio.com/get-download/${new_version}/headless/linux64))" + +sd "$current_version" "$new_version" ./default.nix +sd "$current_hash" "$new_hash" ./default.nix From ee22f17dbef22cea9a849903bf0f55599ab0e4ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sun, 3 Nov 2024 04:17:56 -0300 Subject: [PATCH 102/218] amdgpu: add custom fan control --- hosts/monolith/amdgpu.nix | 9 ++++++- scripts/amd-fan-control | 50 +++++++++++++++++++++++++++++++++++++++ scripts/default.nix | 1 + 3 files changed, 59 insertions(+), 1 deletion(-) create mode 100755 scripts/amd-fan-control diff --git a/hosts/monolith/amdgpu.nix b/hosts/monolith/amdgpu.nix index c02af7e..f3cefaa 100644 --- a/hosts/monolith/amdgpu.nix +++ b/hosts/monolith/amdgpu.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, lib, ... }: let undervoltGpu = pkgs.writeShellScript "undervolt-gpu" '' set -xe @@ -18,6 +18,13 @@ in "amdgpu.ppfeaturemask=0xfffd7fff" # enable undervolting ]; + systemd.services.amd-fan-control = { + script = '' + ${lib.getExe pkgs.amd-fan-control} /sys/class/drm/card1/device 60 85 + ''; + wantedBy = [ "multi-user.target" ]; + }; + hardware.opengl.driSupport = true; # # For 32 bit applications hardware.opengl.driSupport32Bit = true; diff --git a/scripts/amd-fan-control b/scripts/amd-fan-control new file mode 100755 index 0000000..641c5cf --- /dev/null +++ b/scripts/amd-fan-control @@ -0,0 +1,50 @@ +#!/usr/bin/env bash + +set -e + +DEVICE="$1" # eg: /sys/class/drm/card1/device +HWMON=$(echo "$DEVICE"/hwmon/hwmon*) + +exit() { + echo "Setting controll to auto" >&2 + echo 2 > "$HWMON/pwm1_enable" +} + +trap exit EXIT INT + +bail() { + echo "Error: $@" >&2 + echo "Exiting..." >&2 + exit 1 +} + +if ! [ -d $HWMON ]; then + bail "Invalid HWMON" +fi + +TEMP_INPUT="$HWMON/temp2_input" + +if ! [ -f $TEMP_INPUT ]; then + bail "Invalid TEMP_INPUT" +fi + +MIN="$2" +MAX="$3" + +echo "Running..." >&2 +while true; do + TEMPERATURE_RAW=$(cat "$TEMP_INPUT") + TEMPERATURE="$(( $TEMPERATURE_RAW / 1000 ))" + # Remap from a number between 60_000..90_000 to 0..255 + PWM=$(( ($TEMPERATURE - $MIN) * 255 / ($MAX - $MIN) )) + + if [ "$PWM" -gt 255 ]; then + PWM=255 + elif [ "$PWM" -lt 0 ]; then + PWM=0 + fi + + echo 1 > "$HWMON/pwm1_enable" + echo "$PWM" > "$HWMON/pwm1" + sleep .1s +done diff --git a/scripts/default.nix b/scripts/default.nix index 79fe4c6..c621d47 100644 --- a/scripts/default.nix +++ b/scripts/default.nix @@ -23,6 +23,7 @@ in with final; createScripts { + amd-fan-control = [ bash ]; br = [ ]; bmenu = [ bemenu From fd32b735f6b941970bb3a99ebb855c37650bc97d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Thu, 7 Nov 2024 13:01:19 -0300 Subject: [PATCH 103/218] kak: add scss formatter --- user/kakoune/filetypes.kak | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/user/kakoune/filetypes.kak b/user/kakoune/filetypes.kak index 293293c..7ea774e 100644 --- a/user/kakoune/filetypes.kak +++ b/user/kakoune/filetypes.kak @@ -38,6 +38,10 @@ hook global BufCreate .*\.js %{ set buffer formatcmd 'prettier --parser babel' } +hook global BufCreate .*\.scss %{ + set buffer formatcmd 'prettier --parser scss' +} + hook global BufCreate .*\.vue %{ set buffer formatcmd 'prettier --parser vue' hook buffer InsertCompletionHide { From 8dd92bf641094467a55877f696a71db914782318 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sun, 10 Nov 2024 23:25:20 -0300 Subject: [PATCH 104/218] factorio: 2.0.13 -> 2.0.15 --- pkgs/factorio-headless/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/factorio-headless/default.nix b/pkgs/factorio-headless/default.nix index b6d34ef..9e940f0 100644 --- a/pkgs/factorio-headless/default.nix +++ b/pkgs/factorio-headless/default.nix @@ -1,10 +1,10 @@ { factorio-headless, pkgs }: factorio-headless.overrideAttrs (_: rec { - version = "2.0.13"; + version = "2.0.15"; src = pkgs.fetchurl { name = "factorio_headless_x64-${version}.tar.xz"; url = "https://www.factorio.com/get-download/${version}/headless/linux64"; - hash = "sha256-J7NpAaOeWTrfKEGMAoYULGx6n4PRVpY8c2m9QFolx9E="; + hash = "sha256-cLRBy4B4EaYFhsARBySMHY164EO9HyNnX8kk+6qlONg="; }; }) From 0faa8354ad8da46b9a88901a7159ad3e32b93005 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 23 Nov 2024 23:41:28 -0300 Subject: [PATCH 105/218] factorio: 2.0.15 -> 2.0.20 --- pkgs/factorio-headless/default.nix | 4 ++-- pkgs/factorio-headless/update.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/factorio-headless/default.nix b/pkgs/factorio-headless/default.nix index 9e940f0..01ff2cc 100644 --- a/pkgs/factorio-headless/default.nix +++ b/pkgs/factorio-headless/default.nix @@ -1,10 +1,10 @@ { factorio-headless, pkgs }: factorio-headless.overrideAttrs (_: rec { - version = "2.0.15"; + version = "2.0.20"; src = pkgs.fetchurl { name = "factorio_headless_x64-${version}.tar.xz"; url = "https://www.factorio.com/get-download/${version}/headless/linux64"; - hash = "sha256-cLRBy4B4EaYFhsARBySMHY164EO9HyNnX8kk+6qlONg="; + hash = "sha256-xKkB8vHb7btBZUVg20xvq2g6MMIDNOgF1O90DAQWUVo="; }; }) diff --git a/pkgs/factorio-headless/update.sh b/pkgs/factorio-headless/update.sh index 9f7bce9..2f57612 100755 --- a/pkgs/factorio-headless/update.sh +++ b/pkgs/factorio-headless/update.sh @@ -10,5 +10,5 @@ current_hash="$(rg '^.*?hash\s*=\s*"(.+)".*?$' --replace '$1' ./default.nix)" new_version="$(curl https://factorio.com/api/latest-releases | jq -r .stable.headless)" new_hash="$(nix-hash --to-sri --type sha256 $(nix-prefetch-url --type sha256 https://www.factorio.com/get-download/${new_version}/headless/linux64))" -sd "$current_version" "$new_version" ./default.nix -sd "$current_hash" "$new_hash" ./default.nix +sd --fixed-strings "$current_version" "$new_version" ./default.nix +sd --fixed-strings "$current_hash" "$new_hash" ./default.nix From 08b6907b45c685bae12871011caff5a5aee9a97a Mon Sep 17 00:00:00 2001 From: lelgenio Date: Wed, 4 Dec 2024 17:43:02 -0300 Subject: [PATCH 106/218] home: add slugify package --- user/home.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/user/home.nix b/user/home.nix index aef10ad..b380515 100644 --- a/user/home.nix +++ b/user/home.nix @@ -85,6 +85,7 @@ ripgrep translate-shell lipsum + python3Packages.python-slugify par mate.engrampa From 0603be4fe5e80c10336b093ef757dde301b27c39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 4 Dec 2024 21:55:37 -0300 Subject: [PATCH 107/218] factorio: 2.0.20 -> 2.0.23 --- pkgs/factorio-headless/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/factorio-headless/default.nix b/pkgs/factorio-headless/default.nix index 01ff2cc..aa84b01 100644 --- a/pkgs/factorio-headless/default.nix +++ b/pkgs/factorio-headless/default.nix @@ -1,10 +1,10 @@ { factorio-headless, pkgs }: factorio-headless.overrideAttrs (_: rec { - version = "2.0.20"; + version = "2.0.23"; src = pkgs.fetchurl { name = "factorio_headless_x64-${version}.tar.xz"; url = "https://www.factorio.com/get-download/${version}/headless/linux64"; - hash = "sha256-xKkB8vHb7btBZUVg20xvq2g6MMIDNOgF1O90DAQWUVo="; + hash = "sha256-6Bn8mtbfBhv51L/8kZiN0Y0OOYLIscIsBSXXi9o+8hY="; }; }) From 6596fe271201f2ed1be559ae3f3404689b653f20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sun, 8 Dec 2024 18:55:00 -0300 Subject: [PATCH 108/218] tablet: reduce drawing area --- user/sway/open-tablet-driver.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/user/sway/open-tablet-driver.json b/user/sway/open-tablet-driver.json index 3b388a1..632cd6c 100644 --- a/user/sway/open-tablet-driver.json +++ b/user/sway/open-tablet-driver.json @@ -10,8 +10,8 @@ "Filters": [], "AbsoluteModeSettings": { "Display": { - "Width": 1920.0, - "Height": 1080.0, + "Width": 960.0, + "Height": 540.0, "X": 960.0, "Y": 540.0, "Rotation": 0.0 @@ -111,4 +111,4 @@ "LockUsableAreaDisplay": true, "LockUsableAreaTablet": true, "Tools": [] -} +} \ No newline at end of file From 2c31e85b559afc0c92dfe3374b3485cfcb562f3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sun, 8 Dec 2024 18:55:43 -0300 Subject: [PATCH 109/218] firefox: remove mastodon simplified federation --- user/firefox.nix | 5 ----- 1 file changed, 5 deletions(-) diff --git a/user/firefox.nix b/user/firefox.nix index 48c4fc9..063cd26 100644 --- a/user/firefox.nix +++ b/user/firefox.nix @@ -61,11 +61,6 @@ in hash = "sha256-ApCc+MNmW9Wd/5seV6npePQVEaszT/rhD9EB7HGiUb8="; }) - (pkgs.fetchFirefoxAddon { - name = "mastodon_simplified_federation"; - url = "https://addons.mozilla.org/firefox/downloads/file/4215691/mastodon_simplified_federation-2.2.xpi"; - hash = "sha256-4iU25chpjsdsMTPaa0yQOTWc9V9q1qFz6YV0lYtNjLA="; - }) (pkgs.fetchFirefoxAddon { name = "substitoot"; url = "https://addons.mozilla.org/firefox/downloads/file/4236602/substitoot-0.7.2.0.xpi"; From 1fe114cdcdd1d2458503fc8756eb3a8452dc1383 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sun, 8 Dec 2024 19:13:16 -0300 Subject: [PATCH 110/218] phantom: add lemmy --- hosts/phantom/default.nix | 1 + hosts/phantom/lemmy.nix | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 hosts/phantom/lemmy.nix diff --git a/hosts/phantom/default.nix b/hosts/phantom/default.nix index e5570ee..45c27d7 100644 --- a/hosts/phantom/default.nix +++ b/hosts/phantom/default.nix @@ -11,6 +11,7 @@ ../../system/nix.nix ./hardware-config.nix ./mastodon.nix + ./lemmy.nix ./nextcloud.nix ./nginx.nix ./syncthing.nix diff --git a/hosts/phantom/lemmy.nix b/hosts/phantom/lemmy.nix new file mode 100644 index 0000000..61bf2e4 --- /dev/null +++ b/hosts/phantom/lemmy.nix @@ -0,0 +1,15 @@ +{ + services.lemmy = { + enable = true; + settings = { + hostname = "lemmy.lelgenio.com"; + }; + database.createLocally = true; + nginx.enable = true; + }; + + services.nginx.virtualHosts."lemmy.lelgenio.com" = { + enableACME = true; + forceSSL = true; + }; +} From fbc3d6b96a7c2532756d4ae422975caf61fc7743 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Thu, 12 Dec 2024 20:11:34 -0300 Subject: [PATCH 111/218] update: 24.11 --- flake.lock | 234 +++++++++++++++++----------- flake.nix | 43 ++--- hosts/double-rainbow.nix | 3 +- hosts/monolith/amdgpu.nix | 9 +- hosts/monolith/default.nix | 6 +- hosts/phantom/lemmy.nix | 3 + hosts/phantom/nextcloud.nix | 2 +- pkgs/gnome-pass-search-provider.nix | 1 - system/configuration.nix | 2 +- system/fonts.nix | 2 +- system/nix.nix | 2 +- system/sound.nix | 1 - system/steam.nix | 3 +- user/firefox.nix | 1 + user/gnome.nix | 4 +- user/sway/sway-binds.nix | 3 +- user/vscode/default.nix | 9 +- 17 files changed, 183 insertions(+), 145 deletions(-) diff --git a/flake.lock b/flake.lock index 54aac8d..48adc6a 100644 --- a/flake.lock +++ b/flake.lock @@ -166,9 +166,7 @@ "advisory-db": "advisory-db", "crane": "crane", "flake-utils": "flake-utils_2", - "nixpkgs": [ - "nixpkgs" - ] + "nixpkgs": "nixpkgs" }, "locked": { "lastModified": 1693509848, @@ -188,9 +186,7 @@ "inputs": { "fenix": "fenix", "flake-utils": "flake-utils_3", - "nixpkgs": [ - "nixpkgs" - ] + "nixpkgs": "nixpkgs_2" }, "locked": { "lastModified": 1659395338, @@ -213,11 +209,11 @@ ] }, "locked": { - "lastModified": 1730190761, - "narHash": "sha256-o5m5WzvY6cGIDupuOvjgNSS8AN6yP2iI9MtUC6q/uos=", + "lastModified": 1733168902, + "narHash": "sha256-8dupm9GfK+BowGdQd7EHK5V61nneLfr9xR6sc5vtDi0=", "owner": "nix-community", "repo": "disko", - "rev": "3979285062d6781525cded0f6c4ff92e71376b55", + "rev": "785c1e02c7e465375df971949b8dcbde9ec362e5", "type": "github" }, "original": { @@ -228,16 +224,14 @@ }, "dzgui-nix": { "inputs": { - "nixpkgs": [ - "nixpkgs" - ] + "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1727831626, - "narHash": "sha256-Gvt5lapgNRRTL95gFH8vm48f8gjsk7GYM4Qo5aUOzzo=", + "lastModified": 1733974299, + "narHash": "sha256-fPvJ/ZsQGVqGJqYL2gKotalQUoG1wpUYTJkRKG2BrwA=", "owner": "lelgenio", "repo": "dzgui-nix", - "rev": "38cf2b507d75cc36ec127b21fc5a4144fc821525", + "rev": "580022e73efedb17ddf640115539cb9bd1423d44", "type": "github" }, "original": { @@ -371,7 +365,7 @@ }, "flake-utils_5": { "inputs": { - "systems": "systems_6" + "systems": "systems_5" }, "locked": { "lastModified": 1681202837, @@ -389,7 +383,7 @@ }, "flake-utils_6": { "inputs": { - "systems": "systems_7" + "systems": "systems_6" }, "locked": { "lastModified": 1681202837, @@ -407,7 +401,7 @@ }, "flake-utils_7": { "inputs": { - "systems": "systems_8" + "systems": "systems_7" }, "locked": { "lastModified": 1710146030, @@ -446,16 +440,16 @@ ] }, "locked": { - "lastModified": 1726989464, - "narHash": "sha256-Vl+WVTJwutXkimwGprnEtXc/s/s8sMuXzqXaspIGlwM=", + "lastModified": 1733951536, + "narHash": "sha256-Zb5ZCa7Xj+0gy5XVXINTSr71fCfAv+IKtmIXNrykT54=", "owner": "nix-community", "repo": "home-manager", - "rev": "2f23fa308a7c067e52dfcc30a0758f47043ec176", + "rev": "1318c3f3b068cdcea922fa7c1a0a1f0c96c22f5f", "type": "github" }, "original": { "owner": "nix-community", - "ref": "release-24.05", + "ref": "release-24.11", "repo": "home-manager", "type": "github" } @@ -464,9 +458,7 @@ "inputs": { "crane": "crane_2", "flake-utils": "flake-utils_4", - "nixpkgs": [ - "nixpkgs" - ] + "nixpkgs": "nixpkgs_4" }, "locked": { "lastModified": 1728159958, @@ -489,11 +481,11 @@ ] }, "locked": { - "lastModified": 1729999765, - "narHash": "sha256-LYsavZXitFjjyETZoij8usXjTa7fa9AIF3Sk3MJSX+Y=", + "lastModified": 1733629314, + "narHash": "sha256-U0vivjQFAwjNDYt49Krevs1murX9hKBFe2Ye0cHpgbU=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "0e3a8778c2ee218eff8de6aacf3d2fa6c33b2d4f", + "rev": "f1e477a7dd11e27e7f98b646349cd66bbabf2fb8", "type": "github" }, "original": { @@ -511,46 +503,46 @@ ], "nixpkgs-24_05": [ "nixpkgs" - ], - "utils": "utils" + ] }, "locked": { - "lastModified": 1718084203, - "narHash": "sha256-Cx1xoVfSMv1XDLgKg08CUd1EoTYWB45VmB9XIQzhmzI=", + "lastModified": 1722877200, + "narHash": "sha256-qgKDNJXs+od+1UbRy62uk7dYal3h98I4WojfIqMoGcg=", "owner": "simple-nixos-mailserver", "repo": "nixos-mailserver", - "rev": "29916981e7b3b5782dc5085ad18490113f8ff63b", + "rev": "af7d3bf5daeba3fc28089b015c0dd43f06b176f2", "type": "gitlab" }, "original": { "owner": "simple-nixos-mailserver", - "ref": "nixos-24.05", + "ref": "master", "repo": "nixos-mailserver", "type": "gitlab" } }, "nixpkgs": { "locked": { - "lastModified": 1730137625, - "narHash": "sha256-9z8oOgFZiaguj+bbi3k4QhAD6JabWrnv7fscC/mt0KE=", + "lastModified": 1684425776, + "narHash": "sha256-eXzSIXkzXa9EecoDF9xCsoim0vd++8dvYU7QOuQMO8A=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "64b80bfb316b57cdb8919a9110ef63393d74382a", + "rev": "8dc174d8b768893172eb3e52008f10f48dfbd5cf", "type": "github" }, "original": { - "id": "nixpkgs", - "ref": "nixos-24.05", - "type": "indirect" + "owner": "NixOS", + "ref": "release-22.11", + "repo": "nixpkgs", + "type": "github" } }, "nixpkgs-unstable": { "locked": { - "lastModified": 1729880355, - "narHash": "sha256-RP+OQ6koQQLX5nw0NmcDrzvGL8HDLnyXt/jHhL1jwjM=", + "lastModified": 1733759999, + "narHash": "sha256-463SNPWmz46iLzJKRzO3Q2b0Aurff3U1n0nYItxq7jU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "18536bf04cd71abd345f9579158841376fdd0c5a", + "rev": "a73246e2eef4c6ed172979932bc80e1404ba2d56", "type": "github" }, "original": { @@ -559,6 +551,99 @@ "type": "indirect" } }, + "nixpkgs_2": { + "locked": { + "lastModified": 1659219666, + "narHash": "sha256-pzYr5fokQPHv7CmUXioOhhzDy/XyWOIXP4LZvv/T7Mk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "7b9be38c7250b22d829ab6effdee90d5e40c6e5c", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-unstable", + "type": "indirect" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1733749988, + "narHash": "sha256-+5qdtgXceqhK5ZR1YbP1fAUsweBIrhL38726oIEAtDs=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "bc27f0fde01ce4e1bfec1ab122d72b7380278e68", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixpkgs-unstable", + "type": "indirect" + } + }, + "nixpkgs_4": { + "locked": { + "lastModified": 1719010183, + "narHash": "sha256-8HMWaqpyjbVeEsmy/A2H6VFtW/Wr71vkPLnpTiAXu+8=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "0f620ca71fa69abb411a6c78739a9b171a0a95a6", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "release-24.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_5": { + "locked": { + "lastModified": 1733808091, + "narHash": "sha256-KWwINTQelKOoQgrXftxoqxmKFZb9pLVfnRvK270nkVk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "a0f3e10d94359665dba45b71b4227b0aeb851f8e", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-24.11", + "type": "indirect" + } + }, + "nixpkgs_6": { + "locked": { + "lastModified": 1719010183, + "narHash": "sha256-8HMWaqpyjbVeEsmy/A2H6VFtW/Wr71vkPLnpTiAXu+8=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "0f620ca71fa69abb411a6c78739a9b171a0a95a6", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "release-24.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_7": { + "locked": { + "lastModified": 1714091391, + "narHash": "sha256-68n3GBvlm1MIeJXadPzQ3v8Y9sIW3zmv8gI5w5sliC8=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "4c86138ce486d601d956a165e2f7a0fc029a03c1", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "plymouth-themes": { "flake": false, "locked": { @@ -578,11 +663,11 @@ "ranger-icons": { "flake": false, "locked": { - "lastModified": 1713564482, - "narHash": "sha256-sijO9leDXgnjgcVlh5fKYalhjOupwFMRyH0xh2g/rEQ=", + "lastModified": 1732436707, + "narHash": "sha256-sqqsWU5/zBwIpyJKEBiCfosqKNvISWCw8cFgzLcNjUY=", "owner": "alexanderjeurissen", "repo": "ranger_devicons", - "rev": "a8d626485ca83719e1d8d5e32289cd96a097c861", + "rev": "84db73d0a50a8c6085b3ec63f834c781b603e83e", "type": "github" }, "original": { @@ -604,7 +689,7 @@ "made-you-look": "made-you-look", "nix-index-database": "nix-index-database", "nixos-mailserver": "nixos-mailserver", - "nixpkgs": "nixpkgs", + "nixpkgs": "nixpkgs_5", "nixpkgs-unstable": "nixpkgs-unstable", "plymouth-themes": "plymouth-themes", "ranger-icons": "ranger-icons", @@ -765,21 +850,6 @@ "type": "github" } }, - "systems_8": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, "tlauncher": { "inputs": { "flake-utils": "flake-utils_5", @@ -788,11 +858,11 @@ ] }, "locked": { - "lastModified": 1684504342, - "narHash": "sha256-rJ0eH7BuPizvXPc+LjVtovse4gWEuxP2WiyNdXjPNL4=", + "lastModified": 1734044605, + "narHash": "sha256-CeCYv3JFJIySSf2eX9ceEOF1FqNGeJnzEuO5f+OvioQ=", "ref": "refs/heads/main", - "rev": "add4df7220bd0b85177a1938c02b60c966c5eb71", - "revCount": 3, + "rev": "6a68f2cda0aa2fbb399a4c43b445e8c1a2df0634", + "revCount": 4, "type": "git", "url": "https://git.lelgenio.xyz/lelgenio/tlauncher-nix" }, @@ -817,31 +887,13 @@ "url": "https://git.lelgenio.com/lelgenio/tomater" } }, - "utils": { - "inputs": { - "systems": "systems_5" - }, - "locked": { - "lastModified": 1709126324, - "narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "d465f4819400de7c8d874d50b982301f28a84605", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "vpsadminos": { "locked": { - "lastModified": 1730290190, - "narHash": "sha256-a+op2lnWrCytuEhLOE24SKR/irRfjwDEHkpLyAL5P90=", + "lastModified": 1733157322, + "narHash": "sha256-lN6AY1zxZ0mQzpvLIfpdHdZ7oThHOlWFb2HUeOVcCJQ=", "owner": "vpsfreecz", "repo": "vpsadminos", - "rev": "63ac771b9667b45ab2ea87363f69ca7f85668e9b", + "rev": "8ba8b0885526f484da44c0aeb4894dbaf548e61f", "type": "github" }, "original": { @@ -854,9 +906,7 @@ "inputs": { "crane": "crane_3", "flake-utils": "flake-utils_6", - "nixpkgs": [ - "nixpkgs" - ] + "nixpkgs": "nixpkgs_6" }, "locked": { "lastModified": 1719076817, @@ -875,9 +925,7 @@ "wl-crosshair": { "inputs": { "flake-utils": "flake-utils_7", - "nixpkgs": [ - "nixpkgs" - ] + "nixpkgs": "nixpkgs_7" }, "locked": { "lastModified": 1715216838, diff --git a/flake.nix b/flake.nix index e7f5813..c580335 100644 --- a/flake.nix +++ b/flake.nix @@ -1,10 +1,10 @@ { description = "My system config"; inputs = { - nixpkgs.url = "nixpkgs/nixos-24.05"; + nixpkgs.url = "nixpkgs/nixos-24.11"; nixpkgs-unstable.url = "nixpkgs/nixos-unstable"; - home-manager.url = "github:nix-community/home-manager/release-24.05"; + home-manager.url = "github:nix-community/home-manager/release-24.11"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; vpsadminos.url = "github:vpsfreecz/vpsadminos"; @@ -27,45 +27,29 @@ }; nixos-mailserver = { - url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-24.05"; + url = "gitlab:simple-nixos-mailserver/nixos-mailserver/master"; inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs-24_05.follows = "nixpkgs"; }; - dzgui-nix = { - url = "github:lelgenio/dzgui-nix"; - inputs.nixpkgs.follows = "nixpkgs"; - }; + dzgui-nix.url = "github:lelgenio/dzgui-nix"; tlauncher = { url = "git+https://git.lelgenio.xyz/lelgenio/tlauncher-nix"; inputs.nixpkgs.follows = "nixpkgs"; }; - disko.url = "github:nix-community/disko"; - disko.inputs.nixpkgs.follows = "nixpkgs"; + disko = { + url = "github:nix-community/disko"; + inputs.nixpkgs.follows = "nixpkgs"; + }; # my stuff - dhist = { - url = "github:lelgenio/dhist"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - demoji = { - url = "github:lelgenio/demoji"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - wl-crosshair = { - url = "github:lelgenio/wl-crosshair"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - warthunder-leak-counter = { - url = "git+https://git.lelgenio.com/lelgenio/warthunder-leak-counter"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - made-you-look = { - url = "git+https://git.lelgenio.com/lelgenio/made-you-look"; - inputs.nixpkgs.follows = "nixpkgs"; - }; + dhist.url = "github:lelgenio/dhist"; + demoji.url = "github:lelgenio/demoji"; + wl-crosshair.url = "github:lelgenio/wl-crosshair"; + warthunder-leak-counter.url = "git+https://git.lelgenio.com/lelgenio/warthunder-leak-counter"; + made-you-look.url = "git+https://git.lelgenio.com/lelgenio/made-you-look"; catboy-spinner = { url = "git+https://git.lelgenio.com/lelgenio/catboy-spinner"; flake = false; @@ -115,7 +99,6 @@ { login-manager.greetd.enable = desktop == "sway"; } inputs.agenix.nixosModules.default - inputs.dzgui-nix.nixosModules.default inputs.home-manager.nixosModules.home-manager inputs.disko.nixosModules.disko { diff --git a/hosts/double-rainbow.nix b/hosts/double-rainbow.nix index 4c8636a..af8c5e4 100644 --- a/hosts/double-rainbow.nix +++ b/hosts/double-rainbow.nix @@ -37,7 +37,8 @@ in options = [ "subvol=@" ] ++ btrfs_options ++ btrfs_ssd; }; - boot.initrd.luks.devices."luks-d6573cf8-25f0-4ffc-8046-ac3a4db1e964".device = "/dev/disk/by-uuid/d6573cf8-25f0-4ffc-8046-ac3a4db1e964"; + boot.initrd.luks.devices."luks-d6573cf8-25f0-4ffc-8046-ac3a4db1e964".device = + "/dev/disk/by-uuid/d6573cf8-25f0-4ffc-8046-ac3a4db1e964"; fileSystems."/boot" = { device = "/dev/disk/by-uuid/97EB-7DB5"; diff --git a/hosts/monolith/amdgpu.nix b/hosts/monolith/amdgpu.nix index f3cefaa..0df9923 100644 --- a/hosts/monolith/amdgpu.nix +++ b/hosts/monolith/amdgpu.nix @@ -25,16 +25,13 @@ in wantedBy = [ "multi-user.target" ]; }; - hardware.opengl.driSupport = true; - # # For 32 bit applications - hardware.opengl.driSupport32Bit = true; + hardware.graphics.enable32Bit = true; - hardware.opengl.extraPackages = with pkgs; [ + hardware.graphics.extraPackages = with pkgs; [ libva libvdpau vaapiVdpau - rocm-opencl-icd - rocm-opencl-runtime + rocmPackages.clr rocmPackages.rocm-smi ]; diff --git a/hosts/monolith/default.nix b/hosts/monolith/default.nix index f4fde3a..77dfa50 100644 --- a/hosts/monolith/default.nix +++ b/hosts/monolith/default.nix @@ -35,7 +35,11 @@ in "sd_mod" ]; - hardware.opentabletdriver.enable = true; + hardware.opentabletdriver = { + enable = true; + # TODO: remove this once otd gets updated + package = pkgs.unstable.opentabletdriver; + }; boot.kernelPackages = pkgs.linuxPackages_latest; diff --git a/hosts/phantom/lemmy.nix b/hosts/phantom/lemmy.nix index 61bf2e4..0e6ee1a 100644 --- a/hosts/phantom/lemmy.nix +++ b/hosts/phantom/lemmy.nix @@ -1,3 +1,4 @@ +{ pkgs, ... }: { services.lemmy = { enable = true; @@ -8,6 +9,8 @@ nginx.enable = true; }; + services.pict-rs.package = pkgs.pict-rs; + services.nginx.virtualHosts."lemmy.lelgenio.com" = { enableACME = true; forceSSL = true; diff --git a/hosts/phantom/nextcloud.nix b/hosts/phantom/nextcloud.nix index 88f0b02..a7ef9f3 100644 --- a/hosts/phantom/nextcloud.nix +++ b/hosts/phantom/nextcloud.nix @@ -7,7 +7,7 @@ { services.nextcloud = { enable = true; - package = pkgs.nextcloud29; + package = pkgs.nextcloud30; hostName = "cloud.lelgenio.com"; https = true; config = { diff --git a/pkgs/gnome-pass-search-provider.nix b/pkgs/gnome-pass-search-provider.nix index e149505..ab2e94a 100644 --- a/pkgs/gnome-pass-search-provider.nix +++ b/pkgs/gnome-pass-search-provider.nix @@ -5,7 +5,6 @@ wrapGAppsHook, gtk3, gobject-introspection, - gnome, }: let diff --git a/system/configuration.nix b/system/configuration.nix index b905240..5db8efc 100644 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -43,7 +43,7 @@ glib # gsettings usbutils # dracula-theme # gtk theme - gnome3.adwaita-icon-theme # default gnome cursors + adwaita-icon-theme # default gnome cursors ]; services.geoclue2.enable = true; diff --git a/system/fonts.nix b/system/fonts.nix index d8bff5a..2815563 100644 --- a/system/fonts.nix +++ b/system/fonts.nix @@ -3,7 +3,7 @@ fonts.enableDefaultPackages = true; fonts.packages = with pkgs; [ noto-fonts - noto-fonts-cjk + noto-fonts-cjk-sans noto-fonts-emoji nerdfonts_fira_hack ]; diff --git a/system/nix.nix b/system/nix.nix index c91e362..482bb93 100644 --- a/system/nix.nix +++ b/system/nix.nix @@ -44,7 +44,7 @@ in ]; }; extraOptions = '' - experimental-features = nix-command flakes repl-flake + experimental-features = nix-command flakes ''; }; } diff --git a/system/sound.nix b/system/sound.nix index 8ef55ab..f04e513 100644 --- a/system/sound.nix +++ b/system/sound.nix @@ -1,6 +1,5 @@ { pkgs, ... }: { - sound.enable = true; hardware.pulseaudio.enable = false; services.pipewire = { enable = true; diff --git a/system/steam.nix b/system/steam.nix index 1d8b412..f82c958 100644 --- a/system/steam.nix +++ b/system/steam.nix @@ -31,7 +31,6 @@ environment.systemPackages = with pkgs; [ protontricks bottles + inputs.dzgui-nix.packages.${pkgs.system}.default ]; - - programs.dzgui.enable = true; } diff --git a/user/firefox.nix b/user/firefox.nix index 063cd26..4b69ad2 100644 --- a/user/firefox.nix +++ b/user/firefox.nix @@ -123,6 +123,7 @@ in if desktop == "sway" then '' #titlebar { display: none !important; } + #TabsToolbar { display: none !important; } #sidebar-header { display: none !important; } '' else diff --git a/user/gnome.nix b/user/gnome.nix index 443f1fe..74951c7 100644 --- a/user/gnome.nix +++ b/user/gnome.nix @@ -10,7 +10,7 @@ lib.mkIf (config.my.desktop == "gnome") { home.pointerCursor = { name = "Adwaita"; size = 24; - package = pkgs.gnome.adwaita-icon-theme; + package = pkgs.adwaita-icon-theme; gtk.enable = true; }; @@ -42,7 +42,7 @@ lib.mkIf (config.my.desktop == "gnome") { qt6Packages.qtstyleplugin-kvantum ]; - services.gpg-agent.pinentryPackage = pkgs.pinentry-gnome3; + services.gpg-agent.pinentryPackage = pkgs.pinentry-gnome; xdg.defaultApplications = { enable = lib.mkForce false; diff --git a/user/sway/sway-binds.nix b/user/sway/sway-binds.nix index cd0ac9a..fd05236 100644 --- a/user/sway/sway-binds.nix +++ b/user/sway/sway-binds.nix @@ -166,7 +166,8 @@ let other_binds = { "${mod}+p" = "exec ${pkgs.wpass}/bin/wpass"; "${mod}+s" = "exec ${menu}"; - "${mod}+g" = "exec ${pkgs.demoji}/bin/demoji --lang pt --fallback --copy -- ${pkgs.wdmenu}/bin/wdmenu"; + "${mod}+g" = + "exec ${pkgs.demoji}/bin/demoji --lang pt --fallback --copy -- ${pkgs.wdmenu}/bin/wdmenu"; "${mod}+c" = "exec ${pkgs.color_picker}/bin/color_picker"; "${mod}+Return" = "exec ${terminal}"; "${mod}+Ctrl+Return" = "exec thunar"; diff --git a/user/vscode/default.nix b/user/vscode/default.nix index 35d972b..b8afdfd 100644 --- a/user/vscode/default.nix +++ b/user/vscode/default.nix @@ -12,8 +12,11 @@ }; home.file = { - "${config.home.homeDirectory}/.config/VSCodium/User/keybindings.json".source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/projects/nixos-config/user/vscode/keybindings.json"; - "${config.home.homeDirectory}/.config/VSCodium/User/settings.json".source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/projects/nixos-config/user/vscode/settings.json"; - "${config.home.homeDirectory}/.config/VSCodium/product.json".source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/projects/nixos-config/user/vscode/product.json"; + "${config.home.homeDirectory}/.config/VSCodium/User/keybindings.json".source = + config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/projects/nixos-config/user/vscode/keybindings.json"; + "${config.home.homeDirectory}/.config/VSCodium/User/settings.json".source = + config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/projects/nixos-config/user/vscode/settings.json"; + "${config.home.homeDirectory}/.config/VSCodium/product.json".source = + config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/projects/nixos-config/user/vscode/product.json"; }; } From 3eb36a334d1f17aeb6775b4d1958dcb4af44152d Mon Sep 17 00:00:00 2001 From: lelgenio Date: Tue, 17 Dec 2024 16:12:37 -0300 Subject: [PATCH 112/218] git: add clean-deleted-remotes command --- scripts/default.nix | 6 ++++++ scripts/git_clean_remote_deleted | 6 ++++++ user/git.nix | 5 +++++ 3 files changed, 17 insertions(+) create mode 100755 scripts/git_clean_remote_deleted diff --git a/scripts/default.nix b/scripts/default.nix index c621d47..24eded1 100644 --- a/scripts/default.nix +++ b/scripts/default.nix @@ -125,6 +125,12 @@ zbar wl-clipboard ]; + git_clean_remote_deleted = [ + git + gnugrep + gawk + findutils + ]; pint-fmt = [ ]; powerplay-led-idle = [ bash diff --git a/scripts/git_clean_remote_deleted b/scripts/git_clean_remote_deleted new file mode 100755 index 0000000..99bc93d --- /dev/null +++ b/scripts/git_clean_remote_deleted @@ -0,0 +1,6 @@ +#!/bin/sh + +git branch -vv \ +| grep ': gone]' \ +| awk '{print $1}' \ +| xargs git branch -D diff --git a/user/git.nix b/user/git.nix index 94532f3..867b9a5 100644 --- a/user/git.nix +++ b/user/git.nix @@ -36,8 +36,13 @@ in alias = { graph = "log --graph --oneline --branches"; root = "rev-parse --show-toplevel"; + clean-deleted-remotes = "!" + (lib.getExe pkgs.git_clean_remote_deleted); }; }; }; + + home.packages = with pkgs; [ + git_clean_remote_deleted + ]; }; } From f41f9aa0a550afe4328b3548fcc569879ffdd6bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 20 Dec 2024 12:51:37 -0300 Subject: [PATCH 113/218] chat: switch do vesktop -> discordcanary --- user/chat.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user/chat.nix b/user/chat.nix index a68055f..fda61e3 100644 --- a/user/chat.nix +++ b/user/chat.nix @@ -9,14 +9,14 @@ wayland.windowManager.sway = { extraConfig = '' exec thunderbird - exec vesktop + exec discordcanary exec telegram-desktop ''; }; home.packages = with pkgs; [ tdesktop - vesktop + discord-canary thunderbird element-desktop-wayland ]; From 0a8ee31f4fc543d131eda575050901193ea0e9d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sun, 22 Dec 2024 01:21:36 -0300 Subject: [PATCH 114/218] factorio: 2.0.23 -> 2.0.28 --- pkgs/factorio-headless/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/factorio-headless/default.nix b/pkgs/factorio-headless/default.nix index aa84b01..2aaaba4 100644 --- a/pkgs/factorio-headless/default.nix +++ b/pkgs/factorio-headless/default.nix @@ -1,10 +1,10 @@ { factorio-headless, pkgs }: factorio-headless.overrideAttrs (_: rec { - version = "2.0.23"; + version = "2.0.28"; src = pkgs.fetchurl { name = "factorio_headless_x64-${version}.tar.xz"; url = "https://www.factorio.com/get-download/${version}/headless/linux64"; - hash = "sha256-6Bn8mtbfBhv51L/8kZiN0Y0OOYLIscIsBSXXi9o+8hY="; + hash = "sha256-6pk3tq3HoY4XpOHmSZLsOJQHSXs25oKAuxT83UyITdM="; }; }) From b6b6e68397588271160ac4540a546031e6143a67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sun, 22 Dec 2024 01:21:40 -0300 Subject: [PATCH 115/218] update --- flake.lock | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/flake.lock b/flake.lock index 48adc6a..e166853 100644 --- a/flake.lock +++ b/flake.lock @@ -209,11 +209,11 @@ ] }, "locked": { - "lastModified": 1733168902, - "narHash": "sha256-8dupm9GfK+BowGdQd7EHK5V61nneLfr9xR6sc5vtDi0=", + "lastModified": 1734701201, + "narHash": "sha256-hk0roBX10j/hospoWIJIJj3i2skd7Oml6yKQBx7mTFk=", "owner": "nix-community", "repo": "disko", - "rev": "785c1e02c7e465375df971949b8dcbde9ec362e5", + "rev": "2ee76c861af3b895b3b104bae04777b61397485b", "type": "github" }, "original": { @@ -440,11 +440,11 @@ ] }, "locked": { - "lastModified": 1733951536, - "narHash": "sha256-Zb5ZCa7Xj+0gy5XVXINTSr71fCfAv+IKtmIXNrykT54=", + "lastModified": 1734366194, + "narHash": "sha256-vykpJ1xsdkv0j8WOVXrRFHUAdp9NXHpxdnn1F4pYgSw=", "owner": "nix-community", "repo": "home-manager", - "rev": "1318c3f3b068cdcea922fa7c1a0a1f0c96c22f5f", + "rev": "80b0fdf483c5d1cb75aaad909bd390d48673857f", "type": "github" }, "original": { @@ -481,11 +481,11 @@ ] }, "locked": { - "lastModified": 1733629314, - "narHash": "sha256-U0vivjQFAwjNDYt49Krevs1murX9hKBFe2Ye0cHpgbU=", + "lastModified": 1734234111, + "narHash": "sha256-icEMqBt4HtGH52PU5FHidgBrNJvOfXH6VQKNtnD1aw8=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "f1e477a7dd11e27e7f98b646349cd66bbabf2fb8", + "rev": "311d6cf3ad3f56cb051ffab1f480b2909b3f754d", "type": "github" }, "original": { @@ -506,11 +506,11 @@ ] }, "locked": { - "lastModified": 1722877200, - "narHash": "sha256-qgKDNJXs+od+1UbRy62uk7dYal3h98I4WojfIqMoGcg=", + "lastModified": 1734370678, + "narHash": "sha256-a8zkti1QM5Oxkdfnzr/NjrFlyqI36/kYV/X8G1jOmB4=", "owner": "simple-nixos-mailserver", "repo": "nixos-mailserver", - "rev": "af7d3bf5daeba3fc28089b015c0dd43f06b176f2", + "rev": "c43d8c4a3ce84a7bebd110b06e69365484db6208", "type": "gitlab" }, "original": { @@ -538,11 +538,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1733759999, - "narHash": "sha256-463SNPWmz46iLzJKRzO3Q2b0Aurff3U1n0nYItxq7jU=", + "lastModified": 1734424634, + "narHash": "sha256-cHar1vqHOOyC7f1+tVycPoWTfKIaqkoe1Q6TnKzuti4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a73246e2eef4c6ed172979932bc80e1404ba2d56", + "rev": "d3c42f187194c26d9f0309a8ecc469d6c878ce33", "type": "github" }, "original": { @@ -568,11 +568,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1733749988, - "narHash": "sha256-+5qdtgXceqhK5ZR1YbP1fAUsweBIrhL38726oIEAtDs=", + "lastModified": 1732812356, + "narHash": "sha256-LNcgjOLArRlx2W6XSi0yc0xwLjrK3KF9LxAMqUgFDgw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "bc27f0fde01ce4e1bfec1ab122d72b7380278e68", + "rev": "581d7e4d23b91daf2afa0005a5d3d01d6a8884fe", "type": "github" }, "original": { @@ -599,11 +599,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1733808091, - "narHash": "sha256-KWwINTQelKOoQgrXftxoqxmKFZb9pLVfnRvK270nkVk=", + "lastModified": 1734737257, + "narHash": "sha256-GIMyMt1pkkoXdCq9un859bX6YQZ/iYtukb9R5luazLM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a0f3e10d94359665dba45b71b4227b0aeb851f8e", + "rev": "1c6e20d41d6a9c1d737945962160e8571df55daa", "type": "github" }, "original": { @@ -889,11 +889,11 @@ }, "vpsadminos": { "locked": { - "lastModified": 1733157322, - "narHash": "sha256-lN6AY1zxZ0mQzpvLIfpdHdZ7oThHOlWFb2HUeOVcCJQ=", + "lastModified": 1734458258, + "narHash": "sha256-xZEbuwAAbxwujrGtuydDNBjzMLnE9YOcuLv3hdudZe4=", "owner": "vpsfreecz", "repo": "vpsadminos", - "rev": "8ba8b0885526f484da44c0aeb4894dbaf548e61f", + "rev": "83ddccf4462f155f12596af773e9291d7ebc37a3", "type": "github" }, "original": { From 0a7e40485940e3924825ef034564e6f8829b1eb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Mon, 30 Dec 2024 21:25:46 -0300 Subject: [PATCH 116/218] update --- flake.lock | 57 ++++++++++++++++++++++++---------------- flake.nix | 1 - user/chat.nix | 2 +- user/kakoune/default.nix | 2 +- 4 files changed, 37 insertions(+), 25 deletions(-) diff --git a/flake.lock b/flake.lock index e166853..9ec7057 100644 --- a/flake.lock +++ b/flake.lock @@ -209,11 +209,11 @@ ] }, "locked": { - "lastModified": 1734701201, - "narHash": "sha256-hk0roBX10j/hospoWIJIJj3i2skd7Oml6yKQBx7mTFk=", + "lastModified": 1735468753, + "narHash": "sha256-2dt1nOe9zf9pDkf5Kn7FUFyPRo581s0n90jxYXJ94l0=", "owner": "nix-community", "repo": "disko", - "rev": "2ee76c861af3b895b3b104bae04777b61397485b", + "rev": "84a5b93637cc16cbfcc61b6e1684d626df61eb21", "type": "github" }, "original": { @@ -440,11 +440,11 @@ ] }, "locked": { - "lastModified": 1734366194, - "narHash": "sha256-vykpJ1xsdkv0j8WOVXrRFHUAdp9NXHpxdnn1F4pYgSw=", + "lastModified": 1735344290, + "narHash": "sha256-oJDtWPH1oJT34RJK1FSWjwX4qcGOBRkcNQPD0EbSfNM=", "owner": "nix-community", "repo": "home-manager", - "rev": "80b0fdf483c5d1cb75aaad909bd390d48673857f", + "rev": "613691f285dad87694c2ba1c9e6298d04736292d", "type": "github" }, "original": { @@ -481,11 +481,11 @@ ] }, "locked": { - "lastModified": 1734234111, - "narHash": "sha256-icEMqBt4HtGH52PU5FHidgBrNJvOfXH6VQKNtnD1aw8=", + "lastModified": 1735443188, + "narHash": "sha256-AydPpRBh8+NOkrLylG7vTsHrGO2b5L7XkMEL5HlzcA8=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "311d6cf3ad3f56cb051ffab1f480b2909b3f754d", + "rev": "55ab1e1df5daf2476e6b826b69a82862dcbd7544", "type": "github" }, "original": { @@ -501,16 +501,14 @@ "nixpkgs": [ "nixpkgs" ], - "nixpkgs-24_05": [ - "nixpkgs" - ] + "nixpkgs-24_11": "nixpkgs-24_11" }, "locked": { - "lastModified": 1734370678, - "narHash": "sha256-a8zkti1QM5Oxkdfnzr/NjrFlyqI36/kYV/X8G1jOmB4=", + "lastModified": 1735230346, + "narHash": "sha256-zgR8NTiNDPVNrfaiOlB9yHSmCqFDo7Ks2IavaJ2dZo4=", "owner": "simple-nixos-mailserver", "repo": "nixos-mailserver", - "rev": "c43d8c4a3ce84a7bebd110b06e69365484db6208", + "rev": "dc0569066e79ae96184541da6fa28f35a33fbf7b", "type": "gitlab" }, "original": { @@ -536,13 +534,28 @@ "type": "github" } }, - "nixpkgs-unstable": { + "nixpkgs-24_11": { "locked": { - "lastModified": 1734424634, - "narHash": "sha256-cHar1vqHOOyC7f1+tVycPoWTfKIaqkoe1Q6TnKzuti4=", + "lastModified": 1734083684, + "narHash": "sha256-5fNndbndxSx5d+C/D0p/VF32xDiJCJzyOqorOYW4JEo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d3c42f187194c26d9f0309a8ecc469d6c878ce33", + "rev": "314e12ba369ccdb9b352a4db26ff419f7c49fa84", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-24.11", + "type": "indirect" + } + }, + "nixpkgs-unstable": { + "locked": { + "lastModified": 1735471104, + "narHash": "sha256-0q9NGQySwDQc7RhAV2ukfnu7Gxa5/ybJ2ANT8DQrQrs=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "88195a94f390381c6afcdaa933c2f6ff93959cb4", "type": "github" }, "original": { @@ -599,11 +612,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1734737257, - "narHash": "sha256-GIMyMt1pkkoXdCq9un859bX6YQZ/iYtukb9R5luazLM=", + "lastModified": 1735531152, + "narHash": "sha256-As8I+ebItDKtboWgDXYZSIjGlKeqiLBvjxsQHUmAf1Q=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1c6e20d41d6a9c1d737945962160e8571df55daa", + "rev": "3ffbbdbac0566a0977da3d2657b89cbcfe9a173b", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index c580335..1e11ec6 100644 --- a/flake.nix +++ b/flake.nix @@ -29,7 +29,6 @@ nixos-mailserver = { url = "gitlab:simple-nixos-mailserver/nixos-mailserver/master"; inputs.nixpkgs.follows = "nixpkgs"; - inputs.nixpkgs-24_05.follows = "nixpkgs"; }; dzgui-nix.url = "github:lelgenio/dzgui-nix"; diff --git a/user/chat.nix b/user/chat.nix index fda61e3..b42f6fd 100644 --- a/user/chat.nix +++ b/user/chat.nix @@ -18,6 +18,6 @@ tdesktop discord-canary thunderbird - element-desktop-wayland + element-desktop ]; } diff --git a/user/kakoune/default.nix b/user/kakoune/default.nix index 9963f26..a015bd0 100644 --- a/user/kakoune/default.nix +++ b/user/kakoune/default.nix @@ -127,7 +127,7 @@ in ranger bmenu kak-lsp - unstable.kak-tree-sitter + kak-tree-sitter kak-pager kak-man-pager From 565a970d34345defa4d78a2d35598fb199be470a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 8 Jan 2025 21:20:08 -0300 Subject: [PATCH 117/218] amdgpu: remove semingly useless configurations OBS was causing gpu panics --- hosts/monolith/amdgpu.nix | 5 ----- 1 file changed, 5 deletions(-) diff --git a/hosts/monolith/amdgpu.nix b/hosts/monolith/amdgpu.nix index 0df9923..ac09b48 100644 --- a/hosts/monolith/amdgpu.nix +++ b/hosts/monolith/amdgpu.nix @@ -13,7 +13,6 @@ in { boot.initrd.kernelModules = [ "amdgpu" ]; boot.kernelParams = [ - "amdgpu.dcdebugmask=0x10" # amdgpu undervolting bug "video=DP-1:1920x1080@144" "amdgpu.ppfeaturemask=0xfffd7fff" # enable undervolting ]; @@ -29,10 +28,6 @@ in hardware.graphics.extraPackages = with pkgs; [ libva - libvdpau - vaapiVdpau - rocmPackages.clr - rocmPackages.rocm-smi ]; services.udev.extraRules = '' From b58b9b18448d941fcf628ca5bc75ea501a592928 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 8 Jan 2025 21:20:45 -0300 Subject: [PATCH 118/218] amdgpu: always restart the fan control script --- hosts/monolith/amdgpu.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hosts/monolith/amdgpu.nix b/hosts/monolith/amdgpu.nix index ac09b48..4c26afa 100644 --- a/hosts/monolith/amdgpu.nix +++ b/hosts/monolith/amdgpu.nix @@ -21,6 +21,10 @@ in script = '' ${lib.getExe pkgs.amd-fan-control} /sys/class/drm/card1/device 60 85 ''; + serviceConfig = { + Restart = "always"; + RestartSec = 10; + }; wantedBy = [ "multi-user.target" ]; }; From cf712901d204737ca78f99fe01baf06956189da4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 8 Jan 2025 21:21:11 -0300 Subject: [PATCH 119/218] factorio: wait for network connection before starting --- hosts/monolith/factorio-server.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hosts/monolith/factorio-server.nix b/hosts/monolith/factorio-server.nix index 3c893a5..211e746 100644 --- a/hosts/monolith/factorio-server.nix +++ b/hosts/monolith/factorio-server.nix @@ -10,6 +10,11 @@ extraSettingsFile = config.age.secrets.factorio-settings.path; }; + systemd.services.factorio = { + after = [ "network-online.target" ]; + wants = [ "network-online.target" ]; + }; + age.secrets.factorio-settings = { file = ../../secrets/factorio-settings.age; mode = "777"; From ce2e1c9c23d97a569baf889bd1f2da1f12f3df16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 8 Jan 2025 21:22:29 -0300 Subject: [PATCH 120/218] monolith: revert to LTS kernel --- hosts/monolith/default.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/hosts/monolith/default.nix b/hosts/monolith/default.nix index 77dfa50..c3764fd 100644 --- a/hosts/monolith/default.nix +++ b/hosts/monolith/default.nix @@ -41,8 +41,6 @@ in package = pkgs.unstable.opentabletdriver; }; - boot.kernelPackages = pkgs.linuxPackages_latest; - boot.extraModulePackages = with config.boot.kernelPackages; [ zenpower ]; boot.initrd.kernelModules = [ "amdgpu" ]; From e41b9c9bd853e360bfa0782ccb40889398e807db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 8 Jan 2025 21:23:18 -0300 Subject: [PATCH 121/218] sway: don't force steam into floating window --- user/sway/sway-assigns.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/user/sway/sway-assigns.nix b/user/sway/sway-assigns.nix index 65e1a97..8f073c7 100644 --- a/user/sway/sway-assigns.nix +++ b/user/sway/sway-assigns.nix @@ -58,7 +58,6 @@ in { app_id = "wdisplays"; } { app_id = "pavucontrol"; } { app_id = ".*[Hh]elvum.*"; } - { workspace = "9"; } ]; }; }; From d6fe39a775ea7e3c9531c21beeab1320bfb8859b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 8 Jan 2025 21:23:37 -0300 Subject: [PATCH 122/218] OpenTabletDriver: fix shortcuts and revert draw-area to fullscreen --- user/sway/open-tablet-driver.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/user/sway/open-tablet-driver.json b/user/sway/open-tablet-driver.json index 632cd6c..bf49af6 100644 --- a/user/sway/open-tablet-driver.json +++ b/user/sway/open-tablet-driver.json @@ -10,8 +10,8 @@ "Filters": [], "AbsoluteModeSettings": { "Display": { - "Width": 960.0, - "Height": 540.0, + "Width": 1920.0, + "Height": 1080.0, "X": 960.0, "Y": 540.0, "Rotation": 0.0 @@ -76,7 +76,7 @@ "Settings": [ { "Property": "Keys", - "Value": "Control+O" + "Value": "Control+Shift+Z" } ], "Enable": true From 7b670efc6739a79ed03dff0b2dc2dc1ccdf8d697 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 8 Jan 2025 21:25:01 -0300 Subject: [PATCH 123/218] update --- flake.lock | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/flake.lock b/flake.lock index 9ec7057..b2c2019 100644 --- a/flake.lock +++ b/flake.lock @@ -209,11 +209,11 @@ ] }, "locked": { - "lastModified": 1735468753, - "narHash": "sha256-2dt1nOe9zf9pDkf5Kn7FUFyPRo581s0n90jxYXJ94l0=", + "lastModified": 1736199437, + "narHash": "sha256-TdU0a/x8048rbbJmkKWzSY1CtsbbGKNkIJcMdr8Zf4Q=", "owner": "nix-community", "repo": "disko", - "rev": "84a5b93637cc16cbfcc61b6e1684d626df61eb21", + "rev": "49f8aa791f81ff2402039b3efe0c35b9386c4bcf", "type": "github" }, "original": { @@ -227,11 +227,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1733974299, - "narHash": "sha256-fPvJ/ZsQGVqGJqYL2gKotalQUoG1wpUYTJkRKG2BrwA=", + "lastModified": 1735940463, + "narHash": "sha256-qrjv3UrlcFQf8zFjV4lMDmcBnlow/sqyyjGFAXp8mLk=", "owner": "lelgenio", "repo": "dzgui-nix", - "rev": "580022e73efedb17ddf640115539cb9bd1423d44", + "rev": "fccedf1386f484375570e0195c7a08d7687b1df6", "type": "github" }, "original": { @@ -481,11 +481,11 @@ ] }, "locked": { - "lastModified": 1735443188, - "narHash": "sha256-AydPpRBh8+NOkrLylG7vTsHrGO2b5L7XkMEL5HlzcA8=", + "lastModified": 1736047960, + "narHash": "sha256-hutd85FA1jUJhhqBRRJ+u7UHO9oFGD/RVm2x5w8WjVQ=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "55ab1e1df5daf2476e6b826b69a82862dcbd7544", + "rev": "816a6ae88774ba7e74314830546c29e134e0dffb", "type": "github" }, "original": { @@ -551,11 +551,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1735471104, - "narHash": "sha256-0q9NGQySwDQc7RhAV2ukfnu7Gxa5/ybJ2ANT8DQrQrs=", + "lastModified": 1736012469, + "narHash": "sha256-/qlNWm/IEVVH7GfgAIyP6EsVZI6zjAx1cV5zNyrs+rI=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "88195a94f390381c6afcdaa933c2f6ff93959cb4", + "rev": "8f3e1f807051e32d8c95cd12b9b421623850a34d", "type": "github" }, "original": { @@ -612,11 +612,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1735531152, - "narHash": "sha256-As8I+ebItDKtboWgDXYZSIjGlKeqiLBvjxsQHUmAf1Q=", + "lastModified": 1736061677, + "narHash": "sha256-DjkQPnkAfd7eB522PwnkGhOMuT9QVCZspDpJJYyOj60=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3ffbbdbac0566a0977da3d2657b89cbcfe9a173b", + "rev": "cbd8ec4de4469333c82ff40d057350c30e9f7d36", "type": "github" }, "original": { From be3686db826b55a853fa4ebea7f6f6d375b26f4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 10 Jan 2025 11:06:58 -0300 Subject: [PATCH 124/218] docker: block external connections --- scripts/_docker-block-external-connections | 33 ++++++++++++++++++++++ scripts/default.nix | 6 ++++ system/containers.nix | 4 ++- 3 files changed, 42 insertions(+), 1 deletion(-) create mode 100755 scripts/_docker-block-external-connections diff --git a/scripts/_docker-block-external-connections b/scripts/_docker-block-external-connections new file mode 100755 index 0000000..f22bc4f --- /dev/null +++ b/scripts/_docker-block-external-connections @@ -0,0 +1,33 @@ +#!/bin/sh + +# Create the DOCKER-USER chain if it doesn't exist +iptables -N DOCKER-USER || true + +# Flush existing rules in the DOCKER-USER chain +iptables -F DOCKER-USER + +# Get all external network interfaces +interfaces=$( + ip -o -f inet addr show | + awk '{print $2}' | + grep -E '^(enp|eth|wlan|wlp)' | + sort -u +) + +for iface in $interfaces; do + # Allow traffic from LAN + iptables -A DOCKER-USER -i "$iface" -s 127.0.0.1 -j ACCEPT + iptables -A DOCKER-USER -i "$iface" -s 10.0.0.0/8 -j ACCEPT + iptables -A DOCKER-USER -i "$iface" -s 192.168.0.0/16 -j ACCEPT + + # Allow established and related connections + iptables -A DOCKER-USER -i "$iface" -m state --state RELATED,ESTABLISHED -j ACCEPT + + # Drop all other traffic + iptables -A DOCKER-USER -i "$iface" -j DROP + + echo "iptables rules have been set up for interface: $iface" +done + +# Return to the previous chain +iptables -A DOCKER-USER -j RETURN diff --git a/scripts/default.nix b/scripts/default.nix index 24eded1..c2725ee 100644 --- a/scripts/default.nix +++ b/scripts/default.nix @@ -139,6 +139,12 @@ ]; vrr-fullscreen = [ ]; controller-battery = [ ]; + _docker-block-external-connections = [ + iptables + gawk + gnugrep + iproute2 + ]; } // lib.mapAttrs importScript { wdmenu = ./wdmenu.nix; diff --git a/system/containers.nix b/system/containers.nix index 37844f7..64383a6 100644 --- a/system/containers.nix +++ b/system/containers.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, lib, ... }: { services.flatpak.enable = true; @@ -22,6 +22,8 @@ }; }; + networking.firewall.extraCommands = lib.getExe pkgs._docker-block-external-connections; + programs.extra-container.enable = true; programs.firejail.enable = true; From 75da9cfb7bb63250783b9d3585560e9fa6cb84e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 17 Jan 2025 00:34:11 -0300 Subject: [PATCH 125/218] phantom: add mastodon storage device --- hosts/phantom/hardware-config.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/hosts/phantom/hardware-config.nix b/hosts/phantom/hardware-config.nix index 4df34c8..afea081 100644 --- a/hosts/phantom/hardware-config.nix +++ b/hosts/phantom/hardware-config.nix @@ -1,15 +1,14 @@ -{ - config, - pkgs, - inputs, - ... -}: { fileSystems."/var/lib/syncthing-data" = { device = "172.16.130.7:/nas/5749/syncthinng_data"; fsType = "nfs"; options = [ "nofail" ]; }; + fileSystems."/var/lib/mastodon" = { + device = "172.16.130.7:/nas/5749/mastodon"; + fsType = "nfs"; + options = [ "nofail" ]; + }; swapDevices = [ { From af4431b9efaff1dfa9c1e4a985c7e70d1d82b847 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 17 Jan 2025 20:29:22 -0300 Subject: [PATCH 126/218] amdgpu: update fan controller --- scripts/amd-fan-control | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/scripts/amd-fan-control b/scripts/amd-fan-control index 641c5cf..1f4c3e7 100755 --- a/scripts/amd-fan-control +++ b/scripts/amd-fan-control @@ -18,7 +18,7 @@ bail() { exit 1 } -if ! [ -d $HWMON ]; then +if ! [ -d "$HWMON" ]; then bail "Invalid HWMON" fi @@ -28,20 +28,31 @@ if ! [ -f $TEMP_INPUT ]; then bail "Invalid TEMP_INPUT" fi -MIN="$2" -MAX="$3" +TEMP_MIN="$2" +TEMP_MAX="$3" + +if [ -z "$TEMP_MIN" ];then + bail "No minimum temperature provided" +fi + +if [ -z "$TEMP_MAX" ];then + bail "No maximum temperature provided" +fi + +PWM_MIN=0 +PWM_MAX=255 echo "Running..." >&2 while true; do TEMPERATURE_RAW=$(cat "$TEMP_INPUT") TEMPERATURE="$(( $TEMPERATURE_RAW / 1000 ))" # Remap from a number between 60_000..90_000 to 0..255 - PWM=$(( ($TEMPERATURE - $MIN) * 255 / ($MAX - $MIN) )) + PWM=$(( ($TEMPERATURE - $TEMP_MIN) * $PWM_MAX / ($TEMP_MAX - $TEMP_MIN) )) - if [ "$PWM" -gt 255 ]; then - PWM=255 - elif [ "$PWM" -lt 0 ]; then - PWM=0 + if [ "$PWM" -gt $PWM_MAX ]; then + PWM=$PWM_MAX + elif [ "$PWM" -lt $PWM_MIN ]; then + PWM=$PWM_MIN fi echo 1 > "$HWMON/pwm1_enable" From b0d8ce885cf1a05741c21605684a6b6946eea5d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sun, 19 Jan 2025 23:40:19 -0300 Subject: [PATCH 127/218] update --- flake.lock | 54 +++++++++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/flake.lock b/flake.lock index b2c2019..d654964 100644 --- a/flake.lock +++ b/flake.lock @@ -28,11 +28,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1723293904, - "narHash": "sha256-b+uqzj+Wa6xgMS9aNbX4I+sXeb5biPDi39VgvSFqFvU=", + "lastModified": 1736955230, + "narHash": "sha256-uenf8fv2eG5bKM8C/UvFaiJMZ4IpUFaQxk9OH5t/1gA=", "owner": "ryantm", "repo": "agenix", - "rev": "f6291c5935fdc4e0bef208cfc0dcab7e3f7a1c41", + "rev": "e600439ec4c273cf11e06fe4d9d906fb98fa097c", "type": "github" }, "original": { @@ -209,11 +209,11 @@ ] }, "locked": { - "lastModified": 1736199437, - "narHash": "sha256-TdU0a/x8048rbbJmkKWzSY1CtsbbGKNkIJcMdr8Zf4Q=", + "lastModified": 1737038063, + "narHash": "sha256-rMEuiK69MDhjz1JgbaeQ9mBDXMJ2/P8vmOYRbFndXsk=", "owner": "nix-community", "repo": "disko", - "rev": "49f8aa791f81ff2402039b3efe0c35b9386c4bcf", + "rev": "bf0abfde48f469c256f2b0f481c6281ff04a5db2", "type": "github" }, "original": { @@ -227,11 +227,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1735940463, - "narHash": "sha256-qrjv3UrlcFQf8zFjV4lMDmcBnlow/sqyyjGFAXp8mLk=", + "lastModified": 1736891870, + "narHash": "sha256-JFHhj8jlWE4bAzWzceWJdyByq9VcUt7MMbs331xlxMY=", "owner": "lelgenio", "repo": "dzgui-nix", - "rev": "fccedf1386f484375570e0195c7a08d7687b1df6", + "rev": "2be703bfbc8cb9924d7afd9c4ecced9adff7647c", "type": "github" }, "original": { @@ -440,11 +440,11 @@ ] }, "locked": { - "lastModified": 1735344290, - "narHash": "sha256-oJDtWPH1oJT34RJK1FSWjwX4qcGOBRkcNQPD0EbSfNM=", + "lastModified": 1736373539, + "narHash": "sha256-dinzAqCjenWDxuy+MqUQq0I4zUSfaCvN9rzuCmgMZJY=", "owner": "nix-community", "repo": "home-manager", - "rev": "613691f285dad87694c2ba1c9e6298d04736292d", + "rev": "bd65bc3cde04c16755955630b344bc9e35272c56", "type": "github" }, "original": { @@ -481,11 +481,11 @@ ] }, "locked": { - "lastModified": 1736047960, - "narHash": "sha256-hutd85FA1jUJhhqBRRJ+u7UHO9oFGD/RVm2x5w8WjVQ=", + "lastModified": 1736652904, + "narHash": "sha256-8uolHABgroXqzs03QdulHp8H9e5kWQZnnhcda1MKbBM=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "816a6ae88774ba7e74314830546c29e134e0dffb", + "rev": "271e5bd7c57e1f001693799518b10a02d1123b12", "type": "github" }, "original": { @@ -551,11 +551,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1736012469, - "narHash": "sha256-/qlNWm/IEVVH7GfgAIyP6EsVZI6zjAx1cV5zNyrs+rI=", + "lastModified": 1737062831, + "narHash": "sha256-Tbk1MZbtV2s5aG+iM99U8FqwxU/YNArMcWAv6clcsBc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "8f3e1f807051e32d8c95cd12b9b421623850a34d", + "rev": "5df43628fdf08d642be8ba5b3625a6c70731c19c", "type": "github" }, "original": { @@ -612,11 +612,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1736061677, - "narHash": "sha256-DjkQPnkAfd7eB522PwnkGhOMuT9QVCZspDpJJYyOj60=", + "lastModified": 1736916166, + "narHash": "sha256-puPDoVKxkuNmYIGMpMQiK8bEjaACcCksolsG36gdaNQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "cbd8ec4de4469333c82ff40d057350c30e9f7d36", + "rev": "e24b4c09e963677b1beea49d411cd315a024ad3a", "type": "github" }, "original": { @@ -676,11 +676,11 @@ "ranger-icons": { "flake": false, "locked": { - "lastModified": 1732436707, - "narHash": "sha256-sqqsWU5/zBwIpyJKEBiCfosqKNvISWCw8cFgzLcNjUY=", + "lastModified": 1736375293, + "narHash": "sha256-ck53eG+mGIQ706sUnEHbJ6vY1/LYnRcpq94JXzwnGTQ=", "owner": "alexanderjeurissen", "repo": "ranger_devicons", - "rev": "84db73d0a50a8c6085b3ec63f834c781b603e83e", + "rev": "f227f212e14996fbb366f945ec3ecaf5dc5f44b0", "type": "github" }, "original": { @@ -902,11 +902,11 @@ }, "vpsadminos": { "locked": { - "lastModified": 1734458258, - "narHash": "sha256-xZEbuwAAbxwujrGtuydDNBjzMLnE9YOcuLv3hdudZe4=", + "lastModified": 1737136524, + "narHash": "sha256-wMy7IbQs87VUxJOqRSbfFIdxRRTUBQh8G1L/zwI36vY=", "owner": "vpsfreecz", "repo": "vpsadminos", - "rev": "83ddccf4462f155f12596af773e9291d7ebc37a3", + "rev": "0af10d77ca146293b2ed19d5dcfd98474f1fc285", "type": "github" }, "original": { From 6d49b98e722851ac70cfd98a57ed4f131687298b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Mon, 20 Jan 2025 00:31:05 -0300 Subject: [PATCH 128/218] amdgpu: update fan controller --- hosts/monolith/amdgpu.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosts/monolith/amdgpu.nix b/hosts/monolith/amdgpu.nix index 4c26afa..0da64f0 100644 --- a/hosts/monolith/amdgpu.nix +++ b/hosts/monolith/amdgpu.nix @@ -19,7 +19,7 @@ in systemd.services.amd-fan-control = { script = '' - ${lib.getExe pkgs.amd-fan-control} /sys/class/drm/card1/device 60 85 + ${lib.getExe pkgs.amd-fan-control} /sys/class/drm/card1/device 60 100 ''; serviceConfig = { Restart = "always"; From 77adcf8951b49d8a24e4501f1429483d95708f10 Mon Sep 17 00:00:00 2001 From: lelgenio Date: Thu, 23 Jan 2025 16:07:09 -0300 Subject: [PATCH 129/218] rainbow: update gitlab concurrent runners --- system/rainbow-gitlab-runner.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/rainbow-gitlab-runner.nix b/system/rainbow-gitlab-runner.nix index 3230c8b..52e573a 100644 --- a/system/rainbow-gitlab-runner.nix +++ b/system/rainbow-gitlab-runner.nix @@ -12,7 +12,7 @@ in virtualisation.docker.enable = true; services.gitlab-runner = { enable = true; - settings.concurrent = 1; + settings.concurrent = 6; services = { thoreb-telemetria-nix = mkNixRunner config.age.secrets.gitlab-runner-thoreb-telemetria-registrationConfigFile.path; thoreb-itinerario-nix = mkNixRunner config.age.secrets.rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.path; From f8ee1952f84eda9ace68a5d7c92e0766cbdc283c Mon Sep 17 00:00:00 2001 From: lelgenio Date: Thu, 23 Jan 2025 17:45:35 -0300 Subject: [PATCH 130/218] kak-lsp: add intelephense stubs --- user/kakoune/kak-lsp.toml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/user/kakoune/kak-lsp.toml b/user/kakoune/kak-lsp.toml index b3a6c8e..9c195bd 100644 --- a/user/kakoune/kak-lsp.toml +++ b/user/kakoune/kak-lsp.toml @@ -104,6 +104,19 @@ files.exclude = [ "**/bower_components/**", "**/resources/views/**" ] +stubs = [ + "apache", "bcmath", "bz2", "calendar", "com_dotnet", "Core", "ctype", + "curl", "date", "dba", "dom", "enchant", "exif", "FFI", "fileinfo", "filter", + "fpm", "ftp", "gd", "gettext", "gmp", "hash", "iconv", "imagick", "imap", + "intl", "json", "ldap", "libxml", "mbstring", "meta", "mysqli", "oci8", + "odbc", "openssl", "pcntl", "pcre", "PDO", "pdo_ibm", "pdo_mysql", "pdo_pgsql", + "pdo_sqlite", "pgsql", "Phar", "posix", "pspell", "readline", "Reflection", + "session", "shmop", "SimpleXML", "snmp", "soap", "sockets", "sodium", + "SPL", "sqlite3", "standard", "superglobals", "sysvmsg", "sysvsem", "sysvshm", + "tidy", "tokenizer", "xml", "xmlreader", "xmlrpc", "xmlwriter", "xsl", + "Zend OPcache", "zip", "zlib", +] + [language_server.rust-analyzer] filetypes = ["rust"] From 3d612c91f63199b4f99e4b61fd35d37d71c2945a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 24 Jan 2025 08:24:42 -0300 Subject: [PATCH 131/218] flake: add treefmt --- flake.lock | 41 ++++++++++++++++++++++++++++++++++++++--- flake.nix | 5 ++++- treefmt.nix | 8 ++++++++ 3 files changed, 50 insertions(+), 4 deletions(-) create mode 100644 treefmt.nix diff --git a/flake.lock b/flake.lock index d654964..0ce37e0 100644 --- a/flake.lock +++ b/flake.lock @@ -626,6 +626,22 @@ } }, "nixpkgs_6": { + "locked": { + "lastModified": 1735554305, + "narHash": "sha256-zExSA1i/b+1NMRhGGLtNfFGXgLtgo+dcuzHzaWA6w3Q=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "0e82ab234249d8eee3e8c91437802b32c74bb3fd", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_7": { "locked": { "lastModified": 1719010183, "narHash": "sha256-8HMWaqpyjbVeEsmy/A2H6VFtW/Wr71vkPLnpTiAXu+8=", @@ -641,7 +657,7 @@ "type": "github" } }, - "nixpkgs_7": { + "nixpkgs_8": { "locked": { "lastModified": 1714091391, "narHash": "sha256-68n3GBvlm1MIeJXadPzQ3v8Y9sIW3zmv8gI5w5sliC8=", @@ -708,6 +724,7 @@ "ranger-icons": "ranger-icons", "tlauncher": "tlauncher", "tomater": "tomater", + "treefmt-nix": "treefmt-nix", "vpsadminos": "vpsadminos", "warthunder-leak-counter": "warthunder-leak-counter", "wl-crosshair": "wl-crosshair", @@ -900,6 +917,24 @@ "url": "https://git.lelgenio.com/lelgenio/tomater" } }, + "treefmt-nix": { + "inputs": { + "nixpkgs": "nixpkgs_6" + }, + "locked": { + "lastModified": 1737483750, + "narHash": "sha256-5An1wq5U8sNycOBBg3nsDDgpwBmR9liOpDGlhliA6Xo=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "f2cc121df15418d028a59c9737d38e3a90fbaf8f", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, "vpsadminos": { "locked": { "lastModified": 1737136524, @@ -919,7 +954,7 @@ "inputs": { "crane": "crane_3", "flake-utils": "flake-utils_6", - "nixpkgs": "nixpkgs_6" + "nixpkgs": "nixpkgs_7" }, "locked": { "lastModified": 1719076817, @@ -938,7 +973,7 @@ "wl-crosshair": { "inputs": { "flake-utils": "flake-utils_7", - "nixpkgs": "nixpkgs_7" + "nixpkgs": "nixpkgs_8" }, "locked": { "lastModified": 1715216838, diff --git a/flake.nix b/flake.nix index 1e11ec6..49c3192 100644 --- a/flake.nix +++ b/flake.nix @@ -43,6 +43,8 @@ inputs.nixpkgs.follows = "nixpkgs"; }; + treefmt-nix.url = "github:numtide/treefmt-nix"; + # my stuff dhist.url = "github:lelgenio/dhist"; demoji.url = "github:lelgenio/demoji"; @@ -176,6 +178,7 @@ packages.${system} = pkgs // packages; - formatter.${system} = pkgs.nixfmt-rfc-style; + # formatter.${system} = pkgs.nixfmt-rfc-style; + formatter.${system} = (inputs.treefmt-nix.lib.evalModule pkgs ./treefmt.nix).config.build.wrapper; }; } diff --git a/treefmt.nix b/treefmt.nix new file mode 100644 index 0000000..6c86ca2 --- /dev/null +++ b/treefmt.nix @@ -0,0 +1,8 @@ +{ pkgs, ... }: +{ + projectRootFile = "flake.nix"; + programs.nixfmt.enable = true; + programs.nixfmt.package = pkgs.nixfmt-rfc-style; + + settings.on-unmatched = "debug"; +} From 6c2aa3706f7aff8b9cd47b83585aebd6c823ff47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 25 Jan 2025 14:28:33 -0300 Subject: [PATCH 132/218] amdgpu: remove manual fan control --- hosts/monolith/amdgpu.nix | 13 +-------- scripts/amd-fan-control | 61 --------------------------------------- scripts/default.nix | 1 - 3 files changed, 1 insertion(+), 74 deletions(-) delete mode 100755 scripts/amd-fan-control diff --git a/hosts/monolith/amdgpu.nix b/hosts/monolith/amdgpu.nix index 0da64f0..8c42bf0 100644 --- a/hosts/monolith/amdgpu.nix +++ b/hosts/monolith/amdgpu.nix @@ -1,4 +1,4 @@ -{ pkgs, lib, ... }: +{ pkgs, ... }: let undervoltGpu = pkgs.writeShellScript "undervolt-gpu" '' set -xe @@ -17,17 +17,6 @@ in "amdgpu.ppfeaturemask=0xfffd7fff" # enable undervolting ]; - systemd.services.amd-fan-control = { - script = '' - ${lib.getExe pkgs.amd-fan-control} /sys/class/drm/card1/device 60 100 - ''; - serviceConfig = { - Restart = "always"; - RestartSec = 10; - }; - wantedBy = [ "multi-user.target" ]; - }; - hardware.graphics.enable32Bit = true; hardware.graphics.extraPackages = with pkgs; [ diff --git a/scripts/amd-fan-control b/scripts/amd-fan-control deleted file mode 100755 index 1f4c3e7..0000000 --- a/scripts/amd-fan-control +++ /dev/null @@ -1,61 +0,0 @@ -#!/usr/bin/env bash - -set -e - -DEVICE="$1" # eg: /sys/class/drm/card1/device -HWMON=$(echo "$DEVICE"/hwmon/hwmon*) - -exit() { - echo "Setting controll to auto" >&2 - echo 2 > "$HWMON/pwm1_enable" -} - -trap exit EXIT INT - -bail() { - echo "Error: $@" >&2 - echo "Exiting..." >&2 - exit 1 -} - -if ! [ -d "$HWMON" ]; then - bail "Invalid HWMON" -fi - -TEMP_INPUT="$HWMON/temp2_input" - -if ! [ -f $TEMP_INPUT ]; then - bail "Invalid TEMP_INPUT" -fi - -TEMP_MIN="$2" -TEMP_MAX="$3" - -if [ -z "$TEMP_MIN" ];then - bail "No minimum temperature provided" -fi - -if [ -z "$TEMP_MAX" ];then - bail "No maximum temperature provided" -fi - -PWM_MIN=0 -PWM_MAX=255 - -echo "Running..." >&2 -while true; do - TEMPERATURE_RAW=$(cat "$TEMP_INPUT") - TEMPERATURE="$(( $TEMPERATURE_RAW / 1000 ))" - # Remap from a number between 60_000..90_000 to 0..255 - PWM=$(( ($TEMPERATURE - $TEMP_MIN) * $PWM_MAX / ($TEMP_MAX - $TEMP_MIN) )) - - if [ "$PWM" -gt $PWM_MAX ]; then - PWM=$PWM_MAX - elif [ "$PWM" -lt $PWM_MIN ]; then - PWM=$PWM_MIN - fi - - echo 1 > "$HWMON/pwm1_enable" - echo "$PWM" > "$HWMON/pwm1" - sleep .1s -done diff --git a/scripts/default.nix b/scripts/default.nix index c2725ee..78ccac8 100644 --- a/scripts/default.nix +++ b/scripts/default.nix @@ -23,7 +23,6 @@ in with final; createScripts { - amd-fan-control = [ bash ]; br = [ ]; bmenu = [ bemenu From 094841597ffde356c8a5646d0d3371cf7ee35352 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 25 Jan 2025 18:48:02 -0300 Subject: [PATCH 133/218] home: fix btop gpu support --- user/home.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user/home.nix b/user/home.nix index b380515..e8ba81d 100644 --- a/user/home.nix +++ b/user/home.nix @@ -75,7 +75,7 @@ comma # System monitors - (btop.override { cudaSupport = true; }) + (btop.override { rocmSupport = true; }) amdgpu_top inxi dmidecode From 16604962effe4c54ea788cf2ac19423ee38c4b25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Tue, 28 Jan 2025 10:24:22 -0300 Subject: [PATCH 134/218] update --- flake.lock | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/flake.lock b/flake.lock index 0ce37e0..4fc266a 100644 --- a/flake.lock +++ b/flake.lock @@ -227,11 +227,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1736891870, - "narHash": "sha256-JFHhj8jlWE4bAzWzceWJdyByq9VcUt7MMbs331xlxMY=", + "lastModified": 1737831696, + "narHash": "sha256-+MiZ0DmokNycjvoFBddlzPw16GlSHEH7fARWB9RzTas=", "owner": "lelgenio", "repo": "dzgui-nix", - "rev": "2be703bfbc8cb9924d7afd9c4ecced9adff7647c", + "rev": "0f3bc9ab6a2d3afe93007ec742afb71bc8f03f75", "type": "github" }, "original": { @@ -481,11 +481,11 @@ ] }, "locked": { - "lastModified": 1736652904, - "narHash": "sha256-8uolHABgroXqzs03QdulHp8H9e5kWQZnnhcda1MKbBM=", + "lastModified": 1737861961, + "narHash": "sha256-LIRtMvAwLGb8pBoamzgEF67oKlNPz4LuXiRPVZf+TpE=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "271e5bd7c57e1f001693799518b10a02d1123b12", + "rev": "79b7b8eae3243fc5aa9aad34ba6b9bbb2266f523", "type": "github" }, "original": { @@ -504,11 +504,11 @@ "nixpkgs-24_11": "nixpkgs-24_11" }, "locked": { - "lastModified": 1735230346, - "narHash": "sha256-zgR8NTiNDPVNrfaiOlB9yHSmCqFDo7Ks2IavaJ2dZo4=", + "lastModified": 1737201600, + "narHash": "sha256-JBh5+g8oQteQdQqbO07dGHBRQo/NGI61JPlTjdfQ1pk=", "owner": "simple-nixos-mailserver", "repo": "nixos-mailserver", - "rev": "dc0569066e79ae96184541da6fa28f35a33fbf7b", + "rev": "ade37b2765032f83d2d4bd50b6204a40a4c05eb4", "type": "gitlab" }, "original": { @@ -551,11 +551,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1737062831, - "narHash": "sha256-Tbk1MZbtV2s5aG+iM99U8FqwxU/YNArMcWAv6clcsBc=", + "lastModified": 1737885589, + "narHash": "sha256-Zf0hSrtzaM1DEz8//+Xs51k/wdSajticVrATqDrfQjg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5df43628fdf08d642be8ba5b3625a6c70731c19c", + "rev": "852ff1d9e153d8875a83602e03fdef8a63f0ecf8", "type": "github" }, "original": { @@ -612,11 +612,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1736916166, - "narHash": "sha256-puPDoVKxkuNmYIGMpMQiK8bEjaACcCksolsG36gdaNQ=", + "lastModified": 1737885640, + "narHash": "sha256-GFzPxJzTd1rPIVD4IW+GwJlyGwBDV1Tj5FLYwDQQ9sM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e24b4c09e963677b1beea49d411cd315a024ad3a", + "rev": "4e96537f163fad24ed9eb317798a79afc85b51b7", "type": "github" }, "original": { @@ -937,11 +937,11 @@ }, "vpsadminos": { "locked": { - "lastModified": 1737136524, - "narHash": "sha256-wMy7IbQs87VUxJOqRSbfFIdxRRTUBQh8G1L/zwI36vY=", + "lastModified": 1737943400, + "narHash": "sha256-2BqPlxdK4vvZYtYL+wVhch+U9/ZJrue5/t+VJsWqc+8=", "owner": "vpsfreecz", "repo": "vpsadminos", - "rev": "0af10d77ca146293b2ed19d5dcfd98474f1fc285", + "rev": "bced91cd0b47d61e648d1c254351206a3395c08a", "type": "github" }, "original": { From 43b501b261da43e7d506800b28b66989cc41815a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 29 Jan 2025 22:46:04 -0300 Subject: [PATCH 135/218] factorio: auto backup the game saves --- hosts/monolith/factorio-server.nix | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/hosts/monolith/factorio-server.nix b/hosts/monolith/factorio-server.nix index 211e746..8ed0324 100644 --- a/hosts/monolith/factorio-server.nix +++ b/hosts/monolith/factorio-server.nix @@ -1,4 +1,9 @@ -{ config, pkgs, ... }: +{ + config, + pkgs, + lib, + ... +}: { services.factorio = { enable = true; @@ -15,6 +20,28 @@ wants = [ "network-online.target" ]; }; + systemd.services.factorio-backup-save = { + description = "Backup factorio saves"; + script = '' + ${lib.getExe pkgs.rsync} \ + -av \ + --chown=lelgenio \ + /var/lib/factorio/saves/default.zip \ + ~lelgenio/Documentos/GameSaves/factorio_saves/space-age-$(date --iso=seconds).zip + ''; + serviceConfig.Type = "oneshot"; + wantedBy = [ "multi-user.target" ]; + }; + + systemd.timers.factorio-backup-save = { + timerConfig = { + OnCalendar = "*-*-* 18:00:00"; + Persistent = true; + Unit = "factorio-backup-save.service"; + }; + wantedBy = [ "timers.target" ]; + }; + age.secrets.factorio-settings = { file = ../../secrets/factorio-settings.age; mode = "777"; From 1c91c3700bf9612e65b5803879893c334f8b7d1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 1 Feb 2025 22:19:20 -0300 Subject: [PATCH 136/218] Revert "amdgpu: remove manual fan control" This reverts commit 1336203f529cdd6100c9f776f8d56b44f39252d9. --- hosts/monolith/amdgpu.nix | 13 ++++++++- scripts/amd-fan-control | 61 +++++++++++++++++++++++++++++++++++++++ scripts/default.nix | 1 + 3 files changed, 74 insertions(+), 1 deletion(-) create mode 100755 scripts/amd-fan-control diff --git a/hosts/monolith/amdgpu.nix b/hosts/monolith/amdgpu.nix index 8c42bf0..0da64f0 100644 --- a/hosts/monolith/amdgpu.nix +++ b/hosts/monolith/amdgpu.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, lib, ... }: let undervoltGpu = pkgs.writeShellScript "undervolt-gpu" '' set -xe @@ -17,6 +17,17 @@ in "amdgpu.ppfeaturemask=0xfffd7fff" # enable undervolting ]; + systemd.services.amd-fan-control = { + script = '' + ${lib.getExe pkgs.amd-fan-control} /sys/class/drm/card1/device 60 100 + ''; + serviceConfig = { + Restart = "always"; + RestartSec = 10; + }; + wantedBy = [ "multi-user.target" ]; + }; + hardware.graphics.enable32Bit = true; hardware.graphics.extraPackages = with pkgs; [ diff --git a/scripts/amd-fan-control b/scripts/amd-fan-control new file mode 100755 index 0000000..1f4c3e7 --- /dev/null +++ b/scripts/amd-fan-control @@ -0,0 +1,61 @@ +#!/usr/bin/env bash + +set -e + +DEVICE="$1" # eg: /sys/class/drm/card1/device +HWMON=$(echo "$DEVICE"/hwmon/hwmon*) + +exit() { + echo "Setting controll to auto" >&2 + echo 2 > "$HWMON/pwm1_enable" +} + +trap exit EXIT INT + +bail() { + echo "Error: $@" >&2 + echo "Exiting..." >&2 + exit 1 +} + +if ! [ -d "$HWMON" ]; then + bail "Invalid HWMON" +fi + +TEMP_INPUT="$HWMON/temp2_input" + +if ! [ -f $TEMP_INPUT ]; then + bail "Invalid TEMP_INPUT" +fi + +TEMP_MIN="$2" +TEMP_MAX="$3" + +if [ -z "$TEMP_MIN" ];then + bail "No minimum temperature provided" +fi + +if [ -z "$TEMP_MAX" ];then + bail "No maximum temperature provided" +fi + +PWM_MIN=0 +PWM_MAX=255 + +echo "Running..." >&2 +while true; do + TEMPERATURE_RAW=$(cat "$TEMP_INPUT") + TEMPERATURE="$(( $TEMPERATURE_RAW / 1000 ))" + # Remap from a number between 60_000..90_000 to 0..255 + PWM=$(( ($TEMPERATURE - $TEMP_MIN) * $PWM_MAX / ($TEMP_MAX - $TEMP_MIN) )) + + if [ "$PWM" -gt $PWM_MAX ]; then + PWM=$PWM_MAX + elif [ "$PWM" -lt $PWM_MIN ]; then + PWM=$PWM_MIN + fi + + echo 1 > "$HWMON/pwm1_enable" + echo "$PWM" > "$HWMON/pwm1" + sleep .1s +done diff --git a/scripts/default.nix b/scripts/default.nix index 78ccac8..c2725ee 100644 --- a/scripts/default.nix +++ b/scripts/default.nix @@ -23,6 +23,7 @@ in with final; createScripts { + amd-fan-control = [ bash ]; br = [ ]; bmenu = [ bemenu From dc6ecd34b663110efe2bed2dde9b3f3c453591e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 1 Feb 2025 22:51:38 -0300 Subject: [PATCH 137/218] Revert "amdgpu: update fan controller" This reverts commit ffd977ef394e5adf7a4f0476bd095919c8a9f9ab. --- hosts/monolith/amdgpu.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosts/monolith/amdgpu.nix b/hosts/monolith/amdgpu.nix index 0da64f0..4c26afa 100644 --- a/hosts/monolith/amdgpu.nix +++ b/hosts/monolith/amdgpu.nix @@ -19,7 +19,7 @@ in systemd.services.amd-fan-control = { script = '' - ${lib.getExe pkgs.amd-fan-control} /sys/class/drm/card1/device 60 100 + ${lib.getExe pkgs.amd-fan-control} /sys/class/drm/card1/device 60 85 ''; serviceConfig = { Restart = "always"; From 385fb59418777e33af9a8264e07f05f4951cad52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Tue, 4 Feb 2025 23:46:58 -0300 Subject: [PATCH 138/218] flake: add nix-output-monitor --- switch | 25 +++++++++++++++++++------ system/configuration.nix | 2 ++ 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/switch b/switch index 93bd80a..d341e87 100755 --- a/switch +++ b/switch @@ -1,12 +1,25 @@ #!/usr/bin/env bash +set -euo pipefail + nix fmt git --no-pager diff -nixos-rebuild \ - switch \ - --use-remote-sudo \ - --print-build-logs \ - --flake .# \ - "$@" +run() { + nixos-rebuild \ + switch \ + --use-remote-sudo \ + --print-build-logs \ + --flake .# \ + "$@" +} + +if which nom >/dev/null; then + run --verbose \ + --log-format internal-json \ + "$@" \ + |& nom --json +else + run "$@" +fi diff --git a/system/configuration.nix b/system/configuration.nix index 5db8efc..9b4bed3 100644 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -44,6 +44,8 @@ usbutils # dracula-theme # gtk theme adwaita-icon-theme # default gnome cursors + + nix-output-monitor ]; services.geoclue2.enable = true; From 17019aef9d097a5e18cb70e753dc4897cb96932f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Tue, 4 Feb 2025 23:47:20 -0300 Subject: [PATCH 139/218] update --- flake.lock | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/flake.lock b/flake.lock index 4fc266a..731f752 100644 --- a/flake.lock +++ b/flake.lock @@ -209,11 +209,11 @@ ] }, "locked": { - "lastModified": 1737038063, - "narHash": "sha256-rMEuiK69MDhjz1JgbaeQ9mBDXMJ2/P8vmOYRbFndXsk=", + "lastModified": 1738148035, + "narHash": "sha256-KYOATYEwaKysL3HdHdS5kbQMXvzS4iPJzJrML+3TKAo=", "owner": "nix-community", "repo": "disko", - "rev": "bf0abfde48f469c256f2b0f481c6281ff04a5db2", + "rev": "18d0a984cc2bc82cf61df19523a34ad463aa7f54", "type": "github" }, "original": { @@ -481,11 +481,11 @@ ] }, "locked": { - "lastModified": 1737861961, - "narHash": "sha256-LIRtMvAwLGb8pBoamzgEF67oKlNPz4LuXiRPVZf+TpE=", + "lastModified": 1738466368, + "narHash": "sha256-PZhUjtvQZOH3PO0EYdTpQvcqkgkq1NkP2A6w9SPHYsk=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "79b7b8eae3243fc5aa9aad34ba6b9bbb2266f523", + "rev": "46a8f5fc9552b776bfc5c5c96ea3bede33f68f52", "type": "github" }, "original": { @@ -504,11 +504,11 @@ "nixpkgs-24_11": "nixpkgs-24_11" }, "locked": { - "lastModified": 1737201600, - "narHash": "sha256-JBh5+g8oQteQdQqbO07dGHBRQo/NGI61JPlTjdfQ1pk=", + "lastModified": 1737736848, + "narHash": "sha256-VrUfCXBXYV+YmQ2OvVTeML9EnmaPRtH+POrNIcJp6yo=", "owner": "simple-nixos-mailserver", "repo": "nixos-mailserver", - "rev": "ade37b2765032f83d2d4bd50b6204a40a4c05eb4", + "rev": "6b425d13f5a9d73cb63973d3609acacef4d1e261", "type": "gitlab" }, "original": { @@ -551,11 +551,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1737885589, - "narHash": "sha256-Zf0hSrtzaM1DEz8//+Xs51k/wdSajticVrATqDrfQjg=", + "lastModified": 1738680400, + "narHash": "sha256-ooLh+XW8jfa+91F1nhf9OF7qhuA/y1ChLx6lXDNeY5U=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "852ff1d9e153d8875a83602e03fdef8a63f0ecf8", + "rev": "799ba5bffed04ced7067a91798353d360788b30d", "type": "github" }, "original": { @@ -612,11 +612,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1737885640, - "narHash": "sha256-GFzPxJzTd1rPIVD4IW+GwJlyGwBDV1Tj5FLYwDQQ9sM=", + "lastModified": 1738574474, + "narHash": "sha256-rvyfF49e/k6vkrRTV4ILrWd92W+nmBDfRYZgctOyolQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "4e96537f163fad24ed9eb317798a79afc85b51b7", + "rev": "fecfeb86328381268e29e998ddd3ebc70bbd7f7c", "type": "github" }, "original": { @@ -922,11 +922,11 @@ "nixpkgs": "nixpkgs_6" }, "locked": { - "lastModified": 1737483750, - "narHash": "sha256-5An1wq5U8sNycOBBg3nsDDgpwBmR9liOpDGlhliA6Xo=", + "lastModified": 1738680491, + "narHash": "sha256-8X7tR3kFGkE7WEF5EXVkt4apgaN85oHZdoTGutCFs6I=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "f2cc121df15418d028a59c9737d38e3a90fbaf8f", + "rev": "64dbb922d51a42c0ced6a7668ca008dded61c483", "type": "github" }, "original": { @@ -937,11 +937,11 @@ }, "vpsadminos": { "locked": { - "lastModified": 1737943400, - "narHash": "sha256-2BqPlxdK4vvZYtYL+wVhch+U9/ZJrue5/t+VJsWqc+8=", + "lastModified": 1738687007, + "narHash": "sha256-cCFjJCknS2eVxCo6A1H+cffq0+7m0s18wE//bQDS28g=", "owner": "vpsfreecz", "repo": "vpsadminos", - "rev": "bced91cd0b47d61e648d1c254351206a3395c08a", + "rev": "c9040809be5e730ff5488ec0c9ecc9cd46c75df8", "type": "github" }, "original": { From d1d4e2da8d6a38d58467a051cf610a98b52281ed Mon Sep 17 00:00:00 2001 From: lelgenio Date: Tue, 11 Feb 2025 16:51:28 -0300 Subject: [PATCH 140/218] fish: Don't show unpushed tags in status --- user/fish/fish_prompt.fish | 1 + 1 file changed, 1 insertion(+) diff --git a/user/fish/fish_prompt.fish b/user/fish/fish_prompt.fish index e5784bd..ec7774e 100644 --- a/user/fish/fish_prompt.fish +++ b/user/fish/fish_prompt.fish @@ -51,6 +51,7 @@ end function _fish_prompt_git_unpushed_branches timeout 5s git log \ --branches \ + --decorate-refs-exclude=refs/tags \ --simplify-by-decoration \ --not \ --remotes \ From 01d0985202ad824dec1f04c0382cc64ee82f058c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 14 Feb 2025 13:57:20 -0300 Subject: [PATCH 141/218] update --- flake.lock | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/flake.lock b/flake.lock index 731f752..651e965 100644 --- a/flake.lock +++ b/flake.lock @@ -209,11 +209,11 @@ ] }, "locked": { - "lastModified": 1738148035, - "narHash": "sha256-KYOATYEwaKysL3HdHdS5kbQMXvzS4iPJzJrML+3TKAo=", + "lastModified": 1739353546, + "narHash": "sha256-YTqXhBZvCdZLMBupWlCDvRFaTEhaHa2/Xc/p1sUdSZU=", "owner": "nix-community", "repo": "disko", - "rev": "18d0a984cc2bc82cf61df19523a34ad463aa7f54", + "rev": "26ade1005191e0602a78b0f141970648445bafd9", "type": "github" }, "original": { @@ -227,11 +227,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1737831696, - "narHash": "sha256-+MiZ0DmokNycjvoFBddlzPw16GlSHEH7fARWB9RzTas=", + "lastModified": 1739502527, + "narHash": "sha256-KMLNOCWmqdDeAZV5O1ccRmVqRutDcy4IONJin3lzd0Q=", "owner": "lelgenio", "repo": "dzgui-nix", - "rev": "0f3bc9ab6a2d3afe93007ec742afb71bc8f03f75", + "rev": "06fcea9445b5a005b40469a69f57f2147398bc94", "type": "github" }, "original": { @@ -481,11 +481,11 @@ ] }, "locked": { - "lastModified": 1738466368, - "narHash": "sha256-PZhUjtvQZOH3PO0EYdTpQvcqkgkq1NkP2A6w9SPHYsk=", + "lastModified": 1739071773, + "narHash": "sha256-/Ak+Quinhmdxa9m3shjm4lwwwqmzG8zzGhhhhgR1k9I=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "46a8f5fc9552b776bfc5c5c96ea3bede33f68f52", + "rev": "895d81b6228bbd50a6ef22f5a58a504ca99763ea", "type": "github" }, "original": { @@ -504,11 +504,11 @@ "nixpkgs-24_11": "nixpkgs-24_11" }, "locked": { - "lastModified": 1737736848, - "narHash": "sha256-VrUfCXBXYV+YmQ2OvVTeML9EnmaPRtH+POrNIcJp6yo=", + "lastModified": 1739121270, + "narHash": "sha256-EmJhpy9U8sVlepl2QPjG019VfG67HcucsQNItTqW6cA=", "owner": "simple-nixos-mailserver", "repo": "nixos-mailserver", - "rev": "6b425d13f5a9d73cb63973d3609acacef4d1e261", + "rev": "8c1c4640b878c692dd3d8055e8cdea0a2bbd8cf3", "type": "gitlab" }, "original": { @@ -551,11 +551,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1738680400, - "narHash": "sha256-ooLh+XW8jfa+91F1nhf9OF7qhuA/y1ChLx6lXDNeY5U=", + "lastModified": 1739446958, + "narHash": "sha256-+/bYK3DbPxMIvSL4zArkMX0LQvS7rzBKXnDXLfKyRVc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "799ba5bffed04ced7067a91798353d360788b30d", + "rev": "2ff53fe64443980e139eaa286017f53f88336dd0", "type": "github" }, "original": { @@ -612,11 +612,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1738574474, - "narHash": "sha256-rvyfF49e/k6vkrRTV4ILrWd92W+nmBDfRYZgctOyolQ=", + "lastModified": 1739357830, + "narHash": "sha256-9xim3nJJUFbVbJCz48UP4fGRStVW5nv4VdbimbKxJ3I=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "fecfeb86328381268e29e998ddd3ebc70bbd7f7c", + "rev": "0ff09db9d034a04acd4e8908820ba0b410d7a33a", "type": "github" }, "original": { @@ -922,11 +922,11 @@ "nixpkgs": "nixpkgs_6" }, "locked": { - "lastModified": 1738680491, - "narHash": "sha256-8X7tR3kFGkE7WEF5EXVkt4apgaN85oHZdoTGutCFs6I=", + "lastModified": 1738953846, + "narHash": "sha256-yrK3Hjcr8F7qS/j2F+r7C7o010eVWWlm4T1PrbKBOxQ=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "64dbb922d51a42c0ced6a7668ca008dded61c483", + "rev": "4f09b473c936d41582dd744e19f34ec27592c5fd", "type": "github" }, "original": { @@ -937,11 +937,11 @@ }, "vpsadminos": { "locked": { - "lastModified": 1738687007, - "narHash": "sha256-cCFjJCknS2eVxCo6A1H+cffq0+7m0s18wE//bQDS28g=", + "lastModified": 1739153939, + "narHash": "sha256-7z+4SMs1uD/mCruBasPeWeq1DGzzgACRHOSdLE+mHRk=", "owner": "vpsfreecz", "repo": "vpsadminos", - "rev": "c9040809be5e730ff5488ec0c9ecc9cd46c75df8", + "rev": "939254840fcd72bdd3cd52186171815c3f25403b", "type": "github" }, "original": { From 667bb740b82675697c3e66c26ddac95ccba6068c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 25 Jan 2025 14:28:33 -0300 Subject: [PATCH 142/218] amdgpu: remove manual fan control --- hosts/monolith/amdgpu.nix | 13 +-------- scripts/amd-fan-control | 61 --------------------------------------- scripts/default.nix | 1 - 3 files changed, 1 insertion(+), 74 deletions(-) delete mode 100755 scripts/amd-fan-control diff --git a/hosts/monolith/amdgpu.nix b/hosts/monolith/amdgpu.nix index 4c26afa..8c42bf0 100644 --- a/hosts/monolith/amdgpu.nix +++ b/hosts/monolith/amdgpu.nix @@ -1,4 +1,4 @@ -{ pkgs, lib, ... }: +{ pkgs, ... }: let undervoltGpu = pkgs.writeShellScript "undervolt-gpu" '' set -xe @@ -17,17 +17,6 @@ in "amdgpu.ppfeaturemask=0xfffd7fff" # enable undervolting ]; - systemd.services.amd-fan-control = { - script = '' - ${lib.getExe pkgs.amd-fan-control} /sys/class/drm/card1/device 60 85 - ''; - serviceConfig = { - Restart = "always"; - RestartSec = 10; - }; - wantedBy = [ "multi-user.target" ]; - }; - hardware.graphics.enable32Bit = true; hardware.graphics.extraPackages = with pkgs; [ diff --git a/scripts/amd-fan-control b/scripts/amd-fan-control deleted file mode 100755 index 1f4c3e7..0000000 --- a/scripts/amd-fan-control +++ /dev/null @@ -1,61 +0,0 @@ -#!/usr/bin/env bash - -set -e - -DEVICE="$1" # eg: /sys/class/drm/card1/device -HWMON=$(echo "$DEVICE"/hwmon/hwmon*) - -exit() { - echo "Setting controll to auto" >&2 - echo 2 > "$HWMON/pwm1_enable" -} - -trap exit EXIT INT - -bail() { - echo "Error: $@" >&2 - echo "Exiting..." >&2 - exit 1 -} - -if ! [ -d "$HWMON" ]; then - bail "Invalid HWMON" -fi - -TEMP_INPUT="$HWMON/temp2_input" - -if ! [ -f $TEMP_INPUT ]; then - bail "Invalid TEMP_INPUT" -fi - -TEMP_MIN="$2" -TEMP_MAX="$3" - -if [ -z "$TEMP_MIN" ];then - bail "No minimum temperature provided" -fi - -if [ -z "$TEMP_MAX" ];then - bail "No maximum temperature provided" -fi - -PWM_MIN=0 -PWM_MAX=255 - -echo "Running..." >&2 -while true; do - TEMPERATURE_RAW=$(cat "$TEMP_INPUT") - TEMPERATURE="$(( $TEMPERATURE_RAW / 1000 ))" - # Remap from a number between 60_000..90_000 to 0..255 - PWM=$(( ($TEMPERATURE - $TEMP_MIN) * $PWM_MAX / ($TEMP_MAX - $TEMP_MIN) )) - - if [ "$PWM" -gt $PWM_MAX ]; then - PWM=$PWM_MAX - elif [ "$PWM" -lt $PWM_MIN ]; then - PWM=$PWM_MIN - fi - - echo 1 > "$HWMON/pwm1_enable" - echo "$PWM" > "$HWMON/pwm1" - sleep .1s -done diff --git a/scripts/default.nix b/scripts/default.nix index c2725ee..78ccac8 100644 --- a/scripts/default.nix +++ b/scripts/default.nix @@ -23,7 +23,6 @@ in with final; createScripts { - amd-fan-control = [ bash ]; br = [ ]; bmenu = [ bemenu From 3bb0b28ae3ba9488a68641d4ce76ff9719c4caeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 19 Feb 2025 08:49:12 -0300 Subject: [PATCH 143/218] update --- flake.lock | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/flake.lock b/flake.lock index 651e965..5a3f325 100644 --- a/flake.lock +++ b/flake.lock @@ -209,11 +209,11 @@ ] }, "locked": { - "lastModified": 1739353546, - "narHash": "sha256-YTqXhBZvCdZLMBupWlCDvRFaTEhaHa2/Xc/p1sUdSZU=", + "lastModified": 1739841949, + "narHash": "sha256-lSOXdgW/1zi/SSu7xp71v+55D5Egz8ACv0STkj7fhbs=", "owner": "nix-community", "repo": "disko", - "rev": "26ade1005191e0602a78b0f141970648445bafd9", + "rev": "15dbf8cebd8e2655a883b74547108e089f051bf0", "type": "github" }, "original": { @@ -440,11 +440,11 @@ ] }, "locked": { - "lastModified": 1736373539, - "narHash": "sha256-dinzAqCjenWDxuy+MqUQq0I4zUSfaCvN9rzuCmgMZJY=", + "lastModified": 1739757849, + "narHash": "sha256-Gs076ot1YuAAsYVcyidLKUMIc4ooOaRGO0PqTY7sBzA=", "owner": "nix-community", "repo": "home-manager", - "rev": "bd65bc3cde04c16755955630b344bc9e35272c56", + "rev": "9d3d080aec2a35e05a15cedd281c2384767c2cfe", "type": "github" }, "original": { @@ -481,11 +481,11 @@ ] }, "locked": { - "lastModified": 1739071773, - "narHash": "sha256-/Ak+Quinhmdxa9m3shjm4lwwwqmzG8zzGhhhhgR1k9I=", + "lastModified": 1739676768, + "narHash": "sha256-U1HQ7nzhJyVVXUgjU028UCkbLQLEIkg42+G7iIiBmlU=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "895d81b6228bbd50a6ef22f5a58a504ca99763ea", + "rev": "ae15068e79e22b76c344f0d7f8aed1bb1c5b0b63", "type": "github" }, "original": { @@ -551,11 +551,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1739446958, - "narHash": "sha256-+/bYK3DbPxMIvSL4zArkMX0LQvS7rzBKXnDXLfKyRVc=", + "lastModified": 1739736696, + "narHash": "sha256-zON2GNBkzsIyALlOCFiEBcIjI4w38GYOb+P+R4S8Jsw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "2ff53fe64443980e139eaa286017f53f88336dd0", + "rev": "d74a2335ac9c133d6bbec9fc98d91a77f1604c1f", "type": "github" }, "original": { @@ -612,11 +612,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1739357830, - "narHash": "sha256-9xim3nJJUFbVbJCz48UP4fGRStVW5nv4VdbimbKxJ3I=", + "lastModified": 1739758141, + "narHash": "sha256-uq6A2L7o1/tR6VfmYhZWoVAwb3gTy7j4Jx30MIrH0rE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "0ff09db9d034a04acd4e8908820ba0b410d7a33a", + "rev": "c618e28f70257593de75a7044438efc1c1fc0791", "type": "github" }, "original": { @@ -922,11 +922,11 @@ "nixpkgs": "nixpkgs_6" }, "locked": { - "lastModified": 1738953846, - "narHash": "sha256-yrK3Hjcr8F7qS/j2F+r7C7o010eVWWlm4T1PrbKBOxQ=", + "lastModified": 1739829690, + "narHash": "sha256-mL1szCeIsjh6Khn3nH2cYtwO5YXG6gBiTw1A30iGeDU=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "4f09b473c936d41582dd744e19f34ec27592c5fd", + "rev": "3d0579f5cc93436052d94b73925b48973a104204", "type": "github" }, "original": { From 03dd6d96aab66074e719ed40321895c5723d6491 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Thu, 20 Feb 2025 20:23:01 -0300 Subject: [PATCH 144/218] git: add git forges cli --- user/git.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/user/git.nix b/user/git.nix index 867b9a5..bfc85c1 100644 --- a/user/git.nix +++ b/user/git.nix @@ -43,6 +43,9 @@ in home.packages = with pkgs; [ git_clean_remote_deleted + + gh + glab ]; }; } From 90125795a99662038a19f5fafcd3754afac6ed9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Thu, 20 Feb 2025 22:01:07 -0300 Subject: [PATCH 145/218] Revert "amdgpu: remove manual fan control" This reverts commit 38dfa39c6dc80963c461edddae9c18a555715ca9. --- hosts/monolith/amdgpu.nix | 13 ++++++++- scripts/amd-fan-control | 61 +++++++++++++++++++++++++++++++++++++++ scripts/default.nix | 1 + 3 files changed, 74 insertions(+), 1 deletion(-) create mode 100755 scripts/amd-fan-control diff --git a/hosts/monolith/amdgpu.nix b/hosts/monolith/amdgpu.nix index 8c42bf0..4c26afa 100644 --- a/hosts/monolith/amdgpu.nix +++ b/hosts/monolith/amdgpu.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, lib, ... }: let undervoltGpu = pkgs.writeShellScript "undervolt-gpu" '' set -xe @@ -17,6 +17,17 @@ in "amdgpu.ppfeaturemask=0xfffd7fff" # enable undervolting ]; + systemd.services.amd-fan-control = { + script = '' + ${lib.getExe pkgs.amd-fan-control} /sys/class/drm/card1/device 60 85 + ''; + serviceConfig = { + Restart = "always"; + RestartSec = 10; + }; + wantedBy = [ "multi-user.target" ]; + }; + hardware.graphics.enable32Bit = true; hardware.graphics.extraPackages = with pkgs; [ diff --git a/scripts/amd-fan-control b/scripts/amd-fan-control new file mode 100755 index 0000000..1f4c3e7 --- /dev/null +++ b/scripts/amd-fan-control @@ -0,0 +1,61 @@ +#!/usr/bin/env bash + +set -e + +DEVICE="$1" # eg: /sys/class/drm/card1/device +HWMON=$(echo "$DEVICE"/hwmon/hwmon*) + +exit() { + echo "Setting controll to auto" >&2 + echo 2 > "$HWMON/pwm1_enable" +} + +trap exit EXIT INT + +bail() { + echo "Error: $@" >&2 + echo "Exiting..." >&2 + exit 1 +} + +if ! [ -d "$HWMON" ]; then + bail "Invalid HWMON" +fi + +TEMP_INPUT="$HWMON/temp2_input" + +if ! [ -f $TEMP_INPUT ]; then + bail "Invalid TEMP_INPUT" +fi + +TEMP_MIN="$2" +TEMP_MAX="$3" + +if [ -z "$TEMP_MIN" ];then + bail "No minimum temperature provided" +fi + +if [ -z "$TEMP_MAX" ];then + bail "No maximum temperature provided" +fi + +PWM_MIN=0 +PWM_MAX=255 + +echo "Running..." >&2 +while true; do + TEMPERATURE_RAW=$(cat "$TEMP_INPUT") + TEMPERATURE="$(( $TEMPERATURE_RAW / 1000 ))" + # Remap from a number between 60_000..90_000 to 0..255 + PWM=$(( ($TEMPERATURE - $TEMP_MIN) * $PWM_MAX / ($TEMP_MAX - $TEMP_MIN) )) + + if [ "$PWM" -gt $PWM_MAX ]; then + PWM=$PWM_MAX + elif [ "$PWM" -lt $PWM_MIN ]; then + PWM=$PWM_MIN + fi + + echo 1 > "$HWMON/pwm1_enable" + echo "$PWM" > "$HWMON/pwm1" + sleep .1s +done diff --git a/scripts/default.nix b/scripts/default.nix index 78ccac8..c2725ee 100644 --- a/scripts/default.nix +++ b/scripts/default.nix @@ -23,6 +23,7 @@ in with final; createScripts { + amd-fan-control = [ bash ]; br = [ ]; bmenu = [ bemenu From 1fcf1ecd5239783497f0d273a3904a16cf7aa15f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 21 Feb 2025 00:35:24 -0300 Subject: [PATCH 146/218] remove fullscreen only vrr --- scripts/default.nix | 1 - scripts/vrr-fullscreen | 28 ---------------------------- user/sway/default.nix | 15 --------------- 3 files changed, 44 deletions(-) delete mode 100755 scripts/vrr-fullscreen diff --git a/scripts/default.nix b/scripts/default.nix index c2725ee..d9824b5 100644 --- a/scripts/default.nix +++ b/scripts/default.nix @@ -137,7 +137,6 @@ libinput libratbag ]; - vrr-fullscreen = [ ]; controller-battery = [ ]; _docker-block-external-connections = [ iptables diff --git a/scripts/vrr-fullscreen b/scripts/vrr-fullscreen deleted file mode 100755 index 8413923..0000000 --- a/scripts/vrr-fullscreen +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env bash - -# List of supported outputs for VRR -output_vrr_whitelist=( - "DP-1" - "DP-2" -) - -# Toggle VRR for fullscreened apps in prespecified displays to avoid stutters while in desktop -swaymsg -t subscribe -m '[ "window" ]' | while read window_json; do - window_event=$(echo ${window_json} | jq -r '.change') - - # Process only focus change and fullscreen toggle - if [[ $window_event = "focus" || $window_event = "fullscreen_mode" ]]; then - output_json=$(swaymsg -t get_outputs | jq -r '.[] | select(.focused == true)') - output_name=$(echo ${output_json} | jq -r '.name') - - # Use only VRR in whitelisted outputs - if [[ ${output_vrr_whitelist[*]} =~ ${output_name} ]]; then - output_vrr_status=$(echo ${output_json} | jq -r '.adaptive_sync_status') - window_fullscreen_status=$(echo ${window_json} | jq -r '.container.fullscreen_mode') - - # Only update output if nesseccary to avoid flickering - [[ $output_vrr_status = "disabled" && $window_fullscreen_status = "1" ]] && swaymsg output "${output_name}" adaptive_sync 1 - [[ $output_vrr_status = "enabled" && $window_fullscreen_status = "0" ]] && swaymsg output "${output_name}" adaptive_sync 0 - fi - fi -done diff --git a/user/sway/default.nix b/user/sway/default.nix index 6679134..2633c23 100644 --- a/user/sway/default.nix +++ b/user/sway/default.nix @@ -122,21 +122,6 @@ in indicator = true; }; - systemd.user.services.vrr-fullscreen = { - Unit = { - Description = "Enable VRR for fullscreen windows"; - PartOf = [ "graphical-session.target" ]; - After = [ "graphical-session.target" ]; - }; - Service = { - ExecStart = "${lib.getExe pkgs.vrr-fullscreen}"; - Restart = "on-failure"; - }; - Install = { - WantedBy = [ "sway-session.target" ]; - }; - }; - services.gpg-agent.pinentryPackage = pkgs.pinentry-all; xdg.configFile."OpenTabletDriver/settings.json".source = ./open-tablet-driver.json; From d469c5fa796411840a3d09ef86c1c6976adbeae7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 21 Feb 2025 19:46:33 -0300 Subject: [PATCH 147/218] remove cachix config --- system/cachix.nix | 18 ------------------ system/configuration.nix | 1 - 2 files changed, 19 deletions(-) delete mode 100644 system/cachix.nix diff --git a/system/cachix.nix b/system/cachix.nix deleted file mode 100644 index 7ff9b29..0000000 --- a/system/cachix.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ - pkgs, - lib, - config, - ... -}: -{ - services.cachix-watch-store = { - enable = true; - cacheName = "lelgenio"; - cachixTokenFile = config.age.secrets.lelgenio-cachix.path; - }; - systemd.services.cachix-watch-store-agent = { - serviceConfig.TimeoutStopSec = 3; - # If we don't do this, cachix tends to timeout - serviceConfig.KillMode = lib.mkForce "control-group"; - }; -} diff --git a/system/configuration.nix b/system/configuration.nix index 9b4bed3..f4bfabf 100644 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -10,7 +10,6 @@ { imports = [ ./gamemode.nix - ./cachix.nix ./media-packages.nix ./boot.nix ./thunar.nix From 0a387960a2c5e730a39cf7d160027528811dd0dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Thu, 20 Feb 2025 22:01:03 -0300 Subject: [PATCH 148/218] treewide: cleanup config with enable options --- flake.nix | 32 +++++---- hosts/monolith/default.nix | 2 + settings/default.nix | 14 +++- system/android.nix | 17 +++++ system/boot.nix | 1 - system/configuration.nix | 32 +++------ system/containers.nix | 55 +++++++++------- system/gamemode.nix | 27 -------- system/gaming.nix | 63 ++++++++++++++++++ system/media-packages.nix | 4 +- system/network.nix | 13 +++- system/steam.nix | 36 ---------- user/dummy.nix | 8 +++ user/fish/default.nix | 5 +- user/fzf.nix | 8 +-- user/gaming.nix | 24 +++++++ user/helix.nix | 6 +- user/home.nix | 18 ++--- user/mangohud.nix | 132 +++++++++++++++++-------------------- user/mpd.nix | 7 +- user/pass.nix | 8 ++- user/sway/default.nix | 29 ++++---- user/sway/kanshi.nix | 20 ++---- user/sway/mako.nix | 84 ++++++++++++----------- user/sway/swayidle.nix | 15 ++--- user/sway/swaylock.nix | 20 ++---- user/waybar/default.nix | 6 +- user/zathura.nix | 92 +++++++++++++------------- 28 files changed, 420 insertions(+), 358 deletions(-) create mode 100644 system/android.nix delete mode 100644 system/gamemode.nix create mode 100644 system/gaming.nix delete mode 100644 system/steam.nix create mode 100644 user/dummy.nix create mode 100644 user/gaming.nix diff --git a/flake.nix b/flake.nix index 49c3192..0126f65 100644 --- a/flake.nix +++ b/flake.nix @@ -102,17 +102,25 @@ inputs.agenix.nixosModules.default inputs.home-manager.nixosModules.home-manager inputs.disko.nixosModules.disko - { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.users.lelgenio = import ./user/home.nix; - home-manager.backupFileExtension = "bkp"; - # Optionally, use home-manager.extraSpecialArgs to pass - # arguments to home.nix - home-manager.extraSpecialArgs = { - inherit inputs; - }; - } + ( + { config, ... }: + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.lelgenio = { + my = config.my; + imports = [ + ./user/home.nix + ]; + }; + home-manager.backupFileExtension = "bkp"; + # Optionally, use home-manager.extraSpecialArgs to pass + # arguments to home.nix + home-manager.extraSpecialArgs = { + inherit inputs; + }; + } + ) ] ++ lib.optional (desktop == "gnome") ./system/gnome.nix ++ lib.optional (desktop == "kde") ./system/kde.nix; @@ -133,7 +141,6 @@ ./system/monolith-gitlab-runner.nix ./system/monolith-forgejo-runner.nix ./system/nix-serve.nix - ./system/steam.nix ] ++ common_modules; }; double-rainbow = lib.nixosSystem { @@ -151,7 +158,6 @@ ++ [ { packages.media-packages.enable = lib.mkOverride 0 false; - programs.steam.enable = lib.mkOverride 0 false; services.flatpak.enable = lib.mkOverride 0 false; } ]; diff --git a/hosts/monolith/default.nix b/hosts/monolith/default.nix index c3764fd..410300e 100644 --- a/hosts/monolith/default.nix +++ b/hosts/monolith/default.nix @@ -41,6 +41,8 @@ in package = pkgs.unstable.opentabletdriver; }; + my.gaming.enable = true; + boot.extraModulePackages = with config.boot.kernelPackages; [ zenpower ]; boot.initrd.kernelModules = [ "amdgpu" ]; diff --git a/settings/default.nix b/settings/default.nix index 2a2ca08..1cf90df 100644 --- a/settings/default.nix +++ b/settings/default.nix @@ -1,6 +1,18 @@ { lib, ... }: { options = { - my = lib.mkOption { }; + my = { + themes = lib.mkOption { }; + key = lib.mkOption { }; + theme = lib.mkOption { }; + accent = lib.mkOption { }; + font = lib.mkOption { }; + username = lib.mkOption { type = lib.types.str; }; + mail = lib.mkOption { }; + dmenu = lib.mkOption { type = lib.types.str; }; + desktop = lib.mkOption { type = lib.types.str; }; + browser = lib.mkOption { type = lib.types.str; }; + editor = lib.mkOption { type = lib.types.str; }; + }; }; } diff --git a/system/android.nix b/system/android.nix new file mode 100644 index 0000000..3cce4af --- /dev/null +++ b/system/android.nix @@ -0,0 +1,17 @@ +{ + config, + pkgs, + lib, + ... +}: +{ + options.my.android.enable = lib.mkEnableOption { }; + + config = lib.mkIf config.my.android.enable { + # Open kde connect ports + programs.kdeconnect.enable = true; + + programs.adb.enable = true; + services.udev.packages = [ pkgs.android-udev-rules ]; + }; +} diff --git a/system/boot.nix b/system/boot.nix index fa1ed8d..3e0151d 100644 --- a/system/boot.nix +++ b/system/boot.nix @@ -2,7 +2,6 @@ config, pkgs, lib, - inputs, ... }: { diff --git a/system/configuration.nix b/system/configuration.nix index f4bfabf..a227e36 100644 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -1,15 +1,11 @@ # Edit this configuration file to define what should be installed on # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). -{ - config, - pkgs, - inputs, - ... -}: +{ pkgs, ... }: { imports = [ - ./gamemode.nix + ./android.nix + ./gaming.nix ./media-packages.nix ./boot.nix ./thunar.nix @@ -25,39 +21,27 @@ ../settings ]; - my = import ../user/variables.nix; + my = import ../user/variables.nix // { + android.enable = true; + media-packages.enable = true; + containers.enable = true; + }; zramSwap.enable = true; - programs.adb.enable = true; - services.udev.packages = [ pkgs.android-udev-rules ]; - # Enable touchpad support (enabled default in most desktopManager). services.libinput.enable = true; - packages.media-packages.enable = true; environment.systemPackages = with pkgs; [ pavucontrol glib # gsettings usbutils - # dracula-theme # gtk theme adwaita-icon-theme # default gnome cursors - - nix-output-monitor ]; services.geoclue2.enable = true; - # Workaround for nm-wait-online hanging?? - # Ref: https://github.com/NixOS/nixpkgs/issues/180175 - systemd.services.NetworkManager-wait-online = { - serviceConfig.ExecStart = [ - "" - "${pkgs.networkmanager}/bin/nm-online -q" - ]; - }; - systemd.extraConfig = '' DefaultTimeoutStopSec=10s ''; diff --git a/system/containers.nix b/system/containers.nix index 64383a6..9032a6c 100644 --- a/system/containers.nix +++ b/system/containers.nix @@ -1,30 +1,39 @@ -{ pkgs, lib, ... }: { - services.flatpak.enable = true; + pkgs, + lib, + config, + ... +}: +{ + options.my.containers.enable = lib.mkEnableOption { }; - virtualisation.docker = { - enable = true; - autoPrune = { + config = lib.mkIf config.my.containers.enable { + services.flatpak.enable = true; + + virtualisation.docker = { enable = true; - dates = "monthly"; - flags = [ - "--all" - "--volumes" - ]; - }; - daemon.settings = { - # needed by bitbucket runner ??? - log-driver = "json-file"; - log-opts = { - max-size = "10m"; - max-file = "3"; + autoPrune = { + enable = true; + dates = "monthly"; + flags = [ + "--all" + "--volumes" + ]; + }; + daemon.settings = { + # needed by bitbucket runner ??? + log-driver = "json-file"; + log-opts = { + max-size = "10m"; + max-file = "3"; + }; }; }; + + networking.firewall.extraCommands = lib.getExe pkgs._docker-block-external-connections; + + programs.extra-container.enable = true; + + programs.firejail.enable = true; }; - - networking.firewall.extraCommands = lib.getExe pkgs._docker-block-external-connections; - - programs.extra-container.enable = true; - - programs.firejail.enable = true; } diff --git a/system/gamemode.nix b/system/gamemode.nix deleted file mode 100644 index 92207cd..0000000 --- a/system/gamemode.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ - config, - pkgs, - inputs, - ... -}: -{ - programs.gamemode.enable = true; - programs.gamemode.enableRenice = true; - programs.gamemode.settings = { - general = { - renice = 10; - }; - - # Warning: GPU optimisations have the potential to damage hardware - gpu = { - apply_gpu_optimisations = "accept-responsibility"; - gpu_device = 0; - amd_performance_level = "high"; - }; - - custom = { - start = "${pkgs.libnotify}/bin/notify-send 'GameMode started'"; - end = "${pkgs.libnotify}/bin/notify-send 'GameMode ended'"; - }; - }; -} diff --git a/system/gaming.nix b/system/gaming.nix new file mode 100644 index 0000000..e32c640 --- /dev/null +++ b/system/gaming.nix @@ -0,0 +1,63 @@ +{ + config, + pkgs, + lib, + inputs, + ... +}: +{ + options.my.gaming.enable = lib.mkEnableOption { }; + + config = lib.mkIf config.my.gaming.enable { + programs.steam.enable = true; + programs.steam.extraPackages = + config.fonts.packages + ++ (with pkgs; [ + capitaine-cursors + bibata-cursors + mangohud + xdg-user-dirs + gamescope + + # gamescope compatibility?? + xorg.libXcursor + xorg.libXi + xorg.libXinerama + xorg.libXScrnSaver + libpng + libpulseaudio + libvorbis + stdenv.cc.cc.lib + libkrb5 + keyutils + ]); + + environment.systemPackages = with pkgs; [ + protontricks + bottles + inputs.dzgui-nix.packages.${pkgs.system}.default + ]; + + programs.gamemode = { + enable = true; + enableRenice = true; + settings = { + general = { + renice = 10; + }; + + # Warning: GPU optimisations have the potential to damage hardware + gpu = { + apply_gpu_optimisations = "accept-responsibility"; + gpu_device = 0; + amd_performance_level = "high"; + }; + + custom = { + start = "${pkgs.libnotify}/bin/notify-send 'GameMode started'"; + end = "${pkgs.libnotify}/bin/notify-send 'GameMode ended'"; + }; + }; + }; + }; +} diff --git a/system/media-packages.nix b/system/media-packages.nix index 8458087..dec98a2 100644 --- a/system/media-packages.nix +++ b/system/media-packages.nix @@ -5,10 +5,10 @@ ... }: let - cfg = config.packages.media-packages; + cfg = config.my.media-packages; in { - options.packages.media-packages = { + options.my.media-packages = { enable = lib.mkEnableOption "media packages"; }; config = lib.mkIf cfg.enable { diff --git a/system/network.nix b/system/network.nix index 682639d..e280ff5 100644 --- a/system/network.nix +++ b/system/network.nix @@ -6,8 +6,6 @@ # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; # Enable networking networking.networkmanager.enable = true; - # Open kde connect ports - programs.kdeconnect.enable = true; networking.firewall = { enable = true; @@ -15,7 +13,7 @@ }; # Enable CUPS to print documents. - # services.printing.enable = true; + services.printing.enable = true; security.rtkit.enable = true; services.openssh = { @@ -27,4 +25,13 @@ KbdInteractiveAuthentication = false; }; }; + + # Workaround for nm-wait-online hanging?? + # Ref: https://github.com/NixOS/nixpkgs/issues/180175 + systemd.services.NetworkManager-wait-online = { + serviceConfig.ExecStart = [ + "" + "${pkgs.networkmanager}/bin/nm-online -q" + ]; + }; } diff --git a/system/steam.nix b/system/steam.nix deleted file mode 100644 index f82c958..0000000 --- a/system/steam.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ - config, - pkgs, - inputs, - ... -}: -{ - programs.steam.enable = true; - programs.steam.extraPackages = - config.fonts.packages - ++ (with pkgs; [ - capitaine-cursors - bibata-cursors - mangohud - xdg-user-dirs - gamescope - - # gamescope compatibility?? - xorg.libXcursor - xorg.libXi - xorg.libXinerama - xorg.libXScrnSaver - libpng - libpulseaudio - libvorbis - stdenv.cc.cc.lib - libkrb5 - keyutils - ]); - - environment.systemPackages = with pkgs; [ - protontricks - bottles - inputs.dzgui-nix.packages.${pkgs.system}.default - ]; -} diff --git a/user/dummy.nix b/user/dummy.nix new file mode 100644 index 0000000..39043dd --- /dev/null +++ b/user/dummy.nix @@ -0,0 +1,8 @@ +{ lib, ... }: +{ + options.my = { + android.enable = lib.mkEnableOption { }; + media-packages.enable = lib.mkEnableOption { }; + containers.enable = lib.mkEnableOption { }; + }; +} diff --git a/user/fish/default.nix b/user/fish/default.nix index 30893ee..830d716 100644 --- a/user/fish/default.nix +++ b/user/fish/default.nix @@ -6,9 +6,12 @@ }: let inherit (config.my) accent editor desktop; + cfg = config.my.fish; in { - config = { + options.my.fish.enable = lib.mkEnableOption { }; + + config = lib.mkIf cfg.enable { programs.fish = { enable = true; shellInit = '' diff --git a/user/fzf.nix b/user/fzf.nix index df16adb..468cae5 100644 --- a/user/fzf.nix +++ b/user/fzf.nix @@ -2,16 +2,10 @@ config, pkgs, lib, - inputs, ... }: let - inherit (config.my) - key - theme - accent - font - ; + inherit (config.my) theme accent; inherit (theme) color; colors = { diff --git a/user/gaming.nix b/user/gaming.nix new file mode 100644 index 0000000..3e89361 --- /dev/null +++ b/user/gaming.nix @@ -0,0 +1,24 @@ +{ + config, + lib, + pkgs, + ... +}: +let + cfg = config.my.gaming; +in +{ + options.my.gaming.enable = lib.mkEnableOption { }; + config = lib.mkIf cfg.enable { + my.mangohud.enable = true; + + home.packages = with pkgs; [ + # lutris-unwrapped + # steam # It's enabled in the system config + tlauncher + gamescope + glxinfo + vulkan-tools + ]; + }; +} diff --git a/user/helix.nix b/user/helix.nix index b711055..15250b4 100644 --- a/user/helix.nix +++ b/user/helix.nix @@ -7,9 +7,13 @@ let inherit (config.my) accent theme editor; inherit (theme) color; + + cfg = config.my.helix; in { - config = { + options.my.helix.enable = lib.mkEnableOption "Enable helix config"; + + config = lib.mkIf cfg.enable { programs.helix = { enable = true; settings = { diff --git a/user/home.nix b/user/home.nix index e8ba81d..c384c60 100644 --- a/user/home.nix +++ b/user/home.nix @@ -8,6 +8,7 @@ }: { imports = [ + ./dummy.nix ./waybar ./helix.nix ./kakoune @@ -21,6 +22,7 @@ ./rofi.nix ./mpv.nix ./mangohud.nix + ./gaming.nix ./pipewire.nix ./mimeapps.nix ./desktop-entries.nix @@ -44,7 +46,11 @@ ./powerplay-led-idle.nix ]; - my = import ./variables.nix; + my = import ./variables.nix // { + sway.enable = true; + pass.enable = true; + fish.enable = true; + }; # Home Manager needs a bit of information about you and the # paths it should manage. @@ -91,14 +97,6 @@ mate.engrampa # gnome.nautilus - ## games - # lutris-unwrapped - # steam # It's enabled in the system config - tlauncher - gamescope - glxinfo - vulkan-tools - ## Theming orchis_theme_compact papirus_red @@ -130,6 +128,8 @@ unstable.blade-formatter nixfmt-rfc-style + + nix-output-monitor ]; fonts.fontconfig.enable = true; diff --git a/user/mangohud.nix b/user/mangohud.nix index 440b750..fa0c8ff 100644 --- a/user/mangohud.nix +++ b/user/mangohud.nix @@ -1,80 +1,68 @@ -{ - config, - pkgs, - lib, - font, - ... -}: +{ config, lib, ... }: let - inherit (config.my) - key - theme - color - accent - font - ; + cfg = config.my.mangohud; in { - config = { - programs.mangohud = { - enable = true; - enableSessionWide = true; - settings = { - full = true; - # histogram = true; - no_display = true; - fps_limit = "0,30,60,72,90,120,144,240,288,320"; - toggle_fps_limit = "Shift_R+F10"; - toggle_preset = "Control_R+F9"; - fps_metrics = "Control_R+F8"; + options.my.mangohud.enable = lib.mkEnableOption { }; - # legacy_layout = "false"; - # gpu_stats = true; - # gpu_temp = true; - # gpu_core_clock = true; - # gpu_mem_clock = true; - # gpu_power = true; - # gpu_load_change = true; - # gpu_load_value = "50,90"; - gpu_load_color = "FFFFFF,FFAA7F,CC0000"; - # gpu_text = "GPU"; - # cpu_stats = true; - # cpu_temp = true; - # cpu_power = true; - # cpu_mhz = true; - # cpu_load_change = true; - # core_load_change = true; - # cpu_load_value = "50,90"; - cpu_load_color = "FFFFFF,FFAA7F,CC0000"; - cpu_color = "2e97cb"; - # cpu_text = "CPU"; - # io_stats = true; - # io_read = true; - # io_write = true; - io_color = "a491d3"; - # swap = true; - # vram = true; - vram_color = "ad64c1"; - # ram = true; - ram_color = "c26693"; - # fps = true; - engine_color = "eb5b5b"; - gpu_color = "2e9762"; - wine_color = "eb5b5b"; - # frame_timing = "1"; - frametime_color = "00ff00"; - media_player_color = "ffffff"; - background_alpha = "0.8"; - font_size = "24"; + config.programs.mangohud = lib.mkIf cfg.enable { + enable = true; + enableSessionWide = true; + settings = { + full = true; + # histogram = true; + no_display = true; + fps_limit = "0,30,60,72,90,120,144,240,288,320"; + toggle_fps_limit = "Shift_R+F10"; + toggle_preset = "Control_R+F9"; + fps_metrics = "Control_R+F8"; - background_color = "020202"; - position = "top-left"; - # text_color = "ffffff"; - round_corners = "10"; - toggle_hud = "Shift_R+F12"; - # toggle_logging = "Shift_L+F12"; - # output_folder = "/home/lelgenio"; - }; + # legacy_layout = "false"; + # gpu_stats = true; + # gpu_temp = true; + # gpu_core_clock = true; + # gpu_mem_clock = true; + # gpu_power = true; + # gpu_load_change = true; + # gpu_load_value = "50,90"; + gpu_load_color = "FFFFFF,FFAA7F,CC0000"; + # gpu_text = "GPU"; + # cpu_stats = true; + # cpu_temp = true; + # cpu_power = true; + # cpu_mhz = true; + # cpu_load_change = true; + # core_load_change = true; + # cpu_load_value = "50,90"; + cpu_load_color = "FFFFFF,FFAA7F,CC0000"; + cpu_color = "2e97cb"; + # cpu_text = "CPU"; + # io_stats = true; + # io_read = true; + # io_write = true; + io_color = "a491d3"; + # swap = true; + # vram = true; + vram_color = "ad64c1"; + # ram = true; + ram_color = "c26693"; + # fps = true; + engine_color = "eb5b5b"; + gpu_color = "2e9762"; + wine_color = "eb5b5b"; + # frame_timing = "1"; + frametime_color = "00ff00"; + media_player_color = "ffffff"; + background_alpha = "0.8"; + font_size = "24"; + + background_color = "020202"; + position = "top-left"; + # text_color = "ffffff"; + round_corners = "10"; + toggle_hud = "Shift_R+F12"; + # toggle_logging = "Shift_L+F12"; + # output_folder = "/home/lelgenio"; }; }; } diff --git a/user/mpd.nix b/user/mpd.nix index f4cca16..b4bdad3 100644 --- a/user/mpd.nix +++ b/user/mpd.nix @@ -4,8 +4,13 @@ config, ... }: +let + cfg = config.my.mpd; +in { - config = lib.mkIf (config.my.desktop != "gnome") { + options.my.mpd.enable = lib.mkEnableOption { }; + + config = lib.mkIf cfg.enable { services.mpd = { enable = true; musicDirectory = config.home.homeDirectory + "/Música"; diff --git a/user/pass.nix b/user/pass.nix index 4a69d12..c3b56c6 100644 --- a/user/pass.nix +++ b/user/pass.nix @@ -2,11 +2,15 @@ config, pkgs, lib, - inputs, ... }: +let + cfg = config.my.pass; +in { - config = { + options.my.pass.enable = lib.mkEnableOption { }; + + config = lib.mkIf cfg.enable { programs.password-store = { enable = true; package = pkgs.pass.withExtensions ( diff --git a/user/sway/default.nix b/user/sway/default.nix index 2633c23..325cad5 100644 --- a/user/sway/default.nix +++ b/user/sway/default.nix @@ -5,13 +5,10 @@ ... }: let - inherit (config.my) - key - accent - font - theme - ; + inherit (config.my) accent font theme; inherit (theme) color; + + cfg = config.my.sway; in { imports = [ @@ -24,10 +21,17 @@ in ./swaylock.nix ./theme.nix ]; - config = lib.mkIf (config.my.desktop == "sway") { - services.mako.enable = true; - services.swayidle.enable = true; - services.kanshi.enable = true; + + options.my.sway.enable = lib.mkEnableOption { }; + + config = lib.mkIf cfg.enable { + my.mako.enable = true; + my.kanshi.enable = true; + my.swayidle.enable = true; + my.swaylock.enable = true; + my.mpd.enable = true; + my.zathura.enable = true; + my.waybar.enable = true; wayland.windowManager.sway = { enable = true; @@ -36,7 +40,7 @@ in bars = [ ]; floating.modifier = "Mod4"; - terminal = pkgs.alacritty.executable; + terminal = lib.getExe pkgs.alacritty; window.titlebar = false; gaps = { @@ -69,7 +73,7 @@ in }; output = { "*" = { - adaptive_sync = "off"; + adaptive_sync = "on"; bg = "${theme.background} fill"; mode = "1920x1080@144.000Hz"; }; @@ -132,7 +136,6 @@ in swaylock wdisplays - waybar dhist demoji bmenu diff --git a/user/sway/kanshi.nix b/user/sway/kanshi.nix index c0a584b..486a209 100644 --- a/user/sway/kanshi.nix +++ b/user/sway/kanshi.nix @@ -1,20 +1,12 @@ -{ - config, - pkgs, - lib, - ... -}: +{ config, lib, ... }: let - inherit (config.my) - key - accent - font - theme - ; - inherit (theme) color; + cfg = config.my.kanshi; in { - services.kanshi = { + options.my.kanshi.enable = lib.mkEnableOption { }; + + config.services.kanshi = lib.mkIf cfg.enable { + enable = true; settings = [ { profile = { diff --git a/user/sway/mako.nix b/user/sway/mako.nix index 4f43734..af6c673 100644 --- a/user/sway/mako.nix +++ b/user/sway/mako.nix @@ -6,60 +6,66 @@ }: let inherit (config.my) - key accent font theme ; inherit (theme) color; + + cfg = config.my.mako; in { - services.mako = { - borderSize = 2; - padding = "5"; - margin = "15"; - layer = "overlay"; + options.my.mako.enable = lib.mkEnableOption { }; - font = "${font.interface} ${toString font.size.small}"; - textColor = color.txt; + config = lib.mkIf cfg.enable { + services.mako = { + enable = true; + borderSize = 2; + padding = "5"; + margin = "15"; + layer = "overlay"; - backgroundColor = color.bg; - borderColor = accent.color; - progressColor = "over ${accent.color}88"; + font = "${font.interface} ${toString font.size.small}"; + textColor = color.txt; - defaultTimeout = 10000; + backgroundColor = color.bg; + borderColor = accent.color; + progressColor = "over ${accent.color}88"; - extraConfig = '' - [app-name=volumesh] - default-timeout=5000 - group-by=app-name - format=%s\n%b - ''; + defaultTimeout = 10000; - # # {{@@ header() @@}} - # # text + extraConfig = '' + [app-name=volumesh] + default-timeout=5000 + group-by=app-name + format=%s\n%b + ''; - # # features - # icons=1 - # markup=1 - # actions=1 - # default-timeout=10000 + # # {{@@ header() @@}} + # # text - # # position - # layer=overlay - }; - systemd.user.services.mako = lib.mkIf (config.services.mako.enable) { - Unit = { - Description = "Notification daemon"; - PartOf = [ "graphical-session.target" ]; - After = [ "graphical-session.target" ]; + # # features + # icons=1 + # markup=1 + # actions=1 + # default-timeout=10000 + + # # position + # layer=overlay }; - Service = { - ExecStart = "${pkgs.mako}/bin/mako"; - Restart = "on-failure"; - }; - Install = { - WantedBy = [ "sway-session.target" ]; + systemd.user.services.mako = lib.mkIf (config.services.mako.enable) { + Unit = { + Description = "Notification daemon"; + PartOf = [ "graphical-session.target" ]; + After = [ "graphical-session.target" ]; + }; + Service = { + ExecStart = "${pkgs.mako}/bin/mako"; + Restart = "on-failure"; + }; + Install = { + WantedBy = [ "sway-session.target" ]; + }; }; }; } diff --git a/user/sway/swayidle.nix b/user/sway/swayidle.nix index 2c5384f..b6541f3 100644 --- a/user/sway/swayidle.nix +++ b/user/sway/swayidle.nix @@ -5,18 +5,15 @@ ... }: let - inherit (config.my) - key - accent - font - theme - ; - inherit (theme) color; - asScript = filename: text: toString (pkgs.writeShellScript filename text); + + cfg = config.my.swayidle; in { - services.swayidle = { + options.my.swayidle.enable = lib.mkEnableOption { }; + + config.services.swayidle = { + enable = cfg.enable; timeouts = [ { timeout = 360; diff --git a/user/sway/swaylock.nix b/user/sway/swaylock.nix index e46b5d9..8d0a195 100644 --- a/user/sway/swaylock.nix +++ b/user/sway/swaylock.nix @@ -1,20 +1,14 @@ -{ - config, - pkgs, - lib, - ... -}: +{ config, lib, ... }: let - inherit (config.my) - key - accent - font - theme - ; + inherit (config.my) accent font theme; inherit (theme) color; + + cfg = config.my.swaylock; in { - programs.swaylock.settings = { + options.my.swaylock.enable = lib.mkEnableOption { }; + + config.programs.swaylock.settings = lib.mkIf cfg.enable { image = toString theme.background; font = font.interface; font-size = font.size.medium; diff --git a/user/waybar/default.nix b/user/waybar/default.nix index b36dfce..fc95ff1 100644 --- a/user/waybar/default.nix +++ b/user/waybar/default.nix @@ -14,9 +14,13 @@ let font ; inherit (theme) color; + + cfg = config.my.waybar; in { - config = { + options.my.waybar.enable = lib.mkEnableOption { }; + + config = lib.mkIf cfg.enable { programs.waybar = { enable = true; systemd.enable = true; diff --git a/user/zathura.nix b/user/zathura.nix index 70e1c23..ae8e003 100644 --- a/user/zathura.nix +++ b/user/zathura.nix @@ -1,10 +1,4 @@ -{ - config, - pkgs, - lib, - font, - ... -}: +{ config, lib, ... }: let inherit (config.my) key @@ -13,56 +7,62 @@ let theme ; inherit (theme) color; + + cfg = config.my.zathura; in { - config = { - programs.zathura.enable = true; - programs.zathura.options = { - font = "${font.mono} ${toString font.size.small}"; - guioptions = "s"; + options.my.zathura.enable = lib.mkEnableOption { }; - selection-clipboard = "clipboard"; + config = lib.mkIf cfg.enable { + programs.zathura = { + enable = true; + options = { + font = "${font.mono} ${toString font.size.small}"; + guioptions = "s"; - recolor = true; - # Turn images grayscale, so they don't look weird - recolor-keephue = false; - recolor-lightcolor = "rgba(0,0,0,0)"; - recolor-darkcolor = color.txt; + selection-clipboard = "clipboard"; - default-bg = color.bg_dark; + recolor = true; + # Turn images grayscale, so they don't look weird + recolor-keephue = false; + recolor-lightcolor = "rgba(0,0,0,0)"; + recolor-darkcolor = color.txt; - inputbar-bg = color.bg_dark; - inputbar-fg = color.txt; + default-bg = color.bg_dark; - statusbar-bg = color.bg; - statusbar-fg = color.txt; + inputbar-bg = color.bg_dark; + inputbar-fg = color.txt; - completion-bg = color.bg; - completion-fg = color.txt; + statusbar-bg = color.bg; + statusbar-fg = color.txt; - completion-group-bg = color.bg_dark; - completion-group-fg = color.txt; + completion-bg = color.bg; + completion-fg = color.txt; - completion-highlight-bg = accent.color; - completion-highlight-fg = accent.fg; + completion-group-bg = color.bg_dark; + completion-group-fg = color.txt; - index-active-bg = accent.color; - index-active-fg = accent.fg; - }; - programs.zathura.mappings = { - "" = "toggle_statusbar"; - ${key.left} = "scroll left"; - ${key.down} = "scroll down"; - ${key.up} = "scroll up"; - ${key.right} = "scroll right"; - "[index] ${key.left}" = "navigate_index collapse"; - "[index] ${key.down}" = "navigate_index down"; - "[index] ${key.up}" = "navigate_index up"; - "[index] ${key.right}" = "navigate_index expand"; - ${lib.toUpper key.down} = "navigate next"; - ${lib.toUpper key.up} = "navigate previous"; - ${key.next} = "search forward"; - ${lib.toUpper key.next} = "search backward"; + completion-highlight-bg = accent.color; + completion-highlight-fg = accent.fg; + + index-active-bg = accent.color; + index-active-fg = accent.fg; + }; + mappings = { + "" = "toggle_statusbar"; + ${key.left} = "scroll left"; + ${key.down} = "scroll down"; + ${key.up} = "scroll up"; + ${key.right} = "scroll right"; + "[index] ${key.left}" = "navigate_index collapse"; + "[index] ${key.down}" = "navigate_index down"; + "[index] ${key.up}" = "navigate_index up"; + "[index] ${key.right}" = "navigate_index expand"; + ${lib.toUpper key.down} = "navigate next"; + ${lib.toUpper key.up} = "navigate previous"; + ${key.next} = "search forward"; + ${lib.toUpper key.next} = "search backward"; + }; }; }; } From 212c586c5c2107e15c950315e9ddec3e368116b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Tue, 25 Feb 2025 23:20:46 -0300 Subject: [PATCH 149/218] update --- flake.lock | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/flake.lock b/flake.lock index 5a3f325..f62cca1 100644 --- a/flake.lock +++ b/flake.lock @@ -209,11 +209,11 @@ ] }, "locked": { - "lastModified": 1739841949, - "narHash": "sha256-lSOXdgW/1zi/SSu7xp71v+55D5Egz8ACv0STkj7fhbs=", + "lastModified": 1740485968, + "narHash": "sha256-WK+PZHbfDjLyveXAxpnrfagiFgZWaTJglewBWniTn2Y=", "owner": "nix-community", "repo": "disko", - "rev": "15dbf8cebd8e2655a883b74547108e089f051bf0", + "rev": "19c1140419c4f1cdf88ad4c1cfb6605597628940", "type": "github" }, "original": { @@ -481,11 +481,11 @@ ] }, "locked": { - "lastModified": 1739676768, - "narHash": "sha256-U1HQ7nzhJyVVXUgjU028UCkbLQLEIkg42+G7iIiBmlU=", + "lastModified": 1740281615, + "narHash": "sha256-dZWcbAQ1sF8oVv+zjSKkPVY0ebwENQEkz5vc6muXbKY=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "ae15068e79e22b76c344f0d7f8aed1bb1c5b0b63", + "rev": "465792533d03e6bb9dc849d58ab9d5e31fac9023", "type": "github" }, "original": { @@ -504,11 +504,11 @@ "nixpkgs-24_11": "nixpkgs-24_11" }, "locked": { - "lastModified": 1739121270, - "narHash": "sha256-EmJhpy9U8sVlepl2QPjG019VfG67HcucsQNItTqW6cA=", + "lastModified": 1740437053, + "narHash": "sha256-exPTta4qI1ka9sk+jPcLogGffJ1OVXnAsTRqpeAXeNw=", "owner": "simple-nixos-mailserver", "repo": "nixos-mailserver", - "rev": "8c1c4640b878c692dd3d8055e8cdea0a2bbd8cf3", + "rev": "c8ec4d5e432f5df4838eacd39c11828d23ce66ec", "type": "gitlab" }, "original": { @@ -551,11 +551,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1739736696, - "narHash": "sha256-zON2GNBkzsIyALlOCFiEBcIjI4w38GYOb+P+R4S8Jsw=", + "lastModified": 1740367490, + "narHash": "sha256-WGaHVAjcrv+Cun7zPlI41SerRtfknGQap281+AakSAw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d74a2335ac9c133d6bbec9fc98d91a77f1604c1f", + "rev": "0196c0175e9191c474c26ab5548db27ef5d34b05", "type": "github" }, "original": { @@ -612,11 +612,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1739758141, - "narHash": "sha256-uq6A2L7o1/tR6VfmYhZWoVAwb3gTy7j4Jx30MIrH0rE=", + "lastModified": 1740339700, + "narHash": "sha256-cbrw7EgQhcdFnu6iS3vane53bEagZQy/xyIkDWpCgVE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c618e28f70257593de75a7044438efc1c1fc0791", + "rev": "04ef94c4c1582fd485bbfdb8c4a8ba250e359195", "type": "github" }, "original": { @@ -937,11 +937,11 @@ }, "vpsadminos": { "locked": { - "lastModified": 1739153939, - "narHash": "sha256-7z+4SMs1uD/mCruBasPeWeq1DGzzgACRHOSdLE+mHRk=", + "lastModified": 1740082937, + "narHash": "sha256-HcTWGIzG2leM0gZabg9lkY7iLwvAe49lqXEzez/Rp/s=", "owner": "vpsfreecz", "repo": "vpsadminos", - "rev": "939254840fcd72bdd3cd52186171815c3f25403b", + "rev": "521427c69173bc443de940ba88d4f58d5fa8d8e2", "type": "github" }, "original": { From b5e6127bb365913eb8f34812759b783aa422aed1 Mon Sep 17 00:00:00 2001 From: lelgenio Date: Wed, 19 Feb 2025 17:04:03 -0300 Subject: [PATCH 150/218] rainbow: remove gitlab runner --- flake.nix | 1 - secrets/secrets.nix | 3 --- system/rainbow-gitlab-runner.nix | 22 ---------------------- system/secrets.nix | 1 - 4 files changed, 27 deletions(-) delete mode 100644 system/rainbow-gitlab-runner.nix diff --git a/flake.nix b/flake.nix index 0126f65..636724e 100644 --- a/flake.nix +++ b/flake.nix @@ -147,7 +147,6 @@ inherit system specialArgs; modules = [ ./hosts/double-rainbow.nix - ./system/rainbow-gitlab-runner.nix ] ++ common_modules; }; pixie = lib.nixosSystem { diff --git a/secrets/secrets.nix b/secrets/secrets.nix index f64fb4b..6504054 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix @@ -2,9 +2,6 @@ let main_ssh_public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCxR/w+38b2lX90yNBqhq3mUmkn1WGu6GAPhN1tVp2ZjYRJNV/+5gWCnTtOWYtDx35HmK/spQ2Qy8X9ttkzORa24fysNx1Iqn/TiXhD7eIJjbGPnrOpIKTkW5/uB3SD/P5NBSa06//BaqJU4sBlG79hoXRpod052hQtdpTVDiMCIV+iboWPKqopmJJfWdBtVnHXs9rep0htPRExxGslImFk7Z6xjcaHyCpIQZPlOGf+sGsmUU7jRqzvZFV8ucIdbnAlMHrU4pepNFhuraESyZVTa/bi9sw0iozXp5Q5+5thMebEslmT1Z771kI4sieDy+O4r8c0Sx2/VY1UAzcpq1faggc3YB01MTh+tiEC6xdMvZLrQGL1NBWjHleMyL53GU5ERluC0vXJF3Hv3BGGBDfXWbrEm5n06DHr2apRVJGC0LwiQ7Woud1X4V4X1pKSusxCVMjT2lmcOwV6YhKhB2sowJc1OdMx4+tL0UWE+YKSZgBHfolwk6ml0F4EO9nnUHc= lelgenio@i15"; in { - "rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.age".publicKeys = [ - main_ssh_public_key - ]; "monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.age".publicKeys = [ main_ssh_public_key ]; diff --git a/system/rainbow-gitlab-runner.nix b/system/rainbow-gitlab-runner.nix deleted file mode 100644 index 52e573a..0000000 --- a/system/rainbow-gitlab-runner.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ - config, - pkgs, - lib, - ... -}: -let - inherit (pkgs.callPackage ./gitlab-runner.nix { }) mkNixRunner; -in -{ - boot.kernel.sysctl."net.ipv4.ip_forward" = true; - virtualisation.docker.enable = true; - services.gitlab-runner = { - enable = true; - settings.concurrent = 6; - services = { - thoreb-telemetria-nix = mkNixRunner config.age.secrets.gitlab-runner-thoreb-telemetria-registrationConfigFile.path; - thoreb-itinerario-nix = mkNixRunner config.age.secrets.rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.path; - }; - }; - systemd.services.gitlab-runner.serviceConfig.Nice = 10; -} diff --git a/system/secrets.nix b/system/secrets.nix index ca11fb4..fdf14e8 100644 --- a/system/secrets.nix +++ b/system/secrets.nix @@ -6,7 +6,6 @@ secrets.monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.file = ../secrets/monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.age; secrets.gitlab-runner-thoreb-telemetria-registrationConfigFile.file = ../secrets/gitlab-runner-thoreb-telemetria-registrationConfigFile.age; secrets.monolith-forgejo-runner-token.file = ../secrets/monolith-forgejo-runner-token.age; - secrets.rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.file = ../secrets/rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.age; secrets.monolith-nix-serve-privkey.file = ../secrets/monolith-nix-serve-privkey.age; secrets.phantom-forgejo-mailer-password.file = ../secrets/phantom-forgejo-mailer-password.age; }; From 00c686512c2d724d1a2f9632b361bd12a0dd6518 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 28 Feb 2025 17:58:29 -0300 Subject: [PATCH 151/218] gaming: add corectrl --- hosts/monolith/amdgpu.nix | 1 - system/gaming.nix | 8 ++++++++ user/sway/default.nix | 1 - 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/hosts/monolith/amdgpu.nix b/hosts/monolith/amdgpu.nix index 4c26afa..765e081 100644 --- a/hosts/monolith/amdgpu.nix +++ b/hosts/monolith/amdgpu.nix @@ -14,7 +14,6 @@ in boot.initrd.kernelModules = [ "amdgpu" ]; boot.kernelParams = [ "video=DP-1:1920x1080@144" - "amdgpu.ppfeaturemask=0xfffd7fff" # enable undervolting ]; systemd.services.amd-fan-control = { diff --git a/system/gaming.nix b/system/gaming.nix index e32c640..e79353e 100644 --- a/system/gaming.nix +++ b/system/gaming.nix @@ -59,5 +59,13 @@ }; }; }; + + programs.corectrl = { + enable = true; + gpuOverclock = { + enable = true; + ppfeaturemask = "0xffffffff"; + }; + }; }; } diff --git a/user/sway/default.nix b/user/sway/default.nix index 325cad5..04193aa 100644 --- a/user/sway/default.nix +++ b/user/sway/default.nix @@ -113,7 +113,6 @@ in for_window [title=.*] inhibit_idle fullscreen exec swaymsg workspace 2 exec_always systemctl --user restart waybar.service - exec corectrl --minimize-systray ''; }; services.gammastep = { From 57f6eb38348f0581e2b493631884c0e6563f1f11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 1 Mar 2025 12:11:18 -0300 Subject: [PATCH 152/218] update --- flake.lock | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/flake.lock b/flake.lock index f62cca1..573ab5e 100644 --- a/flake.lock +++ b/flake.lock @@ -551,11 +551,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1740367490, - "narHash": "sha256-WGaHVAjcrv+Cun7zPlI41SerRtfknGQap281+AakSAw=", + "lastModified": 1740560979, + "narHash": "sha256-Vr3Qi346M+8CjedtbyUevIGDZW8LcA1fTG0ugPY/Hic=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "0196c0175e9191c474c26ab5548db27ef5d34b05", + "rev": "5135c59491985879812717f4c9fea69604e7f26f", "type": "github" }, "original": { @@ -612,11 +612,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1740339700, - "narHash": "sha256-cbrw7EgQhcdFnu6iS3vane53bEagZQy/xyIkDWpCgVE=", + "lastModified": 1740603184, + "narHash": "sha256-t+VaahjQAWyA+Ctn2idyo1yxRIYpaDxMgHkgCNiMJa4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "04ef94c4c1582fd485bbfdb8c4a8ba250e359195", + "rev": "f44bd8ca21e026135061a0a57dcf3d0775b67a49", "type": "github" }, "original": { @@ -937,11 +937,11 @@ }, "vpsadminos": { "locked": { - "lastModified": 1740082937, - "narHash": "sha256-HcTWGIzG2leM0gZabg9lkY7iLwvAe49lqXEzez/Rp/s=", + "lastModified": 1740754923, + "narHash": "sha256-o7Qo5kkjVgBL9CVqNJKnkcDbRkpD0UAp82G/mJ086Xw=", "owner": "vpsfreecz", "repo": "vpsadminos", - "rev": "521427c69173bc443de940ba88d4f58d5fa8d8e2", + "rev": "3a9df8fbe84b680ad0a38ec85e8e9c8a4f095ca3", "type": "github" }, "original": { From 9fd65b02bae1adf71deb7b8c9cdbaeda1db3596e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 1 Mar 2025 12:11:23 -0300 Subject: [PATCH 153/218] factorio: update --- pkgs/factorio-headless/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/factorio-headless/default.nix b/pkgs/factorio-headless/default.nix index 2aaaba4..531e69b 100644 --- a/pkgs/factorio-headless/default.nix +++ b/pkgs/factorio-headless/default.nix @@ -1,10 +1,10 @@ { factorio-headless, pkgs }: factorio-headless.overrideAttrs (_: rec { - version = "2.0.28"; + version = "2.0.32"; src = pkgs.fetchurl { name = "factorio_headless_x64-${version}.tar.xz"; url = "https://www.factorio.com/get-download/${version}/headless/linux64"; - hash = "sha256-6pk3tq3HoY4XpOHmSZLsOJQHSXs25oKAuxT83UyITdM="; + hash = "sha256-KmECrkLcxej+kjvWi80yalaeNZEqzeEhMB5dTS2FZBc="; }; }) From 553ea251faa56dd49ed37e40e81788c3d499f9a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 5 Mar 2025 14:53:07 -0300 Subject: [PATCH 154/218] secrets: add sops --- .sops.yaml | 18 ++++++++++ flake.lock | 21 ++++++++++++ flake.nix | 7 ++++ hosts/phantom/default.nix | 13 ++++++++ secrets/phantom/default.yaml | 30 +++++++++++++++++ secrets/test.yaml | 65 ++++++++++++++++++++++++++++++++++++ system/configuration.nix | 10 +++++- system/secrets.nix | 2 +- system/sops.nix | 12 +++++++ 9 files changed, 176 insertions(+), 2 deletions(-) create mode 100644 .sops.yaml create mode 100644 secrets/phantom/default.yaml create mode 100644 secrets/test.yaml create mode 100644 system/sops.nix diff --git a/.sops.yaml b/.sops.yaml new file mode 100644 index 0000000..699e3c1 --- /dev/null +++ b/.sops.yaml @@ -0,0 +1,18 @@ +keys: + - &lelgenio-gpg 0FECE8316E74BA6F44EFC21A2F8F21CE8721456B + - &lelgenio-ssh ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCxR/w+38b2lX90yNBqhq3mUmkn1WGu6GAPhN1tVp2ZjYRJNV/+5gWCnTtOWYtDx35HmK/spQ2Qy8X9ttkzORa24fysNx1Iqn/TiXhD7eIJjbGPnrOpIKTkW5/uB3SD/P5NBSa06//BaqJU4sBlG79hoXRpod052hQtdpTVDiMCIV+iboWPKqopmJJfWdBtVnHXs9rep0htPRExxGslImFk7Z6xjcaHyCpIQZPlOGf+sGsmUU7jRqzvZFV8ucIdbnAlMHrU4pepNFhuraESyZVTa/bi9sw0iozXp5Q5+5thMebEslmT1Z771kI4sieDy+O4r8c0Sx2/VY1UAzcpq1faggc3YB01MTh+tiEC6xdMvZLrQGL1NBWjHleMyL53GU5ERluC0vXJF3Hv3BGGBDfXWbrEm5n06DHr2apRVJGC0LwiQ7Woud1X4V4X1pKSusxCVMjT2lmcOwV6YhKhB2sowJc1OdMx4+tL0UWE+YKSZgBHfolwk6ml0F4EO9nnUHc= lelgenio@i15 + - &monolith-ssh age1ecyynwv93lfu7crjjp8l47defv07quzfzaktwurpep7jc9eha5pscg7lrw + - &phantom-ssh age1m4mqcd2kmuhfr8a22rvh02c68jkakhdfmuqgtusuv0czk4jvna7sz79p3y + +creation_rules: + - path_regex: secrets/[^/]+\.(yaml|json|env|ini)$ + key_groups: + - pgp: + - *lelgenio-gpg + age: + - *lelgenio-ssh + - *monolith-ssh + - path_regex: secrets/phantom/[^/]+\.(yaml|json|env|ini)$ + key_groups: + - age: + - *phantom-ssh diff --git a/flake.lock b/flake.lock index 573ab5e..cabf4cf 100644 --- a/flake.lock +++ b/flake.lock @@ -722,6 +722,7 @@ "nixpkgs-unstable": "nixpkgs-unstable", "plymouth-themes": "plymouth-themes", "ranger-icons": "ranger-icons", + "sops-nix": "sops-nix", "tlauncher": "tlauncher", "tomater": "tomater", "treefmt-nix": "treefmt-nix", @@ -775,6 +776,26 @@ "type": "github" } }, + "sops-nix": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1741043164, + "narHash": "sha256-9lfmSZLz6eq9Ygr6cCmvQiiBEaPb54pUBcjvbEMPORc=", + "owner": "Mic92", + "repo": "sops-nix", + "rev": "3f2412536eeece783f0d0ad3861417f347219f4d", + "type": "github" + }, + "original": { + "owner": "Mic92", + "repo": "sops-nix", + "type": "github" + } + }, "systems": { "locked": { "lastModified": 1681028828, diff --git a/flake.nix b/flake.nix index 636724e..90ef37e 100644 --- a/flake.nix +++ b/flake.nix @@ -26,6 +26,11 @@ inputs.home-manager.follows = "home-manager"; }; + sops-nix = { + url = "github:Mic92/sops-nix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + nixos-mailserver = { url = "gitlab:simple-nixos-mailserver/nixos-mailserver/master"; inputs.nixpkgs.follows = "nixpkgs"; @@ -96,10 +101,12 @@ { nixpkgs.pkgs = pkgs; } ./system/configuration.nix ./system/secrets.nix + ./system/sops.nix ./system/greetd.nix { login-manager.greetd.enable = desktop == "sway"; } inputs.agenix.nixosModules.default + inputs.sops-nix.nixosModules.default inputs.home-manager.nixosModules.home-manager inputs.disko.nixosModules.disko ( diff --git a/hosts/phantom/default.nix b/hosts/phantom/default.nix index 45c27d7..9111434 100644 --- a/hosts/phantom/default.nix +++ b/hosts/phantom/default.nix @@ -2,12 +2,16 @@ config, pkgs, inputs, + lib, ... }: { imports = [ inputs.vpsadminos.nixosConfigurations.container inputs.agenix.nixosModules.default + inputs.sops-nix.nixosModules.default + + ../../system/sops.nix ../../system/nix.nix ./hardware-config.nix ./mastodon.nix @@ -57,6 +61,15 @@ identityPaths = [ "/root/.ssh/id_rsa" ]; }; + sops = { + secrets.hello = { }; + defaultSopsFile = lib.mkForce ../../secrets/phantom/default.yaml; + }; + + environment.etc."teste-sops" = { + text = config.sops.secrets.hello.path; + }; + virtualisation.docker = { enable = true; daemon.settings = { diff --git a/secrets/phantom/default.yaml b/secrets/phantom/default.yaml new file mode 100644 index 0000000..a299b34 --- /dev/null +++ b/secrets/phantom/default.yaml @@ -0,0 +1,30 @@ +hello: ENC[AES256_GCM,data:UJAAdOL7wzQ1LduTyW+XK2NtXyw/u/Yz28Bmd7OoBe41FVLKwVfvdI1nAwYuNQ==,iv:7kPT2HF5T498bUJ9hUlz5Ez/jn1g7YIUVbJOTW/CHhQ=,tag:KJhJPg8AStyW4roEbEUJ2g==,type:str] +example_key: ENC[AES256_GCM,data:DcLN+C1BQ6WZg5fRiA==,iv:JC3GTWn4a4RekAHdOQB3YV5+eGa4cUK1JjyTPe8eNHY=,tag:W9CV4rsgHuXyqpWpUxlIQg==,type:str] +#ENC[AES256_GCM,data:RjdYJNz6qGfbsU/AiBeLlQ==,iv:LjRzSjBXp44cGSqUUfRDNLC9cW4Vd7lfsqDWINt31VA=,tag:NzVm1h9CVKE2XXt300aR/g==,type:comment] +example_array: + - ENC[AES256_GCM,data:K9j/t8MDibYO8Frhu1M=,iv:YnrxRnJJwTH6DJC6Bv/d1NUnX2ZPFwsjoji7L1Z+d7s=,tag:Dm7xCUlnjKdXHCuk8lwY8w==,type:str] + - ENC[AES256_GCM,data:0g6ACJzEHBtukwQYYTY=,iv:xLBJWfOYkX7Y28N01CX2+d5QOr9VGAhInH6pa1hNSGE=,tag:tCkCigo4yhi6YKVMe3Z3lQ==,type:str] +example_number: ENC[AES256_GCM,data:R+/m/QVBH9/3DA==,iv:FumBUj97ICrRQmyh5fg8Gu9Lba9oITD1pdsr1I/PCf0=,tag:hguw1gpPI3w64fG1WLnJqA==,type:float] +example_booleans: + - ENC[AES256_GCM,data:VvI5ag==,iv:koMzyWcua75sK19vuk65oywCD61lMyH3xUwue8LTqy4=,tag:2ym1M0FTwevLm7wefTUWAw==,type:bool] + - ENC[AES256_GCM,data:lFEC/S8=,iv:cJWbnmseP/AqJzyORM+VI5y7rK8axVeh7EXoLP7mT/Q=,tag:BaS5HyecokdLCq+LzQxGkg==,type:bool] +sops: + kms: [] + gcp_kms: [] + azure_kv: [] + hc_vault: [] + age: + - recipient: age1m4mqcd2kmuhfr8a22rvh02c68jkakhdfmuqgtusuv0czk4jvna7sz79p3y + enc: | + -----BEGIN AGE ENCRYPTED FILE----- + YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAxQkRWWmYweUNpcDRNbzRW + NnQ4R3JPK0oydm9iL0owS0d6Nm92eTFJZldFCnZpUVUvWi9FYTBDSGNvUUJRZHNz + QStPT0hCc08xUmh4dEdJdmVPRm01V2cKLS0tIEZPMmNKdGUvNnVWYXZNTHA3SkE3 + ZTNJbW9EWktPb2M5TVBNekUrZXVoUFkKLEsQVYVp7fTBRDA7RO8Kjpc5MUPb5U7I + WKZtNhsMZsP+SLgZWBF1PpvcjlDlNA2Z+Hqsrw6vsq6DYpnxToxfZQ== + -----END AGE ENCRYPTED FILE----- + lastmodified: "2025-03-05T22:27:18Z" + mac: ENC[AES256_GCM,data:WSopSnWZ+uOllywd7difaZtJcfxkL7eIf9Kr3GajZKO0+rP6pEHIS+5AbXZy6oKRlCLUPecY/WXFvk3//akpvvXHbf6Jp4fQ/YSuTcYKRQupbDBpOXSlc33QyRl6oEyiMOjxMxa2N2tmq8dmA0NbF9wSDMa5a4eNDoiL5T/sUZ8=,iv:QqbVRApzFF6q24rk8KfKuthj656nEczD9Si4INj+N9A=,tag:tMRNYo+u/jIQ6iX3KqKJdA==,type:str] + pgp: [] + unencrypted_suffix: _unencrypted + version: 3.9.4-unstable diff --git a/secrets/test.yaml b/secrets/test.yaml new file mode 100644 index 0000000..a2a8ee9 --- /dev/null +++ b/secrets/test.yaml @@ -0,0 +1,65 @@ +hello: ENC[AES256_GCM,data:ADXdQUkrnh9lDrsHyInYsPBo21u/mIAH47KhGQsxuz5OshT6CoK+89CILEi9tQ==,iv:b/rnM77z69+pVO3kxQZxI2YzTCRiBwwO5fhcwCB2/CI=,tag:A0FOXIfgIkJawV3QhlJPWQ==,type:str] +example_key: ENC[AES256_GCM,data:gXXl6hhdYNLC1Grmyw==,iv:miSL7Wdewd5zs4A86/r8OW6gK+PGZJ+gaqZRHHxvZos=,tag:Ty+IaoXdMSEThNPRjwhqTA==,type:str] +#ENC[AES256_GCM,data:FLhydTaiOqLRFk+ZrgGx9Q==,iv:TqhX2ylJKFQjdOpmwCER1+gRe4iR+I0hkVkNnYH4ESo=,tag:1BSk9TKqTma4MVUMswwmog==,type:comment] +example_array: + - ENC[AES256_GCM,data:1sIEL3xGDAygUKoodBA=,iv:1DumVv8vDvhT/K0jXM1vHdrFTE7dIxqqjS8CIpWdnc8=,tag:WSs+3a816zVOaGCTElxgFQ==,type:str] + - ENC[AES256_GCM,data:tFi1czQnVgX/nlWrJrs=,iv:isH65ldilVe3EjsKNP/dOKgtWZtHQPw364fPHBI+LEw=,tag:Ka5ywriFptKg3+lIHPEIyA==,type:str] +example_number: ENC[AES256_GCM,data:sxSM8a9oAp+u6g==,iv:KRLfIxZuBsnK+QE4mqm3pyhJmE7Fsd4ykJA++KrOnEQ=,tag:F5EkVUzw06ulr5jZvlTJdg==,type:float] +example_booleans: + - ENC[AES256_GCM,data:PDts2Q==,iv:qtfKg5gmUw2aERJe3gfT15Pk7mWocXwKdJhAzSic1o0=,tag:gn1sWsgt9ihYF8bHAkAQwQ==,type:bool] + - ENC[AES256_GCM,data:o9as7T0=,iv:YXyTB2X9PmTsOd37+BAp2xnT/+Yzyajcn5y1GE1O5rE=,tag:hyXA43jpyAbgH2hg1ivloQ==,type:bool] +sops: + shamir_threshold: 1 + kms: [] + gcp_kms: [] + azure_kv: [] + hc_vault: [] + age: + - recipient: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCxR/w+38b2lX90yNBqhq3mUmkn1WGu6GAPhN1tVp2ZjYRJNV/+5gWCnTtOWYtDx35HmK/spQ2Qy8X9ttkzORa24fysNx1Iqn/TiXhD7eIJjbGPnrOpIKTkW5/uB3SD/P5NBSa06//BaqJU4sBlG79hoXRpod052hQtdpTVDiMCIV+iboWPKqopmJJfWdBtVnHXs9rep0htPRExxGslImFk7Z6xjcaHyCpIQZPlOGf+sGsmUU7jRqzvZFV8ucIdbnAlMHrU4pepNFhuraESyZVTa/bi9sw0iozXp5Q5+5thMebEslmT1Z771kI4sieDy+O4r8c0Sx2/VY1UAzcpq1faggc3YB01MTh+tiEC6xdMvZLrQGL1NBWjHleMyL53GU5ERluC0vXJF3Hv3BGGBDfXWbrEm5n06DHr2apRVJGC0LwiQ7Woud1X4V4X1pKSusxCVMjT2lmcOwV6YhKhB2sowJc1OdMx4+tL0UWE+YKSZgBHfolwk6ml0F4EO9nnUHc= lelgenio@i15 + enc: | + -----BEGIN AGE ENCRYPTED FILE----- + YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1yc2EgQnd3eEhnCm4zQnZFV2hJ + cFR0Z0hGeFlQd1Rtb2dDUDRJOVc3dmtWT3FIa2xOV0hRREE4LzVKQ01FTHd6M3kz + M0JLeEtXTXoKZkhnMTNETnZVc2tEbU84NWlGWk5YaUg5NjJDdk9yb01QMTVCOHlh + SDE3c0c0dUV3bXQ4MjAxYWJjYUFscmlORwplOFZLc1JzUzdjU0lCZGUyQWl4b3d0 + L3hmekNSUUZia2FOR0k3TWcyQm9xZytCakFpSGRidEJUZHQzaC9sVlppCmJBSnl0 + VW9Tb2hRME9MdmFlcUw5Z3MyV0k3V1FKQTNQZ3M0UTRLK0FvL3NOUTZ3RDBQY0M5 + UHdnLzU3VkFCME0KWTV4c29NbmIvLzl3WXJvMkhnT1gwTTBRNzV3RVVnRTdiMkpn + WmVWanB5VFpnTmhQMWRibXc4VGdhblAwWkQ1WQo0YnFjcnpnYTZITnVueTlZYzhW + OGs3MmlPcmhtaWZoU3h1T3FkbmpoMFFUN0UwQ1FDTGs5L1hGUHdJbmU5Q3haCjJG + bXAyd1lycGhELzY4ZWR2cEtmcWt4NnhXcjIyREw3cTR5d3ZoQlZySlg4Z2lwRmQ1 + cEF1VGthTkV0ekg4M2UKZS9aN0IxazdjUWhUMnBFSmYrOEdYQWdocWtQcFhtYlpN + M3FyTDdMSmpESncydnFFd3lTcE1FMEg5a1ZoTXVIRgoKLS0tIEsvb090WDRBZFdV + dFRUUms3S0J2b201OExwTy9DZERhZVlqVEdtaThkTE0KFT1RB8s+hEOJk7XGjSak + 34qTDcoBnaF0jPZ5Z0HsUx84G4Nu5teRVeHgVKyC7Iv7Gi9TkYtsdgM+q/3rdSvn + aA== + -----END AGE ENCRYPTED FILE----- + - recipient: age1ecyynwv93lfu7crjjp8l47defv07quzfzaktwurpep7jc9eha5pscg7lrw + enc: | + -----BEGIN AGE ENCRYPTED FILE----- + YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB5eVFsWHZZYkNrdjNraW5q + OTdmbWF6Tm02elk3NGt0TGQ3ZUoxaHp3VGdBCnVqSDRIMlRSOXdTSER2U0tDcjR1 + Tk5FcURQOW90bENWL2Nyck1CU3RBR1UKLS0tIFRZZzlNNWRtUkJmVzBHWTA3L21K + VCsyS0x4Rk83eC9UTHJvM1NJZG9DbTQKbGp6n/45qGA3rgmdxUJQKZdA1zen5kfZ + pXnExsrIhfPDx0oE2jIWGW0N8cizkCJA4k7ROGu56GqIqga9h55VTw== + -----END AGE ENCRYPTED FILE----- + lastmodified: "2025-03-05T21:02:24Z" + mac: ENC[AES256_GCM,data:QfyrJrLERhs14KnuBJ0eCEUqKIBwhmQHROflBAArGlPmyVZU6KLvvOOANv+PJWk9Kt9yPU9Avwt6/e2q0jq9u2OUrvxHbqF4SWvkwhvSoSD3EOe27NGPjDLkVHOdszObo/fT8xglvc6LY8NqL9dXnUoLl58IrY7SE18F7EjrYuE=,iv:rjonQvZQjsr0oC5p3pjh1FAH/7B8SnHpAQ/qFxxfhQs=,tag:/DgHviNrSIzLyjj6ndwY0w==,type:str] + pgp: + - created_at: "2025-03-05T21:28:21Z" + enc: |- + -----BEGIN PGP MESSAGE----- + + hQEMAzy6JxafzLr5AQf/aiSW1yeJJ3VLiJ6I+vafWPVe702+6IstICKNdTz4AFgo + 2yUkY/alpgkcH1ybAiRQK0lOs63NBL51Pe2XsKAWXTlHVgFU0B6e+7YoDuwPWnTP + dyTASd+++EAbf0l7bIVQbx28Ib5F5DZyB1VMhhGAZXQqURJGQpLrSqzaoMFPGodg + V7whjtOaEmtFKNhNeRIdrnTW2raeKO0J3mQ5nawCekeIHnx22NxCIbhBMsKpF8EH + 3SZSCNiGrrfbLZFHcM/P5N5qEPc53r9Zvpxcwc8NayIS3kUPwLqKmvhCbRW3WOr0 + 2fc8TQgHTWEYSRSYIVw5vPHWs4+3T4cjdGb0atJ4rtJeAUnGlwchAvxLfFFG096r + SDdiJBBZ03r31EJqnplNwwitKyR4jj+HaM/CNmtSFo7c99iA91A7C1PBri+NpuCK + Fr0JVEom4Fm9WY7BMPduiLN77XLB0aaYN7zu7pwdYA== + =4URT + -----END PGP MESSAGE----- + fp: 0FECE8316E74BA6F44EFC21A2F8F21CE8721456B + unencrypted_suffix: _unencrypted + version: 3.9.4 diff --git a/system/configuration.nix b/system/configuration.nix index a227e36..11f327e 100644 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -1,7 +1,7 @@ # Edit this configuration file to define what should be installed on # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). -{ pkgs, ... }: +{ pkgs, config, ... }: { imports = [ ./android.nix @@ -29,6 +29,14 @@ zramSwap.enable = true; + sops = { + secrets.hello = { }; + }; + + environment.etc."teste-sops" = { + text = config.sops.secrets.hello.path; + }; + # Enable touchpad support (enabled default in most desktopManager). services.libinput.enable = true; diff --git a/system/secrets.nix b/system/secrets.nix index fdf14e8..588dfe4 100644 --- a/system/secrets.nix +++ b/system/secrets.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, config, ... }: { age = { identityPaths = [ "/root/.ssh/id_rsa" ]; diff --git a/system/sops.nix b/system/sops.nix new file mode 100644 index 0000000..673d1c1 --- /dev/null +++ b/system/sops.nix @@ -0,0 +1,12 @@ +{ pkgs, ... }: +{ + environment.systemPackages = with pkgs; [ + sops-master + gnupg + ]; + + sops = { + defaultSopsFile = ../secrets/test.yaml; + age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ]; + }; +} From 0bc125c944a18b65b5f390b313b74860375ed9b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 7 Mar 2025 13:11:42 -0300 Subject: [PATCH 155/218] monolith: add docker-images gitlab runner --- .sops.yaml | 12 ++++++- secrets/monolith/default.yaml | 56 +++++++++++++++++++++++++++++++ secrets/phantom/default.yaml | 46 +++++++++++++++++++++---- system/configuration.nix | 8 ----- system/monolith-gitlab-runner.nix | 14 ++++++++ 5 files changed, 121 insertions(+), 15 deletions(-) create mode 100644 secrets/monolith/default.yaml diff --git a/.sops.yaml b/.sops.yaml index 699e3c1..20a8640 100644 --- a/.sops.yaml +++ b/.sops.yaml @@ -12,7 +12,17 @@ creation_rules: age: - *lelgenio-ssh - *monolith-ssh + - path_regex: secrets/monolith/[^/]+\.(yaml|json|env|ini)$ + key_groups: + - pgp: + - *lelgenio-gpg + age: + - *lelgenio-ssh + - *monolith-ssh - path_regex: secrets/phantom/[^/]+\.(yaml|json|env|ini)$ key_groups: - - age: + - pgp: + - *lelgenio-gpg + age: + - *lelgenio-ssh - *phantom-ssh diff --git a/secrets/monolith/default.yaml b/secrets/monolith/default.yaml new file mode 100644 index 0000000..857bc5d --- /dev/null +++ b/secrets/monolith/default.yaml @@ -0,0 +1,56 @@ +gitlab-runners: + docker-images-token: ENC[AES256_GCM,data:GGB/KSkjdAyhFKEspAh91ItbqEDf7K/LZSGSn+Jp7SxRfXpDzHIiMD8XJ9PTkGLeQGN4ug1i2nTYPS7d/P5OALWDU+1NPiV9nPdG0w7GERfu4g==,iv:6roabdOKX9xFMf0hWlECd73+943R+hFLos0e2dOpzns=,tag:LrASFc4DtN7aQ+3oOW/p/w==,type:str] +sops: + kms: [] + gcp_kms: [] + azure_kv: [] + hc_vault: [] + age: + - recipient: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCxR/w+38b2lX90yNBqhq3mUmkn1WGu6GAPhN1tVp2ZjYRJNV/+5gWCnTtOWYtDx35HmK/spQ2Qy8X9ttkzORa24fysNx1Iqn/TiXhD7eIJjbGPnrOpIKTkW5/uB3SD/P5NBSa06//BaqJU4sBlG79hoXRpod052hQtdpTVDiMCIV+iboWPKqopmJJfWdBtVnHXs9rep0htPRExxGslImFk7Z6xjcaHyCpIQZPlOGf+sGsmUU7jRqzvZFV8ucIdbnAlMHrU4pepNFhuraESyZVTa/bi9sw0iozXp5Q5+5thMebEslmT1Z771kI4sieDy+O4r8c0Sx2/VY1UAzcpq1faggc3YB01MTh+tiEC6xdMvZLrQGL1NBWjHleMyL53GU5ERluC0vXJF3Hv3BGGBDfXWbrEm5n06DHr2apRVJGC0LwiQ7Woud1X4V4X1pKSusxCVMjT2lmcOwV6YhKhB2sowJc1OdMx4+tL0UWE+YKSZgBHfolwk6ml0F4EO9nnUHc= lelgenio@i15 + enc: | + -----BEGIN AGE ENCRYPTED FILE----- + YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1yc2EgQnd3eEhnCldST3lPZXBV + cTVNK3R3RjlFcDQ4UldRT0tsSVJ2N2FkN0hiOVllT2Rrc2NjVWtMbnMrWHVMN1k5 + dExsVHFhMHMKRVVzR1pzeG01Y2FidWNrQ0xjK1FUZktnWTZaWWlWalM5cWhZWE9U + TFU3ZXV3aGp6QkRIZkl4MDFJN2RRQVkrdwpqQlE5ajFTVW15MVVyTkNaS3JiOFph + cGthWWZ4R3Rldjh0a2lnd1dSbUcvSVpDdHJKVk5GVy8vR05WbmhUWFhuCkZsaWk5 + L2dnNE4rNTV6VWpIZlNIMENzZVlKS2NEOFdmSFhsYkFNSHRlTENYeGNtekpDaUN4 + V3l2VWtta3hSVFIKblVDZ1hOdzZQbWswTDB5MXd3dXpXQW44MFhFR0hGZkxjbzlU + WkR5dFhhbVpTUGZwQVR3WXNCUjJWYlAyTU1VeQpkWEdXQjVUemlRdXVxZVE4SGVU + TFlPS0FEV1dRRWU0K1d1ZTRrZGU1MHVKQ0lCemJmcUhOaWtON3ZDbUtad2lXCklt + aFREN3BmdEo1TUw2V2NtQ0QvbE1EQ25OeW5ZaldOY04zQjFQbWRnWjhJaWZKWXJn + UlBTTjV0VkpEY0FhZjQKTURjT004dHEvS24rNGVBSE1KK0ZabTBKb0Z4QTJvS2Fi + czdnWEpUTXJsRVMvdWFzVlJLT281a3JwQi9PMGVDcQoKLS0tIFgvSE14blgvVkxQ + b3N5WWlzdG5hajZaVFVkWVlhOXNZKytmZEZrZVprRHMKXqPgDpKG42KsfKfIAflT + 1meea416Af+WeFhWnw8fBBhApKrMMmYMMjDi1lIOGDz57ydNqtlFqdFtkiQsUC0f + wA== + -----END AGE ENCRYPTED FILE----- + - recipient: age1ecyynwv93lfu7crjjp8l47defv07quzfzaktwurpep7jc9eha5pscg7lrw + enc: | + -----BEGIN AGE ENCRYPTED FILE----- + YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBzTWVYNXNQcHhHSzVBQmhU + ejlOQzJMZ0xEVFVkbzNPQ0hMVHBQWEgzQTFJCkF6ZDNaZ29UM29vWGZqVW10dmlQ + YjNFNXJVMlcxT1ZsMU55cE8vc3VjaXMKLS0tIDZYQTRjMWp5a3hKc2N4alZKZHFt + TGNwNUQxN0VQMHErMGVZbG5CZW9kSGMK9TRcgSJQT73dYoQxrrqFW/FkKExLGT4T + Xagi6Eq4rhT7pvaL4h3vglwbqkLPsHrWRSyhh0sAEIJ1WpvD+cFEMA== + -----END AGE ENCRYPTED FILE----- + lastmodified: "2025-03-07T14:47:44Z" + mac: ENC[AES256_GCM,data:k0yhfVhDmtU8wOZIylaxmmd+8TIXCzCbGhlaQnyeLplH2BDHVnpzAxBJVizS/VtVpAkjMAESndXqW7N6pnGnRWdZPtCxE8KNtz/nUxCZA44cn+mjC+ghKgsgaLuxe4smu0f4u4TK2uFsJqw5J0VGFgMtyKe4AaHujoXWL80zTR0=,iv:xiDrOtto246oPjMw5+ny0qB8HjdMpkzZyPNi3csgMVE=,tag:2xioMXxERDSePdIwPpP7hg==,type:str] + pgp: + - created_at: "2025-03-07T14:42:24Z" + enc: |- + -----BEGIN PGP MESSAGE----- + + hQEMAzy6JxafzLr5AQf/Y0QIIBN0uY3RUj88u5L0tJqypnKOAlfLOMYPkZ0oomAd + ZowogLWJgWyFC6NTdZRj84GoF2EAMDZqDAwh7shrZSpuhr0rwT7bGMQ4/VSx/Sxs + uCgkzXGMT0DsGjDOw6h17dDLNAnnvViamL1Br3ZXG7gZJXmUhPavL1YXeQciPqjh + FyJLAKeb9sQAFUp0Aexo4fKZSJh//O8jTiz7vl5klpQnDHWzpkcuxqIajIoYFdcL + ioP1GnrsUDfyXh2zfLcggxs/WHU24/C8DZqWai9WqRA08kJpw+aj1835vmUIWM0W + E5TF9h/tOEGw+PGhvwNiEvONhv/tpyLpjoXylbisjtJeAY6Fntxcrssw2cKMimFV + UjBuf2vSmQlNBqU+LE0JOICmRsmnLZTEPXnPqpqBTRV4gj4kTLCJYcaEIFP7uSEd + WlCyyX28ACGThorQEoQ/W2bFfNT/Mi7CNQ8EOckmKg== + =6Qin + -----END PGP MESSAGE----- + fp: 0FECE8316E74BA6F44EFC21A2F8F21CE8721456B + unencrypted_suffix: _unencrypted + version: 3.9.4-unstable diff --git a/secrets/phantom/default.yaml b/secrets/phantom/default.yaml index a299b34..2d744c9 100644 --- a/secrets/phantom/default.yaml +++ b/secrets/phantom/default.yaml @@ -14,17 +14,51 @@ sops: azure_kv: [] hc_vault: [] age: + - recipient: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCxR/w+38b2lX90yNBqhq3mUmkn1WGu6GAPhN1tVp2ZjYRJNV/+5gWCnTtOWYtDx35HmK/spQ2Qy8X9ttkzORa24fysNx1Iqn/TiXhD7eIJjbGPnrOpIKTkW5/uB3SD/P5NBSa06//BaqJU4sBlG79hoXRpod052hQtdpTVDiMCIV+iboWPKqopmJJfWdBtVnHXs9rep0htPRExxGslImFk7Z6xjcaHyCpIQZPlOGf+sGsmUU7jRqzvZFV8ucIdbnAlMHrU4pepNFhuraESyZVTa/bi9sw0iozXp5Q5+5thMebEslmT1Z771kI4sieDy+O4r8c0Sx2/VY1UAzcpq1faggc3YB01MTh+tiEC6xdMvZLrQGL1NBWjHleMyL53GU5ERluC0vXJF3Hv3BGGBDfXWbrEm5n06DHr2apRVJGC0LwiQ7Woud1X4V4X1pKSusxCVMjT2lmcOwV6YhKhB2sowJc1OdMx4+tL0UWE+YKSZgBHfolwk6ml0F4EO9nnUHc= lelgenio@i15 + enc: | + -----BEGIN AGE ENCRYPTED FILE----- + YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1yc2EgQnd3eEhnCm9xWXdTQjZU + Znpiak1xdE1kTm56NWI3bUNlQXBFcjhNNFlwbDVUcGhrS2J4Y1M3aXFydjVGYmVI + UmNKVmkrb3cKWHNsa2FZaE4zbnJWYVo1SDhTOEZxM0JMRWJ0ckpySk11V09LMkd5 + bjhQRkpSZG0xYko3aTFqQmVFU3JhSWo1Ugo2Nk0rNzJBNzJvbVJkU0VhSmRRWE5B + RUt4S3h1cFZkZHkxOU5VUTcxN1JBNFlaYTkyZTNSM3JVUjhCUStNODRMCjdJRWlv + d0g4bnlQMzhWSGUxY04vRnUvbTlyWVQ0eWsvbnk4UmxxOHVZblM3bVFETXJiVjRE + b2s1ZFVHaEFNc3EKSDJTYUVSNWtKQS81bUdOcDA0SnZGeE4vQkt6bFZWY1dxNm9S + YVhRdjVCb3RGaC94djZZeFhXaTZSVVYzaUJ6KwoxQXNKcU9Dbk8xYWRvaGJwSXdu + Zzk4Y09zbW54elJHdjJ6OTNyeURwZ3JJL0gvaFVRUmgyRnNBbXFJU1l5U2FwCm56 + bzc0TkVWdnNoWnBMMjlKbnZicmRxdXIwd2hCZGp5dEQ2TnBtdTZCdnJRbzIyZFhV + L1ZpVW9nZmNqQW45c0cKYnIxQTc2aEowTUprZ1pYVCt3L2NsVHJ5SWF1aHZUR1E5 + eGVrcUphWk1vVURBL2J4UlZLQXluNC82YnNhQUFOQgoKLS0tICtOTXVyUzZldUJO + QkN0eUVRSDlDWmthU0VrRUZDb0VBTVFhL24raHJDcGsKcspICwz+f6y21yogiXO3 + Qp7evIuOzfWe6pMtge5BjxWTlzIdi2btFTzuTjgZaOiQd8FIB3iTqBkepUVD49jN + RQ== + -----END AGE ENCRYPTED FILE----- - recipient: age1m4mqcd2kmuhfr8a22rvh02c68jkakhdfmuqgtusuv0czk4jvna7sz79p3y enc: | -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAxQkRWWmYweUNpcDRNbzRW - NnQ4R3JPK0oydm9iL0owS0d6Nm92eTFJZldFCnZpUVUvWi9FYTBDSGNvUUJRZHNz - QStPT0hCc08xUmh4dEdJdmVPRm01V2cKLS0tIEZPMmNKdGUvNnVWYXZNTHA3SkE3 - ZTNJbW9EWktPb2M5TVBNekUrZXVoUFkKLEsQVYVp7fTBRDA7RO8Kjpc5MUPb5U7I - WKZtNhsMZsP+SLgZWBF1PpvcjlDlNA2Z+Hqsrw6vsq6DYpnxToxfZQ== + YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB3TklEaUl2QkVtVVN5UXlC + cW9RaHNoSnRkV0lKTmtYS0VZQnhyM0o0cUFNCmZWemJuOFVyK1ZFbkR1RUZOTEVB + WmJFemRrd0xIUW43cElkdVJOM052N2cKLS0tIFJpRTNtQ1hjWGJwSFJLRDNRSm4z + WW9MbmZoTllLalpWcFdOa3JpaThPMjQKa5vVGp+L1V2/ScyUe0EaOVw4TB8paS2w + 79VgplKN6HL+f6bL/0rIUOwJ6PDW944bOioKDYvbUCpBnSRYIHnYoQ== -----END AGE ENCRYPTED FILE----- lastmodified: "2025-03-05T22:27:18Z" mac: ENC[AES256_GCM,data:WSopSnWZ+uOllywd7difaZtJcfxkL7eIf9Kr3GajZKO0+rP6pEHIS+5AbXZy6oKRlCLUPecY/WXFvk3//akpvvXHbf6Jp4fQ/YSuTcYKRQupbDBpOXSlc33QyRl6oEyiMOjxMxa2N2tmq8dmA0NbF9wSDMa5a4eNDoiL5T/sUZ8=,iv:QqbVRApzFF6q24rk8KfKuthj656nEczD9Si4INj+N9A=,tag:tMRNYo+u/jIQ6iX3KqKJdA==,type:str] - pgp: [] + pgp: + - created_at: "2025-03-07T16:05:59Z" + enc: |- + -----BEGIN PGP MESSAGE----- + + hQEMAzy6JxafzLr5AQf/djnT5hse11QoFPbmuu5rmc/0vpOQ79G6MYZtHlXL/HbP + hx0r25yTI6ICayFiO7luovz58saN0BY5K1dCbGB7+nZ8lrKoGE4GhX4k5Cc/KJIO + BTEbTqMJLezkb34FsuXgD9o2udNysC3Bpi/3NbPCYsJkVeCmx1wyEWzWhz51RO4M + WEyKkE0DyJfOpTuY2fofGhaA866firFDrS2SeiU4Dox4au3iR4VYqt6IITmgZdDE + M9LRp3AzOPOUZzpeRcer4ksh8WVDIWPEEL+w+OGo8QpUL3kqHIMVPgXY0kBOR+5s + tVTCLVe7yoimK/oSYkEx9Z3TYRwKV6ggJWahX7VHaNJeAVxIon8Qs8W2L+f1gclK + tPbaE+jCg6AH3apD3ICisxCj0Vvm+NsWMo2skeN2YGyWBCOoeGcG5OhgJtD0cQiw + QxCzywMXujxYYAXJEvhk4YRhaCOMkTTMGNoloWMugg== + =CHH0 + -----END PGP MESSAGE----- + fp: 0FECE8316E74BA6F44EFC21A2F8F21CE8721456B unencrypted_suffix: _unencrypted version: 3.9.4-unstable diff --git a/system/configuration.nix b/system/configuration.nix index 11f327e..f515e43 100644 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -29,14 +29,6 @@ zramSwap.enable = true; - sops = { - secrets.hello = { }; - }; - - environment.etc."teste-sops" = { - text = config.sops.secrets.hello.path; - }; - # Enable touchpad support (enabled default in most desktopManager). services.libinput.enable = true; diff --git a/system/monolith-gitlab-runner.nix b/system/monolith-gitlab-runner.nix index 3e63d98..ce0dc6f 100644 --- a/system/monolith-gitlab-runner.nix +++ b/system/monolith-gitlab-runner.nix @@ -18,7 +18,21 @@ in # nix store will be readable in runner, might be insecure thoreb-telemetria-nix = mkNixRunner config.age.secrets.gitlab-runner-thoreb-telemetria-registrationConfigFile.path; thoreb-itinerario-nix = mkNixRunner config.age.secrets.monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.path; + + default = { + # File should contain at least these two variables: + # `CI_SERVER_URL` + # `CI_SERVER_TOKEN` + authenticationTokenConfigFile = config.sops.secrets."gitlab-runners/docker-images-token".path; + dockerImage = "debian:stable"; + }; }; }; systemd.services.gitlab-runner.serviceConfig.Nice = 10; + + sops.secrets = { + "gitlab-runners/docker-images-token" = { + sopsFile = ../secrets/monolith/default.yaml; + }; + }; } From b52a8868069bc4662d9da0c1b55d9a4fb29e2751 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 7 Mar 2025 14:56:02 -0300 Subject: [PATCH 156/218] monolith: migrate ci secrets to sops --- secrets/monolith/default.yaml | 8 ++++++-- system/monolith-gitlab-runner.nix | 11 ++++++++--- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/secrets/monolith/default.yaml b/secrets/monolith/default.yaml index 857bc5d..46cc388 100644 --- a/secrets/monolith/default.yaml +++ b/secrets/monolith/default.yaml @@ -1,4 +1,8 @@ +forgejo-runners: + git.lelgenio.com-default: ENC[AES256_GCM,data:sEfpBZvgQUkyXPWY4RI0RPJWUbsYK/RGqiYJ5wDSVY9a0EYenyt96QYq6815evq2iQ==,iv:rSWnCOdhfKH4TM9R0/IParYd9laYhWxR+iUhgkVvqfc=,tag:mBcSH/oGDMBgBScvCdn3Zg==,type:str] gitlab-runners: + thoreb-telemetria-nix: ENC[AES256_GCM,data:zrZvG4be08ulpo7itbrprKK5csCMLvzZjrszfMw1XiJP0FyRTUd9nHgHpbAzbjj2KyT7kKngoZAyengvaTEhkT9sUi1pdGnvajAH8BDDOD0g4LJIHFl4,iv:3bSsTzU7gHx+MchuPg9kmb5xEDugmGPje8Jw74NpRJI=,tag:zffRr77lWbyLt7o/mywb5A==,type:str] + thoreb-itinerario-nix: ENC[AES256_GCM,data:UdAAD0V895sFoEYR56sCG2LlpZugJ0K/nwkTygzWOnbTSmBRAcIQ8qVFPZGw+K+XMSLiCyio6Jp7k8AYP0K1VYm+6aEP3OkqR9FCLQTJgXo=,iv:UGUby50BYkn13OzItk6zZmxc5+SnbZZa4bebQHIow2A=,tag:LjDg3deWwdH2T71EtPo6jA==,type:str] docker-images-token: ENC[AES256_GCM,data:GGB/KSkjdAyhFKEspAh91ItbqEDf7K/LZSGSn+Jp7SxRfXpDzHIiMD8XJ9PTkGLeQGN4ug1i2nTYPS7d/P5OALWDU+1NPiV9nPdG0w7GERfu4g==,iv:6roabdOKX9xFMf0hWlECd73+943R+hFLos0e2dOpzns=,tag:LrASFc4DtN7aQ+3oOW/p/w==,type:str] sops: kms: [] @@ -34,8 +38,8 @@ sops: TGNwNUQxN0VQMHErMGVZbG5CZW9kSGMK9TRcgSJQT73dYoQxrrqFW/FkKExLGT4T Xagi6Eq4rhT7pvaL4h3vglwbqkLPsHrWRSyhh0sAEIJ1WpvD+cFEMA== -----END AGE ENCRYPTED FILE----- - lastmodified: "2025-03-07T14:47:44Z" - mac: ENC[AES256_GCM,data:k0yhfVhDmtU8wOZIylaxmmd+8TIXCzCbGhlaQnyeLplH2BDHVnpzAxBJVizS/VtVpAkjMAESndXqW7N6pnGnRWdZPtCxE8KNtz/nUxCZA44cn+mjC+ghKgsgaLuxe4smu0f4u4TK2uFsJqw5J0VGFgMtyKe4AaHujoXWL80zTR0=,iv:xiDrOtto246oPjMw5+ny0qB8HjdMpkzZyPNi3csgMVE=,tag:2xioMXxERDSePdIwPpP7hg==,type:str] + lastmodified: "2025-03-07T16:48:32Z" + mac: ENC[AES256_GCM,data:vyO1MMSRCoc8CK1wqXdgvvAiNP4NUXxpF1MPNsz2z9ioeu15ue2AYV+kWH3I94qUOZ93UM+Nbfx1sqN+JKpkbQ7iS8vY1NNwovEYtrp4FInr6esYOIJXSvvf/3wlWoquSaNACQnbjKJKgV05m24+hu/meIXMYs9sn2SxlnetTmg=,iv:W1jokO9Shhle0cWZpR5bonVdLPZAOo76h8sClMUYZbE=,tag:1Pg5f6q6TmBrAmYWuhKaKQ==,type:str] pgp: - created_at: "2025-03-07T14:42:24Z" enc: |- diff --git a/system/monolith-gitlab-runner.nix b/system/monolith-gitlab-runner.nix index ce0dc6f..28a0ecd 100644 --- a/system/monolith-gitlab-runner.nix +++ b/system/monolith-gitlab-runner.nix @@ -1,7 +1,6 @@ { config, pkgs, - lib, ... }: let @@ -16,8 +15,8 @@ in services = { # runner for building in docker via host's nix-daemon # nix store will be readable in runner, might be insecure - thoreb-telemetria-nix = mkNixRunner config.age.secrets.gitlab-runner-thoreb-telemetria-registrationConfigFile.path; - thoreb-itinerario-nix = mkNixRunner config.age.secrets.monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.path; + thoreb-telemetria-nix = mkNixRunner config.sops.secrets."gitlab-runners/thoreb-telemetria-nix".path; + thoreb-itinerario-nix = mkNixRunner config.sops.secrets."gitlab-runners/thoreb-itinerario-nix".path; default = { # File should contain at least these two variables: @@ -31,6 +30,12 @@ in systemd.services.gitlab-runner.serviceConfig.Nice = 10; sops.secrets = { + "gitlab-runners/thoreb-telemetria-nix" = { + sopsFile = ../secrets/monolith/default.yaml; + }; + "gitlab-runners/thoreb-itinerario-nix" = { + sopsFile = ../secrets/monolith/default.yaml; + }; "gitlab-runners/docker-images-token" = { sopsFile = ../secrets/monolith/default.yaml; }; From 21d747cb71f0c3358c0af8c3279fe62f399f45a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 7 Mar 2025 18:33:59 -0300 Subject: [PATCH 157/218] monolith: add declarative bitbucket runners --- flake.nix | 1 + secrets/monolith/default.yaml | 9 +++-- system/monolith-bitbucket-runner.nix | 50 ++++++++++++++++++++++++++++ 3 files changed, 58 insertions(+), 2 deletions(-) create mode 100644 system/monolith-bitbucket-runner.nix diff --git a/flake.nix b/flake.nix index 90ef37e..fd1bac2 100644 --- a/flake.nix +++ b/flake.nix @@ -146,6 +146,7 @@ modules = [ ./hosts/monolith ./system/monolith-gitlab-runner.nix + ./system/monolith-bitbucket-runner.nix ./system/monolith-forgejo-runner.nix ./system/nix-serve.nix ] ++ common_modules; diff --git a/secrets/monolith/default.yaml b/secrets/monolith/default.yaml index 46cc388..3e1c99c 100644 --- a/secrets/monolith/default.yaml +++ b/secrets/monolith/default.yaml @@ -4,6 +4,11 @@ gitlab-runners: thoreb-telemetria-nix: ENC[AES256_GCM,data:zrZvG4be08ulpo7itbrprKK5csCMLvzZjrszfMw1XiJP0FyRTUd9nHgHpbAzbjj2KyT7kKngoZAyengvaTEhkT9sUi1pdGnvajAH8BDDOD0g4LJIHFl4,iv:3bSsTzU7gHx+MchuPg9kmb5xEDugmGPje8Jw74NpRJI=,tag:zffRr77lWbyLt7o/mywb5A==,type:str] thoreb-itinerario-nix: ENC[AES256_GCM,data:UdAAD0V895sFoEYR56sCG2LlpZugJ0K/nwkTygzWOnbTSmBRAcIQ8qVFPZGw+K+XMSLiCyio6Jp7k8AYP0K1VYm+6aEP3OkqR9FCLQTJgXo=,iv:UGUby50BYkn13OzItk6zZmxc5+SnbZZa4bebQHIow2A=,tag:LjDg3deWwdH2T71EtPo6jA==,type:str] docker-images-token: ENC[AES256_GCM,data:GGB/KSkjdAyhFKEspAh91ItbqEDf7K/LZSGSn+Jp7SxRfXpDzHIiMD8XJ9PTkGLeQGN4ug1i2nTYPS7d/P5OALWDU+1NPiV9nPdG0w7GERfu4g==,iv:6roabdOKX9xFMf0hWlECd73+943R+hFLos0e2dOpzns=,tag:LrASFc4DtN7aQ+3oOW/p/w==,type:str] +bitbucket-runners: + wopus-runner-1: ENC[AES256_GCM,data:gtH0T5n8qMYpvSv5ciN8+ScGlFDf9xE0FTxNP97vT/qsOCcaItTE+5P+DFcWw46onLED+1c+u0sArFbEsT3f8lyco9b+0l99uOQAxLZQzAXYH8zGye1UnwUtytkci2PHu5c8kTpIWHXyZ1IOYNGWkermeab57ANzOkM1LbkHyAjS6VTh0I60LfAOdHOw5FDFL8d1d9oWxLloOe9USLPqHjC023EpCUT2YuyHoPCTpBu8Kb/2HfV0wkAKaB3dvVrKwXCj+bfP6+bjQ3uMzVO/7jxPmnSGBfvyZ+Hlg5goJ6bSAqQWmnPPnQ96FgQfe8su5ML9qNIp9/7eNiL6Rv6Vhxe0hHbE5wsZ/58grcg/LrugeWJvUJ9THhwcTwO8Pkvwlq0XM9seUY2NV+LCK3bLQ4IWDjWkU1IHg6+nihTcvl1iD6UIGMgqGoB/v05WVzHb+GcE2fFuSuhVHfa5RMyboELOJoFrqZiXGhY=,iv:ZakLafxYQCDd1Zw8T83Xfj+YwAQKna9LC6ognJqtifA=,tag:bwBObfdMIvJfRrOG04NtxA==,type:str] + wopus-runner-2: ENC[AES256_GCM,data:gg8merZMFbf396hdJY7zmKQndT3GzB7NeGZAs3C0au8Zd7OFAg9vcQcFcxNA3kZGJZqmFTR/ycWJwhYr9fhlfFuPhDynVvgJAqoYtvC2MUDiOMD/d3DlfwFjQ6cOGTrvFuY1kkgSFb4OFdrVC1eiTDrGygFmYnYcqTKn/t5Ttqi+cHZNzFzVzdVLvaLCYxltM5g45zn+fXYxYwCfqyb32/M1XTnnwIGiataGxEX5oWhVV4zqeLO4ZIYPSby5AVvIMJ/zqvqaeVVY52GLDcTKrj3thbZxMQLWN3/lOA0uYhi3L/WM8Gx+JMEIbSICcuT7QXu4w4PA+opcx9GnsMCK2/egzS+cNPJ4vGZCdVD/jh6A9zVEJAgXdsHXNXFHmMPt7DcgrCQiub62og4kBY4G/Rcg4UN7sb3v3qyBpGbCGHGRjCFc+wdHpom0yDOG2cwcqfN49pC2R7Ag2BisFQ/5A+DPmKnvGG3kt9s=,iv:5g5XiDecYqi4JNRkZubgPJECBQdZ6rBeojgFe6Etebk=,tag:HRy5bFSbfxKTb5e13lGtgg==,type:str] + wopus-runner-3: ENC[AES256_GCM,data:f9pLYR8t51HtPpLyXysIVaDAhxDrmktJH93E7rb7imtKwK7hRhR8usnvHTcknLfD7BMvStAIYefdGt19u7PrQu6vqc19bEcNbnK5OH4KBP6+X47oMgBYtbIGXH+t3dSDt22fSIoppTwdX7/Kf4vqesfN8K7EunETvFR86oyyKdy15mvXr0XUO4us4HZjnIOBEnOm1P/V8hk5JcCpRuo+8ZYmBe5gzq5pTnqnYlPE1EovM7eDMg72J7ev07h50qvySrAqmNiqDcXfTPQ2TzuHx3XxAYqFybf1L6P9OnLB6RDAlpoFJ0h8dSg2tzC2+amYsBP0UIBK/ZhWvvAjpX+MZrTASjenh/tefDcNdbsXDOr7A4i/261z4rC0r+97INglCN1N/SZg51iBHiRAVV1zibDLfioR5+eBIykWAtjILMoYU+zOcr0E8K0I9jQGMtpnYmvHJqV0DVcdfZpJptrPUUy+lQ/iZVcPpLs=,iv:grzvVsfpUzywjNE4jvTxXKG3TYajrvSsQgfOgtafvIo=,tag:K1B6crN0ckLk0EYBtGHDkw==,type:str] + wopus-runner-4: ENC[AES256_GCM,data:D1Zq0BtPuACnutAbUcj3gYSMLuIZcMuqc/1mEFmitEG0tBFMWhkabS+8lXcp8sb1DM0LTDMEwgMB9FVyFb670MKQNEncqQtaNJtY1BxS3SolovDAM/I+i6YGvd4X8jX99d+7ZNR6xGBWJ/dW8rz4QnIM8Eh3FDOqaFa/ltfyPKP9IZ2uZi67C/n8Q/OSdgMQkt+QxhgJfSghE1iruPwxyGlqv+E4SZNI/fQQMjX0Lh7z02ms58yyMtjO71YbukV/JXFRsdJrqY2wfH/6NlZbsKideoSxluBRVqmbW6KQd7dUT819KbOSu9CFdgThtVCU8qiv3jbAbn8D5xRy4AAOEfSqRLXJoj7otCqr47R/8+0BdS3aztFBjL3lDmprMWZ4+LD55fvczfpxUF9ox1mhcjIvCvZJJL06XsST1XRXa7i2fr4/a/XhCmQgIzar5IYxSC9OjuHp6jLsTaY3ZUgid5W1L1n8uWSmA98=,iv:O9caRG//brERiIhuMrsFdTz6TnPY0rdQnvHEu0P42yM=,tag:hrmwLX/CRhZfammJ2nfTPw==,type:str] sops: kms: [] gcp_kms: [] @@ -38,8 +43,8 @@ sops: TGNwNUQxN0VQMHErMGVZbG5CZW9kSGMK9TRcgSJQT73dYoQxrrqFW/FkKExLGT4T Xagi6Eq4rhT7pvaL4h3vglwbqkLPsHrWRSyhh0sAEIJ1WpvD+cFEMA== -----END AGE ENCRYPTED FILE----- - lastmodified: "2025-03-07T16:48:32Z" - mac: ENC[AES256_GCM,data:vyO1MMSRCoc8CK1wqXdgvvAiNP4NUXxpF1MPNsz2z9ioeu15ue2AYV+kWH3I94qUOZ93UM+Nbfx1sqN+JKpkbQ7iS8vY1NNwovEYtrp4FInr6esYOIJXSvvf/3wlWoquSaNACQnbjKJKgV05m24+hu/meIXMYs9sn2SxlnetTmg=,iv:W1jokO9Shhle0cWZpR5bonVdLPZAOo76h8sClMUYZbE=,tag:1Pg5f6q6TmBrAmYWuhKaKQ==,type:str] + lastmodified: "2025-03-07T21:28:04Z" + mac: ENC[AES256_GCM,data:4lOafZQ6PP38CByulzA/J86sw+TpQhj40s1lTRXqUtpt72yH8nQK8dXpw0dNYvDBtDpKRvNTHZubzalEua6n2lCQL7rsZ2+fo6FJ4ht2Kb70dddDcWEyrfyZQ2FaKC5L/QjqM0SbIfPszNvyQ8wIaOoMfNJBis5QOjRSGDAcJm8=,iv:LLT0oJW+3KNe1nKphCK0c5FPIuh8GfnDrvNDCFhP4NM=,tag:rPbVY7L1qxNc3aCfv77FAg==,type:str] pgp: - created_at: "2025-03-07T14:42:24Z" enc: |- diff --git a/system/monolith-bitbucket-runner.nix b/system/monolith-bitbucket-runner.nix new file mode 100644 index 0000000..17d462b --- /dev/null +++ b/system/monolith-bitbucket-runner.nix @@ -0,0 +1,50 @@ +{ + config, + pkgs, + ... +}: + +let + mkRunner = secret: { + image = "docker-public.packages.atlassian.com/sox/atlassian/bitbucket-pipelines-runner:latest"; + volumes = [ + "/tmp:/tmp" + "/var/run/docker.sock:/var/run/docker.sock" + "/var/lib/docker/containers:/var/lib/docker/containers:ro" + ]; + environmentFiles = [ secret ]; + }; + + secretConf = { + sopsFile = ../secrets/monolith/default.yaml; + }; +in +{ + virtualisation.docker = { + enable = true; + daemon.settings = { + # needed by bitbucket runner ??? + log-driver = "json-file"; + log-opts = { + max-size = "10m"; + max-file = "3"; + }; + }; + }; + + virtualisation.oci-containers.backend = "docker"; + + virtualisation.oci-containers.containers = { + bitbucket-runner-1 = mkRunner config.sops.secrets."bitbucket-runners/wopus-runner-1".path; + bitbucket-runner-2 = mkRunner config.sops.secrets."bitbucket-runners/wopus-runner-2".path; + bitbucket-runner-3 = mkRunner config.sops.secrets."bitbucket-runners/wopus-runner-3".path; + bitbucket-runner-4 = mkRunner config.sops.secrets."bitbucket-runners/wopus-runner-4".path; + }; + + sops.secrets = { + "bitbucket-runners/wopus-runner-1" = secretConf; + "bitbucket-runners/wopus-runner-2" = secretConf; + "bitbucket-runners/wopus-runner-3" = secretConf; + "bitbucket-runners/wopus-runner-4" = secretConf; + }; +} From 1a4fd195961977b5b87d218a349205fb8b8e3181 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 7 Mar 2025 19:50:22 -0300 Subject: [PATCH 158/218] sops: switch to id_ed25519 keys --- .sops.yaml | 2 +- secrets/monolith/default.yaml | 52 +++++++++++++------------------- secrets/phantom/default.yaml | 52 +++++++++++++------------------- secrets/test.yaml | 56 ++++++++++++++--------------------- system/sops.nix | 7 +++-- 5 files changed, 71 insertions(+), 98 deletions(-) diff --git a/.sops.yaml b/.sops.yaml index 20a8640..7aa3d88 100644 --- a/.sops.yaml +++ b/.sops.yaml @@ -1,6 +1,6 @@ keys: - &lelgenio-gpg 0FECE8316E74BA6F44EFC21A2F8F21CE8721456B - - &lelgenio-ssh ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCxR/w+38b2lX90yNBqhq3mUmkn1WGu6GAPhN1tVp2ZjYRJNV/+5gWCnTtOWYtDx35HmK/spQ2Qy8X9ttkzORa24fysNx1Iqn/TiXhD7eIJjbGPnrOpIKTkW5/uB3SD/P5NBSa06//BaqJU4sBlG79hoXRpod052hQtdpTVDiMCIV+iboWPKqopmJJfWdBtVnHXs9rep0htPRExxGslImFk7Z6xjcaHyCpIQZPlOGf+sGsmUU7jRqzvZFV8ucIdbnAlMHrU4pepNFhuraESyZVTa/bi9sw0iozXp5Q5+5thMebEslmT1Z771kI4sieDy+O4r8c0Sx2/VY1UAzcpq1faggc3YB01MTh+tiEC6xdMvZLrQGL1NBWjHleMyL53GU5ERluC0vXJF3Hv3BGGBDfXWbrEm5n06DHr2apRVJGC0LwiQ7Woud1X4V4X1pKSusxCVMjT2lmcOwV6YhKhB2sowJc1OdMx4+tL0UWE+YKSZgBHfolwk6ml0F4EO9nnUHc= lelgenio@i15 + - &lelgenio-ssh age1zrgu7w8059xydagm60phnffghvfe9h2ca58cx8qwagqpyfuvs9fqw79c8h - &monolith-ssh age1ecyynwv93lfu7crjjp8l47defv07quzfzaktwurpep7jc9eha5pscg7lrw - &phantom-ssh age1m4mqcd2kmuhfr8a22rvh02c68jkakhdfmuqgtusuv0czk4jvna7sz79p3y diff --git a/secrets/monolith/default.yaml b/secrets/monolith/default.yaml index 3e1c99c..8bd8e12 100644 --- a/secrets/monolith/default.yaml +++ b/secrets/monolith/default.yaml @@ -15,50 +15,40 @@ sops: azure_kv: [] hc_vault: [] age: - - recipient: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCxR/w+38b2lX90yNBqhq3mUmkn1WGu6GAPhN1tVp2ZjYRJNV/+5gWCnTtOWYtDx35HmK/spQ2Qy8X9ttkzORa24fysNx1Iqn/TiXhD7eIJjbGPnrOpIKTkW5/uB3SD/P5NBSa06//BaqJU4sBlG79hoXRpod052hQtdpTVDiMCIV+iboWPKqopmJJfWdBtVnHXs9rep0htPRExxGslImFk7Z6xjcaHyCpIQZPlOGf+sGsmUU7jRqzvZFV8ucIdbnAlMHrU4pepNFhuraESyZVTa/bi9sw0iozXp5Q5+5thMebEslmT1Z771kI4sieDy+O4r8c0Sx2/VY1UAzcpq1faggc3YB01MTh+tiEC6xdMvZLrQGL1NBWjHleMyL53GU5ERluC0vXJF3Hv3BGGBDfXWbrEm5n06DHr2apRVJGC0LwiQ7Woud1X4V4X1pKSusxCVMjT2lmcOwV6YhKhB2sowJc1OdMx4+tL0UWE+YKSZgBHfolwk6ml0F4EO9nnUHc= lelgenio@i15 + - recipient: age1zrgu7w8059xydagm60phnffghvfe9h2ca58cx8qwagqpyfuvs9fqw79c8h enc: | -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1yc2EgQnd3eEhnCldST3lPZXBV - cTVNK3R3RjlFcDQ4UldRT0tsSVJ2N2FkN0hiOVllT2Rrc2NjVWtMbnMrWHVMN1k5 - dExsVHFhMHMKRVVzR1pzeG01Y2FidWNrQ0xjK1FUZktnWTZaWWlWalM5cWhZWE9U - TFU3ZXV3aGp6QkRIZkl4MDFJN2RRQVkrdwpqQlE5ajFTVW15MVVyTkNaS3JiOFph - cGthWWZ4R3Rldjh0a2lnd1dSbUcvSVpDdHJKVk5GVy8vR05WbmhUWFhuCkZsaWk5 - L2dnNE4rNTV6VWpIZlNIMENzZVlKS2NEOFdmSFhsYkFNSHRlTENYeGNtekpDaUN4 - V3l2VWtta3hSVFIKblVDZ1hOdzZQbWswTDB5MXd3dXpXQW44MFhFR0hGZkxjbzlU - WkR5dFhhbVpTUGZwQVR3WXNCUjJWYlAyTU1VeQpkWEdXQjVUemlRdXVxZVE4SGVU - TFlPS0FEV1dRRWU0K1d1ZTRrZGU1MHVKQ0lCemJmcUhOaWtON3ZDbUtad2lXCklt - aFREN3BmdEo1TUw2V2NtQ0QvbE1EQ25OeW5ZaldOY04zQjFQbWRnWjhJaWZKWXJn - UlBTTjV0VkpEY0FhZjQKTURjT004dHEvS24rNGVBSE1KK0ZabTBKb0Z4QTJvS2Fi - czdnWEpUTXJsRVMvdWFzVlJLT281a3JwQi9PMGVDcQoKLS0tIFgvSE14blgvVkxQ - b3N5WWlzdG5hajZaVFVkWVlhOXNZKytmZEZrZVprRHMKXqPgDpKG42KsfKfIAflT - 1meea416Af+WeFhWnw8fBBhApKrMMmYMMjDi1lIOGDz57ydNqtlFqdFtkiQsUC0f - wA== + YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBlaFFtOHRBNjZqOXJOV1Bk + SXRhZTdNWklKaTZST2JhU3VFLzBGSWY0QlMwCldwS1hhMDEyZDAxWUlRRXZtTWts + Ti9IOUR2OFdGYkJ4cFRsV0lkbWJvb1EKLS0tIEJUS1ZCZ1M4ZUs5cDhiam5JaEk1 + U1VjNFprNHZWeDhwU3owRXh0MlBFYkUKHPgxz9/w3+JEtOljfyWBPSshfFlVWVys + f15yxlAeWIZVEGqoau7DegVdZiYYIJR2dFBXV1RkKbAwLrbUxAQidg== -----END AGE ENCRYPTED FILE----- - recipient: age1ecyynwv93lfu7crjjp8l47defv07quzfzaktwurpep7jc9eha5pscg7lrw enc: | -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBzTWVYNXNQcHhHSzVBQmhU - ejlOQzJMZ0xEVFVkbzNPQ0hMVHBQWEgzQTFJCkF6ZDNaZ29UM29vWGZqVW10dmlQ - YjNFNXJVMlcxT1ZsMU55cE8vc3VjaXMKLS0tIDZYQTRjMWp5a3hKc2N4alZKZHFt - TGNwNUQxN0VQMHErMGVZbG5CZW9kSGMK9TRcgSJQT73dYoQxrrqFW/FkKExLGT4T - Xagi6Eq4rhT7pvaL4h3vglwbqkLPsHrWRSyhh0sAEIJ1WpvD+cFEMA== + YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB5OWk0cTJ4d25Qd0hrdkFD + a2Fzd1lrMDREclkvRmxUSjFpYXZvRGs2Rm13Cm5aRVZDWE5ZUVR1K2hkZkdKWjYw + K3lKNndBNGFveGVGVWplaHA0MVlYUG8KLS0tIFlVeXhCTGJGUm1HK2RCSFg1RnI3 + aFVxcDFhaGdYekRWRVFIWnRsZndtZFkKgsvxOFHOcO306Z9FkucA1fDOpZA8N1/h + jYmIgcKTFgWoSCvux67lK30jFsYp7sm5z6WxxDYsGcoQ/+pxoUX2jQ== -----END AGE ENCRYPTED FILE----- lastmodified: "2025-03-07T21:28:04Z" mac: ENC[AES256_GCM,data:4lOafZQ6PP38CByulzA/J86sw+TpQhj40s1lTRXqUtpt72yH8nQK8dXpw0dNYvDBtDpKRvNTHZubzalEua6n2lCQL7rsZ2+fo6FJ4ht2Kb70dddDcWEyrfyZQ2FaKC5L/QjqM0SbIfPszNvyQ8wIaOoMfNJBis5QOjRSGDAcJm8=,iv:LLT0oJW+3KNe1nKphCK0c5FPIuh8GfnDrvNDCFhP4NM=,tag:rPbVY7L1qxNc3aCfv77FAg==,type:str] pgp: - - created_at: "2025-03-07T14:42:24Z" + - created_at: "2025-03-07T22:49:16Z" enc: |- -----BEGIN PGP MESSAGE----- - hQEMAzy6JxafzLr5AQf/Y0QIIBN0uY3RUj88u5L0tJqypnKOAlfLOMYPkZ0oomAd - ZowogLWJgWyFC6NTdZRj84GoF2EAMDZqDAwh7shrZSpuhr0rwT7bGMQ4/VSx/Sxs - uCgkzXGMT0DsGjDOw6h17dDLNAnnvViamL1Br3ZXG7gZJXmUhPavL1YXeQciPqjh - FyJLAKeb9sQAFUp0Aexo4fKZSJh//O8jTiz7vl5klpQnDHWzpkcuxqIajIoYFdcL - ioP1GnrsUDfyXh2zfLcggxs/WHU24/C8DZqWai9WqRA08kJpw+aj1835vmUIWM0W - E5TF9h/tOEGw+PGhvwNiEvONhv/tpyLpjoXylbisjtJeAY6Fntxcrssw2cKMimFV - UjBuf2vSmQlNBqU+LE0JOICmRsmnLZTEPXnPqpqBTRV4gj4kTLCJYcaEIFP7uSEd - WlCyyX28ACGThorQEoQ/W2bFfNT/Mi7CNQ8EOckmKg== - =6Qin + hQEMAzy6JxafzLr5AQgAjwQqdeESOfrOuCjfjALdoy3AnNYC+slusdlra58CoRu6 + YFDAivwPHJBRiuVy43Lo7SWnKXMKvLOry589GBY3JGjNV5U1cPWBhMlTubYZmZWl + iel8Bvw4IF5JksMIvLFdDgexLN7wETzzZP9S8750BCgpSrncrw1k/dUedhv5HUjo + N10x6BPjPSmgolA8uxsISHLAUrKcQoeaWvcZFU1ofKywq08HgIySphy6z3Gmv3Qs + 86saZp1rFm5+qHkrDRgL6Oe3Xx30jVkzn9MHPWzZCDPCEvYGJgXX34NGzbX+/nd3 + JB9XkT2YTFi4BLhdHY3EE7e9//PJc5G9RVDZyAF1e9JeAXH2yR5blXbogoy+VMnS + Yn74Uvs+fnYFTDOiuequro5i0uAyxtrCx8fdfwjuh+9SC5p3N2cBv2eT7zLQwQHi + czHlwxmpi/dMB/u83fR4FzuCUt98VXiezIC4yGn25g== + =Yqqx -----END PGP MESSAGE----- fp: 0FECE8316E74BA6F44EFC21A2F8F21CE8721456B unencrypted_suffix: _unencrypted diff --git a/secrets/phantom/default.yaml b/secrets/phantom/default.yaml index 2d744c9..962c6ba 100644 --- a/secrets/phantom/default.yaml +++ b/secrets/phantom/default.yaml @@ -14,50 +14,40 @@ sops: azure_kv: [] hc_vault: [] age: - - recipient: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCxR/w+38b2lX90yNBqhq3mUmkn1WGu6GAPhN1tVp2ZjYRJNV/+5gWCnTtOWYtDx35HmK/spQ2Qy8X9ttkzORa24fysNx1Iqn/TiXhD7eIJjbGPnrOpIKTkW5/uB3SD/P5NBSa06//BaqJU4sBlG79hoXRpod052hQtdpTVDiMCIV+iboWPKqopmJJfWdBtVnHXs9rep0htPRExxGslImFk7Z6xjcaHyCpIQZPlOGf+sGsmUU7jRqzvZFV8ucIdbnAlMHrU4pepNFhuraESyZVTa/bi9sw0iozXp5Q5+5thMebEslmT1Z771kI4sieDy+O4r8c0Sx2/VY1UAzcpq1faggc3YB01MTh+tiEC6xdMvZLrQGL1NBWjHleMyL53GU5ERluC0vXJF3Hv3BGGBDfXWbrEm5n06DHr2apRVJGC0LwiQ7Woud1X4V4X1pKSusxCVMjT2lmcOwV6YhKhB2sowJc1OdMx4+tL0UWE+YKSZgBHfolwk6ml0F4EO9nnUHc= lelgenio@i15 + - recipient: age1zrgu7w8059xydagm60phnffghvfe9h2ca58cx8qwagqpyfuvs9fqw79c8h enc: | -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1yc2EgQnd3eEhnCm9xWXdTQjZU - Znpiak1xdE1kTm56NWI3bUNlQXBFcjhNNFlwbDVUcGhrS2J4Y1M3aXFydjVGYmVI - UmNKVmkrb3cKWHNsa2FZaE4zbnJWYVo1SDhTOEZxM0JMRWJ0ckpySk11V09LMkd5 - bjhQRkpSZG0xYko3aTFqQmVFU3JhSWo1Ugo2Nk0rNzJBNzJvbVJkU0VhSmRRWE5B - RUt4S3h1cFZkZHkxOU5VUTcxN1JBNFlaYTkyZTNSM3JVUjhCUStNODRMCjdJRWlv - d0g4bnlQMzhWSGUxY04vRnUvbTlyWVQ0eWsvbnk4UmxxOHVZblM3bVFETXJiVjRE - b2s1ZFVHaEFNc3EKSDJTYUVSNWtKQS81bUdOcDA0SnZGeE4vQkt6bFZWY1dxNm9S - YVhRdjVCb3RGaC94djZZeFhXaTZSVVYzaUJ6KwoxQXNKcU9Dbk8xYWRvaGJwSXdu - Zzk4Y09zbW54elJHdjJ6OTNyeURwZ3JJL0gvaFVRUmgyRnNBbXFJU1l5U2FwCm56 - bzc0TkVWdnNoWnBMMjlKbnZicmRxdXIwd2hCZGp5dEQ2TnBtdTZCdnJRbzIyZFhV - L1ZpVW9nZmNqQW45c0cKYnIxQTc2aEowTUprZ1pYVCt3L2NsVHJ5SWF1aHZUR1E5 - eGVrcUphWk1vVURBL2J4UlZLQXluNC82YnNhQUFOQgoKLS0tICtOTXVyUzZldUJO - QkN0eUVRSDlDWmthU0VrRUZDb0VBTVFhL24raHJDcGsKcspICwz+f6y21yogiXO3 - Qp7evIuOzfWe6pMtge5BjxWTlzIdi2btFTzuTjgZaOiQd8FIB3iTqBkepUVD49jN - RQ== + YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBpSXhsMHQvb0NyUXRkRDE3 + TjVjb2orQktDMGs4U2JUS3hWdmtMdnhuYnhBCi9VU1RVblZPaW14VGxMcjM0N20z + R1pOdUJZc1ZGcjBsTnNaZGhleVR6L1kKLS0tIE5vQkFhVXd0R3ZQSzZkNmVqN1Vj + NERXdlJhVHF0NWpNT29CNlRid2NYMVUKxg7kbP6dOZDUz0uxdC45DZCAa6GQTQ1x + nIb7lvPW4xFIb0bOZuvc7cAbHjf4So+8zvA0MM4mkTmIDpnwGD5Clg== -----END AGE ENCRYPTED FILE----- - recipient: age1m4mqcd2kmuhfr8a22rvh02c68jkakhdfmuqgtusuv0czk4jvna7sz79p3y enc: | -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB3TklEaUl2QkVtVVN5UXlC - cW9RaHNoSnRkV0lKTmtYS0VZQnhyM0o0cUFNCmZWemJuOFVyK1ZFbkR1RUZOTEVB - WmJFemRrd0xIUW43cElkdVJOM052N2cKLS0tIFJpRTNtQ1hjWGJwSFJLRDNRSm4z - WW9MbmZoTllLalpWcFdOa3JpaThPMjQKa5vVGp+L1V2/ScyUe0EaOVw4TB8paS2w - 79VgplKN6HL+f6bL/0rIUOwJ6PDW944bOioKDYvbUCpBnSRYIHnYoQ== + YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBrcTJGVmZUenNwYVNjRFlU + VXNBeDdpVFVtSTN5TG9VN0Q1WjRFbjlHd0Z3CjFsU1BsNkZ1a1ZkY2lva3lBUWZ3 + YUpqeEo0Tys1bDk0TEpwQTJ2U29kbjgKLS0tIFJDYWpNemY4NXZ0MkM0YWNldDBE + RU1HSUhldHpzeURaUWQvcjBCQ3pMY2cKYL87Njs4e68zu5AXKNF/hxiB3HduS8wz + o0kmGI58DZx17+Cdipw0ab9a9wiu9C9Fn+LaiCcdM/ESXtS79RzdbQ== -----END AGE ENCRYPTED FILE----- lastmodified: "2025-03-05T22:27:18Z" mac: ENC[AES256_GCM,data:WSopSnWZ+uOllywd7difaZtJcfxkL7eIf9Kr3GajZKO0+rP6pEHIS+5AbXZy6oKRlCLUPecY/WXFvk3//akpvvXHbf6Jp4fQ/YSuTcYKRQupbDBpOXSlc33QyRl6oEyiMOjxMxa2N2tmq8dmA0NbF9wSDMa5a4eNDoiL5T/sUZ8=,iv:QqbVRApzFF6q24rk8KfKuthj656nEczD9Si4INj+N9A=,tag:tMRNYo+u/jIQ6iX3KqKJdA==,type:str] pgp: - - created_at: "2025-03-07T16:05:59Z" + - created_at: "2025-03-07T22:49:19Z" enc: |- -----BEGIN PGP MESSAGE----- - hQEMAzy6JxafzLr5AQf/djnT5hse11QoFPbmuu5rmc/0vpOQ79G6MYZtHlXL/HbP - hx0r25yTI6ICayFiO7luovz58saN0BY5K1dCbGB7+nZ8lrKoGE4GhX4k5Cc/KJIO - BTEbTqMJLezkb34FsuXgD9o2udNysC3Bpi/3NbPCYsJkVeCmx1wyEWzWhz51RO4M - WEyKkE0DyJfOpTuY2fofGhaA866firFDrS2SeiU4Dox4au3iR4VYqt6IITmgZdDE - M9LRp3AzOPOUZzpeRcer4ksh8WVDIWPEEL+w+OGo8QpUL3kqHIMVPgXY0kBOR+5s - tVTCLVe7yoimK/oSYkEx9Z3TYRwKV6ggJWahX7VHaNJeAVxIon8Qs8W2L+f1gclK - tPbaE+jCg6AH3apD3ICisxCj0Vvm+NsWMo2skeN2YGyWBCOoeGcG5OhgJtD0cQiw - QxCzywMXujxYYAXJEvhk4YRhaCOMkTTMGNoloWMugg== - =CHH0 + hQEMAzy6JxafzLr5AQf/Zw+EB0lFpbul4KmHL3ndbhQCHzhkMgG6vEyj7EpjHQxE + nwf9kRrTcRh9YdrgR+5PFRnFJ8+L+gZhk+V/GaEPcEUyskOX/YGTSp1u6pXKGEem + TGojrIx0WwcmeCZUn+qCehbC7ZU64NDDmb7VeWnRkMbboU6UVooHUub88VsbnYw2 + XXtXh4G8isrbyAKzUyypnJnEVbKlVqPOL67BYczjyBqMYc1JVLmBy6nP+sv6q/yo + QyDzlunmZtu52dwAL0L6wJF+novLr4W9cso4K5UVv2sp5M8gucuiY2obiB3vNfgO + q9GZTlMWnyDGflM1w+tzpZ/Ke+sM4dSy3cXpZd+MFNJeAaBJ1owjolb4tPUXlt+W + cJ+SFLWxzH8MsPb+Hfxrt8PPCcv67uch/k50PLYs/V/EM59+mgEJe5LY4rMbUSFw + REGL3LA6Cnkl2bUeHlfG7XlztHd/ehmZM2RPKof+Qw== + =htZl -----END PGP MESSAGE----- fp: 0FECE8316E74BA6F44EFC21A2F8F21CE8721456B unencrypted_suffix: _unencrypted diff --git a/secrets/test.yaml b/secrets/test.yaml index a2a8ee9..0f9b6e7 100644 --- a/secrets/test.yaml +++ b/secrets/test.yaml @@ -15,50 +15,40 @@ sops: azure_kv: [] hc_vault: [] age: - - recipient: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCxR/w+38b2lX90yNBqhq3mUmkn1WGu6GAPhN1tVp2ZjYRJNV/+5gWCnTtOWYtDx35HmK/spQ2Qy8X9ttkzORa24fysNx1Iqn/TiXhD7eIJjbGPnrOpIKTkW5/uB3SD/P5NBSa06//BaqJU4sBlG79hoXRpod052hQtdpTVDiMCIV+iboWPKqopmJJfWdBtVnHXs9rep0htPRExxGslImFk7Z6xjcaHyCpIQZPlOGf+sGsmUU7jRqzvZFV8ucIdbnAlMHrU4pepNFhuraESyZVTa/bi9sw0iozXp5Q5+5thMebEslmT1Z771kI4sieDy+O4r8c0Sx2/VY1UAzcpq1faggc3YB01MTh+tiEC6xdMvZLrQGL1NBWjHleMyL53GU5ERluC0vXJF3Hv3BGGBDfXWbrEm5n06DHr2apRVJGC0LwiQ7Woud1X4V4X1pKSusxCVMjT2lmcOwV6YhKhB2sowJc1OdMx4+tL0UWE+YKSZgBHfolwk6ml0F4EO9nnUHc= lelgenio@i15 + - recipient: age1zrgu7w8059xydagm60phnffghvfe9h2ca58cx8qwagqpyfuvs9fqw79c8h enc: | -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1yc2EgQnd3eEhnCm4zQnZFV2hJ - cFR0Z0hGeFlQd1Rtb2dDUDRJOVc3dmtWT3FIa2xOV0hRREE4LzVKQ01FTHd6M3kz - M0JLeEtXTXoKZkhnMTNETnZVc2tEbU84NWlGWk5YaUg5NjJDdk9yb01QMTVCOHlh - SDE3c0c0dUV3bXQ4MjAxYWJjYUFscmlORwplOFZLc1JzUzdjU0lCZGUyQWl4b3d0 - L3hmekNSUUZia2FOR0k3TWcyQm9xZytCakFpSGRidEJUZHQzaC9sVlppCmJBSnl0 - VW9Tb2hRME9MdmFlcUw5Z3MyV0k3V1FKQTNQZ3M0UTRLK0FvL3NOUTZ3RDBQY0M5 - UHdnLzU3VkFCME0KWTV4c29NbmIvLzl3WXJvMkhnT1gwTTBRNzV3RVVnRTdiMkpn - WmVWanB5VFpnTmhQMWRibXc4VGdhblAwWkQ1WQo0YnFjcnpnYTZITnVueTlZYzhW - OGs3MmlPcmhtaWZoU3h1T3FkbmpoMFFUN0UwQ1FDTGs5L1hGUHdJbmU5Q3haCjJG - bXAyd1lycGhELzY4ZWR2cEtmcWt4NnhXcjIyREw3cTR5d3ZoQlZySlg4Z2lwRmQ1 - cEF1VGthTkV0ekg4M2UKZS9aN0IxazdjUWhUMnBFSmYrOEdYQWdocWtQcFhtYlpN - M3FyTDdMSmpESncydnFFd3lTcE1FMEg5a1ZoTXVIRgoKLS0tIEsvb090WDRBZFdV - dFRUUms3S0J2b201OExwTy9DZERhZVlqVEdtaThkTE0KFT1RB8s+hEOJk7XGjSak - 34qTDcoBnaF0jPZ5Z0HsUx84G4Nu5teRVeHgVKyC7Iv7Gi9TkYtsdgM+q/3rdSvn - aA== + YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBvUURIQmZvSVp3aXlFT0RR + VHVBR0drN2JyV1hNUk5sakxGRXl6SEJuOUUwClQ1Q1lRZTR5R3Z4dlZyb29OaTNW + UVcwV3h6UlhtZkg2aFhrUUtIT0tQRmsKLS0tIDlnckhHWXRKcmRwTGUzdHZxWEVh + a3ZSWk0wNm1raXdMYXdKY1hDd2dZWUEK+IFU/9vsHu70XbSJ7sKqFncrZO3NAH8/ + X/XF1VUmIuDfQZYJsDa4HaXe52xvDWTw3/4frG9HutEI2NcvvRpxlw== -----END AGE ENCRYPTED FILE----- - recipient: age1ecyynwv93lfu7crjjp8l47defv07quzfzaktwurpep7jc9eha5pscg7lrw enc: | -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB5eVFsWHZZYkNrdjNraW5q - OTdmbWF6Tm02elk3NGt0TGQ3ZUoxaHp3VGdBCnVqSDRIMlRSOXdTSER2U0tDcjR1 - Tk5FcURQOW90bENWL2Nyck1CU3RBR1UKLS0tIFRZZzlNNWRtUkJmVzBHWTA3L21K - VCsyS0x4Rk83eC9UTHJvM1NJZG9DbTQKbGp6n/45qGA3rgmdxUJQKZdA1zen5kfZ - pXnExsrIhfPDx0oE2jIWGW0N8cizkCJA4k7ROGu56GqIqga9h55VTw== + YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBNRGxFWXJVcDZOdzVxaFJG + LzdhN3JKaFhPOVBlblRPNWpDdERPaWhDNkM0CmcvUGxNQ09tNTJndWZTdjFia2pl + RnNWQ0ZKSFhEN0FNbVZlKzlFUlh5QTgKLS0tIFkwc1pJajlyOGNHSTdaM3FQZWFK + NUJpRDlLNXlGOTNBbVRTU0ZMVkhqdUUK1koXmGDGTKoNx1wp4c9EknY9LQ5a7dQP + Zx6OzvtpsxL6KGjH7BeNNcm2zOR4YqnklLq09UsPHElz2upJQzECAQ== -----END AGE ENCRYPTED FILE----- - lastmodified: "2025-03-05T21:02:24Z" - mac: ENC[AES256_GCM,data:QfyrJrLERhs14KnuBJ0eCEUqKIBwhmQHROflBAArGlPmyVZU6KLvvOOANv+PJWk9Kt9yPU9Avwt6/e2q0jq9u2OUrvxHbqF4SWvkwhvSoSD3EOe27NGPjDLkVHOdszObo/fT8xglvc6LY8NqL9dXnUoLl58IrY7SE18F7EjrYuE=,iv:rjonQvZQjsr0oC5p3pjh1FAH/7B8SnHpAQ/qFxxfhQs=,tag:/DgHviNrSIzLyjj6ndwY0w==,type:str] + lastmodified: "2025-03-07T22:49:01Z" + mac: ENC[AES256_GCM,data:yma+7wtzVjCzlLOVpqiicjQ9YN1ttzoh8CpcAtjdtVl6gu7/3FXUKYyAWJd+1NUUpK7vN435gOq9/nsig0FRrn0Hgq0+cjFUGS6+6+SPmL97eFvti89gCOeIFhPvBnJQYJLiyVkUcBek4xW+vnt6UgrTy+sD9AT3KHdBlfu3pzY=,iv:ioswFO5KDAL3Bv7MI8V0aWXXxZZIz1M1PyMUbIMnCRI=,tag:5fUBtqz9J2qvY4fUT2ueoQ==,type:str] pgp: - - created_at: "2025-03-05T21:28:21Z" + - created_at: "2025-03-07T22:49:20Z" enc: |- -----BEGIN PGP MESSAGE----- - hQEMAzy6JxafzLr5AQf/aiSW1yeJJ3VLiJ6I+vafWPVe702+6IstICKNdTz4AFgo - 2yUkY/alpgkcH1ybAiRQK0lOs63NBL51Pe2XsKAWXTlHVgFU0B6e+7YoDuwPWnTP - dyTASd+++EAbf0l7bIVQbx28Ib5F5DZyB1VMhhGAZXQqURJGQpLrSqzaoMFPGodg - V7whjtOaEmtFKNhNeRIdrnTW2raeKO0J3mQ5nawCekeIHnx22NxCIbhBMsKpF8EH - 3SZSCNiGrrfbLZFHcM/P5N5qEPc53r9Zvpxcwc8NayIS3kUPwLqKmvhCbRW3WOr0 - 2fc8TQgHTWEYSRSYIVw5vPHWs4+3T4cjdGb0atJ4rtJeAUnGlwchAvxLfFFG096r - SDdiJBBZ03r31EJqnplNwwitKyR4jj+HaM/CNmtSFo7c99iA91A7C1PBri+NpuCK - Fr0JVEom4Fm9WY7BMPduiLN77XLB0aaYN7zu7pwdYA== - =4URT + hQEMAzy6JxafzLr5AQf/Xok7aBMNT6W3LV2Ekx/ccxEZaZ0aVNKHE9aFTz5kBSpu + cXVohu5mEgeXr++HbrsCI821/gfchQ1yzVSLJsSrmZdJ586c3a7pWx2Eo4pcngmy + vb5UWtTBNogABnLz4iTjVQYLjZeNcNhkzW6s3m9PiaX3AvJP9irPcmwIyYpzd9pt + hngnBsdTis52fmvZ6+wOuMyTZU0Iksknom1De8xqgR5ZuO0Vitt19RGbpVhx96AC + t1CUkb5WMFTdpbCFORa/ta9Z7UcKxXTAPsfPkPVG9DnHQ1jSmsJWPDQZxoIJLHuH + SVV+qfRGndOo9fjExCInX6I5wBlrHrdpGtL7VLczV9JeAXYlMJwH63eOyi8hxxtr + KfTJEIALC25uFhoK8bmr30yVZe7thUPMXfht+R5dlHne7+FcBb4k7YLpeN/M40me + CSKk+9YaG7gQIdrfvEXlHSPCPppcKev6ZUspHewhmQ== + =IMON -----END PGP MESSAGE----- fp: 0FECE8316E74BA6F44EFC21A2F8F21CE8721456B unencrypted_suffix: _unencrypted diff --git a/system/sops.nix b/system/sops.nix index 673d1c1..d868153 100644 --- a/system/sops.nix +++ b/system/sops.nix @@ -1,12 +1,15 @@ { pkgs, ... }: { environment.systemPackages = with pkgs; [ - sops-master + sops gnupg ]; sops = { defaultSopsFile = ../secrets/test.yaml; - age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ]; + age.sshKeyPaths = [ + "/etc/ssh/ssh_host_ed25519_key" + "/home/lelgenio/.ssh/id_ed25519" + ]; }; } From 5a5b544caa6e5f16d064a3c22e16a7895554739f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 7 Mar 2025 19:57:53 -0300 Subject: [PATCH 159/218] swaylock: fix cache miss --- user/sway/swaylock.nix | 2 +- user/variables.nix | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/user/sway/swaylock.nix b/user/sway/swaylock.nix index 8d0a195..ceb2e6b 100644 --- a/user/sway/swaylock.nix +++ b/user/sway/swaylock.nix @@ -9,7 +9,7 @@ in options.my.swaylock.enable = lib.mkEnableOption { }; config.programs.swaylock.settings = lib.mkIf cfg.enable { - image = toString theme.background; + image = theme.backgroundPath; font = font.interface; font-size = font.size.medium; indicator-thickness = 20; diff --git a/user/variables.nix b/user/variables.nix index cb35123..84823d3 100644 --- a/user/variables.nix +++ b/user/variables.nix @@ -28,6 +28,7 @@ let cursor_theme = "Bibata-Modern-Classic"; background = ./backgrounds/nixos-dark-pattern.png; + backgroundPath = "~/.local/share/backgrounds/nixos-dark-pattern.png"; opacity = 95; opacityHex = "ee"; color = { @@ -59,6 +60,7 @@ let cursor_theme = "Bibata-Modern-Classic"; background = ./backgrounds/nixos-light-pattern.png; + backgroundPath = "~/.local/share/backgrounds/nixos-light-pattern.png"; opacity = 95; opacityHex = "ee"; color = { From 36ec5ef63cd7169df5f4fc52d486ce6999206d83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 8 Mar 2025 01:19:28 -0300 Subject: [PATCH 160/218] git: update config --- user/git.nix | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/user/git.nix b/user/git.nix index bfc85c1..9e76e01 100644 --- a/user/git.nix +++ b/user/git.nix @@ -18,15 +18,40 @@ in email = mail.personal.user; }; init.defaultBranch = "main"; + core = { + fsmonitor = true; + untrackedCache = true; + }; commit.verbose = true; - push.autoSetupRemote = true; + fetch = { + prune = true; + pruneTags = true; + all = true; + }; + push = { + autoSetupRemote = true; + default = "simple"; + followTags = true; + }; pull.rebase = true; - merge.conflictStyle = "diff3"; - rerere.enabled = true; + tag.sort = "version:refname"; + merge.conflictStyle = "zdiff3"; + rerere = { + enabled = true; + autoupdate = true; + }; + branch.sort = "-committerdate"; + diff = { + algorithm = "histogram"; + colorMoved = "plain"; + mnemonicPrefix = true; + renames = true; + }; rebase = { abbreviateCommands = true; autoSquash = true; autoStash = true; + updateRefs = true; }; pager = { log = "${pkgs._diffr}/bin/_diffr | ${pkgs.kak-pager}/bin/kak-pager"; From fac1976c9c19eb51a9fb68746fb51b8265fa606d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 12 Mar 2025 11:37:29 -0300 Subject: [PATCH 161/218] phantom: fix mastodon data mount --- hosts/phantom/hardware-config.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosts/phantom/hardware-config.nix b/hosts/phantom/hardware-config.nix index afea081..7eebde8 100644 --- a/hosts/phantom/hardware-config.nix +++ b/hosts/phantom/hardware-config.nix @@ -5,7 +5,7 @@ options = [ "nofail" ]; }; fileSystems."/var/lib/mastodon" = { - device = "172.16.130.7:/nas/5749/mastodon"; + device = "172.16.131.19:/nas/5749/mastodon"; fsType = "nfs"; options = [ "nofail" ]; }; From 6e5eebe3c18de474f0c0ebbc3fe51794428ba53b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 12 Mar 2025 11:38:39 -0300 Subject: [PATCH 162/218] amdgpu: limit fan speed --- hosts/monolith/amdgpu.nix | 2 +- scripts/amd-fan-control | 33 +++++++++++++++++++++++++++++---- 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/hosts/monolith/amdgpu.nix b/hosts/monolith/amdgpu.nix index 765e081..2554500 100644 --- a/hosts/monolith/amdgpu.nix +++ b/hosts/monolith/amdgpu.nix @@ -18,7 +18,7 @@ in systemd.services.amd-fan-control = { script = '' - ${lib.getExe pkgs.amd-fan-control} /sys/class/drm/card1/device 60 85 + ${lib.getExe pkgs.amd-fan-control} /sys/class/drm/card1/device 60 90 0 80 ''; serviceConfig = { Restart = "always"; diff --git a/scripts/amd-fan-control b/scripts/amd-fan-control index 1f4c3e7..5b0d7a9 100755 --- a/scripts/amd-fan-control +++ b/scripts/amd-fan-control @@ -39,10 +39,31 @@ if [ -z "$TEMP_MAX" ];then bail "No maximum temperature provided" fi -PWM_MIN=0 -PWM_MAX=255 +PWM_MIN_PCT="$4" +PWM_MAX_PCT="$5" + +if [ -z "$PWM_MIN_PCT" ];then + bail "No minimum fan speed % not provided" +fi + +if [ -z "$PWM_MAX_PCT" ];then + bail "No maximum fan speed % not provided" +fi + +PWM_MIN="$(( $PWM_MIN_PCT * 255 / 100))" +PWM_MAX="$(( $PWM_MAX_PCT * 255 / 100))" echo "Running..." >&2 + +echo "TEMP_MIN=$TEMP_MIN°C" +echo "TEMP_MAX=$TEMP_MAX°C" +echo "FAN_MIN=$PWM_MIN_PCT%" +echo "FAN_MAX=$PWM_MAX_PCT%" + +echo 1 > "$HWMON/pwm1_enable" + +PREV=0 + while true; do TEMPERATURE_RAW=$(cat "$TEMP_INPUT") TEMPERATURE="$(( $TEMPERATURE_RAW / 1000 ))" @@ -55,7 +76,11 @@ while true; do PWM=$PWM_MIN fi - echo 1 > "$HWMON/pwm1_enable" - echo "$PWM" > "$HWMON/pwm1" + AVG="$(( ($PWM * 20 + $PREV * 80) / 100 ))" + + echo "$AVG" + + echo "$AVG" > "$HWMON/pwm1" + PREV="$AVG" sleep .1s done From cef96416d86f962ad52aa996a15815ef455a6ef9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 12 Mar 2025 23:29:31 -0300 Subject: [PATCH 163/218] factorio: 2.0.32 -> 2.0.39 --- pkgs/factorio-headless/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/factorio-headless/default.nix b/pkgs/factorio-headless/default.nix index 531e69b..46064b5 100644 --- a/pkgs/factorio-headless/default.nix +++ b/pkgs/factorio-headless/default.nix @@ -1,10 +1,10 @@ { factorio-headless, pkgs }: factorio-headless.overrideAttrs (_: rec { - version = "2.0.32"; + version = "2.0.39"; src = pkgs.fetchurl { name = "factorio_headless_x64-${version}.tar.xz"; url = "https://www.factorio.com/get-download/${version}/headless/linux64"; - hash = "sha256-KmECrkLcxej+kjvWi80yalaeNZEqzeEhMB5dTS2FZBc="; + hash = "sha256-D4o9DkN5e1/02LhdfDNLCVo/B9mqf4Cx6H+Uk5qT3zQ="; }; }) From 7d15904e7c2a5274287ce480c8ffefa0e6fdea94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 15 Mar 2025 01:03:19 -0300 Subject: [PATCH 164/218] git: sign commits --- user/git.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/user/git.nix b/user/git.nix index 9e76e01..d411d35 100644 --- a/user/git.nix +++ b/user/git.nix @@ -16,13 +16,17 @@ in user = { name = username; email = mail.personal.user; + signingkey = "2F8F21CE8721456B"; }; init.defaultBranch = "main"; core = { fsmonitor = true; untrackedCache = true; }; - commit.verbose = true; + commit = { + verbose = true; + gpgsign = true; + }; fetch = { prune = true; pruneTags = true; From c51d9ee3f11bbb2bb9ab1dfa67d4754b44fc14e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 19 Mar 2025 11:47:36 -0300 Subject: [PATCH 165/218] system: add nix-ld --- hosts/monolith/default.nix | 1 + system/configuration.nix | 1 + system/nix-ld.nix | 21 +++++++++++++++++++++ user/dummy.nix | 1 + 4 files changed, 24 insertions(+) create mode 100644 system/nix-ld.nix diff --git a/hosts/monolith/default.nix b/hosts/monolith/default.nix index 410300e..280cc3f 100644 --- a/hosts/monolith/default.nix +++ b/hosts/monolith/default.nix @@ -42,6 +42,7 @@ in }; my.gaming.enable = true; + my.nix-ld.enable = true; boot.extraModulePackages = with config.boot.kernelPackages; [ zenpower ]; diff --git a/system/configuration.nix b/system/configuration.nix index f515e43..2380d22 100644 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -17,6 +17,7 @@ ./locale.nix ./users.nix ./containers.nix + ./nix-ld.nix ./network.nix ../settings ]; diff --git a/system/nix-ld.nix b/system/nix-ld.nix new file mode 100644 index 0000000..33afa69 --- /dev/null +++ b/system/nix-ld.nix @@ -0,0 +1,21 @@ +{ + pkgs, + lib, + config, + ... +}: +{ + options.my.nix-ld.enable = lib.mkEnableOption { }; + + config = lib.mkIf (config.my.nix-ld.enable) { + programs.nix-ld = { + enable = true; + libraries = + with pkgs; + # run appimages + linux games natively + [ fuse ] + ++ (appimageTools.defaultFhsEnvArgs.multiPkgs pkgs) + ++ (appimageTools.defaultFhsEnvArgs.targetPkgs pkgs); + }; + }; +} diff --git a/user/dummy.nix b/user/dummy.nix index 39043dd..91e66cc 100644 --- a/user/dummy.nix +++ b/user/dummy.nix @@ -1,6 +1,7 @@ { lib, ... }: { options.my = { + nix-ld.enable = lib.mkEnableOption { }; android.enable = lib.mkEnableOption { }; media-packages.enable = lib.mkEnableOption { }; containers.enable = lib.mkEnableOption { }; From 35ba974c1b27d54a1b1348412829c440b5a361f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 19 Mar 2025 11:48:00 -0300 Subject: [PATCH 166/218] system: install aditional appimage support --- system/containers.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/system/containers.nix b/system/containers.nix index 9032a6c..ddd3e38 100644 --- a/system/containers.nix +++ b/system/containers.nix @@ -9,6 +9,7 @@ config = lib.mkIf config.my.containers.enable { services.flatpak.enable = true; + programs.appimage.enable = true; virtualisation.docker = { enable = true; From ca9e0d8653e2f0e1d531bae5b71b3808a6a79bb0 Mon Sep 17 00:00:00 2001 From: lelgenio Date: Thu, 20 Mar 2025 16:40:47 -0300 Subject: [PATCH 167/218] double-rainbow: use nix-ld --- hosts/double-rainbow.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hosts/double-rainbow.nix b/hosts/double-rainbow.nix index af8c5e4..2270198 100644 --- a/hosts/double-rainbow.nix +++ b/hosts/double-rainbow.nix @@ -19,6 +19,8 @@ in { imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; + my.nix-ld.enable = true; + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" From d2654ca5bc27fc20439915be4eacaf834a2735a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 21 Mar 2025 23:23:52 -0300 Subject: [PATCH 168/218] phantom: add travel counter goof --- flake.lock | 17 +++++++++++++++++ flake.nix | 4 ++++ hosts/phantom/goofs.nix | 5 +++++ 3 files changed, 26 insertions(+) diff --git a/flake.lock b/flake.lock index cabf4cf..c1f716c 100644 --- a/flake.lock +++ b/flake.lock @@ -73,6 +73,22 @@ "url": "https://git.lelgenio.com/lelgenio/catboy-spinner" } }, + "contador-da-viagem": { + "flake": false, + "locked": { + "lastModified": 1742597480, + "narHash": "sha256-aN+Kioc4AWPMyJxfz/zFCo2YdP4YxcPqoUcp46z9KcA=", + "ref": "refs/heads/main", + "rev": "29dde9d1965b1f8c1b870185a95859c050ba847d", + "revCount": 3, + "type": "git", + "url": "https://git.lelgenio.com/lelgenio/contador-da-viagem" + }, + "original": { + "type": "git", + "url": "https://git.lelgenio.com/lelgenio/contador-da-viagem" + } + }, "crane": { "inputs": { "flake-compat": "flake-compat", @@ -709,6 +725,7 @@ "inputs": { "agenix": "agenix", "catboy-spinner": "catboy-spinner", + "contador-da-viagem": "contador-da-viagem", "demoji": "demoji", "dhist": "dhist", "disko": "disko", diff --git a/flake.nix b/flake.nix index fd1bac2..8994009 100644 --- a/flake.nix +++ b/flake.nix @@ -56,6 +56,10 @@ wl-crosshair.url = "github:lelgenio/wl-crosshair"; warthunder-leak-counter.url = "git+https://git.lelgenio.com/lelgenio/warthunder-leak-counter"; made-you-look.url = "git+https://git.lelgenio.com/lelgenio/made-you-look"; + contador-da-viagem = { + url = "git+https://git.lelgenio.com/lelgenio/contador-da-viagem"; + flake = false; + }; catboy-spinner = { url = "git+https://git.lelgenio.com/lelgenio/catboy-spinner"; flake = false; diff --git a/hosts/phantom/goofs.nix b/hosts/phantom/goofs.nix index c0b670a..dfb5736 100644 --- a/hosts/phantom/goofs.nix +++ b/hosts/phantom/goofs.nix @@ -43,4 +43,9 @@ forceSSL = true; root = inputs.hello-fonts; }; + services.nginx.virtualHosts."contador-da-viagem.lelgenio.com" = { + enableACME = true; + forceSSL = true; + root = inputs.contador-da-viagem; + }; } From 3c7da418dffaa36c150970d74e20351f9da7f676 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Thu, 20 Mar 2025 20:31:27 -0300 Subject: [PATCH 169/218] gnome: install menulibre --- user/gnome.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/user/gnome.nix b/user/gnome.nix index 74951c7..776f095 100644 --- a/user/gnome.nix +++ b/user/gnome.nix @@ -35,6 +35,7 @@ lib.mkIf (config.my.desktop == "gnome") { amberol pitivi keepassxc + menulibre libsForQt5.qt5ct libsForQt5.qtstyleplugin-kvantum From 0f161863fc8eef929aec742ab1c89e1f79293e43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Thu, 20 Mar 2025 20:51:33 -0300 Subject: [PATCH 170/218] firefox: remove header styling --- user/firefox.nix | 41 +---------------------------------------- 1 file changed, 1 insertion(+), 40 deletions(-) diff --git a/user/firefox.nix b/user/firefox.nix index 4b69ad2..7d8d65f 100644 --- a/user/firefox.nix +++ b/user/firefox.nix @@ -127,46 +127,7 @@ in #sidebar-header { display: none !important; } '' else - '' - /* Element | chrome://browser/content/browser.xhtml */ - - #navigator-toolbox { - display: grid; - grid-template-columns: 1fr 50px; - overflow: hidden; - } - - /* Element | chrome://browser/content/browser.xhtml */ - - #nav-bar { - flex: 1; - width: 100%; - grid-column: 1 / 3; - grid-row: 1; - z-index: 0; - padding-right: 29px !important; - } - - /* Element | chrome://browser/content/browser.xhtml */ - - .toolbar-items { - display: none; - } - - /* Element | chrome://browser/content/browser.xhtml */ - - #TabsToolbar { - max-width: 50px; - } - - /* Element | chrome://browser/content/browser.xhtml */ - - #titlebar { - max-width: 50px; - grid-area: 1 / 2; - z-index: 10; - } - ''; + ""; }; }; }; From a432569595c9300db6e882037bd3f1cb1f9623dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 21 Mar 2025 00:55:53 -0300 Subject: [PATCH 171/218] update --- flake.lock | 60 +++++++++++++++++++++++++++--------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/flake.lock b/flake.lock index c1f716c..e0843d6 100644 --- a/flake.lock +++ b/flake.lock @@ -225,11 +225,11 @@ ] }, "locked": { - "lastModified": 1740485968, - "narHash": "sha256-WK+PZHbfDjLyveXAxpnrfagiFgZWaTJglewBWniTn2Y=", + "lastModified": 1741786315, + "narHash": "sha256-VT65AE2syHVj6v/DGB496bqBnu1PXrrzwlw07/Zpllc=", "owner": "nix-community", "repo": "disko", - "rev": "19c1140419c4f1cdf88ad4c1cfb6605597628940", + "rev": "0d8c6ad4a43906d14abd5c60e0ffe7b587b213de", "type": "github" }, "original": { @@ -243,11 +243,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1739502527, - "narHash": "sha256-KMLNOCWmqdDeAZV5O1ccRmVqRutDcy4IONJin3lzd0Q=", + "lastModified": 1742179690, + "narHash": "sha256-s/q3OWRe5m7kwDcAs1BhJEj6aHc5bsBxRnLP7DM77xE=", "owner": "lelgenio", "repo": "dzgui-nix", - "rev": "06fcea9445b5a005b40469a69f57f2147398bc94", + "rev": "a6d68720c932ac26d549b24f17c776bd2aeb73b4", "type": "github" }, "original": { @@ -456,11 +456,11 @@ ] }, "locked": { - "lastModified": 1739757849, - "narHash": "sha256-Gs076ot1YuAAsYVcyidLKUMIc4ooOaRGO0PqTY7sBzA=", + "lastModified": 1742234739, + "narHash": "sha256-zFL6zsf/5OztR1NSNQF33dvS1fL/BzVUjabZq4qrtY4=", "owner": "nix-community", "repo": "home-manager", - "rev": "9d3d080aec2a35e05a15cedd281c2384767c2cfe", + "rev": "f6af7280a3390e65c2ad8fd059cdc303426cbd59", "type": "github" }, "original": { @@ -497,11 +497,11 @@ ] }, "locked": { - "lastModified": 1740281615, - "narHash": "sha256-dZWcbAQ1sF8oVv+zjSKkPVY0ebwENQEkz5vc6muXbKY=", + "lastModified": 1742174123, + "narHash": "sha256-pDNzMoR6m1ZSJToZQ6XDTLVSdzIzmFl1b8Pc3f7iV6Y=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "465792533d03e6bb9dc849d58ab9d5e31fac9023", + "rev": "2cfb4e1ca32f59dd2811d7a6dd5d4d1225f0955c", "type": "github" }, "original": { @@ -520,11 +520,11 @@ "nixpkgs-24_11": "nixpkgs-24_11" }, "locked": { - "lastModified": 1740437053, - "narHash": "sha256-exPTta4qI1ka9sk+jPcLogGffJ1OVXnAsTRqpeAXeNw=", + "lastModified": 1742413977, + "narHash": "sha256-NkhM9GVu3HL+MiXtGD0TjuPCQ4GFVJPBZ8KyI2cFDGU=", "owner": "simple-nixos-mailserver", "repo": "nixos-mailserver", - "rev": "c8ec4d5e432f5df4838eacd39c11828d23ce66ec", + "rev": "b4fbffe79c00f19be94b86b4144ff67541613659", "type": "gitlab" }, "original": { @@ -567,11 +567,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1740560979, - "narHash": "sha256-Vr3Qi346M+8CjedtbyUevIGDZW8LcA1fTG0ugPY/Hic=", + "lastModified": 1742422364, + "narHash": "sha256-mNqIplmEohk5jRkqYqG19GA8MbQ/D4gQSK0Mu4LvfRQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5135c59491985879812717f4c9fea69604e7f26f", + "rev": "a84ebe20c6bc2ecbcfb000a50776219f48d134cc", "type": "github" }, "original": { @@ -628,11 +628,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1740603184, - "narHash": "sha256-t+VaahjQAWyA+Ctn2idyo1yxRIYpaDxMgHkgCNiMJa4=", + "lastModified": 1742388435, + "narHash": "sha256-GheQGRNYAhHsvPxWVOhAmg9lZKkis22UPbEHlmZMthg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "f44bd8ca21e026135061a0a57dcf3d0775b67a49", + "rev": "b75693fb46bfaf09e662d09ec076c5a162efa9f6", "type": "github" }, "original": { @@ -800,11 +800,11 @@ ] }, "locked": { - "lastModified": 1741043164, - "narHash": "sha256-9lfmSZLz6eq9Ygr6cCmvQiiBEaPb54pUBcjvbEMPORc=", + "lastModified": 1742406979, + "narHash": "sha256-r0aq70/3bmfjTP+JZs4+XV5SgmCtk1BLU4CQPWGtA7o=", "owner": "Mic92", "repo": "sops-nix", - "rev": "3f2412536eeece783f0d0ad3861417f347219f4d", + "rev": "1770be8ad89e41f1ed5a60ce628dd10877cb3609", "type": "github" }, "original": { @@ -960,11 +960,11 @@ "nixpkgs": "nixpkgs_6" }, "locked": { - "lastModified": 1739829690, - "narHash": "sha256-mL1szCeIsjh6Khn3nH2cYtwO5YXG6gBiTw1A30iGeDU=", + "lastModified": 1742370146, + "narHash": "sha256-XRE8hL4vKIQyVMDXykFh4ceo3KSpuJF3ts8GKwh5bIU=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "3d0579f5cc93436052d94b73925b48973a104204", + "rev": "adc195eef5da3606891cedf80c0d9ce2d3190808", "type": "github" }, "original": { @@ -975,11 +975,11 @@ }, "vpsadminos": { "locked": { - "lastModified": 1740754923, - "narHash": "sha256-o7Qo5kkjVgBL9CVqNJKnkcDbRkpD0UAp82G/mJ086Xw=", + "lastModified": 1742222981, + "narHash": "sha256-EDhfWimpzUnpH5h/FQ3oYw/Kaq4Cx1E5nRofDQyI3aE=", "owner": "vpsfreecz", "repo": "vpsadminos", - "rev": "3a9df8fbe84b680ad0a38ec85e8e9c8a4f095ca3", + "rev": "14da38b9a49bf156e06f20ed02533a0549e6d487", "type": "github" }, "original": { From 4ebfaca007c8b77d3942979ae49528258d6339d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sun, 23 Mar 2025 16:30:08 -0300 Subject: [PATCH 172/218] factorio: update backup script filename to fix syncthing integration --- hosts/monolith/factorio-server.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hosts/monolith/factorio-server.nix b/hosts/monolith/factorio-server.nix index 8ed0324..9648de3 100644 --- a/hosts/monolith/factorio-server.nix +++ b/hosts/monolith/factorio-server.nix @@ -23,11 +23,12 @@ systemd.services.factorio-backup-save = { description = "Backup factorio saves"; script = '' + FILENAME="space-age-$(date --iso=seconds | tr ':' '_').zip" ${lib.getExe pkgs.rsync} \ -av \ --chown=lelgenio \ /var/lib/factorio/saves/default.zip \ - ~lelgenio/Documentos/GameSaves/factorio_saves/space-age-$(date --iso=seconds).zip + ~lelgenio/Documentos/GameSaves/factorio_saves/$FILENAME ''; serviceConfig.Type = "oneshot"; wantedBy = [ "multi-user.target" ]; From 0f61393bf36b14ee0293c191fdefb1b3845c387e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 26 Mar 2025 21:58:24 -0300 Subject: [PATCH 173/218] refactor: move rm-target service and timer to separate file --- user/home.nix | 25 +------------------------ user/rm-target.nix | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 24 deletions(-) create mode 100644 user/rm-target.nix diff --git a/user/home.nix b/user/home.nix index c384c60..271ceee 100644 --- a/user/home.nix +++ b/user/home.nix @@ -44,6 +44,7 @@ inputs.nix-index-database.hmModules.nix-index ../settings ./powerplay-led-idle.nix + ./rm-target.nix ]; my = import ./variables.nix // { @@ -169,30 +170,6 @@ exec nicotine ''; - systemd.user.services.rm-target = { - Unit = { - Description = "Remove directories named 'target'"; - }; - Service = { - Type = "oneshot"; - ExecStart = pkgs.writeShellScript "rm-target" '' - sudo ${pkgs.fd}/bin/fd -td -u '^\.?target$' "$HOME" -x rm -vrf -- - ''; - }; - }; - systemd.user.timers.rm-target = { - Unit = { - Description = "Remove directories named 'target'"; - }; - Timer = { - OnCalendar = "weekly"; - Unit = "rm-target.service"; - }; - Install = { - WantedBy = [ "timers.target" ]; - }; - }; - # This value determines the Home Manager release that your # configuration is compatible with. This helps avoid breakage # when a new Home Manager release introduces backwards diff --git a/user/rm-target.nix b/user/rm-target.nix new file mode 100644 index 0000000..93c6058 --- /dev/null +++ b/user/rm-target.nix @@ -0,0 +1,26 @@ +{ pkgs, lib, ... }: +{ + systemd.user.services.rm-target = { + Unit = { + Description = "Remove directories named 'target'"; + }; + Service = { + Type = "oneshot"; + ExecStart = pkgs.writeShellScript "rm-target" '' + sudo ${pkgs.fd}/bin/fd -td -u '^\.?target$' "$HOME" -x rm -vrf -- + ''; + }; + }; + systemd.user.timers.rm-target = { + Unit = { + Description = "Remove directories named 'target'"; + }; + Timer = { + OnCalendar = "weekly"; + Unit = "rm-target.service"; + }; + Install = { + WantedBy = [ "timers.target" ]; + }; + }; +} From 8cae611cd5612135263723cb8321f6c11340556a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Thu, 27 Mar 2025 01:07:27 -0300 Subject: [PATCH 174/218] home: add automatic home-manager cleanup service --- user/home-manager.nix | 28 ++++++++++++++++++++++++++++ user/home.nix | 3 +-- 2 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 user/home-manager.nix diff --git a/user/home-manager.nix b/user/home-manager.nix new file mode 100644 index 0000000..9c8452a --- /dev/null +++ b/user/home-manager.nix @@ -0,0 +1,28 @@ +{ pkgs, lib, ... }: +{ + programs.home-manager.enable = true; + + systemd.user.services.home-manager-expire = { + Unit = { + Description = "Remove old home-manager generations"; + }; + Service = { + Type = "oneshot"; + ExecStart = pkgs.writeShellScript "home-manager-expire" '' + ${lib.getExe pkgs.home-manager} expire-generations 7d + ''; + }; + }; + systemd.user.timers.home-manager-expire = { + Unit = { + Description = "Remove old home-manager generations"; + }; + Timer = { + OnCalendar = "daily"; + Unit = "home-manager-expire.service"; + }; + Install = { + WantedBy = [ "timers.target" ]; + }; + }; +} diff --git a/user/home.nix b/user/home.nix index 271ceee..31e3871 100644 --- a/user/home.nix +++ b/user/home.nix @@ -9,6 +9,7 @@ { imports = [ ./dummy.nix + ./home-manager.nix ./waybar ./helix.nix ./kakoune @@ -58,8 +59,6 @@ home.username = "lelgenio"; home.homeDirectory = "/home/lelgenio"; - # Let Home Manager install and manage itself. - programs.home-manager.enable = true; home.packages = with pkgs; [ terminal From 0a0b8f9e610867fdac84722befd9b13f35f0104e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Thu, 27 Mar 2025 21:09:14 -0300 Subject: [PATCH 175/218] gammastep: extract config --- user/sway/default.nix | 6 ++---- user/sway/gammastep.nix | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 4 deletions(-) create mode 100644 user/sway/gammastep.nix diff --git a/user/sway/default.nix b/user/sway/default.nix index 04193aa..046ae07 100644 --- a/user/sway/default.nix +++ b/user/sway/default.nix @@ -20,6 +20,7 @@ in ./swayidle.nix ./swaylock.nix ./theme.nix + ./gammastep.nix ]; options.my.sway.enable = lib.mkEnableOption { }; @@ -32,6 +33,7 @@ in my.mpd.enable = true; my.zathura.enable = true; my.waybar.enable = true; + my.gammastep.enable = true; wayland.windowManager.sway = { enable = true; @@ -115,10 +117,6 @@ in exec_always systemctl --user restart waybar.service ''; }; - services.gammastep = { - enable = true; - provider = "geoclue2"; - }; services.kdeconnect = { enable = true; diff --git a/user/sway/gammastep.nix b/user/sway/gammastep.nix new file mode 100644 index 0000000..a5b6917 --- /dev/null +++ b/user/sway/gammastep.nix @@ -0,0 +1,19 @@ +{ config, lib, ... }: +let + cfg = config.my.gammastep; +in +{ + options.my.gammastep.enable = lib.mkEnableOption { }; + + config = lib.mkIf cfg.enable { + services.gammastep = { + enable = true; + dawnTime = "6:00-7:45"; + duskTime = "18:35-20:15"; + temperature = { + day = 6500; + night = 4500; + }; + }; + }; +} From 921413f545403e2ea91e19602831dd9fe5bed020 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 28 Mar 2025 20:22:34 -0300 Subject: [PATCH 176/218] firefox: update userchrome --- user/firefox.nix | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/user/firefox.nix b/user/firefox.nix index 7d8d65f..5e38a56 100644 --- a/user/firefox.nix +++ b/user/firefox.nix @@ -2,15 +2,22 @@ config, pkgs, lib, - font, ... }: let - inherit (config.my) desktop browser; + inherit (config.my) desktop; + inherit (config.my.theme) color; + bugfixedFirefox = pkgs.firefox-devedition-unwrapped // { requireSigning = false; allowAddonSideload = true; }; + + swayCustomization = '' + #titlebar { display: none !important; } + #TabsToolbar { display: none !important; } + #sidebar-header { display: none !important; } + ''; in { config = { @@ -119,15 +126,17 @@ in "devtools.chrome.enabled" = true; "devtools.debugger.remote-enabled" = true; }; - userChrome = - if desktop == "sway" then - '' - #titlebar { display: none !important; } - #TabsToolbar { display: none !important; } - #sidebar-header { display: none !important; } - '' - else - ""; + userChrome = '' + ${lib.optionalString (desktop == "sway") swayCustomization} + + #sidebar-main { + background-color: ${color.bg}; + } + + #tabbrowser-tabbox { + outline-width: 0 !important; + } + ''; }; }; }; From 9239cbef77d1e3312eb7a8d076cc0d4f671d1fe0 Mon Sep 17 00:00:00 2001 From: lelgenio Date: Wed, 2 Apr 2025 17:11:01 -0300 Subject: [PATCH 177/218] kakoune: add json and yaml formatter --- user/kakoune/filetypes.kak | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/user/kakoune/filetypes.kak b/user/kakoune/filetypes.kak index 7ea774e..01b0175 100644 --- a/user/kakoune/filetypes.kak +++ b/user/kakoune/filetypes.kak @@ -15,6 +15,14 @@ hook global WinSetOption filetype=nix %{ set buffer formatcmd 'nixfmt' } +hook global BufCreate .*\.json %{ + set buffer formatcmd 'prettier --parser json' +} + +hook global BufCreate .*\.ya?ml %{ + set buffer formatcmd 'prettier --parser yaml' +} + hook global BufCreate .*\.html %{ set buffer formatcmd 'prettier --parser html' } From 1054e831d8d48099895bb2edc30fb51662281c11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Mon, 31 Mar 2025 08:05:09 -0300 Subject: [PATCH 178/218] update --- flake.lock | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/flake.lock b/flake.lock index e0843d6..69ae3c0 100644 --- a/flake.lock +++ b/flake.lock @@ -76,11 +76,11 @@ "contador-da-viagem": { "flake": false, "locked": { - "lastModified": 1742597480, - "narHash": "sha256-aN+Kioc4AWPMyJxfz/zFCo2YdP4YxcPqoUcp46z9KcA=", + "lastModified": 1742610036, + "narHash": "sha256-sY1iheemazmIVJAnoFtut6cN7HX/C5OMDY54UrmCoqE=", "ref": "refs/heads/main", - "rev": "29dde9d1965b1f8c1b870185a95859c050ba847d", - "revCount": 3, + "rev": "efe5ac4a16de7f78824ac89dc987ef635afa5267", + "revCount": 4, "type": "git", "url": "https://git.lelgenio.com/lelgenio/contador-da-viagem" }, @@ -456,11 +456,11 @@ ] }, "locked": { - "lastModified": 1742234739, - "narHash": "sha256-zFL6zsf/5OztR1NSNQF33dvS1fL/BzVUjabZq4qrtY4=", + "lastModified": 1742655702, + "narHash": "sha256-jbqlw4sPArFtNtA1s3kLg7/A4fzP4GLk9bGbtUJg0JQ=", "owner": "nix-community", "repo": "home-manager", - "rev": "f6af7280a3390e65c2ad8fd059cdc303426cbd59", + "rev": "0948aeedc296f964140d9429223c7e4a0702a1ff", "type": "github" }, "original": { @@ -497,11 +497,11 @@ ] }, "locked": { - "lastModified": 1742174123, - "narHash": "sha256-pDNzMoR6m1ZSJToZQ6XDTLVSdzIzmFl1b8Pc3f7iV6Y=", + "lastModified": 1742701275, + "narHash": "sha256-AulwPVrS9859t+eJ61v24wH/nfBEIDSXYxlRo3fL/SA=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "2cfb4e1ca32f59dd2811d7a6dd5d4d1225f0955c", + "rev": "36dc43cb50d5d20f90a28d53abb33a32b0a2aae6", "type": "github" }, "original": { @@ -567,11 +567,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1742422364, - "narHash": "sha256-mNqIplmEohk5jRkqYqG19GA8MbQ/D4gQSK0Mu4LvfRQ=", + "lastModified": 1743095683, + "narHash": "sha256-gWd4urRoLRe8GLVC/3rYRae1h+xfQzt09xOfb0PaHSk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a84ebe20c6bc2ecbcfb000a50776219f48d134cc", + "rev": "5e5402ecbcb27af32284d4a62553c019a3a49ea6", "type": "github" }, "original": { @@ -628,11 +628,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1742388435, - "narHash": "sha256-GheQGRNYAhHsvPxWVOhAmg9lZKkis22UPbEHlmZMthg=", + "lastModified": 1742937945, + "narHash": "sha256-lWc+79eZRyvHp/SqMhHTMzZVhpxkRvthsP1Qx6UCq0E=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b75693fb46bfaf09e662d09ec076c5a162efa9f6", + "rev": "d02d88f8de5b882ccdde0465d8fa2db3aa1169f7", "type": "github" }, "original": { @@ -800,11 +800,11 @@ ] }, "locked": { - "lastModified": 1742406979, - "narHash": "sha256-r0aq70/3bmfjTP+JZs4+XV5SgmCtk1BLU4CQPWGtA7o=", + "lastModified": 1742700801, + "narHash": "sha256-ZGlpUDsuBdeZeTNgoMv+aw0ByXT2J3wkYw9kJwkAS4M=", "owner": "Mic92", "repo": "sops-nix", - "rev": "1770be8ad89e41f1ed5a60ce628dd10877cb3609", + "rev": "67566fe68a8bed2a7b1175fdfb0697ed22ae8852", "type": "github" }, "original": { @@ -960,11 +960,11 @@ "nixpkgs": "nixpkgs_6" }, "locked": { - "lastModified": 1742370146, - "narHash": "sha256-XRE8hL4vKIQyVMDXykFh4ceo3KSpuJF3ts8GKwh5bIU=", + "lastModified": 1743081648, + "narHash": "sha256-WRAylyYptt6OX5eCEBWyTwOEqEtD6zt33rlUkr6u3cE=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "adc195eef5da3606891cedf80c0d9ce2d3190808", + "rev": "29a3d7b768c70addce17af0869f6e2bd8f5be4b7", "type": "github" }, "original": { @@ -975,11 +975,11 @@ }, "vpsadminos": { "locked": { - "lastModified": 1742222981, - "narHash": "sha256-EDhfWimpzUnpH5h/FQ3oYw/Kaq4Cx1E5nRofDQyI3aE=", + "lastModified": 1743047409, + "narHash": "sha256-WTUW2GZqHknVwEbzF/TeX2eg52414gfl6hXloDDwEsQ=", "owner": "vpsfreecz", "repo": "vpsadminos", - "rev": "14da38b9a49bf156e06f20ed02533a0549e6d487", + "rev": "cf9324b9ff855172bd9de8aa3b8215071c4a0c6f", "type": "github" }, "original": { From caffa85ba020a5f18755c2647224145dd1dbb671 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 4 Apr 2025 21:01:39 -0300 Subject: [PATCH 179/218] ranger: disable preview scripts and vcs support, making it very fast --- user/ranger/rc.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/user/ranger/rc.conf b/user/ranger/rc.conf index 3936f36..ad71849 100644 --- a/user/ranger/rc.conf +++ b/user/ranger/rc.conf @@ -27,10 +27,10 @@ set confirm_on_delete multiple # Use non-default path for file preview script? # ranger ships with scope.sh, a script that calls external programs (see # README.md for dependencies) to preview images, archives, etc. -set preview_script ~/.config/ranger/scope.sh +# set preview_script ~/.config/ranger/scope.sh # Use the external preview script or display simple plain text or image previews? -set use_preview_script true +# set use_preview_script true # Automatically count files in the directory, even before entering them? set automatically_count_files true @@ -40,7 +40,7 @@ set automatically_count_files true set open_all_images true # Be aware of version control systems and display information. -set vcs_aware true +set vcs_aware false # State of the four backends git, hg, bzr, svn. The possible states are # disabled, local (only show local info), enabled (show local and remote From 2d2c3d20075b4b30b96c5970e0ce4582269d9191 Mon Sep 17 00:00:00 2001 From: lelgenio Date: Sat, 5 Apr 2025 14:02:55 -0300 Subject: [PATCH 180/218] kak: fix multiline-edit extension --- user/kakoune/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/user/kakoune/default.nix b/user/kakoune/default.nix index a015bd0..fa63e6b 100644 --- a/user/kakoune/default.nix +++ b/user/kakoune/default.nix @@ -82,6 +82,9 @@ in rev = "1cc6baeb14b773916eb9209469aa77b3cfa67a0a"; sha256 = "sha256-3PLxG9UtT0MMSibvTviXQIgTH3rApZ3WSbNCEH3c7HE="; }; + buildInputs = with pkgs; [ + python3Minimal + ]; }) ]; extraConfig = From 310f3b192c157bbac4595a25a7c8e844a20543fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Tue, 8 Apr 2025 21:42:08 -0300 Subject: [PATCH 181/218] qt: cleanup theme config --- user/sway/theme.nix | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/user/sway/theme.nix b/user/sway/theme.nix index 731d12a..0a8a38a 100644 --- a/user/sway/theme.nix +++ b/user/sway/theme.nix @@ -55,7 +55,7 @@ lib.mkIf (desktop == "sway") { qt = { enable = true; platformTheme.name = "gtk3"; - style.name = "qt5ct"; + style.name = "kvantum"; }; dconf.settings = { @@ -70,28 +70,6 @@ lib.mkIf (desktop == "sway") { }; }; - # fonts.fontconfig.enable = true; - xdg.configFile = { - "qt5ct/qt5ct.conf".text = '' - [Appearance] - # color_scheme_path=/nix/store/f07mk0vrm47jxw3y5v99hxncy0w4vcyq-qt5ct-1.5/share/qt5ct/colors/darker.conf - custom_palette=false - icon_theme=${icon_theme} - standard_dialogs=default - style=kvantum-dark - - # [Fonts] - # fixed=@Variant(\0\0\0@\0\0\0\x1c\0H\0\x61\0\x63\0k\0 \0N\0\x65\0r\0\x64\0 \0\x46\0o\0n\0t@(\0\0\0\0\0\0\xff\xff\xff\xff\x5\x1\0\x32\x10) - # general=@Variant(\0\0\0@\0\0\0\x1e\0L\0i\0\x62\0\x65\0r\0\x61\0t\0i\0o\0n\0 \0S\0\x61\0n\0s@(\0\0\0\0\0\0\xff\xff\xff\xff\x5\x1\0\x32\x10) - ''; - "kdedefaults/kdeglobals".text = '' - [General] - ColorScheme=BreezeDark - - [Icons] - Theme=${icon_theme} - ''; - }; services.xsettingsd = { enable = true; settings = { @@ -105,11 +83,6 @@ lib.mkIf (desktop == "sway") { }; home.packages = with pkgs; [ - libsForQt5.qt5ct - libsForQt5.qtstyleplugin-kvantum - qt6Packages.qt6ct - qt6Packages.qtstyleplugin-kvantum - pkgs.bibata-cursors pkgs.orchis_theme_compact pkgs.papirus_red From 7eeb06fbb753b0bf91d8b8b5c4d80a6fd3a6ba16 Mon Sep 17 00:00:00 2001 From: lelgenio Date: Tue, 8 Apr 2025 17:58:25 -0300 Subject: [PATCH 182/218] firefox: remove buggy config --- user/firefox.nix | 6 ------ 1 file changed, 6 deletions(-) diff --git a/user/firefox.nix b/user/firefox.nix index 5e38a56..3f58fa6 100644 --- a/user/firefox.nix +++ b/user/firefox.nix @@ -114,8 +114,6 @@ in "media.ffmpeg.vaapi.enabled" = true; "media.ffvpx.enabled" = true; - "gfx.webrender.all" = true; - # Enable installing non signed extensions "extensions.langpacks.signatures.required" = false; "xpinstall.signatures.required" = false; @@ -145,9 +143,5 @@ in exec firefox ''; }; - home.sessionVariables = { - MOZ_ENABLE_WAYLAND = "1"; - MOZ_DISABLE_RDD_SANDBOX = "1"; - }; }; } From fde4835a77ee84ba6dc37323e2a04fc2b270e3e3 Mon Sep 17 00:00:00 2001 From: lelgenio Date: Mon, 12 May 2025 17:58:13 -0300 Subject: [PATCH 183/218] update --- flake.lock | 72 +++++++++++++++++++++++++++--------------------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/flake.lock b/flake.lock index 69ae3c0..0213291 100644 --- a/flake.lock +++ b/flake.lock @@ -28,11 +28,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1736955230, - "narHash": "sha256-uenf8fv2eG5bKM8C/UvFaiJMZ4IpUFaQxk9OH5t/1gA=", + "lastModified": 1745630506, + "narHash": "sha256-bHCFgGeu8XjWlVuaWzi3QONjDW3coZDqSHvnd4l7xus=", "owner": "ryantm", "repo": "agenix", - "rev": "e600439ec4c273cf11e06fe4d9d906fb98fa097c", + "rev": "96e078c646b711aee04b82ba01aefbff87004ded", "type": "github" }, "original": { @@ -163,11 +163,11 @@ ] }, "locked": { - "lastModified": 1700795494, - "narHash": "sha256-gzGLZSiOhf155FW7262kdHo2YDeugp3VuIFb4/GGng0=", + "lastModified": 1744478979, + "narHash": "sha256-dyN+teG9G82G+m+PX/aSAagkC+vUv0SgUw3XkPhQodQ=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "4b9b83d5a92e8c1fbfd8eb27eda375908c11ec4d", + "rev": "43975d782b418ebf4969e9ccba82466728c2851b", "type": "github" }, "original": { @@ -225,11 +225,11 @@ ] }, "locked": { - "lastModified": 1741786315, - "narHash": "sha256-VT65AE2syHVj6v/DGB496bqBnu1PXrrzwlw07/Zpllc=", + "lastModified": 1746729224, + "narHash": "sha256-9R4sOLAK1w3Bq54H3XOJogdc7a6C2bLLmatOQ+5pf5w=", "owner": "nix-community", "repo": "disko", - "rev": "0d8c6ad4a43906d14abd5c60e0ffe7b587b213de", + "rev": "85555d27ded84604ad6657ecca255a03fd878607", "type": "github" }, "original": { @@ -456,11 +456,11 @@ ] }, "locked": { - "lastModified": 1742655702, - "narHash": "sha256-jbqlw4sPArFtNtA1s3kLg7/A4fzP4GLk9bGbtUJg0JQ=", + "lastModified": 1746171682, + "narHash": "sha256-EyXUNSa+H+YvGVuQJP1nZskXAowxKYp79RNUsNdQTj4=", "owner": "nix-community", "repo": "home-manager", - "rev": "0948aeedc296f964140d9429223c7e4a0702a1ff", + "rev": "50eee705bbdbac942074a8c120e8194185633675", "type": "github" }, "original": { @@ -497,11 +497,11 @@ ] }, "locked": { - "lastModified": 1742701275, - "narHash": "sha256-AulwPVrS9859t+eJ61v24wH/nfBEIDSXYxlRo3fL/SA=", + "lastModified": 1746330942, + "narHash": "sha256-ShizFaJCAST23tSrHHtFFGF0fwd72AG+KhPZFFQX/0o=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "36dc43cb50d5d20f90a28d53abb33a32b0a2aae6", + "rev": "137fd2bd726fff343874f85601b51769b48685cc", "type": "github" }, "original": { @@ -520,11 +520,11 @@ "nixpkgs-24_11": "nixpkgs-24_11" }, "locked": { - "lastModified": 1742413977, - "narHash": "sha256-NkhM9GVu3HL+MiXtGD0TjuPCQ4GFVJPBZ8KyI2cFDGU=", + "lastModified": 1746740198, + "narHash": "sha256-Sbcl1MkJBOMg9BBENRm++clDuk6SihqBNOkPcKt+EF4=", "owner": "simple-nixos-mailserver", "repo": "nixos-mailserver", - "rev": "b4fbffe79c00f19be94b86b4144ff67541613659", + "rev": "1feca020084017b47bcbf893b33e76585785a840", "type": "gitlab" }, "original": { @@ -567,11 +567,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1743095683, - "narHash": "sha256-gWd4urRoLRe8GLVC/3rYRae1h+xfQzt09xOfb0PaHSk=", + "lastModified": 1746663147, + "narHash": "sha256-Ua0drDHawlzNqJnclTJGf87dBmaO/tn7iZ+TCkTRpRc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5e5402ecbcb27af32284d4a62553c019a3a49ea6", + "rev": "dda3dcd3fe03e991015e9a74b22d35950f264a54", "type": "github" }, "original": { @@ -628,11 +628,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1742937945, - "narHash": "sha256-lWc+79eZRyvHp/SqMhHTMzZVhpxkRvthsP1Qx6UCq0E=", + "lastModified": 1746557022, + "narHash": "sha256-QkNoyEf6TbaTW5UZYX0OkwIJ/ZMeKSSoOMnSDPQuol0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d02d88f8de5b882ccdde0465d8fa2db3aa1169f7", + "rev": "1d3aeb5a193b9ff13f63f4d9cc169fb88129f860", "type": "github" }, "original": { @@ -643,11 +643,11 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1735554305, - "narHash": "sha256-zExSA1i/b+1NMRhGGLtNfFGXgLtgo+dcuzHzaWA6w3Q=", + "lastModified": 1745377448, + "narHash": "sha256-jhZDfXVKdD7TSEGgzFJQvEEZ2K65UMiqW5YJ2aIqxMA=", "owner": "nixos", "repo": "nixpkgs", - "rev": "0e82ab234249d8eee3e8c91437802b32c74bb3fd", + "rev": "507b63021ada5fee621b6ca371c4fca9ca46f52c", "type": "github" }, "original": { @@ -800,11 +800,11 @@ ] }, "locked": { - "lastModified": 1742700801, - "narHash": "sha256-ZGlpUDsuBdeZeTNgoMv+aw0ByXT2J3wkYw9kJwkAS4M=", + "lastModified": 1746485181, + "narHash": "sha256-PxrrSFLaC7YuItShxmYbMgSuFFuwxBB+qsl9BZUnRvg=", "owner": "Mic92", "repo": "sops-nix", - "rev": "67566fe68a8bed2a7b1175fdfb0697ed22ae8852", + "rev": "e93ee1d900ad264d65e9701a5c6f895683433386", "type": "github" }, "original": { @@ -960,11 +960,11 @@ "nixpkgs": "nixpkgs_6" }, "locked": { - "lastModified": 1743081648, - "narHash": "sha256-WRAylyYptt6OX5eCEBWyTwOEqEtD6zt33rlUkr6u3cE=", + "lastModified": 1746216483, + "narHash": "sha256-4h3s1L/kKqt3gMDcVfN8/4v2jqHrgLIe4qok4ApH5x4=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "29a3d7b768c70addce17af0869f6e2bd8f5be4b7", + "rev": "29ec5026372e0dec56f890e50dbe4f45930320fd", "type": "github" }, "original": { @@ -975,11 +975,11 @@ }, "vpsadminos": { "locked": { - "lastModified": 1743047409, - "narHash": "sha256-WTUW2GZqHknVwEbzF/TeX2eg52414gfl6hXloDDwEsQ=", + "lastModified": 1746798207, + "narHash": "sha256-KGvQoBdrOCEaxSnvQrQcbDzu4x2aP8ik6RiRxBj43dg=", "owner": "vpsfreecz", "repo": "vpsadminos", - "rev": "cf9324b9ff855172bd9de8aa3b8215071c4a0c6f", + "rev": "29ee8947bda07185e21388a414df88501c3ce83f", "type": "github" }, "original": { From 5dcf7259ed7d383a57f9b4295d93482d6f240035 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Mon, 12 May 2025 22:19:33 -0300 Subject: [PATCH 184/218] update --- flake.lock | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/flake.lock b/flake.lock index 0213291..970c204 100644 --- a/flake.lock +++ b/flake.lock @@ -456,11 +456,11 @@ ] }, "locked": { - "lastModified": 1746171682, - "narHash": "sha256-EyXUNSa+H+YvGVuQJP1nZskXAowxKYp79RNUsNdQTj4=", + "lastModified": 1747020534, + "narHash": "sha256-D/6rkiC6w2p+4SwRiVKrWIeYzun8FBg7NlMKMwQMxO0=", "owner": "nix-community", "repo": "home-manager", - "rev": "50eee705bbdbac942074a8c120e8194185633675", + "rev": "b4bbdc6fde16fc2051fcde232f6e288cd22007ca", "type": "github" }, "original": { @@ -497,11 +497,11 @@ ] }, "locked": { - "lastModified": 1746330942, - "narHash": "sha256-ShizFaJCAST23tSrHHtFFGF0fwd72AG+KhPZFFQX/0o=", + "lastModified": 1746934494, + "narHash": "sha256-3n6i+F0sDASjkhbvgFDpPDZGp7z19IrRtjfF9TwJpCA=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "137fd2bd726fff343874f85601b51769b48685cc", + "rev": "e9b21b01e4307176b9718a29ac514838e7f6f4ff", "type": "github" }, "original": { @@ -520,11 +520,11 @@ "nixpkgs-24_11": "nixpkgs-24_11" }, "locked": { - "lastModified": 1746740198, - "narHash": "sha256-Sbcl1MkJBOMg9BBENRm++clDuk6SihqBNOkPcKt+EF4=", + "lastModified": 1746937334, + "narHash": "sha256-7g2GSePdYbpD1v5BxEVSCJ2Ogf4K5rc9sBB81FervUY=", "owner": "simple-nixos-mailserver", "repo": "nixos-mailserver", - "rev": "1feca020084017b47bcbf893b33e76585785a840", + "rev": "da66510f688b7eac54e3cac7c75be4b8dd78ce8b", "type": "gitlab" }, "original": { @@ -567,11 +567,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1746663147, - "narHash": "sha256-Ua0drDHawlzNqJnclTJGf87dBmaO/tn7iZ+TCkTRpRc=", + "lastModified": 1746904237, + "narHash": "sha256-3e+AVBczosP5dCLQmMoMEogM57gmZ2qrVSrmq9aResQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "dda3dcd3fe03e991015e9a74b22d35950f264a54", + "rev": "d89fc19e405cb2d55ce7cc114356846a0ee5e956", "type": "github" }, "original": { @@ -628,11 +628,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1746557022, - "narHash": "sha256-QkNoyEf6TbaTW5UZYX0OkwIJ/ZMeKSSoOMnSDPQuol0=", + "lastModified": 1746957726, + "narHash": "sha256-k9ut1LSfHCr0AW82ttEQzXVCqmyWVA5+SHJkS5ID/Jo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1d3aeb5a193b9ff13f63f4d9cc169fb88129f860", + "rev": "a39ed32a651fdee6842ec930761e31d1f242cb94", "type": "github" }, "original": { @@ -960,11 +960,11 @@ "nixpkgs": "nixpkgs_6" }, "locked": { - "lastModified": 1746216483, - "narHash": "sha256-4h3s1L/kKqt3gMDcVfN8/4v2jqHrgLIe4qok4ApH5x4=", + "lastModified": 1746989248, + "narHash": "sha256-uoQ21EWsAhyskNo8QxrTVZGjG/dV4x5NM1oSgrmNDJY=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "29ec5026372e0dec56f890e50dbe4f45930320fd", + "rev": "708ec80ca82e2bbafa93402ccb66a35ff87900c5", "type": "github" }, "original": { @@ -975,11 +975,11 @@ }, "vpsadminos": { "locked": { - "lastModified": 1746798207, - "narHash": "sha256-KGvQoBdrOCEaxSnvQrQcbDzu4x2aP8ik6RiRxBj43dg=", + "lastModified": 1746967427, + "narHash": "sha256-lTI7Bg9zgDDWX0kFdR4OoK+I3kAaYt6Jo6jGRvSCn9U=", "owner": "vpsfreecz", "repo": "vpsadminos", - "rev": "29ee8947bda07185e21388a414df88501c3ce83f", + "rev": "cad317d0c2eacd36beb4fce60d6dcced50b71173", "type": "github" }, "original": { From 4c67c260a7deee7f8501c69363970703a560a2d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Thu, 15 May 2025 12:57:15 -0300 Subject: [PATCH 185/218] kakoune: fix prettier formatter config --- user/kakoune/filetypes.kak | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/user/kakoune/filetypes.kak b/user/kakoune/filetypes.kak index 01b0175..9fa33a6 100644 --- a/user/kakoune/filetypes.kak +++ b/user/kakoune/filetypes.kak @@ -16,15 +16,15 @@ hook global WinSetOption filetype=nix %{ } hook global BufCreate .*\.json %{ - set buffer formatcmd 'prettier --parser json' + set buffer formatcmd "prettier --stdin-filepath=%val{buffile}" } hook global BufCreate .*\.ya?ml %{ - set buffer formatcmd 'prettier --parser yaml' + set buffer formatcmd "prettier --stdin-filepath=%val{buffile}" } hook global BufCreate .*\.html %{ - set buffer formatcmd 'prettier --parser html' + set buffer formatcmd "prettier --stdin-filepath=%val{buffile}" } hook global BufCreate .*\.component\.html %{ @@ -43,11 +43,15 @@ hook global BufCreate .*\.php %{ } hook global BufCreate .*\.js %{ - set buffer formatcmd 'prettier --parser babel' + set buffer formatcmd "prettier --stdin-filepath=%val{buffile}" +} + +hook global BufCreate .*\.ts %{ + set buffer formatcmd "prettier --stdin-filepath=%val{buffile}" } hook global BufCreate .*\.scss %{ - set buffer formatcmd 'prettier --parser scss' + set buffer formatcmd "prettier --stdin-filepath=%val{buffile}" } hook global BufCreate .*\.vue %{ From bce7c36693fb088e68db528d38cff47a47987eab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 21 May 2025 20:14:08 -0300 Subject: [PATCH 186/218] factorio: update server --- pkgs/factorio-headless/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/factorio-headless/default.nix b/pkgs/factorio-headless/default.nix index 46064b5..8d81f1d 100644 --- a/pkgs/factorio-headless/default.nix +++ b/pkgs/factorio-headless/default.nix @@ -1,10 +1,10 @@ { factorio-headless, pkgs }: factorio-headless.overrideAttrs (_: rec { - version = "2.0.39"; + version = "2.0.47"; src = pkgs.fetchurl { name = "factorio_headless_x64-${version}.tar.xz"; url = "https://www.factorio.com/get-download/${version}/headless/linux64"; - hash = "sha256-D4o9DkN5e1/02LhdfDNLCVo/B9mqf4Cx6H+Uk5qT3zQ="; + hash = "sha256-8PMgx3YWpHlCJ+tjenC1VxCPMUGkYzJ2WTIgp2j0miY="; }; }) From e4b2f1cb143bc892e6d653ca6650b1b1c68c2040 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 24 May 2025 00:02:46 -0300 Subject: [PATCH 187/218] tablet: force replacing OpenTabletDriver config --- user/sway/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/user/sway/default.nix b/user/sway/default.nix index 046ae07..596fdde 100644 --- a/user/sway/default.nix +++ b/user/sway/default.nix @@ -125,7 +125,10 @@ in services.gpg-agent.pinentryPackage = pkgs.pinentry-all; - xdg.configFile."OpenTabletDriver/settings.json".source = ./open-tablet-driver.json; + xdg.configFile."OpenTabletDriver/settings.json" = { + force = true; + source = ./open-tablet-driver.json; + }; home.packages = with pkgs; [ mySway From 6102f2283a3c624d97fb752c8d6125c8cf89d665 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 24 May 2025 00:03:16 -0300 Subject: [PATCH 188/218] firefox: remove pinned extensions --- user/firefox.nix | 70 +----------------------------------------------- 1 file changed, 1 insertion(+), 69 deletions(-) diff --git a/user/firefox.nix b/user/firefox.nix index 3f58fa6..29d7f07 100644 --- a/user/firefox.nix +++ b/user/firefox.nix @@ -8,11 +8,6 @@ let inherit (config.my) desktop; inherit (config.my.theme) color; - bugfixedFirefox = pkgs.firefox-devedition-unwrapped // { - requireSigning = false; - allowAddonSideload = true; - }; - swayCustomization = '' #titlebar { display: none !important; } #TabsToolbar { display: none !important; } @@ -23,70 +18,7 @@ in config = { programs.firefox = { enable = true; - package = pkgs.wrapFirefox bugfixedFirefox { - nixExtensions = [ - (pkgs.fetchFirefoxAddon { - name = "darkreader"; - url = "https://addons.mozilla.org/firefox/downloads/file/4205543/darkreader-4.9.73.xpi"; - hash = "sha256-fDmf8yVhiGu4Da0Mr6+PYpeSsLcf8e/PEmZ+BaKzjxo="; - }) - (pkgs.fetchFirefoxAddon { - name = "sponsorblock"; - url = "https://addons.mozilla.org/firefox/downloads/file/4202411/sponsorblock-5.4.29.xpi"; - hash = "sha256-7Xqc8cyQNylMe5/dgDOx1f2QDVmz3JshDlTueu6AcSg="; - }) - (pkgs.fetchFirefoxAddon { - name = "tree-style-tab"; - url = "https://addons.mozilla.org/firefox/downloads/file/4197314/tree_style_tab-3.9.19.xpi"; - hash = "sha256-u2f0elVPj5N/QXa+5hRJResPJAYwuT9z0s/0nwmFtVo="; - }) - (pkgs.fetchFirefoxAddon { - name = "ublock-origin"; - url = "https://addons.mozilla.org/firefox/downloads/file/4290466/ublock_origin-1.58.0.xpi"; - hash = "sha256-RwxWmUpxdNshV4rc5ZixWKXcCXDIfFz+iJrGMr0wheo="; - }) - (pkgs.fetchFirefoxAddon { - name = "user_agent_string_switcher"; - url = "https://addons.mozilla.org/firefox/downloads/file/4098688/user_agent_string_switcher-0.5.0.xpi"; - hash = "sha256-ncjaPIxG1PBNEv14nGNQH6ai9QL4WbKGk5oJDbY+rjM="; - }) - - (pkgs.fetchFirefoxAddon { - name = "i-still-dont-care-about-cookies"; - url = "https://github.com/OhMyGuus/I-Still-Dont-Care-About-Cookies/releases/download/v1.1.4/istilldontcareaboutcookies-1.1.4.xpi"; - hash = "sha256-yt6yRiLTuaK4K/QwgkL9gCVGsSa7ndFOHqZvKqIGZ5U="; - }) - - (pkgs.fetchFirefoxAddon { - name = "vimium_ff"; - url = "https://addons.mozilla.org/firefox/downloads/file/4191523/vimium_ff-2.0.6.xpi"; - hash = "sha256-lKLX6IWWtliRdH1Ig33rVEB4DVfbeuMw0dfUPV/mSSI="; - }) - (pkgs.fetchFirefoxAddon { - name = "invidious_redirect"; - url = "https://addons.mozilla.org/firefox/downloads/file/4292924/invidious_redirect_2-1.16.xpi"; - hash = "sha256-ApCc+MNmW9Wd/5seV6npePQVEaszT/rhD9EB7HGiUb8="; - }) - - (pkgs.fetchFirefoxAddon { - name = "substitoot"; - url = "https://addons.mozilla.org/firefox/downloads/file/4236602/substitoot-0.7.2.0.xpi"; - hash = "sha256-1auSqEjkebwRSbmAVUsYwy77dl7TQCOnqgozpoVnqgI="; - }) - - # Locale - (pkgs.fetchFirefoxAddon { - name = "firefox_br"; - url = "https://addons.mozilla.org/firefox/downloads/file/4144369/firefox_br-115.0.20230726.201356.xpi"; - hash = "sha256-8zkqfdW0lX0b62+gAJeq4FFlQ06nXGFAexpH+wg2Cr0="; - }) - (pkgs.fetchFirefoxAddon { - name = "corretor"; - url = "https://addons.mozilla.org/firefox/downloads/file/1176165/corretor-65.2018.12.8.xpi"; - hash = "sha256-/rFQtJHdgemMkGAd+KWuWxVA/BwSIkn6sk0XZE0LrGk="; - }) - ]; - }; + package = pkgs.firefox-devedition; profiles = { dev-edition-default = { isDefault = true; From 18ec0369d7df43df83e4d79937255a6bd34db391 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 24 May 2025 00:05:30 -0300 Subject: [PATCH 189/218] flake: mark flake.lock as binary to git, don't show diffs --- .gitattributes | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..da8c15f --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +flake.lock binary From 8c5847ff33f7680b5b1a1f342adbf454294bb19a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 24 May 2025 00:08:40 -0300 Subject: [PATCH 190/218] update --- flake.lock | 132 ++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 91 insertions(+), 41 deletions(-) diff --git a/flake.lock b/flake.lock index 970c204..0821cf8 100644 --- a/flake.lock +++ b/flake.lock @@ -28,11 +28,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1745630506, - "narHash": "sha256-bHCFgGeu8XjWlVuaWzi3QONjDW3coZDqSHvnd4l7xus=", + "lastModified": 1747575206, + "narHash": "sha256-NwmAFuDUO/PFcgaGGr4j3ozG9Pe5hZ/ogitWhY+D81k=", "owner": "ryantm", "repo": "agenix", - "rev": "96e078c646b711aee04b82ba01aefbff87004ded", + "rev": "4835b1dc898959d8547a871ef484930675cb47f1", "type": "github" }, "original": { @@ -225,11 +225,11 @@ ] }, "locked": { - "lastModified": 1746729224, - "narHash": "sha256-9R4sOLAK1w3Bq54H3XOJogdc7a6C2bLLmatOQ+5pf5w=", + "lastModified": 1747742835, + "narHash": "sha256-kYL4GCwwznsypvsnA20oyvW8zB/Dvn6K5G/tgMjVMT4=", "owner": "nix-community", "repo": "disko", - "rev": "85555d27ded84604ad6657ecca255a03fd878607", + "rev": "df522e787fdffc4f32ed3e1fca9ed0968a384d62", "type": "github" }, "original": { @@ -297,11 +297,11 @@ "flake-compat_2": { "flake": false, "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "lastModified": 1747046372, + "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", "owner": "edolstra", "repo": "flake-compat", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", "type": "github" }, "original": { @@ -433,6 +433,54 @@ "type": "github" } }, + "git-hooks": { + "inputs": { + "flake-compat": [ + "nixos-mailserver", + "flake-compat" + ], + "gitignore": "gitignore", + "nixpkgs": [ + "nixos-mailserver", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1742649964, + "narHash": "sha256-DwOTp7nvfi8mRfuL1escHDXabVXFGT1VlPD1JHrtrco=", + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "dcf5072734cb576d2b0c59b2ac44f5050b5eac82", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "git-hooks.nix", + "type": "github" + } + }, + "gitignore": { + "inputs": { + "nixpkgs": [ + "nixos-mailserver", + "git-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, "hello-fonts": { "flake": false, "locked": { @@ -456,11 +504,11 @@ ] }, "locked": { - "lastModified": 1747020534, - "narHash": "sha256-D/6rkiC6w2p+4SwRiVKrWIeYzun8FBg7NlMKMwQMxO0=", + "lastModified": 1747688870, + "narHash": "sha256-ypL9WAZfmJr5V70jEVzqGjjQzF0uCkz+AFQF7n9NmNc=", "owner": "nix-community", "repo": "home-manager", - "rev": "b4bbdc6fde16fc2051fcde232f6e288cd22007ca", + "rev": "d5f1f641b289553927b3801580598d200a501863", "type": "github" }, "original": { @@ -497,11 +545,11 @@ ] }, "locked": { - "lastModified": 1746934494, - "narHash": "sha256-3n6i+F0sDASjkhbvgFDpPDZGp7z19IrRtjfF9TwJpCA=", + "lastModified": 1747540584, + "narHash": "sha256-cxCQ413JTUuRv9Ygd8DABJ1D6kuB/nTfQqC0Lu9C0ls=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "e9b21b01e4307176b9718a29ac514838e7f6f4ff", + "rev": "ec179dd13fb7b4c6844f55be91436f7857226dce", "type": "github" }, "original": { @@ -514,17 +562,18 @@ "inputs": { "blobs": "blobs", "flake-compat": "flake-compat_2", + "git-hooks": "git-hooks", "nixpkgs": [ "nixpkgs" ], - "nixpkgs-24_11": "nixpkgs-24_11" + "nixpkgs-25_05": "nixpkgs-25_05" }, "locked": { - "lastModified": 1746937334, - "narHash": "sha256-7g2GSePdYbpD1v5BxEVSCJ2Ogf4K5rc9sBB81FervUY=", + "lastModified": 1747965231, + "narHash": "sha256-BW3ktviEhfCN/z3+kEyzpDKAI8qFTwO7+S0NVA0C90o=", "owner": "simple-nixos-mailserver", "repo": "nixos-mailserver", - "rev": "da66510f688b7eac54e3cac7c75be4b8dd78ce8b", + "rev": "53007af63fade28853408370c4c600a63dd97f41", "type": "gitlab" }, "original": { @@ -550,28 +599,29 @@ "type": "github" } }, - "nixpkgs-24_11": { + "nixpkgs-25_05": { "locked": { - "lastModified": 1734083684, - "narHash": "sha256-5fNndbndxSx5d+C/D0p/VF32xDiJCJzyOqorOYW4JEo=", + "lastModified": 1747610100, + "narHash": "sha256-rpR5ZPMkWzcnCcYYo3lScqfuzEw5Uyfh+R0EKZfroAc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "314e12ba369ccdb9b352a4db26ff419f7c49fa84", + "rev": "ca49c4304acf0973078db0a9d200fd2bae75676d", "type": "github" }, "original": { - "id": "nixpkgs", - "ref": "nixos-24.11", - "type": "indirect" + "owner": "NixOS", + "ref": "nixos-25.05", + "repo": "nixpkgs", + "type": "github" } }, "nixpkgs-unstable": { "locked": { - "lastModified": 1746904237, - "narHash": "sha256-3e+AVBczosP5dCLQmMoMEogM57gmZ2qrVSrmq9aResQ=", + "lastModified": 1747744144, + "narHash": "sha256-W7lqHp0qZiENCDwUZ5EX/lNhxjMdNapFnbErcbnP11Q=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d89fc19e405cb2d55ce7cc114356846a0ee5e956", + "rev": "2795c506fe8fb7b03c36ccb51f75b6df0ab2553f", "type": "github" }, "original": { @@ -628,11 +678,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1746957726, - "narHash": "sha256-k9ut1LSfHCr0AW82ttEQzXVCqmyWVA5+SHJkS5ID/Jo=", + "lastModified": 1747862697, + "narHash": "sha256-U4HaNZ1W26cbOVm0Eb5OdGSnfQVWQKbLSPrSSa78KC0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a39ed32a651fdee6842ec930761e31d1f242cb94", + "rev": "2baa12ff69913392faf0ace833bc54bba297ea95", "type": "github" }, "original": { @@ -800,11 +850,11 @@ ] }, "locked": { - "lastModified": 1746485181, - "narHash": "sha256-PxrrSFLaC7YuItShxmYbMgSuFFuwxBB+qsl9BZUnRvg=", + "lastModified": 1747603214, + "narHash": "sha256-lAblXm0VwifYCJ/ILPXJwlz0qNY07DDYdLD+9H+Wc8o=", "owner": "Mic92", "repo": "sops-nix", - "rev": "e93ee1d900ad264d65e9701a5c6f895683433386", + "rev": "8d215e1c981be3aa37e47aeabd4e61bb069548fd", "type": "github" }, "original": { @@ -960,11 +1010,11 @@ "nixpkgs": "nixpkgs_6" }, "locked": { - "lastModified": 1746989248, - "narHash": "sha256-uoQ21EWsAhyskNo8QxrTVZGjG/dV4x5NM1oSgrmNDJY=", + "lastModified": 1747912973, + "narHash": "sha256-XgxghfND8TDypxsMTPU2GQdtBEsHTEc3qWE6RVEk8O0=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "708ec80ca82e2bbafa93402ccb66a35ff87900c5", + "rev": "020cb423808365fa3f10ff4cb8c0a25df35065a3", "type": "github" }, "original": { @@ -975,11 +1025,11 @@ }, "vpsadminos": { "locked": { - "lastModified": 1746967427, - "narHash": "sha256-lTI7Bg9zgDDWX0kFdR4OoK+I3kAaYt6Jo6jGRvSCn9U=", + "lastModified": 1748016252, + "narHash": "sha256-P/h9BTZv6r5br/MKkXyEdUdDTU446UaAZzGLQMCMSIw=", "owner": "vpsfreecz", "repo": "vpsadminos", - "rev": "cad317d0c2eacd36beb4fce60d6dcced50b71173", + "rev": "4756a2ecc603c347e3d983663d663e96f22225a9", "type": "github" }, "original": { From 68568255cbb534f779c0dcaa61f184f571dde06a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 24 May 2025 01:08:45 -0300 Subject: [PATCH 191/218] update: 24.11 -> 25.05 --- flake.lock | 18 +++++++++--------- flake.nix | 6 +++--- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/flake.lock b/flake.lock index 0821cf8..78b8ed1 100644 --- a/flake.lock +++ b/flake.lock @@ -504,16 +504,16 @@ ] }, "locked": { - "lastModified": 1747688870, - "narHash": "sha256-ypL9WAZfmJr5V70jEVzqGjjQzF0uCkz+AFQF7n9NmNc=", + "lastModified": 1747556831, + "narHash": "sha256-Qb84nbYFFk0DzFeqVoHltS2RodAYY5/HZQKE8WnBDsc=", "owner": "nix-community", "repo": "home-manager", - "rev": "d5f1f641b289553927b3801580598d200a501863", + "rev": "d0bbd221482c2713cccb80220f3c9d16a6e20a33", "type": "github" }, "original": { "owner": "nix-community", - "ref": "release-24.11", + "ref": "release-25.05", "repo": "home-manager", "type": "github" } @@ -578,7 +578,7 @@ }, "original": { "owner": "simple-nixos-mailserver", - "ref": "master", + "ref": "nixos-25.05", "repo": "nixos-mailserver", "type": "gitlab" } @@ -678,16 +678,16 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1747862697, - "narHash": "sha256-U4HaNZ1W26cbOVm0Eb5OdGSnfQVWQKbLSPrSSa78KC0=", + "lastModified": 1747953325, + "narHash": "sha256-y2ZtlIlNTuVJUZCqzZAhIw5rrKP4DOSklev6c8PyCkQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "2baa12ff69913392faf0ace833bc54bba297ea95", + "rev": "55d1f923c480dadce40f5231feb472e81b0bab48", "type": "github" }, "original": { "id": "nixpkgs", - "ref": "nixos-24.11", + "ref": "nixos-25.05", "type": "indirect" } }, diff --git a/flake.nix b/flake.nix index 8994009..05332a4 100644 --- a/flake.nix +++ b/flake.nix @@ -1,10 +1,10 @@ { description = "My system config"; inputs = { - nixpkgs.url = "nixpkgs/nixos-24.11"; + nixpkgs.url = "nixpkgs/nixos-25.05"; nixpkgs-unstable.url = "nixpkgs/nixos-unstable"; - home-manager.url = "github:nix-community/home-manager/release-24.11"; + home-manager.url = "github:nix-community/home-manager/release-25.05"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; vpsadminos.url = "github:vpsfreecz/vpsadminos"; @@ -32,7 +32,7 @@ }; nixos-mailserver = { - url = "gitlab:simple-nixos-mailserver/nixos-mailserver/master"; + url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-25.05"; inputs.nixpkgs.follows = "nixpkgs"; }; From ce66f177fb4b59d2ae3c839abf454ab830d1b84e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 24 May 2025 01:09:18 -0300 Subject: [PATCH 192/218] 25.05: split nerd fonts --- overlays/default.nix | 8 -------- system/fonts.nix | 3 ++- user/sway/theme.nix | 1 - 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/overlays/default.nix b/overlays/default.nix index 8886897..a032271 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -28,14 +28,6 @@ rec { ]; } ); - nerdfonts_fira_hack = ( - final.nerdfonts.override { - fonts = [ - "FiraCode" - "Hack" - ]; - } - ); } ); diff --git a/system/fonts.nix b/system/fonts.nix index 2815563..73aa8f7 100644 --- a/system/fonts.nix +++ b/system/fonts.nix @@ -5,6 +5,7 @@ noto-fonts noto-fonts-cjk-sans noto-fonts-emoji - nerdfonts_fira_hack + nerd-fonts.fira-code + nerd-fonts.hack ]; } diff --git a/user/sway/theme.nix b/user/sway/theme.nix index 0a8a38a..600f596 100644 --- a/user/sway/theme.nix +++ b/user/sway/theme.nix @@ -92,7 +92,6 @@ lib.mkIf (desktop == "sway") { hack-font font-awesome_5 fira-code - nerdfonts_fira_hack material-wifi-icons ]; } From 707e8143a03ca4b78ed008a4e390cc2175227c7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 24 May 2025 01:09:54 -0300 Subject: [PATCH 193/218] 25.05: fix defaultLocale string --- hosts/phantom/default.nix | 2 +- system/locale.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hosts/phantom/default.nix b/hosts/phantom/default.nix index 9111434..1b0d3cb 100644 --- a/hosts/phantom/default.nix +++ b/hosts/phantom/default.nix @@ -53,7 +53,7 @@ # Set your time zone. time.timeZone = "America/Sao_Paulo"; # Select internationalisation properties. - i18n.defaultLocale = "pt_BR.utf8"; + i18n.defaultLocale = "pt_BR.UTF-8"; boot.kernel.sysctl."fs.inotify.max_user_watches" = 1048576; diff --git a/system/locale.nix b/system/locale.nix index 07e7175..e2c7e81 100644 --- a/system/locale.nix +++ b/system/locale.nix @@ -2,7 +2,7 @@ { time.timeZone = "America/Sao_Paulo"; environment.variables.TZ = config.time.timeZone; - i18n.defaultLocale = "pt_BR.utf8"; + i18n.defaultLocale = "pt_BR.UTF-8"; # Configure keymap in X11 services.xserver.xkb = { From d353be3ce81476dba4327c10be990794afc0c5f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 24 May 2025 01:10:18 -0300 Subject: [PATCH 194/218] 25.05: j4-dmenu-desktop use '--i3-ipc' flag --- scripts/bmenu | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/scripts/bmenu b/scripts/bmenu index c793269..8abad08 100755 --- a/scripts/bmenu +++ b/scripts/bmenu @@ -8,13 +8,10 @@ if test "$argv[1]" = "run" test -n "$argv[2]" && set t "$argv[2]" || set t "terminal" - test -n "$i3SOCK" && set wrapper 'i3-msg exec --' - test -n "$SWAYSOCK" && set wrapper 'swaymsg exec --' - exec j4-dmenu-desktop \ --dmenu="bmenu start -p Iniciar:" \ --term "$t" \ - --wrapper="$wrapper" \ + --i3-ipc \ --no-generic end From dc734b6d62c7624cad55a587f3c290878582c810 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 24 May 2025 01:11:08 -0300 Subject: [PATCH 195/218] 25.05: fix firefox search engine names --- user/firefox.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user/firefox.nix b/user/firefox.nix index 29d7f07..3e5c9df 100644 --- a/user/firefox.nix +++ b/user/firefox.nix @@ -23,7 +23,7 @@ in dev-edition-default = { isDefault = true; search.force = true; - search.default = "DuckDuckGo"; + search.default = "ddg"; settings = { "devtools.theme" = "auto"; "toolkit.legacyUserProfileCustomizations.stylesheets" = true; From 2c70a0e7dec1f64488051586dc09846dbca6a340 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 24 May 2025 01:11:26 -0300 Subject: [PATCH 196/218] 25.05: mako use settings instead of extraConfig --- user/sway/mako.nix | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/user/sway/mako.nix b/user/sway/mako.nix index af6c673..28b5eb4 100644 --- a/user/sway/mako.nix +++ b/user/sway/mako.nix @@ -34,12 +34,13 @@ in defaultTimeout = 10000; - extraConfig = '' - [app-name=volumesh] - default-timeout=5000 - group-by=app-name - format=%s\n%b - ''; + settings = { + "app-name=volumesh" = { + "default-timeout" = "5000"; + "group-by" = "app-name"; + "format" = "%s\\n%b"; + }; + }; # # {{@@ header() @@}} # # text From fba64d38633230de8e3516e5acfc73e130efe6b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 24 May 2025 01:46:00 -0300 Subject: [PATCH 197/218] firefox: remove unused config --- user/firefox.nix | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/user/firefox.nix b/user/firefox.nix index 3e5c9df..1c891ae 100644 --- a/user/firefox.nix +++ b/user/firefox.nix @@ -1,18 +1,10 @@ { config, pkgs, - lib, ... }: let - inherit (config.my) desktop; inherit (config.my.theme) color; - - swayCustomization = '' - #titlebar { display: none !important; } - #TabsToolbar { display: none !important; } - #sidebar-header { display: none !important; } - ''; in { config = { @@ -27,7 +19,6 @@ in settings = { "devtools.theme" = "auto"; "toolkit.legacyUserProfileCustomizations.stylesheets" = true; - "browser.tabs.inTitlebar" = if desktop == "sway" then 0 else 1; "sidebar.position_start" = false; # Move sidebar to the right # enable media RDD to allow gpu acceleration @@ -57,8 +48,6 @@ in "devtools.debugger.remote-enabled" = true; }; userChrome = '' - ${lib.optionalString (desktop == "sway") swayCustomization} - #sidebar-main { background-color: ${color.bg}; } From 451aeb6725c2b24559b90d38ca653948c2b27a45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 24 May 2025 19:10:54 -0300 Subject: [PATCH 198/218] 25.05: firefox-devedition fix executable and .desktop name --- user/firefox.nix | 2 +- user/home.nix | 2 +- user/variables.nix | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/user/firefox.nix b/user/firefox.nix index 1c891ae..28ba913 100644 --- a/user/firefox.nix +++ b/user/firefox.nix @@ -61,7 +61,7 @@ in }; wayland.windowManager.sway = { extraConfig = '' - exec firefox + exec firefox-devedition ''; }; }; diff --git a/user/home.nix b/user/home.nix index 31e3871..334e260 100644 --- a/user/home.nix +++ b/user/home.nix @@ -152,7 +152,7 @@ text-editor = lib.mkDefault "kak.desktop"; image-viewer = lib.mkDefault "pqiv.desktop"; video-player = lib.mkDefault "mpv.desktop"; - web-browser = lib.mkDefault "firefox.desktop"; + web-browser = lib.mkDefault "firefox-devedition.desktop"; document-viewer = lib.mkDefault "org.pwmt.zathura.desktop"; file-manager = lib.mkDefault "thunar.desktop"; archive-manager = "engrampa.desktop"; diff --git a/user/variables.nix b/user/variables.nix index 84823d3..65bc69a 100644 --- a/user/variables.nix +++ b/user/variables.nix @@ -116,6 +116,6 @@ rec { dmenu = "bmenu"; desktop = "sway"; - browser = "firefox"; + browser = "firefox-devedition"; editor = "kakoune"; } From a4b900582aa71695bc628a1b063334c5e892af85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 24 May 2025 19:11:26 -0300 Subject: [PATCH 199/218] 25.05: fix nextcloud dbtype --- hosts/phantom/nextcloud.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosts/phantom/nextcloud.nix b/hosts/phantom/nextcloud.nix index a7ef9f3..28d76a1 100644 --- a/hosts/phantom/nextcloud.nix +++ b/hosts/phantom/nextcloud.nix @@ -1,7 +1,6 @@ { config, pkgs, - inputs, ... }: { @@ -11,6 +10,7 @@ hostName = "cloud.lelgenio.com"; https = true; config = { + dbtype = "sqlite"; # TODO: move to single postgres db adminpassFile = config.age.secrets.phantom-nextcloud.path; }; }; From 72ddcec77ef098c6204a951f1ef963c6f089e8d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 28 May 2025 00:07:44 -0300 Subject: [PATCH 200/218] monolith: add wopus gitlab runners --- secrets/monolith/default.yaml | 12 +++++------- system/gitlab-runner.nix | 6 ++++-- system/monolith-gitlab-runner.nix | 17 +++++++++++++++++ 3 files changed, 26 insertions(+), 9 deletions(-) diff --git a/secrets/monolith/default.yaml b/secrets/monolith/default.yaml index 8bd8e12..f354335 100644 --- a/secrets/monolith/default.yaml +++ b/secrets/monolith/default.yaml @@ -4,16 +4,14 @@ gitlab-runners: thoreb-telemetria-nix: ENC[AES256_GCM,data:zrZvG4be08ulpo7itbrprKK5csCMLvzZjrszfMw1XiJP0FyRTUd9nHgHpbAzbjj2KyT7kKngoZAyengvaTEhkT9sUi1pdGnvajAH8BDDOD0g4LJIHFl4,iv:3bSsTzU7gHx+MchuPg9kmb5xEDugmGPje8Jw74NpRJI=,tag:zffRr77lWbyLt7o/mywb5A==,type:str] thoreb-itinerario-nix: ENC[AES256_GCM,data:UdAAD0V895sFoEYR56sCG2LlpZugJ0K/nwkTygzWOnbTSmBRAcIQ8qVFPZGw+K+XMSLiCyio6Jp7k8AYP0K1VYm+6aEP3OkqR9FCLQTJgXo=,iv:UGUby50BYkn13OzItk6zZmxc5+SnbZZa4bebQHIow2A=,tag:LjDg3deWwdH2T71EtPo6jA==,type:str] docker-images-token: ENC[AES256_GCM,data:GGB/KSkjdAyhFKEspAh91ItbqEDf7K/LZSGSn+Jp7SxRfXpDzHIiMD8XJ9PTkGLeQGN4ug1i2nTYPS7d/P5OALWDU+1NPiV9nPdG0w7GERfu4g==,iv:6roabdOKX9xFMf0hWlECd73+943R+hFLos0e2dOpzns=,tag:LrASFc4DtN7aQ+3oOW/p/w==,type:str] + wopus-gitlab-nix: ENC[AES256_GCM,data:asE7J0d58x9VfQFWc07f5T4s5NZ+/VqMQo66EX93J0LbJ4iI5YjvrrIE4pSI1e4Nz/SRQhltaJ0DfSH0+qgjD4wnAONPRi3UlFbSdGWS2bwwRtWe+Nci2krrUFxV2i/ZVE3CwCkNe4mqtII=,iv:gKrD/LhzI+jnDnX6CdxoHfjpiRdrsuRYJF9rTc8SffM=,tag:TczDGSU3gdKmERjBJ7tP/A==,type:str] + wopus-gitlab-docker-images: ENC[AES256_GCM,data:aGbCjQr1VKgg5n4f8vZKgdXcDw/M5JHez9E2TqipBXQ8D0jXdfPg6laNOJUOD+uPBOIGKUBMEg4OtLblCZFVw/V6wJN16wVbwkDU3uELQ8tPmlYSt4fcy4+5sC6+tV4YeMSKA6yIjD+xpkk=,iv:ojBhf2WdkWHruvTbABAAvuGDVOnsUl+qnhvH09L+lgA=,tag:gWhEkvL1qlcge3bSKVDSIg==,type:str] bitbucket-runners: wopus-runner-1: ENC[AES256_GCM,data:gtH0T5n8qMYpvSv5ciN8+ScGlFDf9xE0FTxNP97vT/qsOCcaItTE+5P+DFcWw46onLED+1c+u0sArFbEsT3f8lyco9b+0l99uOQAxLZQzAXYH8zGye1UnwUtytkci2PHu5c8kTpIWHXyZ1IOYNGWkermeab57ANzOkM1LbkHyAjS6VTh0I60LfAOdHOw5FDFL8d1d9oWxLloOe9USLPqHjC023EpCUT2YuyHoPCTpBu8Kb/2HfV0wkAKaB3dvVrKwXCj+bfP6+bjQ3uMzVO/7jxPmnSGBfvyZ+Hlg5goJ6bSAqQWmnPPnQ96FgQfe8su5ML9qNIp9/7eNiL6Rv6Vhxe0hHbE5wsZ/58grcg/LrugeWJvUJ9THhwcTwO8Pkvwlq0XM9seUY2NV+LCK3bLQ4IWDjWkU1IHg6+nihTcvl1iD6UIGMgqGoB/v05WVzHb+GcE2fFuSuhVHfa5RMyboELOJoFrqZiXGhY=,iv:ZakLafxYQCDd1Zw8T83Xfj+YwAQKna9LC6ognJqtifA=,tag:bwBObfdMIvJfRrOG04NtxA==,type:str] wopus-runner-2: ENC[AES256_GCM,data:gg8merZMFbf396hdJY7zmKQndT3GzB7NeGZAs3C0au8Zd7OFAg9vcQcFcxNA3kZGJZqmFTR/ycWJwhYr9fhlfFuPhDynVvgJAqoYtvC2MUDiOMD/d3DlfwFjQ6cOGTrvFuY1kkgSFb4OFdrVC1eiTDrGygFmYnYcqTKn/t5Ttqi+cHZNzFzVzdVLvaLCYxltM5g45zn+fXYxYwCfqyb32/M1XTnnwIGiataGxEX5oWhVV4zqeLO4ZIYPSby5AVvIMJ/zqvqaeVVY52GLDcTKrj3thbZxMQLWN3/lOA0uYhi3L/WM8Gx+JMEIbSICcuT7QXu4w4PA+opcx9GnsMCK2/egzS+cNPJ4vGZCdVD/jh6A9zVEJAgXdsHXNXFHmMPt7DcgrCQiub62og4kBY4G/Rcg4UN7sb3v3qyBpGbCGHGRjCFc+wdHpom0yDOG2cwcqfN49pC2R7Ag2BisFQ/5A+DPmKnvGG3kt9s=,iv:5g5XiDecYqi4JNRkZubgPJECBQdZ6rBeojgFe6Etebk=,tag:HRy5bFSbfxKTb5e13lGtgg==,type:str] wopus-runner-3: ENC[AES256_GCM,data:f9pLYR8t51HtPpLyXysIVaDAhxDrmktJH93E7rb7imtKwK7hRhR8usnvHTcknLfD7BMvStAIYefdGt19u7PrQu6vqc19bEcNbnK5OH4KBP6+X47oMgBYtbIGXH+t3dSDt22fSIoppTwdX7/Kf4vqesfN8K7EunETvFR86oyyKdy15mvXr0XUO4us4HZjnIOBEnOm1P/V8hk5JcCpRuo+8ZYmBe5gzq5pTnqnYlPE1EovM7eDMg72J7ev07h50qvySrAqmNiqDcXfTPQ2TzuHx3XxAYqFybf1L6P9OnLB6RDAlpoFJ0h8dSg2tzC2+amYsBP0UIBK/ZhWvvAjpX+MZrTASjenh/tefDcNdbsXDOr7A4i/261z4rC0r+97INglCN1N/SZg51iBHiRAVV1zibDLfioR5+eBIykWAtjILMoYU+zOcr0E8K0I9jQGMtpnYmvHJqV0DVcdfZpJptrPUUy+lQ/iZVcPpLs=,iv:grzvVsfpUzywjNE4jvTxXKG3TYajrvSsQgfOgtafvIo=,tag:K1B6crN0ckLk0EYBtGHDkw==,type:str] wopus-runner-4: ENC[AES256_GCM,data:D1Zq0BtPuACnutAbUcj3gYSMLuIZcMuqc/1mEFmitEG0tBFMWhkabS+8lXcp8sb1DM0LTDMEwgMB9FVyFb670MKQNEncqQtaNJtY1BxS3SolovDAM/I+i6YGvd4X8jX99d+7ZNR6xGBWJ/dW8rz4QnIM8Eh3FDOqaFa/ltfyPKP9IZ2uZi67C/n8Q/OSdgMQkt+QxhgJfSghE1iruPwxyGlqv+E4SZNI/fQQMjX0Lh7z02ms58yyMtjO71YbukV/JXFRsdJrqY2wfH/6NlZbsKideoSxluBRVqmbW6KQd7dUT819KbOSu9CFdgThtVCU8qiv3jbAbn8D5xRy4AAOEfSqRLXJoj7otCqr47R/8+0BdS3aztFBjL3lDmprMWZ4+LD55fvczfpxUF9ox1mhcjIvCvZJJL06XsST1XRXa7i2fr4/a/XhCmQgIzar5IYxSC9OjuHp6jLsTaY3ZUgid5W1L1n8uWSmA98=,iv:O9caRG//brERiIhuMrsFdTz6TnPY0rdQnvHEu0P42yM=,tag:hrmwLX/CRhZfammJ2nfTPw==,type:str] sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] age: - recipient: age1zrgu7w8059xydagm60phnffghvfe9h2ca58cx8qwagqpyfuvs9fqw79c8h enc: | @@ -33,8 +31,8 @@ sops: aFVxcDFhaGdYekRWRVFIWnRsZndtZFkKgsvxOFHOcO306Z9FkucA1fDOpZA8N1/h jYmIgcKTFgWoSCvux67lK30jFsYp7sm5z6WxxDYsGcoQ/+pxoUX2jQ== -----END AGE ENCRYPTED FILE----- - lastmodified: "2025-03-07T21:28:04Z" - mac: ENC[AES256_GCM,data:4lOafZQ6PP38CByulzA/J86sw+TpQhj40s1lTRXqUtpt72yH8nQK8dXpw0dNYvDBtDpKRvNTHZubzalEua6n2lCQL7rsZ2+fo6FJ4ht2Kb70dddDcWEyrfyZQ2FaKC5L/QjqM0SbIfPszNvyQ8wIaOoMfNJBis5QOjRSGDAcJm8=,iv:LLT0oJW+3KNe1nKphCK0c5FPIuh8GfnDrvNDCFhP4NM=,tag:rPbVY7L1qxNc3aCfv77FAg==,type:str] + lastmodified: "2025-05-28T03:04:52Z" + mac: ENC[AES256_GCM,data:THwZcK7nJnCYEUR8CiaQKZ8dQpYbDqnshBBWFzEzPXEWLgFB9+7d6aRh9ZDjZs0rhBTChta3H7YxDJdFh5nAJQy532FJp4S4tBOLHWFZARlKhXngujd0SvxPER55uvxImNFIYX0RDSHUck5jDXCA0tBCmE/Q7DuY7v0+cmRgOV8=,iv:1p3kFMSg0k1n00P6UY5Tttuqvpsb4Se8km5zA9GhAu4=,tag:cDxbHZ+eScDQacwV1sYGIA==,type:str] pgp: - created_at: "2025-03-07T22:49:16Z" enc: |- @@ -52,4 +50,4 @@ sops: -----END PGP MESSAGE----- fp: 0FECE8316E74BA6F44EFC21A2F8F21CE8721456B unencrypted_suffix: _unencrypted - version: 3.9.4-unstable + version: 3.10.2 diff --git a/system/gitlab-runner.nix b/system/gitlab-runner.nix index c50e1b9..b998d17 100644 --- a/system/gitlab-runner.nix +++ b/system/gitlab-runner.nix @@ -1,18 +1,19 @@ { pkgs, lib, ... }: { mkNixRunner = - authenticationTokenConfigFile: with lib; rec { + authenticationTokenConfigFile: with lib; { # File should contain at least these two variables: # `CI_SERVER_URL` # `REGISTRATION_TOKEN` inherit authenticationTokenConfigFile; # 2 dockerImage = "alpine:3.18.2"; - dockerAllowedImages = [ dockerImage ]; dockerVolumes = [ "/etc/nix/nix.conf:/etc/nix/nix.conf:ro" "/nix/store:/nix/store:ro" "/nix/var/nix/db:/nix/var/nix/db:ro" "/nix/var/nix/daemon-socket:/nix/var/nix/daemon-socket:ro" + "/var/run/docker.sock:/var/run/docker.sock" + "/cache" ]; dockerDisableCache = true; preBuildScript = pkgs.writeScript "setup-container" '' @@ -36,6 +37,7 @@ cacert git openssh + docker ] ) } diff --git a/system/monolith-gitlab-runner.nix b/system/monolith-gitlab-runner.nix index 28a0ecd..dd80627 100644 --- a/system/monolith-gitlab-runner.nix +++ b/system/monolith-gitlab-runner.nix @@ -18,6 +18,8 @@ in thoreb-telemetria-nix = mkNixRunner config.sops.secrets."gitlab-runners/thoreb-telemetria-nix".path; thoreb-itinerario-nix = mkNixRunner config.sops.secrets."gitlab-runners/thoreb-itinerario-nix".path; + wopus-gitlab-nix = mkNixRunner config.sops.secrets."gitlab-runners/wopus-gitlab-nix".path; + default = { # File should contain at least these two variables: # `CI_SERVER_URL` @@ -25,6 +27,15 @@ in authenticationTokenConfigFile = config.sops.secrets."gitlab-runners/docker-images-token".path; dockerImage = "debian:stable"; }; + + wopus-gitlab-docker-images = { + # File should contain at least these two variables: + # `CI_SERVER_URL` + # `CI_SERVER_TOKEN` + authenticationTokenConfigFile = + config.sops.secrets."gitlab-runners/wopus-gitlab-docker-images".path; + dockerImage = "debian:stable"; + }; }; }; systemd.services.gitlab-runner.serviceConfig.Nice = 10; @@ -39,5 +50,11 @@ in "gitlab-runners/docker-images-token" = { sopsFile = ../secrets/monolith/default.yaml; }; + "gitlab-runners/wopus-gitlab-nix" = { + sopsFile = ../secrets/monolith/default.yaml; + }; + "gitlab-runners/wopus-gitlab-docker-images" = { + sopsFile = ../secrets/monolith/default.yaml; + }; }; } From 93c88db929bb1072b4b7cf16b2750bd72ba0a808 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 28 May 2025 11:45:38 -0300 Subject: [PATCH 201/218] home: don't set CARGO_HOME and RUSTUP_HOME This was causing issues with using different rust versions in different projects --- user/xdg-dirs.nix | 8 -------- 1 file changed, 8 deletions(-) diff --git a/user/xdg-dirs.nix b/user/xdg-dirs.nix index a9e1c9b..c4036c2 100644 --- a/user/xdg-dirs.nix +++ b/user/xdg-dirs.nix @@ -1,8 +1,5 @@ { config, - pkgs, - lib, - inputs, ... }: let @@ -24,9 +21,4 @@ in videos = "${HOME}/Vídeos"; }; }; - - home.sessionVariables = { - CARGO_HOME = "${config.xdg.dataHome}/cargo"; - RUSTUP_HOME = "${config.xdg.dataHome}/rustup"; - }; } From 53a3cb0a0eb245c25aaa4df1900ea84c7a1b9f53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 28 May 2025 20:56:59 -0300 Subject: [PATCH 202/218] monolith: fix gitlab-runner config to not override PATH --- system/gitlab-runner.nix | 100 ++++++++++++++++++++------------------- 1 file changed, 51 insertions(+), 49 deletions(-) diff --git a/system/gitlab-runner.nix b/system/gitlab-runner.nix index b998d17..e450b5e 100644 --- a/system/gitlab-runner.nix +++ b/system/gitlab-runner.nix @@ -1,53 +1,55 @@ { pkgs, lib, ... }: +let + installNixScript = pkgs.writeScriptBin "install-nix" '' + mkdir -p -m 0755 /nix/var/log/nix/drvs + mkdir -p -m 0755 /nix/var/nix/gcroots + mkdir -p -m 0755 /nix/var/nix/profiles + mkdir -p -m 0755 /nix/var/nix/temproots + mkdir -p -m 0755 /nix/var/nix/userpool + mkdir -p -m 1777 /nix/var/nix/gcroots/per-user + mkdir -p -m 1777 /nix/var/nix/profiles/per-user + mkdir -p -m 0755 /nix/var/nix/profiles/per-user/root + mkdir -p -m 0700 "$HOME/.nix-defexpr" + + . ${pkgs.nix}/etc/profile.d/nix.sh + + ${pkgs.nix}/bin/nix-env -i ${ + lib.concatStringsSep " " ( + with pkgs; + [ + nix + cacert + git + openssh + docker + ] + ) + } + ''; +in { - mkNixRunner = - authenticationTokenConfigFile: with lib; { - # File should contain at least these two variables: - # `CI_SERVER_URL` - # `REGISTRATION_TOKEN` - inherit authenticationTokenConfigFile; # 2 - dockerImage = "alpine:3.18.2"; - dockerVolumes = [ - "/etc/nix/nix.conf:/etc/nix/nix.conf:ro" - "/nix/store:/nix/store:ro" - "/nix/var/nix/db:/nix/var/nix/db:ro" - "/nix/var/nix/daemon-socket:/nix/var/nix/daemon-socket:ro" - "/var/run/docker.sock:/var/run/docker.sock" - "/cache" - ]; - dockerDisableCache = true; - preBuildScript = pkgs.writeScript "setup-container" '' - mkdir -p -m 0755 /nix/var/log/nix/drvs - mkdir -p -m 0755 /nix/var/nix/gcroots - mkdir -p -m 0755 /nix/var/nix/profiles - mkdir -p -m 0755 /nix/var/nix/temproots - mkdir -p -m 0755 /nix/var/nix/userpool - mkdir -p -m 1777 /nix/var/nix/gcroots/per-user - mkdir -p -m 1777 /nix/var/nix/profiles/per-user - mkdir -p -m 0755 /nix/var/nix/profiles/per-user/root - mkdir -p -m 0700 "$HOME/.nix-defexpr" - - . ${pkgs.nix}/etc/profile.d/nix.sh - - ${pkgs.nix}/bin/nix-env -i ${ - concatStringsSep " " ( - with pkgs; - [ - nix - cacert - git - openssh - docker - ] - ) - } - ''; - environmentVariables = { - ENV = "/etc/profile"; - USER = "root"; - NIX_REMOTE = "daemon"; - PATH = "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:/bin:/sbin:/usr/bin:/usr/sbin"; - NIX_SSL_CERT_FILE = "/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt"; - }; + mkNixRunner = authenticationTokenConfigFile: { + # File should contain at least these two variables: + # `CI_SERVER_URL` + # `REGISTRATION_TOKEN` + inherit authenticationTokenConfigFile; # 2 + dockerImage = "alpine:3.18.2"; + dockerVolumes = [ + "/etc/nix/nix.conf:/etc/nix/nix.conf:ro" + "/nix/store:/nix/store:ro" + "/nix/var/nix/db:/nix/var/nix/db:ro" + "/nix/var/nix/daemon-socket:/nix/var/nix/daemon-socket:ro" + "/tmp:/tmp" + "/var/run/docker.sock:/var/run/docker.sock" + "/var/lib/docker/containers:/var/lib/docker/containers" + "/cache" + ]; + preBuildScript = "\". ${lib.getExe installNixScript}\""; + environmentVariables = { + ENV = "/etc/profile"; + USER = "root"; + NIX_REMOTE = "daemon"; + NIX_SSL_CERT_FILE = "/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt"; }; + }; } From 218d32153f794affb95996f77bae6455a58bf5d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 28 May 2025 23:29:28 -0300 Subject: [PATCH 203/218] Revert "firefox: remove pinned extensions" This reverts commit 6102f2283a3c624d97fb752c8d6125c8cf89d665. --- user/firefox.nix | 77 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 76 insertions(+), 1 deletion(-) diff --git a/user/firefox.nix b/user/firefox.nix index 28ba913..0403a14 100644 --- a/user/firefox.nix +++ b/user/firefox.nix @@ -5,12 +5,85 @@ }: let inherit (config.my.theme) color; + + bugfixedFirefox = pkgs.firefox-devedition-unwrapped // { + requireSigning = false; + allowAddonSideload = true; + }; in { config = { programs.firefox = { enable = true; - package = pkgs.firefox-devedition; + package = pkgs.wrapFirefox bugfixedFirefox { + nixExtensions = [ + (pkgs.fetchFirefoxAddon { + name = "darkreader"; + url = "https://addons.mozilla.org/firefox/downloads/file/4205543/darkreader-4.9.73.xpi"; + hash = "sha256-fDmf8yVhiGu4Da0Mr6+PYpeSsLcf8e/PEmZ+BaKzjxo="; + }) + (pkgs.fetchFirefoxAddon { + name = "sponsorblock"; + url = "https://addons.mozilla.org/firefox/downloads/file/4202411/sponsorblock-5.4.29.xpi"; + hash = "sha256-7Xqc8cyQNylMe5/dgDOx1f2QDVmz3JshDlTueu6AcSg="; + }) + # (pkgs.fetchFirefoxAddon { + # name = "tree-style-tab"; + # url = "https://addons.mozilla.org/firefox/downloads/file/4197314/tree_style_tab-3.9.19.xpi"; + # hash = "sha256-u2f0elVPj5N/QXa+5hRJResPJAYwuT9z0s/0nwmFtVo="; + # }) + (pkgs.fetchFirefoxAddon { + name = "ublock-origin"; + url = "https://addons.mozilla.org/firefox/downloads/file/4290466/ublock_origin-1.58.0.xpi"; + hash = "sha256-RwxWmUpxdNshV4rc5ZixWKXcCXDIfFz+iJrGMr0wheo="; + }) + (pkgs.fetchFirefoxAddon { + name = "user_agent_string_switcher"; + url = "https://addons.mozilla.org/firefox/downloads/file/4098688/user_agent_string_switcher-0.5.0.xpi"; + hash = "sha256-ncjaPIxG1PBNEv14nGNQH6ai9QL4WbKGk5oJDbY+rjM="; + }) + + (pkgs.fetchFirefoxAddon { + name = "i-still-dont-care-about-cookies"; + url = "https://github.com/OhMyGuus/I-Still-Dont-Care-About-Cookies/releases/download/v1.1.4/istilldontcareaboutcookies-1.1.4.xpi"; + hash = "sha256-yt6yRiLTuaK4K/QwgkL9gCVGsSa7ndFOHqZvKqIGZ5U="; + }) + + (pkgs.fetchFirefoxAddon { + name = "vimium_ff"; + url = "https://addons.mozilla.org/firefox/downloads/file/4191523/vimium_ff-2.0.6.xpi"; + hash = "sha256-lKLX6IWWtliRdH1Ig33rVEB4DVfbeuMw0dfUPV/mSSI="; + }) + (pkgs.fetchFirefoxAddon { + name = "unhook"; + url = "https://addons.mozilla.org/firefox/downloads/file/4263531/youtube_recommended_videos-1.6.7.xpi"; + hash = "sha256-u21ouN9IyOzkTkFSeDz+QBp9psJ1F2Nmsvqp6nh0DRU="; + }) + # (pkgs.fetchFirefoxAddon { + # name = "invidious_redirect"; + # url = "https://addons.mozilla.org/firefox/downloads/file/4292924/invidious_redirect_2-1.16.xpi"; + # hash = "sha256-ApCc+MNmW9Wd/5seV6npePQVEaszT/rhD9EB7HGiUb8="; + # }) + + (pkgs.fetchFirefoxAddon { + name = "substitoot"; + url = "https://addons.mozilla.org/firefox/downloads/file/4236602/substitoot-0.7.2.0.xpi"; + hash = "sha256-1auSqEjkebwRSbmAVUsYwy77dl7TQCOnqgozpoVnqgI="; + }) + + # Locale + (pkgs.fetchFirefoxAddon { + name = "firefox_br"; + url = "https://addons.mozilla.org/firefox/downloads/file/4144369/firefox_br-115.0.20230726.201356.xpi"; + hash = "sha256-8zkqfdW0lX0b62+gAJeq4FFlQ06nXGFAexpH+wg2Cr0="; + }) + (pkgs.fetchFirefoxAddon { + name = "corretor"; + url = "https://addons.mozilla.org/firefox/downloads/file/1176165/corretor-65.2018.12.8.xpi"; + hash = "sha256-/rFQtJHdgemMkGAd+KWuWxVA/BwSIkn6sk0XZE0LrGk="; + }) + ]; + }; profiles = { dev-edition-default = { isDefault = true; @@ -21,6 +94,8 @@ in "toolkit.legacyUserProfileCustomizations.stylesheets" = true; "sidebar.position_start" = false; # Move sidebar to the right + "browser.tabs.groups.enabled" = true; + # enable media RDD to allow gpu acceleration "media.rdd-ffmpeg.enabled" = true; "media.rdd-ffvpx.enabled" = true; From 1d7c1bf0e9762b3919a5fb3d1491c51f566287bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 30 May 2025 01:31:19 -0300 Subject: [PATCH 204/218] monolith: switch to kyber io scheduler --- hosts/monolith/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosts/monolith/default.nix b/hosts/monolith/default.nix index 280cc3f..753047a 100644 --- a/hosts/monolith/default.nix +++ b/hosts/monolith/default.nix @@ -144,7 +144,7 @@ in ACTION=="add" SUBSYSTEM=="usb" ATTR{idVendor}=="046d" ATTR{idProduct}=="c547" ATTR{power/wakeup}="disabled" # Force all disks to use mq-deadline scheduler # For some reason "noop" is used by default which is kinda bad when io is saturated - ACTION=="add|change", KERNEL=="sd[a-z]*[0-9]*|mmcblk[0-9]*p[0-9]*|nvme[0-9]*n[0-9]*p[0-9]*", ATTR{../queue/scheduler}="mq-deadline" + ACTION=="add|change", KERNEL=="sd[a-z]*[0-9]*|mmcblk[0-9]*p[0-9]*|nvme[0-9]*n[0-9]*p[0-9]*", ATTR{../queue/scheduler}="kyber" ''; boot.tmp = { From 22dc422b6308e54973c3fa33a70ba39cd0096e6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 30 May 2025 17:05:29 -0300 Subject: [PATCH 205/218] gitlab-runner: fix broken cache config --- system/gitlab-runner.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/gitlab-runner.nix b/system/gitlab-runner.nix index e450b5e..8db526f 100644 --- a/system/gitlab-runner.nix +++ b/system/gitlab-runner.nix @@ -42,8 +42,8 @@ in "/tmp:/tmp" "/var/run/docker.sock:/var/run/docker.sock" "/var/lib/docker/containers:/var/lib/docker/containers" - "/cache" ]; + dockerDisableCache = true; preBuildScript = "\". ${lib.getExe installNixScript}\""; environmentVariables = { ENV = "/etc/profile"; From 51fd376c1bbe0124f9d5c41485ded91a718d77d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 4 Jun 2025 00:18:23 -0300 Subject: [PATCH 206/218] kak: add formatter for tsx and jsx --- user/kakoune/filetypes.kak | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/user/kakoune/filetypes.kak b/user/kakoune/filetypes.kak index 9fa33a6..b9d19f5 100644 --- a/user/kakoune/filetypes.kak +++ b/user/kakoune/filetypes.kak @@ -46,10 +46,18 @@ hook global BufCreate .*\.js %{ set buffer formatcmd "prettier --stdin-filepath=%val{buffile}" } +hook global BufCreate .*\.jsx %{ + set buffer formatcmd "prettier --stdin-filepath=%val{buffile}" +} + hook global BufCreate .*\.ts %{ set buffer formatcmd "prettier --stdin-filepath=%val{buffile}" } +hook global BufCreate .*\.tsx %{ + set buffer formatcmd "prettier --stdin-filepath=%val{buffile}" +} + hook global BufCreate .*\.scss %{ set buffer formatcmd "prettier --stdin-filepath=%val{buffile}" } From 61040aa0a76b4fd9a8ee3e9b457f6cc87c20090c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Mon, 16 Jun 2025 00:04:32 -0300 Subject: [PATCH 207/218] firefox: update ublock --- user/firefox.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user/firefox.nix b/user/firefox.nix index 0403a14..d15e569 100644 --- a/user/firefox.nix +++ b/user/firefox.nix @@ -34,8 +34,8 @@ in # }) (pkgs.fetchFirefoxAddon { name = "ublock-origin"; - url = "https://addons.mozilla.org/firefox/downloads/file/4290466/ublock_origin-1.58.0.xpi"; - hash = "sha256-RwxWmUpxdNshV4rc5ZixWKXcCXDIfFz+iJrGMr0wheo="; + url = "https://addons.mozilla.org/firefox/downloads/file/4492375/ublock_origin-1.64.0.xpi"; + hash = "sha256-ueHIaL0awd78q/LgF3bRqQ7/ujSwf+aiE1DUXwIuDp8="; }) (pkgs.fetchFirefoxAddon { name = "user_agent_string_switcher"; From 6f4642531c946c3a1e2be51db5c543610492e352 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Mon, 16 Jun 2025 00:41:58 -0300 Subject: [PATCH 208/218] update --- flake.lock | 66 +++++++++++++++++++++++++++--------------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/flake.lock b/flake.lock index 78b8ed1..6e77084 100644 --- a/flake.lock +++ b/flake.lock @@ -225,11 +225,11 @@ ] }, "locked": { - "lastModified": 1747742835, - "narHash": "sha256-kYL4GCwwznsypvsnA20oyvW8zB/Dvn6K5G/tgMjVMT4=", + "lastModified": 1749436314, + "narHash": "sha256-CqmqU5FRg5AadtIkxwu8ulDSOSoIisUMZRLlcED3Q5w=", "owner": "nix-community", "repo": "disko", - "rev": "df522e787fdffc4f32ed3e1fca9ed0968a384d62", + "rev": "dfa4d1b9c39c0342ef133795127a3af14598017a", "type": "github" }, "original": { @@ -243,11 +243,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1742179690, - "narHash": "sha256-s/q3OWRe5m7kwDcAs1BhJEj6aHc5bsBxRnLP7DM77xE=", + "lastModified": 1749410315, + "narHash": "sha256-5H8MuMMSq1WnQcvb1FiDNkKP+uyeZ8HX5GRTMfEOyLI=", "owner": "lelgenio", "repo": "dzgui-nix", - "rev": "a6d68720c932ac26d549b24f17c776bd2aeb73b4", + "rev": "49adbb1edfb3c25b0cd8256d35673394386065e7", "type": "github" }, "original": { @@ -504,11 +504,11 @@ ] }, "locked": { - "lastModified": 1747556831, - "narHash": "sha256-Qb84nbYFFk0DzFeqVoHltS2RodAYY5/HZQKE8WnBDsc=", + "lastModified": 1749154018, + "narHash": "sha256-gjN3j7joRvT3a8Zgcylnd4NFsnXeDBumqiu4HmY1RIg=", "owner": "nix-community", "repo": "home-manager", - "rev": "d0bbd221482c2713cccb80220f3c9d16a6e20a33", + "rev": "7aae0ee71a17b19708b93b3ed448a1a0952bf111", "type": "github" }, "original": { @@ -545,11 +545,11 @@ ] }, "locked": { - "lastModified": 1747540584, - "narHash": "sha256-cxCQ413JTUuRv9Ygd8DABJ1D6kuB/nTfQqC0Lu9C0ls=", + "lastModified": 1749355504, + "narHash": "sha256-L17CdJMD+/FCBOHjREQLXbe2VUnc3rjffenBbu2Kwpc=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "ec179dd13fb7b4c6844f55be91436f7857226dce", + "rev": "40a6e15e44b11fbf8f2b1df9d64dbfc117625e94", "type": "github" }, "original": { @@ -617,11 +617,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1747744144, - "narHash": "sha256-W7lqHp0qZiENCDwUZ5EX/lNhxjMdNapFnbErcbnP11Q=", + "lastModified": 1749285348, + "narHash": "sha256-frdhQvPbmDYaScPFiCnfdh3B/Vh81Uuoo0w5TkWmmjU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "2795c506fe8fb7b03c36ccb51f75b6df0ab2553f", + "rev": "3e3afe5174c561dee0df6f2c2b2236990146329f", "type": "github" }, "original": { @@ -678,11 +678,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1747953325, - "narHash": "sha256-y2ZtlIlNTuVJUZCqzZAhIw5rrKP4DOSklev6c8PyCkQ=", + "lastModified": 1749727998, + "narHash": "sha256-mHv/yeUbmL91/TvV95p+mBVahm9mdQMJoqaTVTALaFw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "55d1f923c480dadce40f5231feb472e81b0bab48", + "rev": "fd487183437963a59ba763c0cc4f27e3447dd6dd", "type": "github" }, "original": { @@ -693,11 +693,11 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1745377448, - "narHash": "sha256-jhZDfXVKdD7TSEGgzFJQvEEZ2K65UMiqW5YJ2aIqxMA=", + "lastModified": 1747958103, + "narHash": "sha256-qmmFCrfBwSHoWw7cVK4Aj+fns+c54EBP8cGqp/yK410=", "owner": "nixos", "repo": "nixpkgs", - "rev": "507b63021ada5fee621b6ca371c4fca9ca46f52c", + "rev": "fe51d34885f7b5e3e7b59572796e1bcb427eccb1", "type": "github" }, "original": { @@ -758,11 +758,11 @@ "ranger-icons": { "flake": false, "locked": { - "lastModified": 1736375293, - "narHash": "sha256-ck53eG+mGIQ706sUnEHbJ6vY1/LYnRcpq94JXzwnGTQ=", + "lastModified": 1749128401, + "narHash": "sha256-qvWqKVS4C5OO6bgETBlVDwcv4eamGlCUltjsBU3gAbA=", "owner": "alexanderjeurissen", "repo": "ranger_devicons", - "rev": "f227f212e14996fbb366f945ec3ecaf5dc5f44b0", + "rev": "1bcaff0366a9d345313dc5af14002cfdcddabb82", "type": "github" }, "original": { @@ -850,11 +850,11 @@ ] }, "locked": { - "lastModified": 1747603214, - "narHash": "sha256-lAblXm0VwifYCJ/ILPXJwlz0qNY07DDYdLD+9H+Wc8o=", + "lastModified": 1749592509, + "narHash": "sha256-VunQzfZFA+Y6x3wYi2UE4DEQ8qKoAZZCnZPUlSoqC+A=", "owner": "Mic92", "repo": "sops-nix", - "rev": "8d215e1c981be3aa37e47aeabd4e61bb069548fd", + "rev": "50754dfaa0e24e313c626900d44ef431f3210138", "type": "github" }, "original": { @@ -1010,11 +1010,11 @@ "nixpkgs": "nixpkgs_6" }, "locked": { - "lastModified": 1747912973, - "narHash": "sha256-XgxghfND8TDypxsMTPU2GQdtBEsHTEc3qWE6RVEk8O0=", + "lastModified": 1749194973, + "narHash": "sha256-eEy8cuS0mZ2j/r/FE0/LYBSBcIs/MKOIVakwHVuqTfk=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "020cb423808365fa3f10ff4cb8c0a25df35065a3", + "rev": "a05be418a1af1198ca0f63facb13c985db4cb3c5", "type": "github" }, "original": { @@ -1025,11 +1025,11 @@ }, "vpsadminos": { "locked": { - "lastModified": 1748016252, - "narHash": "sha256-P/h9BTZv6r5br/MKkXyEdUdDTU446UaAZzGLQMCMSIw=", + "lastModified": 1749716966, + "narHash": "sha256-aF+YOXv07qI7Q267gqapUcAsoQkI3+EcmZczatq6wkg=", "owner": "vpsfreecz", "repo": "vpsadminos", - "rev": "4756a2ecc603c347e3d983663d663e96f22225a9", + "rev": "2d991bb5109350801a381bff097809b76ee962f5", "type": "github" }, "original": { From 96e9fd098f0734e11292abca05a655c35979f363 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Mon, 16 Jun 2025 00:05:13 -0300 Subject: [PATCH 209/218] monolith: remove docker-images gitlab runner --- secrets/monolith/default.yaml | 5 ++--- system/monolith-gitlab-runner.nix | 12 ------------ 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/secrets/monolith/default.yaml b/secrets/monolith/default.yaml index f354335..5ca1383 100644 --- a/secrets/monolith/default.yaml +++ b/secrets/monolith/default.yaml @@ -5,7 +5,6 @@ gitlab-runners: thoreb-itinerario-nix: ENC[AES256_GCM,data:UdAAD0V895sFoEYR56sCG2LlpZugJ0K/nwkTygzWOnbTSmBRAcIQ8qVFPZGw+K+XMSLiCyio6Jp7k8AYP0K1VYm+6aEP3OkqR9FCLQTJgXo=,iv:UGUby50BYkn13OzItk6zZmxc5+SnbZZa4bebQHIow2A=,tag:LjDg3deWwdH2T71EtPo6jA==,type:str] docker-images-token: ENC[AES256_GCM,data:GGB/KSkjdAyhFKEspAh91ItbqEDf7K/LZSGSn+Jp7SxRfXpDzHIiMD8XJ9PTkGLeQGN4ug1i2nTYPS7d/P5OALWDU+1NPiV9nPdG0w7GERfu4g==,iv:6roabdOKX9xFMf0hWlECd73+943R+hFLos0e2dOpzns=,tag:LrASFc4DtN7aQ+3oOW/p/w==,type:str] wopus-gitlab-nix: ENC[AES256_GCM,data:asE7J0d58x9VfQFWc07f5T4s5NZ+/VqMQo66EX93J0LbJ4iI5YjvrrIE4pSI1e4Nz/SRQhltaJ0DfSH0+qgjD4wnAONPRi3UlFbSdGWS2bwwRtWe+Nci2krrUFxV2i/ZVE3CwCkNe4mqtII=,iv:gKrD/LhzI+jnDnX6CdxoHfjpiRdrsuRYJF9rTc8SffM=,tag:TczDGSU3gdKmERjBJ7tP/A==,type:str] - wopus-gitlab-docker-images: ENC[AES256_GCM,data:aGbCjQr1VKgg5n4f8vZKgdXcDw/M5JHez9E2TqipBXQ8D0jXdfPg6laNOJUOD+uPBOIGKUBMEg4OtLblCZFVw/V6wJN16wVbwkDU3uELQ8tPmlYSt4fcy4+5sC6+tV4YeMSKA6yIjD+xpkk=,iv:ojBhf2WdkWHruvTbABAAvuGDVOnsUl+qnhvH09L+lgA=,tag:gWhEkvL1qlcge3bSKVDSIg==,type:str] bitbucket-runners: wopus-runner-1: ENC[AES256_GCM,data:gtH0T5n8qMYpvSv5ciN8+ScGlFDf9xE0FTxNP97vT/qsOCcaItTE+5P+DFcWw46onLED+1c+u0sArFbEsT3f8lyco9b+0l99uOQAxLZQzAXYH8zGye1UnwUtytkci2PHu5c8kTpIWHXyZ1IOYNGWkermeab57ANzOkM1LbkHyAjS6VTh0I60LfAOdHOw5FDFL8d1d9oWxLloOe9USLPqHjC023EpCUT2YuyHoPCTpBu8Kb/2HfV0wkAKaB3dvVrKwXCj+bfP6+bjQ3uMzVO/7jxPmnSGBfvyZ+Hlg5goJ6bSAqQWmnPPnQ96FgQfe8su5ML9qNIp9/7eNiL6Rv6Vhxe0hHbE5wsZ/58grcg/LrugeWJvUJ9THhwcTwO8Pkvwlq0XM9seUY2NV+LCK3bLQ4IWDjWkU1IHg6+nihTcvl1iD6UIGMgqGoB/v05WVzHb+GcE2fFuSuhVHfa5RMyboELOJoFrqZiXGhY=,iv:ZakLafxYQCDd1Zw8T83Xfj+YwAQKna9LC6ognJqtifA=,tag:bwBObfdMIvJfRrOG04NtxA==,type:str] wopus-runner-2: ENC[AES256_GCM,data:gg8merZMFbf396hdJY7zmKQndT3GzB7NeGZAs3C0au8Zd7OFAg9vcQcFcxNA3kZGJZqmFTR/ycWJwhYr9fhlfFuPhDynVvgJAqoYtvC2MUDiOMD/d3DlfwFjQ6cOGTrvFuY1kkgSFb4OFdrVC1eiTDrGygFmYnYcqTKn/t5Ttqi+cHZNzFzVzdVLvaLCYxltM5g45zn+fXYxYwCfqyb32/M1XTnnwIGiataGxEX5oWhVV4zqeLO4ZIYPSby5AVvIMJ/zqvqaeVVY52GLDcTKrj3thbZxMQLWN3/lOA0uYhi3L/WM8Gx+JMEIbSICcuT7QXu4w4PA+opcx9GnsMCK2/egzS+cNPJ4vGZCdVD/jh6A9zVEJAgXdsHXNXFHmMPt7DcgrCQiub62og4kBY4G/Rcg4UN7sb3v3qyBpGbCGHGRjCFc+wdHpom0yDOG2cwcqfN49pC2R7Ag2BisFQ/5A+DPmKnvGG3kt9s=,iv:5g5XiDecYqi4JNRkZubgPJECBQdZ6rBeojgFe6Etebk=,tag:HRy5bFSbfxKTb5e13lGtgg==,type:str] @@ -31,8 +30,8 @@ sops: aFVxcDFhaGdYekRWRVFIWnRsZndtZFkKgsvxOFHOcO306Z9FkucA1fDOpZA8N1/h jYmIgcKTFgWoSCvux67lK30jFsYp7sm5z6WxxDYsGcoQ/+pxoUX2jQ== -----END AGE ENCRYPTED FILE----- - lastmodified: "2025-05-28T03:04:52Z" - mac: ENC[AES256_GCM,data:THwZcK7nJnCYEUR8CiaQKZ8dQpYbDqnshBBWFzEzPXEWLgFB9+7d6aRh9ZDjZs0rhBTChta3H7YxDJdFh5nAJQy532FJp4S4tBOLHWFZARlKhXngujd0SvxPER55uvxImNFIYX0RDSHUck5jDXCA0tBCmE/Q7DuY7v0+cmRgOV8=,iv:1p3kFMSg0k1n00P6UY5Tttuqvpsb4Se8km5zA9GhAu4=,tag:cDxbHZ+eScDQacwV1sYGIA==,type:str] + lastmodified: "2025-06-16T13:05:35Z" + mac: ENC[AES256_GCM,data:i8HOA7JSVSkxpoXJpFYrENodySyEEupYLNjuezRpd+PQWmxE7igonFyweUblmkSyBgy1FpmN+llwoP0Cokka5QyJse9jq9hR6dFATpZC9qPzSlAb+RpdSzp4QXjryOzP/23RJ7WhhBOC2DRw8OkDBPDJINBnCtu1ticpiuXKoHs=,iv:WEEdZDbrrkhip0ZkpqQfg6fwV+OzP/bBBrExyvOhqng=,tag:6iLMsJtenKdU/lJU/+HnCg==,type:str] pgp: - created_at: "2025-03-07T22:49:16Z" enc: |- diff --git a/system/monolith-gitlab-runner.nix b/system/monolith-gitlab-runner.nix index dd80627..6f1f7b3 100644 --- a/system/monolith-gitlab-runner.nix +++ b/system/monolith-gitlab-runner.nix @@ -27,15 +27,6 @@ in authenticationTokenConfigFile = config.sops.secrets."gitlab-runners/docker-images-token".path; dockerImage = "debian:stable"; }; - - wopus-gitlab-docker-images = { - # File should contain at least these two variables: - # `CI_SERVER_URL` - # `CI_SERVER_TOKEN` - authenticationTokenConfigFile = - config.sops.secrets."gitlab-runners/wopus-gitlab-docker-images".path; - dockerImage = "debian:stable"; - }; }; }; systemd.services.gitlab-runner.serviceConfig.Nice = 10; @@ -53,8 +44,5 @@ in "gitlab-runners/wopus-gitlab-nix" = { sopsFile = ../secrets/monolith/default.yaml; }; - "gitlab-runners/wopus-gitlab-docker-images" = { - sopsFile = ../secrets/monolith/default.yaml; - }; }; } From ffe90ab90d9a395d6b837c86070de6ef31a6e497 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Mon, 16 Jun 2025 13:03:20 -0300 Subject: [PATCH 210/218] kak: work around for rust-analyzer currupting ~/.cargo --- user/kakoune/kak-lsp.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/user/kakoune/kak-lsp.toml b/user/kakoune/kak-lsp.toml index 9c195bd..818c737 100644 --- a/user/kakoune/kak-lsp.toml +++ b/user/kakoune/kak-lsp.toml @@ -135,6 +135,7 @@ args = [ [language_server.rust-analyzer.settings.rust-analyzer] # See https://rust-analyzer.github.io/manual.html#configuration # cargo.features = [] +cargo.buildScripts.useRustcWrapper = false checkOnSave.command = "clippy" hoverActions.enable = false # kak-lsp doesn't support this at the moment From f410503e669729aac9096c08c5fcee24c2ea825a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sun, 22 Jun 2025 21:55:46 -0300 Subject: [PATCH 211/218] phantom: add support for managing email filters (managesieve) --- hosts/phantom/email.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hosts/phantom/email.nix b/hosts/phantom/email.nix index 1951629..105113b 100644 --- a/hosts/phantom/email.nix +++ b/hosts/phantom/email.nix @@ -36,6 +36,8 @@ hashedPassword = "$2b$05$DcA9xMdvHqqQMZw2.zybI.vfKsQAJtaQ/JB.t9AHu6psstWq97m2C"; }; }; + + enableManageSieve = true; }; # Prefer ipv4 and use main ipv6 to avoid reverse DNS issues @@ -52,7 +54,7 @@ $config['smtp_host'] = "tls://${config.mailserver.fqdn}:587"; $config['smtp_user'] = "%u"; $config['smtp_pass'] = "%p"; - $config['plugins'] = [ "carddav", "archive" ]; + $config['plugins'] = [ "carddav", "archive", "managesieve" ]; ''; }; } From 0fa0d0b7a92b3bd1d95d5f52d9982a3ae90455fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sun, 22 Jun 2025 23:56:09 -0300 Subject: [PATCH 212/218] satty: add config --- user/home.nix | 1 + user/satty/config.toml | 63 ++++++++++++++++++++++++++++++++++++++++ user/satty/default.nix | 22 ++++++++++++++ user/sway/default.nix | 1 + user/sway/sway-binds.nix | 2 +- 5 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 user/satty/config.toml create mode 100644 user/satty/default.nix diff --git a/user/home.nix b/user/home.nix index 334e260..1778052 100644 --- a/user/home.nix +++ b/user/home.nix @@ -36,6 +36,7 @@ ./pass.nix ./pqiv.nix ./zathura.nix + ./satty ./man.nix ./mpd.nix ./sway diff --git a/user/satty/config.toml b/user/satty/config.toml new file mode 100644 index 0000000..84075cb --- /dev/null +++ b/user/satty/config.toml @@ -0,0 +1,63 @@ +[general] +# Start Satty in fullscreen mode +fullscreen = true +# Exit directly after copy/save action +early-exit = true +# Draw corners of rectangles round if the value is greater than 0 (0 disables rounded corners) +corner-roundness = 12 +# Select the tool on startup [possible values: pointer, crop, line, arrow, rectangle, text, marker, blur, brush] +initial-tool = "brush" +# Configure the command to be called on copy, for example `wl-copy` +copy-command = "wl-copy" +# Increase or decrease the size of the annotations +# annotation-size-factor = 2 +# Filename to use for saving action. Omit to disable saving to file. Might contain format specifiers: https://docs.rs/chrono/latest/chrono/format/strftime/index.html +# output-filename = "/tmp/test-%Y-%m-%d_%H:%M:%S.png" +# After copying the screenshot, save it to a file as well +# save-after-copy = false +# Hide toolbars by default +# default-hide-toolbars = false +# Experimental: whether window focus shows/hides toolbars. This does not affect initial state of toolbars, see default-hide-toolbars. +# focus-toggles-toolbars = false +# The primary highlighter to use, the other is accessible by holding CTRL at the start of a highlight [possible values: block, freehand] +primary-highlighter = "block" +# Disable notifications +disable-notifications = true +# Actions to trigger on right click (order is important) +# [possible values: save-to-clipboard, save-to-file, exit] +# actions-on-right-click = [] +# Actions to trigger on Enter key (order is important) +# [possible values: save-to-clipboard, save-to-file, exit] +# actions-on-enter = ["save-to-clipboard"] +# Actions to trigger on Escape key (order is important) +# [possible values: save-to-clipboard, save-to-file, exit] +# actions-on-escape = ["exit"] +# Action to perform when the Enter key is pressed [possible values: save-to-clipboard, save-to-file] +# Deprecated: use actions-on-enter instead +action-on-enter = "save-to-clipboard" +# Right click to copy +# Deprecated: use actions-on-right-click instead +# right-click-copy = false +# request no window decoration. Please note that the compositor has the final say in this. At this point. requires xdg-decoration-unstable-v1. +# no-window-decoration = true +# experimental feature: adjust history size for brush input smooting (0: disabled, default: 0, try e.g. 5 or 10) +# brush-smooth-history-size = 10 + +# Font to use for text annotations +[font] +family = "Roboto" +style = "Bold" + +# Custom colours for the colour palette +[color-palette] +# These will be shown in the toolbar for quick selection +palette = [ + "#ff0000", + "#00ffff", + "#a52a2a", + "#dc143c", + "#ff1493", + "#ffd700", + "#008000", +] + diff --git a/user/satty/default.nix b/user/satty/default.nix new file mode 100644 index 0000000..5709b77 --- /dev/null +++ b/user/satty/default.nix @@ -0,0 +1,22 @@ +{ + pkgs, + lib, + config, + ... +}: +let + cfg = config.my.satty; +in +{ + options.my.satty.enable = lib.mkEnableOption { }; + + config = lib.mkIf cfg.enable { + xdg.configFile."satty/config.toml" = { + source = ./config.toml; + }; + + home.packages = with pkgs; [ + satty + ]; + }; +} diff --git a/user/sway/default.nix b/user/sway/default.nix index 596fdde..7a2825f 100644 --- a/user/sway/default.nix +++ b/user/sway/default.nix @@ -32,6 +32,7 @@ in my.swaylock.enable = true; my.mpd.enable = true; my.zathura.enable = true; + my.satty.enable = true; my.waybar.enable = true; my.gammastep.enable = true; diff --git a/user/sway/sway-binds.nix b/user/sway/sway-binds.nix index fd05236..ae71cf4 100644 --- a/user/sway/sway-binds.nix +++ b/user/sway/sway-binds.nix @@ -172,7 +172,7 @@ let "${mod}+Return" = "exec ${terminal}"; "${mod}+Ctrl+Return" = "exec thunar"; "${mod}+Shift+s" = '' - exec grim - | satty --filename - --fullscreen --output-filename "$(xdg-user-dir PICTURES)"/Screenshots/satty-$(date '+%Y%m%d-%H:%M:%S').png + exec grim - | satty --filename - --output-filename "$(xdg-user-dir PICTURES)"/Screenshots/satty-$(date '+%Y%m%d-%H:%M:%S').png ''; "${mod}+Ctrl+v" = "exec wl-paste | tesseract -l por - - | wl-copy"; "${mod}+k" = "exec showkeys"; From 6ff8646af3eedad9c5f41713039c371b2c724e1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sun, 22 Jun 2025 23:56:31 -0300 Subject: [PATCH 213/218] 25.05: update renamed options --- system/sound.nix | 2 +- user/gnome.nix | 2 +- user/sway/default.nix | 2 +- user/vscode/default.nix | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/system/sound.nix b/system/sound.nix index f04e513..40dd701 100644 --- a/system/sound.nix +++ b/system/sound.nix @@ -1,6 +1,6 @@ { pkgs, ... }: { - hardware.pulseaudio.enable = false; + services.pulseaudio.enable = false; services.pipewire = { enable = true; wireplumber.enable = true; diff --git a/user/gnome.nix b/user/gnome.nix index 776f095..9a3562b 100644 --- a/user/gnome.nix +++ b/user/gnome.nix @@ -43,7 +43,7 @@ lib.mkIf (config.my.desktop == "gnome") { qt6Packages.qtstyleplugin-kvantum ]; - services.gpg-agent.pinentryPackage = pkgs.pinentry-gnome; + services.gpg-agent.pinentry.package = pkgs.pinentry-gnome; xdg.defaultApplications = { enable = lib.mkForce false; diff --git a/user/sway/default.nix b/user/sway/default.nix index 7a2825f..5fbd379 100644 --- a/user/sway/default.nix +++ b/user/sway/default.nix @@ -124,7 +124,7 @@ in indicator = true; }; - services.gpg-agent.pinentryPackage = pkgs.pinentry-all; + services.gpg-agent.pinentry.package = pkgs.pinentry-all; xdg.configFile."OpenTabletDriver/settings.json" = { force = true; diff --git a/user/vscode/default.nix b/user/vscode/default.nix index b8afdfd..e9a97cb 100644 --- a/user/vscode/default.nix +++ b/user/vscode/default.nix @@ -4,7 +4,7 @@ programs.vscode = { enable = true; package = pkgs.vscodium; - extensions = with pkgs.vscode-extensions; [ + profiles.default.extensions = with pkgs.vscode-extensions; [ jnoortheen.nix-ide github.github-vscode-theme rust-lang.rust-analyzer From 48ca243d3b230f11f3746a8024af67c2ee06a8ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sun, 22 Jun 2025 23:56:58 -0300 Subject: [PATCH 214/218] make: update to new settings format --- user/sway/mako.nix | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/user/sway/mako.nix b/user/sway/mako.nix index 28b5eb4..6c78c9f 100644 --- a/user/sway/mako.nix +++ b/user/sway/mako.nix @@ -20,21 +20,22 @@ in config = lib.mkIf cfg.enable { services.mako = { enable = true; - borderSize = 2; - padding = "5"; - margin = "15"; - layer = "overlay"; - - font = "${font.interface} ${toString font.size.small}"; - textColor = color.txt; - - backgroundColor = color.bg; - borderColor = accent.color; - progressColor = "over ${accent.color}88"; - - defaultTimeout = 10000; settings = { + border-size = 2; + padding = "5"; + margin = "15"; + layer = "overlay"; + + font = "${font.interface} ${toString font.size.small}"; + text-color = color.txt; + + background-color = color.bg; + border-color = accent.color; + progress-color = "over ${accent.color}88"; + + default-timeout = 10000; + "app-name=volumesh" = { "default-timeout" = "5000"; "group-by" = "app-name"; From dc89b61ff7ee76cd6a89abf4b4d7f05bbd385795 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sun, 22 Jun 2025 23:57:12 -0300 Subject: [PATCH 215/218] waybar: fix use of deprecated function substituteAll --- user/waybar/default.nix | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/user/waybar/default.nix b/user/waybar/default.nix index fc95ff1..5af72bc 100644 --- a/user/waybar/default.nix +++ b/user/waybar/default.nix @@ -234,23 +234,19 @@ in }; } ]; - style = builtins.readFile ( - pkgs.substituteAll { - src = ./style.css; + style = pkgs.replaceVars ./style.css { + accent_color = accent.color; - accent_color = accent.color; + color_bg = color.bg; + color_bg_dark = color.bg_dark; + color_bg_light = color.bg_light; + color_txt = color.txt; - color_bg = color.bg; - color_bg_dark = color.bg_dark; - color_bg_light = color.bg_light; - color_txt = color.txt; + font_interface = font.interface; - font_interface = font.interface; - - font_size_big = "${toString font.size.big}px"; - font_size_medium = "${toString font.size.medium}px"; - } - ); + font_size_big = "${toString font.size.big}px"; + font_size_medium = "${toString font.size.medium}px"; + }; }; home.packages = with pkgs; [ waybar ]; }; From d531c24808193f1b0c7eb19d7e27d7906315f6a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Mon, 23 Jun 2025 11:21:48 -0300 Subject: [PATCH 216/218] Revert "kak: work around for rust-analyzer currupting ~/.cargo" This reverts commit ffe90ab90d9a395d6b837c86070de6ef31a6e497. --- user/kakoune/kak-lsp.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/user/kakoune/kak-lsp.toml b/user/kakoune/kak-lsp.toml index 818c737..9c195bd 100644 --- a/user/kakoune/kak-lsp.toml +++ b/user/kakoune/kak-lsp.toml @@ -135,7 +135,6 @@ args = [ [language_server.rust-analyzer.settings.rust-analyzer] # See https://rust-analyzer.github.io/manual.html#configuration # cargo.features = [] -cargo.buildScripts.useRustcWrapper = false checkOnSave.command = "clippy" hoverActions.enable = false # kak-lsp doesn't support this at the moment From 211b5b41a984b30d9fec99b8f7aa0d7d44b2fa52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Tue, 24 Jun 2025 08:53:42 -0300 Subject: [PATCH 217/218] monolith: remove bitbucket runners --- flake.nix | 1 - secrets/monolith/default.yaml | 9 ++--- system/monolith-bitbucket-runner.nix | 50 ---------------------------- 3 files changed, 2 insertions(+), 58 deletions(-) delete mode 100644 system/monolith-bitbucket-runner.nix diff --git a/flake.nix b/flake.nix index 05332a4..0818b6a 100644 --- a/flake.nix +++ b/flake.nix @@ -150,7 +150,6 @@ modules = [ ./hosts/monolith ./system/monolith-gitlab-runner.nix - ./system/monolith-bitbucket-runner.nix ./system/monolith-forgejo-runner.nix ./system/nix-serve.nix ] ++ common_modules; diff --git a/secrets/monolith/default.yaml b/secrets/monolith/default.yaml index 5ca1383..0dbc4ae 100644 --- a/secrets/monolith/default.yaml +++ b/secrets/monolith/default.yaml @@ -5,11 +5,6 @@ gitlab-runners: thoreb-itinerario-nix: ENC[AES256_GCM,data:UdAAD0V895sFoEYR56sCG2LlpZugJ0K/nwkTygzWOnbTSmBRAcIQ8qVFPZGw+K+XMSLiCyio6Jp7k8AYP0K1VYm+6aEP3OkqR9FCLQTJgXo=,iv:UGUby50BYkn13OzItk6zZmxc5+SnbZZa4bebQHIow2A=,tag:LjDg3deWwdH2T71EtPo6jA==,type:str] docker-images-token: ENC[AES256_GCM,data:GGB/KSkjdAyhFKEspAh91ItbqEDf7K/LZSGSn+Jp7SxRfXpDzHIiMD8XJ9PTkGLeQGN4ug1i2nTYPS7d/P5OALWDU+1NPiV9nPdG0w7GERfu4g==,iv:6roabdOKX9xFMf0hWlECd73+943R+hFLos0e2dOpzns=,tag:LrASFc4DtN7aQ+3oOW/p/w==,type:str] wopus-gitlab-nix: ENC[AES256_GCM,data:asE7J0d58x9VfQFWc07f5T4s5NZ+/VqMQo66EX93J0LbJ4iI5YjvrrIE4pSI1e4Nz/SRQhltaJ0DfSH0+qgjD4wnAONPRi3UlFbSdGWS2bwwRtWe+Nci2krrUFxV2i/ZVE3CwCkNe4mqtII=,iv:gKrD/LhzI+jnDnX6CdxoHfjpiRdrsuRYJF9rTc8SffM=,tag:TczDGSU3gdKmERjBJ7tP/A==,type:str] -bitbucket-runners: - wopus-runner-1: ENC[AES256_GCM,data:gtH0T5n8qMYpvSv5ciN8+ScGlFDf9xE0FTxNP97vT/qsOCcaItTE+5P+DFcWw46onLED+1c+u0sArFbEsT3f8lyco9b+0l99uOQAxLZQzAXYH8zGye1UnwUtytkci2PHu5c8kTpIWHXyZ1IOYNGWkermeab57ANzOkM1LbkHyAjS6VTh0I60LfAOdHOw5FDFL8d1d9oWxLloOe9USLPqHjC023EpCUT2YuyHoPCTpBu8Kb/2HfV0wkAKaB3dvVrKwXCj+bfP6+bjQ3uMzVO/7jxPmnSGBfvyZ+Hlg5goJ6bSAqQWmnPPnQ96FgQfe8su5ML9qNIp9/7eNiL6Rv6Vhxe0hHbE5wsZ/58grcg/LrugeWJvUJ9THhwcTwO8Pkvwlq0XM9seUY2NV+LCK3bLQ4IWDjWkU1IHg6+nihTcvl1iD6UIGMgqGoB/v05WVzHb+GcE2fFuSuhVHfa5RMyboELOJoFrqZiXGhY=,iv:ZakLafxYQCDd1Zw8T83Xfj+YwAQKna9LC6ognJqtifA=,tag:bwBObfdMIvJfRrOG04NtxA==,type:str] - wopus-runner-2: ENC[AES256_GCM,data:gg8merZMFbf396hdJY7zmKQndT3GzB7NeGZAs3C0au8Zd7OFAg9vcQcFcxNA3kZGJZqmFTR/ycWJwhYr9fhlfFuPhDynVvgJAqoYtvC2MUDiOMD/d3DlfwFjQ6cOGTrvFuY1kkgSFb4OFdrVC1eiTDrGygFmYnYcqTKn/t5Ttqi+cHZNzFzVzdVLvaLCYxltM5g45zn+fXYxYwCfqyb32/M1XTnnwIGiataGxEX5oWhVV4zqeLO4ZIYPSby5AVvIMJ/zqvqaeVVY52GLDcTKrj3thbZxMQLWN3/lOA0uYhi3L/WM8Gx+JMEIbSICcuT7QXu4w4PA+opcx9GnsMCK2/egzS+cNPJ4vGZCdVD/jh6A9zVEJAgXdsHXNXFHmMPt7DcgrCQiub62og4kBY4G/Rcg4UN7sb3v3qyBpGbCGHGRjCFc+wdHpom0yDOG2cwcqfN49pC2R7Ag2BisFQ/5A+DPmKnvGG3kt9s=,iv:5g5XiDecYqi4JNRkZubgPJECBQdZ6rBeojgFe6Etebk=,tag:HRy5bFSbfxKTb5e13lGtgg==,type:str] - wopus-runner-3: ENC[AES256_GCM,data:f9pLYR8t51HtPpLyXysIVaDAhxDrmktJH93E7rb7imtKwK7hRhR8usnvHTcknLfD7BMvStAIYefdGt19u7PrQu6vqc19bEcNbnK5OH4KBP6+X47oMgBYtbIGXH+t3dSDt22fSIoppTwdX7/Kf4vqesfN8K7EunETvFR86oyyKdy15mvXr0XUO4us4HZjnIOBEnOm1P/V8hk5JcCpRuo+8ZYmBe5gzq5pTnqnYlPE1EovM7eDMg72J7ev07h50qvySrAqmNiqDcXfTPQ2TzuHx3XxAYqFybf1L6P9OnLB6RDAlpoFJ0h8dSg2tzC2+amYsBP0UIBK/ZhWvvAjpX+MZrTASjenh/tefDcNdbsXDOr7A4i/261z4rC0r+97INglCN1N/SZg51iBHiRAVV1zibDLfioR5+eBIykWAtjILMoYU+zOcr0E8K0I9jQGMtpnYmvHJqV0DVcdfZpJptrPUUy+lQ/iZVcPpLs=,iv:grzvVsfpUzywjNE4jvTxXKG3TYajrvSsQgfOgtafvIo=,tag:K1B6crN0ckLk0EYBtGHDkw==,type:str] - wopus-runner-4: ENC[AES256_GCM,data:D1Zq0BtPuACnutAbUcj3gYSMLuIZcMuqc/1mEFmitEG0tBFMWhkabS+8lXcp8sb1DM0LTDMEwgMB9FVyFb670MKQNEncqQtaNJtY1BxS3SolovDAM/I+i6YGvd4X8jX99d+7ZNR6xGBWJ/dW8rz4QnIM8Eh3FDOqaFa/ltfyPKP9IZ2uZi67C/n8Q/OSdgMQkt+QxhgJfSghE1iruPwxyGlqv+E4SZNI/fQQMjX0Lh7z02ms58yyMtjO71YbukV/JXFRsdJrqY2wfH/6NlZbsKideoSxluBRVqmbW6KQd7dUT819KbOSu9CFdgThtVCU8qiv3jbAbn8D5xRy4AAOEfSqRLXJoj7otCqr47R/8+0BdS3aztFBjL3lDmprMWZ4+LD55fvczfpxUF9ox1mhcjIvCvZJJL06XsST1XRXa7i2fr4/a/XhCmQgIzar5IYxSC9OjuHp6jLsTaY3ZUgid5W1L1n8uWSmA98=,iv:O9caRG//brERiIhuMrsFdTz6TnPY0rdQnvHEu0P42yM=,tag:hrmwLX/CRhZfammJ2nfTPw==,type:str] sops: age: - recipient: age1zrgu7w8059xydagm60phnffghvfe9h2ca58cx8qwagqpyfuvs9fqw79c8h @@ -30,8 +25,8 @@ sops: aFVxcDFhaGdYekRWRVFIWnRsZndtZFkKgsvxOFHOcO306Z9FkucA1fDOpZA8N1/h jYmIgcKTFgWoSCvux67lK30jFsYp7sm5z6WxxDYsGcoQ/+pxoUX2jQ== -----END AGE ENCRYPTED FILE----- - lastmodified: "2025-06-16T13:05:35Z" - mac: ENC[AES256_GCM,data:i8HOA7JSVSkxpoXJpFYrENodySyEEupYLNjuezRpd+PQWmxE7igonFyweUblmkSyBgy1FpmN+llwoP0Cokka5QyJse9jq9hR6dFATpZC9qPzSlAb+RpdSzp4QXjryOzP/23RJ7WhhBOC2DRw8OkDBPDJINBnCtu1ticpiuXKoHs=,iv:WEEdZDbrrkhip0ZkpqQfg6fwV+OzP/bBBrExyvOhqng=,tag:6iLMsJtenKdU/lJU/+HnCg==,type:str] + lastmodified: "2025-06-24T11:51:22Z" + mac: ENC[AES256_GCM,data:onyjWlFsH/9YGSi2nGsPmZjhE4nFVQ5Jiwfi4s9KC7NetKD7Reyz2JY6i3YuZspBn3Jvbq8nOKVPGzttMAG+IrqQEv6+MxrCOEnJZXZcqocDNg7dACOXmJB5iwpFVdKscesTH2SScf7Pl/q6l9KOFjFuaZeBB7dlxHVA5zzCVOU=,iv:lEbxg2HfxU6ikgWSpUNAGIfgaz7DnZjXnLWcmsvt0A4=,tag:/Ag37QuJj9Xy/u20Nhy05Q==,type:str] pgp: - created_at: "2025-03-07T22:49:16Z" enc: |- diff --git a/system/monolith-bitbucket-runner.nix b/system/monolith-bitbucket-runner.nix deleted file mode 100644 index 17d462b..0000000 --- a/system/monolith-bitbucket-runner.nix +++ /dev/null @@ -1,50 +0,0 @@ -{ - config, - pkgs, - ... -}: - -let - mkRunner = secret: { - image = "docker-public.packages.atlassian.com/sox/atlassian/bitbucket-pipelines-runner:latest"; - volumes = [ - "/tmp:/tmp" - "/var/run/docker.sock:/var/run/docker.sock" - "/var/lib/docker/containers:/var/lib/docker/containers:ro" - ]; - environmentFiles = [ secret ]; - }; - - secretConf = { - sopsFile = ../secrets/monolith/default.yaml; - }; -in -{ - virtualisation.docker = { - enable = true; - daemon.settings = { - # needed by bitbucket runner ??? - log-driver = "json-file"; - log-opts = { - max-size = "10m"; - max-file = "3"; - }; - }; - }; - - virtualisation.oci-containers.backend = "docker"; - - virtualisation.oci-containers.containers = { - bitbucket-runner-1 = mkRunner config.sops.secrets."bitbucket-runners/wopus-runner-1".path; - bitbucket-runner-2 = mkRunner config.sops.secrets."bitbucket-runners/wopus-runner-2".path; - bitbucket-runner-3 = mkRunner config.sops.secrets."bitbucket-runners/wopus-runner-3".path; - bitbucket-runner-4 = mkRunner config.sops.secrets."bitbucket-runners/wopus-runner-4".path; - }; - - sops.secrets = { - "bitbucket-runners/wopus-runner-1" = secretConf; - "bitbucket-runners/wopus-runner-2" = secretConf; - "bitbucket-runners/wopus-runner-3" = secretConf; - "bitbucket-runners/wopus-runner-4" = secretConf; - }; -} From 412388a5a26716991a2739a1647eebe91181c27e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 25 Jun 2025 13:07:14 -0300 Subject: [PATCH 218/218] wpass: fix duplicate password fields being incorrectly filled --- scripts/default.nix | 1 + scripts/wpass | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/default.nix b/scripts/default.nix index d9824b5..9b0b728 100644 --- a/scripts/default.nix +++ b/scripts/default.nix @@ -74,6 +74,7 @@ ]; wpass = [ wdmenu + ripgrep fd myPass sd diff --git a/scripts/wpass b/scripts/wpass index 97e4671..52bcdff 100755 --- a/scripts/wpass +++ b/scripts/wpass @@ -29,7 +29,7 @@ main() { test -n "$entry" || exit 0 - username=`pass show "$entry" 2>/dev/null | perl -ne 'print $2 if /^(login|user|email): (.*)/'` + username=`pass show "$entry" 2>/dev/null | rg -m1 '(login|user|email): (.*)' -r '$2'` password=`pass show "$entry" 2>/dev/null | head -n 1` otp=`pass otp "$entry" 2>/dev/null` || true