From da0bb14a96e2266c45c7f00b4b05643e5b6684e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Thu, 23 Oct 2025 15:51:32 +0800 Subject: [PATCH 001/178] vanadium: use custom kernel build again. --- nix/configurations/vanadium.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nix/configurations/vanadium.nix b/nix/configurations/vanadium.nix index 208e712e..5be9bac1 100644 --- a/nix/configurations/vanadium.nix +++ b/nix/configurations/vanadium.nix @@ -61,6 +61,7 @@ in ../packages/overlay.nix ./vanadium/overlay.nix + ./vanadium/kernel-overlay.nix # removed, but I need it for PLFA! ../overlays/pin-emacs28.nix From 38a79e2fd8d8258c2a8472442a64423b164789a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Thu, 23 Oct 2025 15:57:28 +0800 Subject: [PATCH 002/178] vanadium/kernel-overlay: fixes for 6.12.54 --- nix/configurations/vanadium/kernel-overlay.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nix/configurations/vanadium/kernel-overlay.nix b/nix/configurations/vanadium/kernel-overlay.nix index 1af875e2..c6615c22 100644 --- a/nix/configurations/vanadium/kernel-overlay.nix +++ b/nix/configurations/vanadium/kernel-overlay.nix @@ -69,6 +69,7 @@ in { # Disable hypervisor guest HYPERVISOR_GUEST = lib.mkForce no; + HYPERV = lib.mkForce unset; DRM_HYPERV = lib.mkForce unset; FB_HYPERV = lib.mkForce unset; HVC_XEN = lib.mkForce unset; From 481814881b8cba39e6cb4dbf41eb643501402a27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Fri, 24 Oct 2025 10:33:26 +0800 Subject: [PATCH 003/178] vanadium/display: dim orchid default brightness --- nix/configurations/vanadium/nixos/display.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nix/configurations/vanadium/nixos/display.nix b/nix/configurations/vanadium/nixos/display.nix index 94d31e1c..66a45f8c 100644 --- a/nix/configurations/vanadium/nixos/display.nix +++ b/nix/configurations/vanadium/nixos/display.nix @@ -169,7 +169,7 @@ (switches.setDPI {dpi = 100;}) (switches.setSoftwareBrightness { device = name; - brightness = 0.7; + brightness = 0.5; }) ]; }; From 8f8b6e35bae50498eb37d17356d9c45cc26dd8ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sat, 25 Oct 2025 21:31:35 +0800 Subject: [PATCH 004/178] packages/ruler: update --- nix/packages/by-name/ruler/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nix/packages/by-name/ruler/package.nix b/nix/packages/by-name/ruler/package.nix index 68c59d45..a3e06027 100644 --- a/nix/packages/by-name/ruler/package.nix +++ b/nix/packages/by-name/ruler/package.nix @@ -12,8 +12,8 @@ domain = "git.confusedcompiler.org"; owner = "leana8959"; repo = "ruler"; - rev = "adf8f711b014cba4b73da0132c2be944ba20ba0b"; - hash = "sha256-sHJEgwEAMERhOCPY16Lsirj1bSUfEUpwNnPmHfg+/8Q="; + rev = "4c374125ec9f566638e64671f468e598b33730e6"; + hash = "sha256-n5xNC31t5S+h5WoT6iaJV2JxomxKLqz6gGF0KrM8YjQ="; }) {}; From fb527f7dcec4d4ed3e946a1a2bf252b60646d657 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sun, 26 Oct 2025 13:10:35 +0800 Subject: [PATCH 005/178] home/firefox: disable perplexity no AI search engine >:( --- nix/homeModules/common/firefox.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nix/homeModules/common/firefox.nix b/nix/homeModules/common/firefox.nix index d15d0246..ed1c54f5 100644 --- a/nix/homeModules/common/firefox.nix +++ b/nix/homeModules/common/firefox.nix @@ -19,7 +19,7 @@ in { ]; SearchEngines = { - Remove = ["Bing" "DuckDuckGo" "Qwant" "eBay"]; + Remove = ["Bing" "DuckDuckGo" "Qwant" "eBay" "Perplexity"]; }; NoDefaultBookmarks = true; DisplayMenuBar = "never"; From e1407ff24ef7f1e78af1b7ad762947ab5f0b0922 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sun, 26 Oct 2025 21:21:58 +0800 Subject: [PATCH 006/178] nixos/sudo: use doas --- nix/nixosModules/common/sudo-conf.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/nix/nixosModules/common/sudo-conf.nix b/nix/nixosModules/common/sudo-conf.nix index b31388f4..b2b66182 100644 --- a/nix/nixosModules/common/sudo-conf.nix +++ b/nix/nixosModules/common/sudo-conf.nix @@ -1,5 +1,8 @@ -{ - security.sudo.extraConfig = '' - Defaults lecture = always - ''; +{pkgs, ...}: { + security.doas.enable = true; + security.sudo.enable = false; + + environment.systemPackages = [ + pkgs.doas-sudo-shim + ]; } From 0c1f72b6e253c8fb1944b529f8fbd09940e3f847 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Mon, 27 Oct 2025 22:38:53 +0800 Subject: [PATCH 007/178] Use milou theme nvim: use milou theme starship: update to milou scheme fish: update to milou scheme kitty: update to milou theme starship: increase contrast in git modules fzf: update to milou theme nvim/lazy: update milou theme fish/fzf.fish: use patdiff --- .config/nvim/init.lua | 2 +- .config/nvim/lazy-lock.json | 2 +- .config/nvim/lua/_lazy.lua | 3 +- nix/homeModules/common/fish/default.nix | 2 +- nix/homeModules/common/fish/shellInit.fish | 68 +++++++++---------- nix/homeModules/common/fzf.nix | 11 +-- nix/homeModules/common/kitty.nix | 40 +++++------ nix/homeModules/common/starship/starship.toml | 45 ++++++------ 8 files changed, 86 insertions(+), 87 deletions(-) diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 21b5f3e2..c927f47a 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -7,4 +7,4 @@ require("_lazy") require("lsp.haskell") require("lsp.rust") -vim.cmd.colorscheme("curry") +vim.cmd.colorscheme("milou") diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index 483f2ead..8d98d8f2 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -7,7 +7,6 @@ "cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" }, "cmp-spell": { "branch": "master", "commit": "694a4e50809d6d645c1ea29015dad0c293f019d6" }, "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, - "curry.nvim": { "branch": "mistress", "commit": "2c20e5dd43af134a6e18e21ba53f1c0830abe4fc" }, "fidget.nvim": { "branch": "main", "commit": "3f5475949679953af6d78654db29b944fa826e6a" }, "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" }, "gitsigns.nvim": { "branch": "main", "commit": "1ee5c1fd068c81f9dd06483e639c2aa4587dc197" }, @@ -16,6 +15,7 @@ "lazy.nvim": { "branch": "main", "commit": "59334064f8604ca073791c25dcc5c9698865406e" }, "lazydev.nvim": { "branch": "main", "commit": "258d2a5ef4a3e3d6d9ba9da72c9725c53e9afcbd" }, "leap.nvim": { "branch": "main", "commit": "07304103f6bd923004fdef9262d9a4d7925fb70a" }, + "milou": { "branch": "haddock", "commit": "4b3ab4976ff53b029f73d039fea016520af813d6" }, "no-neck-pain.nvim": { "branch": "main", "commit": "ecc584150f5c8a2a82f2e1d43201df0f65c63d0e" }, "nvim-autopairs": { "branch": "master", "commit": "23320e75953ac82e559c610bec5a90d9c6dfa743" }, "nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" }, diff --git a/.config/nvim/lua/_lazy.lua b/.config/nvim/lua/_lazy.lua index 8cd2dd9d..3b2e9541 100644 --- a/.config/nvim/lua/_lazy.lua +++ b/.config/nvim/lua/_lazy.lua @@ -78,7 +78,8 @@ local plugins = { -- Highlight comments { "folke/todo-comments.nvim", dependencies = "nvim-lua/plenary.nvim" }, - "leana8959/curry.nvim", + -- "leana8959/curry.nvim", + "https://git.confusedcompiler.org/leana8959/milou", -- -- LSP / DAP diff --git a/nix/homeModules/common/fish/default.nix b/nix/homeModules/common/fish/default.nix index 240a6c29..a09b371d 100644 --- a/nix/homeModules/common/fish/default.nix +++ b/nix/homeModules/common/fish/default.nix @@ -10,7 +10,7 @@ # # Script dependencies # - home.packages = [pkgs.vivid]; + home.packages = [pkgs.vivid pkgs.patdiff]; programs = { fd.enable = true; fzf.enable = true; diff --git a/nix/homeModules/common/fish/shellInit.fish b/nix/homeModules/common/fish/shellInit.fish index 05793966..8cb17970 100644 --- a/nix/homeModules/common/fish/shellInit.fish +++ b/nix/homeModules/common/fish/shellInit.fish @@ -18,34 +18,33 @@ set fish_cursor_visual block ############### # Learn more: https://fishshell.com/docs/current/interactive.html begin # scope this in a block to not leak variables everywhere - set -l black \#000000 - set -l grey \#a0a1a7 - set -l cyan \#0184bc - set -l blue \#4078f2 - set -l purple \#a626a4 - set -l green \#50a14f - set -l orange \#e45649 - set -l red \#ca1243 - set -l brown \#986801 - set -l gold \#c18401 - set -l accent \#645199 - set -l visual \#d0d0d0 + set -l black "#073642" # .hs-identifier + set -l grey "#a0a1a7" + set -l cyan "#2aa198" # .hs-pragma + set -l blue "#268bd2" # .hs-number + set -l magenta "#d33682" # .hs-operator + set -l green "#859900" # .hs-cpp + set -l orange "#cb4b16" # .hs-char + set -l red "#af005f" # .hs-special + set -l purple "#5f5faf" # .hs-type + set -l visual "#dbcba3" + set -l cursor "#f0e5c9" # General set fish_color_normal $black # default color - set fish_color_command $blue # commands like echo - set fish_color_keyword $purple # keywords like if - this falls back on the command color if unset - set fish_color_quote $green # quoted text like "abc" - set fish_color_redirection $gold # IO redirections like >/dev/null - set fish_color_end $black --bold # process separators like ; and & - set fish_color_error $black # syntax errors - set fish_color_param $red # ordinary command parameters + set fish_color_command # commands like echo + set fish_color_keyword $red # keywords like if - this falls back on the command color if unset + set fish_color_quote $orange # quoted text like "abc" + set fish_color_redirection $magenta # IO redirections like >/dev/null + set fish_color_end $magenta --bold # process separators like ; and & + set fish_color_error $grey # syntax errors + set fish_color_param $black # ordinary command parameters set fish_color_valid_path --italics # parameters that are filenames (if the file exists) - set fish_color_option $cyan # options starting with “-”, up to the first “--” parameter + set fish_color_option # options starting with “-”, up to the first “--” parameter set fish_color_comment $grey # comments like ‘# important’ set fish_color_selection --background=$visual # selected text in vi visual mode - set fish_color_operator $orange # parameter expansion operators like * and ~ - set fish_color_escape $purple # character escapes like \n and \x70 + set fish_color_operator $magenta # parameter expansion operators like * and ~ + set fish_color_escape $orange # character escapes like \n and \x70 set fish_color_autosuggestion $grey # autosuggestions (the proposed rest of a command) set fish_color_cwd $black # The current working directory in the default prompt set fish_color_cwd_root $red # The current working directory in the default prompt for the root user @@ -53,19 +52,19 @@ begin # scope this in a block to not leak variables everywhere set fish_color_host $black # The hostname in the default prompt set fish_color_host_remote $red # the hostname in the default prompt for remote sessions (like ssh) set fish_color_status $red # the last command’s nonzero exit code in the default prompt - set fish_color_cancel $accent --reverse # the ‘^C’ indicator on a canceled command - set fish_color_search_match --background $visual # history search matches and selected pager items (background only) + set fish_color_cancel $cyan --reverse # the ‘^C’ indicator on a canceled command + set fish_color_search_match --background=$cursor # history search matches and selected pager items (background only) # Pager - set fish_pager_color_progress --reverse $cyan # the progress bar at the bottom left corner - set fish_pager_color_background $black # the background color of a line - set fish_pager_color_prefix $black # the prefix string, i.e. the string that is to be completed - set fish_pager_color_completion $grey # the completion itself, i.e. the proposed rest of the string - set fish_pager_color_description $grey # the completion description - set fish_pager_color_selected_background $black # background of the selected completion - set fish_pager_color_selected_prefix # prefix of the selected completion - set fish_pager_color_selected_completion $red # suffix of the selected completion - set fish_pager_color_selected_description $gold # description of the selected completion + set fish_pager_color_progress --reverse # the progress bar at the bottom left corner + set fish_pager_color_background # the background color of a line + set fish_pager_color_prefix $black # the prefix string, i.e. the string that is to be completed + set fish_pager_color_completion $grey # the completion itself, i.e. the proposed rest of the string + set fish_pager_color_description $grey # the completion description + set fish_pager_color_selected_background --background=$cursor # background of the selected completion + set fish_pager_color_selected_prefix $black # prefix of the selected completion + set fish_pager_color_selected_completion $black # suffix of the selected completion + set fish_pager_color_selected_description $black # description of the selected completion # # Alternating colors # set fish_pager_color_secondary_background --background=$tinted_bg # background of every second unselected completion @@ -81,8 +80,9 @@ end set -x fzf_preview_file_cmd 'cat -n' # fzf-fish search hidden files set -x fzf_fd_opts --hidden --exclude=.git +set -x fzf_diff_highlighter patdiff # fd uses LS_COLORS -set -x LS_COLORS (vivid -m 24-bit generate one-light) +set -x LS_COLORS (vivid -m 24-bit generate solarized-light) # similar to milou set -g sponge_purge_only_on_exit true diff --git a/nix/homeModules/common/fzf.nix b/nix/homeModules/common/fzf.nix index d26f3c4e..6a62bea8 100644 --- a/nix/homeModules/common/fzf.nix +++ b/nix/homeModules/common/fzf.nix @@ -3,10 +3,11 @@ "--cycle" "--border=none" "--preview-window=wrap" - "--color=fg:#000000,bg:#eeeeee,hl:#ca1243" - "--color=fg+:#000000,bg+:#d0d0d0,hl+:#ca1243" - "--color=info:#0184bc,prompt:#645199,pointer:#645199" - "--color=marker:#0184bc,spinner:#645199,header:#645199" - "--color=gutter:#eeeeee" + # TODO: This makes the unmatched harder to read + "--color=fg:#a0a1a7,bg:#fdf6e3,hl:#073642" + "--color=fg+:#a0a1a7,bg+:#f0e5c9,hl+:#073642" + "--color=info:#268bd2,prompt:#5f5faf,pointer:#073642" + "--color=marker:#268bd2,spinner:#5f5faf,header:#073642" + "--color=gutter:#eeeadd" ]; } diff --git a/nix/homeModules/common/kitty.nix b/nix/homeModules/common/kitty.nix index 56872961..24b5e1b8 100644 --- a/nix/homeModules/common/kitty.nix +++ b/nix/homeModules/common/kitty.nix @@ -14,7 +14,7 @@ in { programs.kitty = lib.mkIf cfg.enable { font.name = "family=\"Iosevka NFM\""; - settings = { + settings = rec { # Make text thicker text_composition_strategy = lib.mkIf pkgs.stdenv.isLinux "2.8 0"; @@ -32,28 +32,28 @@ in { cursor_stop_blinking_after = 15; # always blink # theme - background = "#ffffff"; - foreground = "#000000"; + background = "#fdf6e3"; + foreground = "#073642"; cursor = "#000000"; cursor_text_color = "#ffffff"; - selection_background = "#bbbbbb"; - color0 = "#000000"; + selection_foreground = foreground; + selection_background = "#dbcba3"; + color0 = "#073642"; color8 = "#4d4d4d"; - color1 = "#ca1243"; - color9 = "#e61955"; - color2 = "#50a14f"; - color10 = "#67c761"; - color3 = "#e5bf6d"; - color11 = "#ffdf84"; - color4 = "#4078f2"; - color12 = "#6296ff"; - color5 = "#950095"; - color13 = "#b000b0"; - color6 = "#0184bc"; - color14 = "#00a6e6"; - color7 = "#bbbbbb"; - color15 = "#ffffff"; - selection_foreground = "#f8f8f8"; + color1 = "#af005f"; + color9 = "#d33682"; + color2 = "#859900"; + color10 = "#29a350"; + color3 = "#ba9b23"; + color11 = "#d6b429"; + color4 = "#268bd2"; + color12 = "#469edd"; + color5 = "#5f5faf"; + color13 = "#6060d1"; + color6 = "#2aa198"; + color14 = "#4bccc1"; # a platupus? perry the platupus? + color7 = "#a0a1a7"; + color15 = "#eeeadd"; }; }; }; diff --git a/nix/homeModules/common/starship/starship.toml b/nix/homeModules/common/starship/starship.toml index 9c462e71..c3f257f9 100644 --- a/nix/homeModules/common/starship/starship.toml +++ b/nix/homeModules/common/starship/starship.toml @@ -14,32 +14,29 @@ $git_state$git_branch$git_commit$git_status #################### Theme #################### -palette = 'curry' +palette = 'milou' -[palettes.curry] -accent = '#645199' # Haskell purple -accent_trans = '#efebfc' -black = '#24292f' +[palettes.milou] +black = "#073642" # .hs-identifier grey = '#a0a1a7' -cyan = '#1b7c83' -blue = '#0969da' -purple = '#8250df' -green = '#116329' -orange = '#e45649' -red = '#ca1243' -brown = '#986801' -gold = '#c18401' -tinted_bg = '#eeeeee' +cyan = "#2aa198" # .hs-pragma +blue = "#268bd2" # .hs-number +magenta = "#d33682" # .hs-operator +green = "#859900" # .hs-cpp +orange = "#cb4b16" # .hs-char +red = "#af005f" # .hs-special +purple = "#5f5faf" # .hs-type +cursor = "#f0e5c9" #################### Theme #################### [hostname] ssh_only = true -style = 'bold orange' +style = 'bold' format = '[$hostname]($style):' [username] -style_root = 'bold orange' +style_root = 'bold' style_user = 'grey' format = '( [\($user\)]($style))' @@ -54,7 +51,7 @@ vimcmd_visual_symbol = '[V](grey)' # Visual [directory] truncation_length = 4 truncate_to_repo = false -style = 'fg:black bg:accent_trans' +style = 'fg:black bg:cursor' format = '[$path]($style)( [$read_only]($read_only_style))' read_only = '' read_only_style = 'red' @@ -107,13 +104,13 @@ style = "bold #5e5086" [time] disabled = false format = '[$time]($style) ' -style = "brown" +style = "blue" #################### Right hand side #################### [cmd_duration] min_time = 60_000 show_milliseconds = true -style = 'brown' +style = 'blue' format = '([$duration]($style) )' [git_state] @@ -122,17 +119,17 @@ format = '\([$state( $progress_current/$progress_total)]($style)\) ' [git_branch] symbol = '' -style = 'grey' +style = 'black' format = '[$symbol$branch(:$remote_branch)]($style)' [git_commit] -style = 'accent' -format = '[\(](grey)[$hash$tag]($style)[\)](grey)' +style = 'cyan' +format = '[\(](black)[$hash$tag]($style)[\)](black)' [git_status] ahead = '⇡$count' behind = '⇣$count' diverged = '⇕⇡$ahead_count⇣$behind_count' -style = 'bold accent' -format = '([\[](grey)[$all_status$ahead_behind]($style)[\]](grey))' +style = 'bold cyan' +format = '([\[](black)[$all_status$ahead_behind]($style)[\]](black))' #################### Right hand side #################### From 9cace50bb1a0d9769a7b8bffe86f883bc96c2a11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Tue, 28 Oct 2025 16:42:53 +0800 Subject: [PATCH 008/178] fzf: make more readable --- nix/homeModules/common/fzf.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nix/homeModules/common/fzf.nix b/nix/homeModules/common/fzf.nix index 6a62bea8..70e94458 100644 --- a/nix/homeModules/common/fzf.nix +++ b/nix/homeModules/common/fzf.nix @@ -3,9 +3,8 @@ "--cycle" "--border=none" "--preview-window=wrap" - # TODO: This makes the unmatched harder to read - "--color=fg:#a0a1a7,bg:#fdf6e3,hl:#073642" - "--color=fg+:#a0a1a7,bg+:#f0e5c9,hl+:#073642" + "--color=fg:#073642,bg:#fdf6e3,hl:#af005f" + "--color=fg+:#073642,bg+:#f0e5c9,hl+:#af005f" "--color=info:#268bd2,prompt:#5f5faf,pointer:#073642" "--color=marker:#268bd2,spinner:#5f5faf,header:#073642" "--color=gutter:#eeeadd" From 1af4390d0579f2fa5915f7f75cbe32ed7239aa88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Wed, 29 Oct 2025 19:15:56 +0800 Subject: [PATCH 009/178] vanadium/display: fix xscreensaver hook event for autorandr It would run autorandr on the wrong event --- nix/configurations/vanadium/nixos/gui.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nix/configurations/vanadium/nixos/gui.nix b/nix/configurations/vanadium/nixos/gui.nix index b96b9a65..2bf33ca7 100644 --- a/nix/configurations/vanadium/nixos/gui.nix +++ b/nix/configurations/vanadium/nixos/gui.nix @@ -28,7 +28,7 @@ enable = true; hooks = { # Reset display setting on login - "UNBLANK" = '' + "RUN" = '' ${lib.getExe pkgs.autorandr} --change --ignore-lid ''; }; From ffb056837ce4cbb5a4facadc98463313ade231ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Wed, 29 Oct 2025 19:16:25 +0800 Subject: [PATCH 010/178] packages/ruler: update --- nix/packages/by-name/ruler/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nix/packages/by-name/ruler/package.nix b/nix/packages/by-name/ruler/package.nix index a3e06027..a393fb6d 100644 --- a/nix/packages/by-name/ruler/package.nix +++ b/nix/packages/by-name/ruler/package.nix @@ -12,8 +12,8 @@ domain = "git.confusedcompiler.org"; owner = "leana8959"; repo = "ruler"; - rev = "4c374125ec9f566638e64671f468e598b33730e6"; - hash = "sha256-n5xNC31t5S+h5WoT6iaJV2JxomxKLqz6gGF0KrM8YjQ="; + rev = "46f40d303f3b04d65475fdfd6511dd6431f20f24"; + hash = "sha256-goJ4iYnFqn88y6xEBhaFnos8O1MWIqHzwGrR1W0yijo="; }) {}; From d9940eb52e4623aa6af83526aadfefa5a68246c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Wed, 29 Oct 2025 21:05:32 +0800 Subject: [PATCH 011/178] home/fish: disable patdiff for fzf.fish --- nix/homeModules/common/fish/default.nix | 2 +- nix/homeModules/common/fish/shellInit.fish | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/nix/homeModules/common/fish/default.nix b/nix/homeModules/common/fish/default.nix index a09b371d..240a6c29 100644 --- a/nix/homeModules/common/fish/default.nix +++ b/nix/homeModules/common/fish/default.nix @@ -10,7 +10,7 @@ # # Script dependencies # - home.packages = [pkgs.vivid pkgs.patdiff]; + home.packages = [pkgs.vivid]; programs = { fd.enable = true; fzf.enable = true; diff --git a/nix/homeModules/common/fish/shellInit.fish b/nix/homeModules/common/fish/shellInit.fish index 8cb17970..0a1cfd24 100644 --- a/nix/homeModules/common/fish/shellInit.fish +++ b/nix/homeModules/common/fish/shellInit.fish @@ -80,7 +80,8 @@ end set -x fzf_preview_file_cmd 'cat -n' # fzf-fish search hidden files set -x fzf_fd_opts --hidden --exclude=.git -set -x fzf_diff_highlighter patdiff +# fzf-fish using patdiff would show incomplete diff, it is a bug +# don't do it # fd uses LS_COLORS set -x LS_COLORS (vivid -m 24-bit generate solarized-light) # similar to milou From 8d004fd48f27e154d4e68a4e47ab1a3028a06ce2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Thu, 30 Oct 2025 11:00:12 +0800 Subject: [PATCH 012/178] packages/ruler: update --- nix/packages/by-name/ruler/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nix/packages/by-name/ruler/package.nix b/nix/packages/by-name/ruler/package.nix index a393fb6d..e217fae0 100644 --- a/nix/packages/by-name/ruler/package.nix +++ b/nix/packages/by-name/ruler/package.nix @@ -12,8 +12,8 @@ domain = "git.confusedcompiler.org"; owner = "leana8959"; repo = "ruler"; - rev = "46f40d303f3b04d65475fdfd6511dd6431f20f24"; - hash = "sha256-goJ4iYnFqn88y6xEBhaFnos8O1MWIqHzwGrR1W0yijo="; + rev = "12b287522215781b21791101bf85f8a0dddd1225"; + hash = "sha256-XoTTxKxlUmtM9mxguwdEsMSp6qBkEgBcviM8bTgs95o="; }) {}; From 7d1292945f1a087b961123e8b06de70efd05124f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Thu, 30 Oct 2025 20:26:26 +0800 Subject: [PATCH 013/178] vanadium: update wallpapers --- nix/configurations/vanadium/home/misc.nix | 2 +- nix/overlays/wallpapers.nix | 5 +++-- npins/sources.json | 6 +++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/nix/configurations/vanadium/home/misc.nix b/nix/configurations/vanadium/home/misc.nix index 4cf015ee..b7741b36 100644 --- a/nix/configurations/vanadium/home/misc.nix +++ b/nix/configurations/vanadium/home/misc.nix @@ -30,7 +30,7 @@ home.file = { ".xscreensaver".source = "${./xscreensaver/.xscreensaver}"; - ".wallpaper".source = "${pkgs.wallpapers.y-combinator}/main.svg"; + ".wallpaper".source = "${pkgs.wallpapers_source}/images/KnightsOfGuinevere/guinevere_francesca.png"; }; xdg.configFile = { "xmonad".source = "${./xmonad}"; diff --git a/nix/overlays/wallpapers.nix b/nix/overlays/wallpapers.nix index 0545f74e..b25035b2 100644 --- a/nix/overlays/wallpapers.nix +++ b/nix/overlays/wallpapers.nix @@ -1,6 +1,7 @@ let sources = import ../../npins; in - _: _: { - wallpapers = import sources.wallpapers {}; + _: _: rec { + wallpapers_source = sources.wallpapers; + wallpapers = import wallpapers_source {}; } diff --git a/npins/sources.json b/npins/sources.json index 07131616..82cafe9d 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -386,9 +386,9 @@ }, "branch": "mistress", "submodules": false, - "revision": "189b0f83db95462244e2dc2e12c68741c924cb46", - "url": "https://git.confusedcompiler.org/leana8959/wallpapers/archive/189b0f83db95462244e2dc2e12c68741c924cb46.tar.gz", - "hash": "1fkspkw0b61q4k13zmnzi9pbw9b5yyd3v1id2ml44xbh1qa09w2m" + "revision": "3e3ed2f3773a4e61db1f4ae8f55dc99c574ee6e1", + "url": "https://git.confusedcompiler.org/leana8959/wallpapers/archive/3e3ed2f3773a4e61db1f4ae8f55dc99c574ee6e1.tar.gz", + "hash": "1bkxfbxck16zvby5ynhgriv9yf137jmjxfihlwz03lr5cwvdbxbf" }, "wired-notify": { "type": "Git", From d96871819cfabeff51bdf9e45847f31bbf743466 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Thu, 30 Oct 2025 21:01:30 +0800 Subject: [PATCH 014/178] vanadium/kernel-overlay: remove scheduler configs --- nix/configurations/vanadium/kernel-overlay.nix | 4 ---- 1 file changed, 4 deletions(-) diff --git a/nix/configurations/vanadium/kernel-overlay.nix b/nix/configurations/vanadium/kernel-overlay.nix index c6615c22..6cb8c7e4 100644 --- a/nix/configurations/vanadium/kernel-overlay.nix +++ b/nix/configurations/vanadium/kernel-overlay.nix @@ -38,10 +38,6 @@ in { # Without more testing, we should accept the claim that its more power efficient and stick to it CPU_FREQ = yes; X86_INTEL_PSTATE = lib.mkForce no; - CPU_FREQ_DEFAULT_GOV_SCHEDUTIL = lib.mkForce no; - CPU_FREQ_DEFAULT_GOV_ONDEMAND = yes; - # ERROR: could not insert 'amd_freq_sensitivity': No such device - X86_AMD_FREQ_SENSITIVITY = module; # skipping firmware loading section since it's handled by other parts of nixos options SENSORS_K10TEMP = yes; From 4669dd485d216d912a2b0940becdbd954929e442 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Thu, 30 Oct 2025 21:01:40 +0800 Subject: [PATCH 015/178] npins: update inputs --- npins/sources.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/npins/sources.json b/npins/sources.json index 82cafe9d..7df0bc2f 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -221,9 +221,9 @@ }, "branch": "master", "submodules": false, - "revision": "d6645c340ef7d821602fd2cd199e8d1eed10afbc", - "url": "https://github.com/NixOS/nixos-hardware/archive/d6645c340ef7d821602fd2cd199e8d1eed10afbc.tar.gz", - "hash": "0m84zxwanfq34j568w4xkvip5hwpwbhsk46xjvnl063y77i54vfs" + "revision": "43ffe9ac82567512abb83187cb673de1091bdfa8", + "url": "https://github.com/NixOS/nixos-hardware/archive/43ffe9ac82567512abb83187cb673de1091bdfa8.tar.gz", + "hash": "1amgw52j0z8mgfklgz3nfa1qcr4sj0vblapamqzsw148ii4xblsx" }, "nixpkgs": { "type": "Git", @@ -234,9 +234,9 @@ }, "branch": "nixos-25.05-small", "submodules": false, - "revision": "4d9bd66e3ea558621ae800445e9302a2aa1bb687", - "url": "https://github.com/NixOS/nixpkgs/archive/4d9bd66e3ea558621ae800445e9302a2aa1bb687.tar.gz", - "hash": "0dzq4bp8qamilabyy014qsjivr2ga7348da5fjiqbkp7y7fhbdk0" + "revision": "90b70846420ac681b72176a88d9fd0a5a06c74b1", + "url": "https://github.com/NixOS/nixpkgs/archive/90b70846420ac681b72176a88d9fd0a5a06c74b1.tar.gz", + "hash": "05ba9jcr3kgg9pn8alnk7bn63xxq2xahw8gpaclsy67q6nbya375" }, "nur": { "type": "Git", @@ -247,9 +247,9 @@ }, "branch": "main", "submodules": false, - "revision": "e68fcda79871132cb42777c15a2c4a3ea563cad6", - "url": "https://github.com/nix-community/nur/archive/e68fcda79871132cb42777c15a2c4a3ea563cad6.tar.gz", - "hash": "0qng617rx1b5vifnigrhshlsb7rviwaii2czbpgbi8ljyivw10v0" + "revision": "fd763567eda0a287d5512590a89b8bdf86f8cf4b", + "url": "https://github.com/nix-community/nur/archive/fd763567eda0a287d5512590a89b8bdf86f8cf4b.tar.gz", + "hash": "148rl5ckahjw99vvk2xiq17hbfggxp0nqvsr8f22sqs94i171hqh" }, "pin-emacs28": { "type": "Git", From 3e7a697db04fedaa5a7b00ce746d4e235cbf53b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Thu, 30 Oct 2025 21:25:44 +0800 Subject: [PATCH 016/178] vanadium/kernel-overlay: add performance monitoring options --- nix/configurations/vanadium/kernel-overlay.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nix/configurations/vanadium/kernel-overlay.nix b/nix/configurations/vanadium/kernel-overlay.nix index 6cb8c7e4..4243b3f6 100644 --- a/nix/configurations/vanadium/kernel-overlay.nix +++ b/nix/configurations/vanadium/kernel-overlay.nix @@ -30,10 +30,15 @@ in { SCHED_MC = yes; X86_MCE = yes; X86_MCE_AMD = yes; + X86_MCE_INTEL = no; PERF_EVENTS_INTEL_RAPL = yes; X86_AMD_PSTATE = yes; X86_POWERNOW_K8 = no; + # Processor type and features > Performance monitoring + PERF_EVENTS_AMD_POWER = yes; + PERF_EVENTS_AMD_UNCORE = yes; + # With amd_pstate=active ondemand won't be available anyway. # Without more testing, we should accept the claim that its more power efficient and stick to it CPU_FREQ = yes; From fe642eba09612b85eba76aa26ff2d578d552ecb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Thu, 30 Oct 2025 23:38:17 +0800 Subject: [PATCH 017/178] vanadium: update network --- .../vanadium/nixos/connectivity/networks.nix | 4 ++-- nix/secrets/wpa_password.age | Bin 735 -> 717 bytes 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nix/configurations/vanadium/nixos/connectivity/networks.nix b/nix/configurations/vanadium/nixos/connectivity/networks.nix index e603f0e2..e87052ce 100644 --- a/nix/configurations/vanadium/nixos/connectivity/networks.nix +++ b/nix/configurations/vanadium/nixos/connectivity/networks.nix @@ -1,10 +1,11 @@ let + preferredPriority = 20; privatePriority = 10; limitedPriority = -10; in [ { ssid = "~"; - priority = privatePriority; + priority = preferredPriority; hasPassword = true; } { @@ -28,7 +29,6 @@ in [ ssid = "5526-1"; # TODO: set bssid preference ? priority = privatePriority; hasPassword = true; - scanOnLowSignal = true; } { diff --git a/nix/secrets/wpa_password.age b/nix/secrets/wpa_password.age index 42ffe14d557eb948af961823da7abbf3185ac5d7..805ead8d7f71ee66b2043c2481d39bc92dad0fb3 100644 GIT binary patch delta 685 zcmV;e0#g0o11AwD|R+9W>j!wX=+9_Lqla+NeV4K zAaiqQEoEdfH8n9gAbDpsHDW;^ZeeUNHc>BnS#3{tD|be0a(^~@Heo_XbSq6Saz<%* zMM^g_cPn97V^K#{3N&+LV@gGLXm3e4S8+v0ML0BYLN`%0Z$oS^Y)McxIcGyORAfXe zQF?kb3N1b$U{f?LXL4m>b7dfHC@3IJNk(`eOKw;r3QJQ;YGz0@H+5lGV{lGyaW!c; zS29*qZ(%iOP=9H9R(Ux~c2##qVnR|(cTG1>VQqF{bTe9ca9MOVIWTcWLo*6)VNYi> zMLA@5bZ$8@Q3@?BEg)ujXGAeIRCH2kL03{|b#5zeb#6ydSV~rBYdkT#L45L*{g~ed2xZ= z?rQey+cy;zxv-jFX@Q2dDJsq^(LgAX(8az*1%7ttG~WDusyuGz@r#0IixHH;vRL}c z5IjFq`j$bi@vQ}NLO>Q^u4p4u?tQ_E)C`2ZRi3M7J^RfDVnnhy1R5gu>qRxbYlUi< zm1C@S;eX@~ADgX+l&~qgs6=v!gv`Mj0fOENN_25F@sfBAin9eh3c^7*;3=n9VxV6W z-u>fQ-0;s>v%8InKK@&@#QIRbRfn`CpzHIrmr_z;@v-30Q+4ML1UIp`<$N_=YfZwT zOcEOf^IgT)SNXgbEPrn@SxZq*ZB0vLW=wZ@Vp2p|GgL%)S8HuTZFDO~R(3B+dSz5s zHd!<=Q3`2TL0M8|V_{l(GIBw1c}r?+Vpw-aH!@3kQb=k!NJ3U@b8bjtV@-BNa|$g! zAaiqQEoEdfH8n9gAbDpsHDW;^YB6prP(gHNHCcIKc}q@7Lw_%9QcE~ibZci(aaUnv zSXOmuW=uqKaWX+;3R5+1D@;yNZZK40W6$XdlQk*E8zw#$}7q5%;{1xD8j?0G2|8v44^&<~)+}h)E!RpH2GGf+v81 z8*T{5&^8P3r_Og;yaWa)1moKhP!Y%+KktI9c7(o_=&L%4L^e5Aa0#mjdzlt2ONW(p zhp}6PCGfEm)e4%c3uTJn^+1B_IHJ|UxvjIJ7h8k@{?!xUI0fP(LQM3@Cvl2$e?$u; zVE#W;uYcbZcF0^8B=^0;6L88p6IW#B1#A6bo{MzoVS@{Kd8+`;$7AK$JhPs}1hB5W za~aXVC`)8#7;qY^&mbs$FjXu#XYI@T<4im`cmzk#Iv99U?v6vysafxp`r@%?YJj$M z(OPoT*oJ@6e>3oW?^tH8-2Kn>fta$GyLPhk)PvKX7;$z90x?>0#E3 lpRsnJxVWDN_i5fmEG{So Date: Fri, 31 Oct 2025 11:33:32 +0800 Subject: [PATCH 018/178] vanadium/url-eater: correct url matching --- nix/configurations/vanadium/nixos/programs.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nix/configurations/vanadium/nixos/programs.nix b/nix/configurations/vanadium/nixos/programs.nix index f66aed03..2f479f34 100644 --- a/nix/configurations/vanadium/nixos/programs.nix +++ b/nix/configurations/vanadium/nixos/programs.nix @@ -63,10 +63,10 @@ enable = true; filters = '' category "Spotify" { - params "context@open.spotify.com" "si@open.spotify.com" + params "context@*spotify.com" "si@*spotify.com" } category "YouTube" { - params "si@youtu.be" "pp@youtu.be" "si@youtube.com" "pp@youtube.com" + params "si@youtu.be" "pp@youtu.be" "si@*youtube.com" "pp@*youtube.com" } category "WTF" { params "utm_*" From 12ccc6c61994ccde566621521b0ed5a99340bcbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Fri, 31 Oct 2025 12:05:03 +0800 Subject: [PATCH 019/178] packages/ai_blocklist: init --- nix/packages/by-name/ai_blocklist/package.nix | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 nix/packages/by-name/ai_blocklist/package.nix diff --git a/nix/packages/by-name/ai_blocklist/package.nix b/nix/packages/by-name/ai_blocklist/package.nix new file mode 100644 index 00000000..dc8967a8 --- /dev/null +++ b/nix/packages/by-name/ai_blocklist/package.nix @@ -0,0 +1,23 @@ +{ + fetchFromGitHub, + stdenvNoCC, + lib, +}: let + rev = "9bb188e2701138e03f73bacebd6b19b181ca0012"; +in + stdenvNoCC.mkDerivation { + pname = "ai_blocklist"; + version = "unstable-" + lib.substring 0 8 rev; + + src = fetchFromGitHub { + owner = "laylavish"; + repo = "uBlockOrigin-HUGE-AI-Blocklist"; + inherit rev; + hash = "sha256-p3wfR28DH6V8BHn9DT10d09Yq3mdbBecWwlR1CdDYUA="; + }; + + installPhase = '' + cp noai_hosts.txt $out + sed -i 's/^0.0.0.0 //' $out + ''; + } From 3eb030b8f42d8ae85414a16a509e190a574df102 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Fri, 31 Oct 2025 12:08:50 +0800 Subject: [PATCH 020/178] packages/hategroup_blocklist: init --- .../by-name/hategroup_blocklist/package.nix | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 nix/packages/by-name/hategroup_blocklist/package.nix diff --git a/nix/packages/by-name/hategroup_blocklist/package.nix b/nix/packages/by-name/hategroup_blocklist/package.nix new file mode 100644 index 00000000..09d1b687 --- /dev/null +++ b/nix/packages/by-name/hategroup_blocklist/package.nix @@ -0,0 +1,22 @@ +{ + fetchFromGitHub, + stdenvNoCC, + lib, +}: let + rev = "cc19c050997d5f54014bb20c764b131e003dfb17"; +in + stdenvNoCC.mkDerivation { + pname = "hategroup_blocklist"; + version = "unstable-" + lib.substring 0 8 rev; + + src = fetchFromGitHub { + owner = "chigh"; + repo = "hategroup-dnsbl"; + inherit rev; + hash = "sha256-SZBrjIBUw687MdrbOV7WrP5IhAAtKvPL2GqdcICHNvQ="; + }; + + installPhase = '' + cp blocklist.txt $out + ''; + } From 7a613e9a43e1abd5f07bd69ec70310f302e758c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Fri, 31 Oct 2025 12:17:40 +0800 Subject: [PATCH 021/178] vanadium/secure_dns: simplify blocklist management --- .../vanadium/nixos/secure_dns.nix | 37 ++----------------- 1 file changed, 4 insertions(+), 33 deletions(-) diff --git a/nix/configurations/vanadium/nixos/secure_dns.nix b/nix/configurations/vanadium/nixos/secure_dns.nix index eebd747a..1a75be76 100644 --- a/nix/configurations/vanadium/nixos/secure_dns.nix +++ b/nix/configurations/vanadium/nixos/secure_dns.nix @@ -29,41 +29,12 @@ # Blocklists are made of one pattern per line. # https://github.com/DNSCrypt/dnscrypt-proxy/blob/fa59f990431a49b6485f63f96601bc7e64017bf8/dnscrypt-proxy/example-dnscrypt-proxy.toml#L583C4-L583C75 - blocked_names.blocked_names_file = let + blocked_names.blocked_names_file = pkgs.concatText "dnsblocklist_combined" [ # Prevent building up reliance on chatbots # Gotta preserve that thinking ability of my smoof bwain - ai_list = let - src = pkgs.fetchFromGitHub { - owner = "laylavish"; - repo = "uBlockOrigin-HUGE-AI-Blocklist"; - rev = "9bb188e2701138e03f73bacebd6b19b181ca0012"; - hash = "sha256-p3wfR28DH6V8BHn9DT10d09Yq3mdbBecWwlR1CdDYUA="; - }; - in - lib.pipe (builtins.readFile "${src}/noai_hosts.txt") [ - (lib.replaceStrings ["\r\n"] ["\n"]) # convert to unix ending just in case - (lib.splitString "\n") - (builtins.filter (x: ! (x == "" || lib.hasPrefix "#" x))) - (builtins.map (x: builtins.elemAt (lib.splitString " " x) 1)) # remove 0.0.0.0 - ]; - - hategroup_list = let - src = pkgs.fetchFromGitHub { - owner = "chigh"; - repo = "hategroup-dnsbl"; - rev = "cc19c050997d5f54014bb20c764b131e003dfb17"; - hash = "sha256-SZBrjIBUw687MdrbOV7WrP5IhAAtKvPL2GqdcICHNvQ="; - }; - in - lib.pipe (builtins.readFile "${src}/blocklist.txt") [ - (lib.replaceStrings ["\r\n"] ["\n"]) # convert to unix ending just in case - (lib.splitString "\n") - (builtins.filter (x: ! (x == "" || lib.hasPrefix "#" x))) - ]; - - combined_lists = ai_list ++ hategroup_list; - in - pkgs.writeText "dnsblocklist" (builtins.concatStringsSep "\n" combined_lists); + pkgs.ai_blocklist + pkgs.hategroup_blocklist + ]; # Add this to test if dnscrypt-proxy is actually used to resolve DNS requests # query_log.file = "/var/log/dnscrypt-proxy/query.log"; From a135fecd684c0aaa45fe229fd713eb8a37129466 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Fri, 31 Oct 2025 12:27:41 +0800 Subject: [PATCH 022/178] vanadium/secure_dns: block some domains for a while --- nix/configurations/vanadium/nixos/secure_dns.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nix/configurations/vanadium/nixos/secure_dns.nix b/nix/configurations/vanadium/nixos/secure_dns.nix index 1a75be76..1aeeff7f 100644 --- a/nix/configurations/vanadium/nixos/secure_dns.nix +++ b/nix/configurations/vanadium/nixos/secure_dns.nix @@ -34,6 +34,12 @@ # Gotta preserve that thinking ability of my smoof bwain pkgs.ai_blocklist pkgs.hategroup_blocklist + + # Gotta purify my smoos brain for a while + (pkgs.writeText "extra_dns_blocklist" '' + instagram.com + youtube.com + '') ]; # Add this to test if dnscrypt-proxy is actually used to resolve DNS requests From 726a416e32b1d2d570b3181c95beeda6ea0661c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Fri, 31 Oct 2025 16:02:37 +0800 Subject: [PATCH 023/178] vanadium/xmonad: make vlc always opaque --- nix/configurations/vanadium/home/xmonad/xmonad.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/nix/configurations/vanadium/home/xmonad/xmonad.hs b/nix/configurations/vanadium/home/xmonad/xmonad.hs index d4de3680..8fc0a1c9 100644 --- a/nix/configurations/vanadium/home/xmonad/xmonad.hs +++ b/nix/configurations/vanadium/home/xmonad/xmonad.hs @@ -65,6 +65,7 @@ main = , "Signal" , "steam" , "discord" + , "vlc" ] -?> opaque From 16a1666570de89fa9a49579241e8ecccf48ed99e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Fri, 31 Oct 2025 20:49:32 +0800 Subject: [PATCH 024/178] vanadium/xmonad: remove fancy insertion rules --- .../vanadium/home/xmonad/xmonad.hs | 54 +++++++------------ 1 file changed, 19 insertions(+), 35 deletions(-) diff --git a/nix/configurations/vanadium/home/xmonad/xmonad.hs b/nix/configurations/vanadium/home/xmonad/xmonad.hs index 8fc0a1c9..c60fb6d7 100644 --- a/nix/configurations/vanadium/home/xmonad/xmonad.hs +++ b/nix/configurations/vanadium/home/xmonad/xmonad.hs @@ -25,7 +25,6 @@ import XMonad.Util.SpawnOnce import XMonad.Layout.Magnifier import Data.Map.Strict qualified as M -import Data.Monoid import System.Posix import Graphics.X11.ExtraTypes.XF86 @@ -102,42 +101,27 @@ main = mag tallr ||| Full , manageHook = - let - hasEvenWindows :: X Bool - hasEvenWindows = g <$> get - where g = even . length . W.integrate' - . W.stack . W.workspace . W.current . windowset + composeAll + [ className ~? "NautilusPreviewer" --> customFloating centeredFloat + , className =? "feh" --> customFloating buttomRightFloat + , className =? "Minder" + <&&> not <$> title ~? "Pick a Color" -- ignore the color picker + --> customFloating centeredFloat + , isFirefoxPIP --> doFloat - -- When having a lot of windows this will converge into the middle of the stack - insertInMiddle :: Query (Endo WindowSet) - insertInMiddle = - ifM - (liftX hasEvenWindows) - (insertPosition Below Newer) -- New window is odd - (insertPosition Above Newer) -- New window is even - in - composeAll - [ className ~? "NautilusPreviewer" --> customFloating centeredFloat - , className =? "feh" --> customFloating buttomRightFloat - , className =? "Minder" - <&&> not <$> title ~? "Pick a Color" -- ignore the color picker - --> customFloating centeredFloat - , isFirefoxPIP --> doFloat + , namedScratchpadManageHook myScratchpads + ] - , namedScratchpadManageHook myScratchpads - ] - - <> - composeOne - [ className =? "firefox" -?> insertPosition Master Newer - , className =? "kitty" -?> insertPosition Below Newer - , className `isOneOf` - [ "sioyek" - , "Nautilus" - ] - -?> insertPosition End Older - , Just <$> insertInMiddle - ] + <> + composeOne + [ className =? "firefox" -?> insertPosition Master Newer + , className =? "kitty" -?> insertPosition Below Newer + , className `isOneOf` + [ "sioyek" + , "Nautilus" + ] + -?> insertPosition End Older + ] } -- Only remove mappings that needs pass through (it's a map). From a1024668db529d2cb1fcfbba5ff6c00f57cd279f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sun, 2 Nov 2025 11:55:17 +0800 Subject: [PATCH 025/178] sudo-conf: make doas inherit PATH for just --- nix/nixosModules/common/sudo-conf.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/nix/nixosModules/common/sudo-conf.nix b/nix/nixosModules/common/sudo-conf.nix index b2b66182..ad4c6a6a 100644 --- a/nix/nixosModules/common/sudo-conf.nix +++ b/nix/nixosModules/common/sudo-conf.nix @@ -1,8 +1,18 @@ {pkgs, ...}: { - security.doas.enable = true; security.sudo.enable = false; environment.systemPackages = [ pkgs.doas-sudo-shim ]; + security.doas = { + enable = true; + extraRules = [ + { + # invoke just with doas directly as a nixos-rebuild helper + users = [":wheel"]; + setEnv = ["PATH"]; + cmd = "just"; + } + ]; + }; } From 006798d917101867d10b492ac323c7fd256d429e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sun, 2 Nov 2025 05:12:02 +0100 Subject: [PATCH 026/178] hydrogen: init (#20) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-on: https://codeberg.org/leana8959/.files/pulls/20 Co-authored-by: Léana 江 Co-committed-by: Léana 江 --- README.md | 17 +++ default.nix | 4 + nix/configurations/hydrogen.nix | 134 ++++++++++++++++++ nix/configurations/hydrogen/home/programs.nix | 61 ++++++++ .../hydrogen/nixos/connectivity.nix | 73 ++++++++++ nix/configurations/hydrogen/nixos/misc.nix | 20 +++ .../hydrogen/nixos/programs.nix | 19 +++ nix/configurations/vanadium.nix | 49 +++---- .../vanadium/nixos/connectivity.nix | 2 +- nix/configurations/vanadium/nixos/misc.nix | 7 +- .../nixos => }/connectivity/networks.nix | 0 .../connectivity/universite_de_rennes.pem | 0 nix/homeModules/common/git.nix | 12 +- nix/identities.nix | 4 + .../extra}/secure_dns.nix | 6 +- nix/overlays/lix.nix | 3 + nix/secrets/four_pwd.age | 23 +-- nix/secrets/hoot_token.age | 23 +-- nix/secrets/iambconfig.age | Bin 778 -> 1054 bytes nix/secrets/parrot_token.age | 22 +-- nix/secrets/restic_backblaze_env.age | Bin 495 -> 695 bytes nix/secrets/restic_backblaze_pwd.age | 21 +-- nix/secrets/restic_backblaze_repo.age | Bin 481 -> 709 bytes nix/secrets/restic_four_pwd.age | 22 +-- nix/secrets/restic_sgbk_pwd.age | 22 +-- nix/secrets/sgbk_pwd.age | 22 +-- nix/secrets/sshconfig.age | Bin 848 -> 975 bytes nix/secrets/two_pwd.age | 22 +-- nix/secrets/typst-bot_token.age | Bin 483 -> 776 bytes nix/secrets/wpa_password.age | Bin 717 -> 867 bytes npins/sources.json | 34 ----- 31 files changed, 481 insertions(+), 141 deletions(-) create mode 100644 nix/configurations/hydrogen.nix create mode 100644 nix/configurations/hydrogen/home/programs.nix create mode 100644 nix/configurations/hydrogen/nixos/connectivity.nix create mode 100644 nix/configurations/hydrogen/nixos/misc.nix create mode 100644 nix/configurations/hydrogen/nixos/programs.nix rename nix/{configurations/vanadium/nixos => }/connectivity/networks.nix (100%) rename nix/{configurations/vanadium/nixos => }/connectivity/universite_de_rennes.pem (100%) rename nix/{configurations/vanadium/nixos => nixosModules/extra}/secure_dns.nix (98%) create mode 100644 nix/overlays/lix.nix diff --git a/README.md b/README.md index 402fc97f..7da3091b 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,23 @@ This repo is managed with Nix + GNU stow # profit ``` +## Installation for Raspberry Pi +Raspberry Pi uses the same configuration as the installer. +The `(modulesPath + "/installer/sd-card/sd-image-aarch64.nix")` allows this. + +- Build the image `nixosConfigurations..config.system.build.sdImage`. + Disable stuff like Lix to build this. + You might want to use raw password once so you don't have agenix decryption + problem while trying to have wpa_supplicant have the right passwords. + +- Burn the image to the sd card. + ```bash + zstdcat result/sd-image/nixos-image-sd-card--aarch64-linux.img.zst | + doas dd of=/dev/sdb status=progress + ``` + +- profit + # Pitfalls ## `users.mutableUsers` NEVER set this to true without declaratively setting the passwords. diff --git a/default.nix b/default.nix index 7deece54..7445744d 100644 --- a/default.nix +++ b/default.nix @@ -8,6 +8,10 @@ system = "x86_64-linux"; modules = [./nix/configurations/vanadium.nix]; }; + hydrogen = { + system = "aarch64-linux"; + modules = [./nix/configurations/hydrogen.nix]; + }; installer = { system = "x86_64-linux"; modules = [./nix/configurations/installer.nix]; diff --git a/nix/configurations/hydrogen.nix b/nix/configurations/hydrogen.nix new file mode 100644 index 00000000..d0196449 --- /dev/null +++ b/nix/configurations/hydrogen.nix @@ -0,0 +1,134 @@ +let + sources = import ../../npins; + + hostname = "hydrogen"; + username = "leana"; +in + { + modulesPath, + config, + pkgs, + lib, + ... + }: let + inherit (lib.modules) mkAliasOptionModule; + in { + imports = [ + # The generator and hardware configuration + (modulesPath + "/installer/sd-card/sd-image-aarch64.nix") + + # + # Shorthands + # + (mkAliasOptionModule ["me"] ["users" "users" username]) + (mkAliasOptionModule ["hm"] ["home-manager" "users" username]) + + # + # hostname + # + {_module.args = {inherit hostname;};} + + # + # nixpkgs + # + { + nixpkgs = { + overlays = map import [ + ../overlays/agenix.nix + ../overlays/nur.nix + ../overlays/nix-tree.nix + ../packages/overlay.nix + + # use lix everywhere and wrap it with nom + ../overlays/lix.nix + ../overlays/nix-monitored.nix + ]; + + # Set NIX_PATH and flake registry at the same time + # https://github.com/NixOS/nixpkgs/pull/254405 + flake.source = sources.nixpkgs; + }; + + nix.package = pkgs.nix-monitored; + + system.nixos.version = lib.substring 0 8 sources.nixpkgs.revision; + } + + ./hydrogen/nixos/misc.nix + ./hydrogen/nixos/programs.nix + ./hydrogen/nixos/connectivity.nix + + # QUIRK: + # Had issue when building the installer as it fails to bootstrap itself + # Might be useful to disable for the first build. + ../nixosModules/extra/secure_dns.nix + ../nixosModules/common/disable-command-not-found.nix + ../nixosModules/common/network.nix + ../nixosModules/common/sudo-conf.nix + ../nixosModules/common/system-nixconf.nix + + ../nixosModules/extra/leana.nix + + # + # Extern modules + # + (sources.agenix + "/modules/age.nix") + + (sources.nixos-hardware + "/raspberry-pi/4") + + # + # home-manager + # + (sources.home-manager + "/nixos") + { + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + sharedModules = [{home.stateVersion = lib.mkDefault config.system.stateVersion;}]; + }; + + hm.imports = [ + # + # hostname + # + {_module.args = {inherit hostname;};} + + # + # home modules + # + ./hydrogen/home/programs.nix + + ../homeModules/common/btop + ../homeModules/common/fish + ../homeModules/common/starship + ../homeModules/common/fzf.nix + ../homeModules/common/tmux + ../homeModules/common/vim + ../homeModules/common/direnv.nix + ../homeModules/common/git.nix + ../homeModules/common/gpg.nix + ../homeModules/common/leana.nix + ../homeModules/common/locale.nix + ../homeModules/common/packages.nix + ../homeModules/common/tealdeer.nix + + ../homeModules/extra/tmux-fish-integration.nix + + # + # Extern modules + # + (sources.agenix + "/modules/age-home.nix") + (import sources.wired-notify).homeManagerModules.default + ]; + } + + # + # Secrets + # + { + age.secrets = { + wpa_password.file = "${../secrets/wpa_password.age}"; + }; + } + ]; + } diff --git a/nix/configurations/hydrogen/home/programs.nix b/nix/configurations/hydrogen/home/programs.nix new file mode 100644 index 00000000..bfe508c8 --- /dev/null +++ b/nix/configurations/hydrogen/home/programs.nix @@ -0,0 +1,61 @@ +{ + pkgs, + lib, + config, + ... +}: { + home.sessionVariables = let + fishCfg = config.programs.fish; + in { + "SHELL" = lib.mkIf fishCfg.enable (lib.getExe fishCfg.package); + }; + + home.packages = [ + pkgs.nmap + pkgs.stow + pkgs.zip + pkgs.unzip + pkgs.gnutar + pkgs.p7zip + pkgs.bc + pkgs.dig + pkgs.hutils + pkgs.miniserve + pkgs.agenix + pkgs.nix-which + + # pretty tui tools + pkgs.du-dust + pkgs.tokei + pkgs.hyperfine + pkgs.watchexec + pkgs.onefetch + pkgs.just + + # nix tools + pkgs.alejandra + pkgs.nurl + pkgs.npins + pkgs.nix-tree + pkgs.nh + ]; + + programs = { + neovim = { + enable = true; + defaultEditor = true; + }; + lazygit.enable = true; + fish.enable = true; + starship.enable = true; + tmux.enable = true; + direnv.enable = true; + ripgrep.enable = true; + + btop.enable = true; + }; + + services = { + gpg-agent.enable = true; + }; +} diff --git a/nix/configurations/hydrogen/nixos/connectivity.nix b/nix/configurations/hydrogen/nixos/connectivity.nix new file mode 100644 index 00000000..a71fc30c --- /dev/null +++ b/nix/configurations/hydrogen/nixos/connectivity.nix @@ -0,0 +1,73 @@ +{ + config, + lib, + ... +}: { + users.users.root.openssh.authorizedKeys.keys = let + ids = import ../../../identities.nix; + in + builtins.concatMap builtins.attrValues (builtins.attrValues ids); + + networking = { + networkmanager.enable = lib.mkForce false; + + firewall.allowedTCPPorts = [ + 8080 + + # For 'localsend' + # https://github.com/localsend/localsend?tab=readme-ov-file#setup + 53317 + ]; + + # To enable roaming https://wiki.archlinux.org/title/Wpa_supplicant#Roaming + wireless = { + enable = true; + userControlled.enable = true; + secretsFile = config.age.secrets.wpa_password.path; + scanOnLowSignal = false; + networks = let + # wpa_supplicant uses `strchr` to seek to the first `=`, so the only forbidden character is `=`. + escapePwdKey = lib.replaceStrings ["="] ["_"]; + + fromList = ns: let + go = networkArgs @ { + ssid, + # Custom fields wrapping nixpkgs module options + hasPassword ? false, + scanOnLowSignal ? false, + randomizeMac ? false, + ... + }: { + ${ssid} = lib.mkMerge [ + (builtins.removeAttrs networkArgs ["ssid" "hasPassword" "scanOnLowSignal" "randomizeMac"]) + (lib.optionalAttrs hasPassword { + pskRaw = "ext:${escapePwdKey ssid}"; + }) + (lib.optionalAttrs scanOnLowSignal { + extraConfig = '' + bgscan="simple:30:-70:3600" + ''; + }) + (lib.optionalAttrs randomizeMac { + extraConfig = '' + mac_addr=1 + ''; + }) + ]; + }; + in + lib.mkMerge (map go ns); + + allowList = builtins.filter (x: x.ssid == "~"); + in + fromList ( + # We only want to use my own network + allowList ( + import ../../../connectivity/networks.nix + ) + ); + }; + }; + + hardware.bluetooth.enable = true; +} diff --git a/nix/configurations/hydrogen/nixos/misc.nix b/nix/configurations/hydrogen/nixos/misc.nix new file mode 100644 index 00000000..3cb2c3d4 --- /dev/null +++ b/nix/configurations/hydrogen/nixos/misc.nix @@ -0,0 +1,20 @@ +{ + system.stateVersion = "25.05"; + + swapDevices = [ + { + device = "/var/swapfile"; + size = 1024; # MB + } + ]; + + # Related https://github.com/NixOS/nixpkgs/issues/154163#issuecomment-1350599022 + # + # modprobe: FATAL: Module sun4i-drm not found in directory /nix/store/gvvwpdckzcr4iamp1iyrqw3nzb7bg6c4-linux-rpi-6.6.51-stable_20241008-modules/lib/modules/6.6.51 + nixpkgs.overlays = [ + (final: prev: { + makeModulesClosure = x: + prev.makeModulesClosure (x // {allowMissing = true;}); + }) + ]; +} diff --git a/nix/configurations/hydrogen/nixos/programs.nix b/nix/configurations/hydrogen/nixos/programs.nix new file mode 100644 index 00000000..5f281024 --- /dev/null +++ b/nix/configurations/hydrogen/nixos/programs.nix @@ -0,0 +1,19 @@ +{pkgs, ...}: { + environment.systemPackages = [ + pkgs.man-pages + pkgs.man-pages-posix + ]; + + # + # Programs + # + programs = { + vim.enable = true; + vim.defaultEditor = true; + + git.enable = true; + }; + + # Helps with kitty when ssh from remote + environment.enableAllTerminfo = true; +} diff --git a/nix/configurations/vanadium.nix b/nix/configurations/vanadium.nix index 5be9bac1..0e72a47e 100644 --- a/nix/configurations/vanadium.nix +++ b/nix/configurations/vanadium.nix @@ -42,35 +42,32 @@ in rocmSupport = true; }; - overlays = - map import - [ - ../overlays/agenix.nix - ../overlays/disko.nix - ../overlays/nur.nix - ../overlays/wired-notify.nix - ../overlays/nix-tree.nix - ../overlays/wallpapers.nix - ../overlays/nil.nix - ../overlays/dix.nix - ../overlays/eepy.nix - ../overlays/calibre-no-mime.nix - ../overlays/fcitx5-table-extra-taiwanese.nix + overlays = map import [ + ../overlays/agenix.nix + ../overlays/disko.nix + ../overlays/nur.nix + ../overlays/wired-notify.nix + ../overlays/nix-tree.nix + ../overlays/wallpapers.nix + ../overlays/nil.nix + ../overlays/dix.nix + ../overlays/eepy.nix + ../overlays/calibre-no-mime.nix + ../overlays/fcitx5-table-extra-taiwanese.nix - ../overlays/iosevka.nix - ../packages/overlay.nix + ../overlays/iosevka.nix + ../packages/overlay.nix - ./vanadium/overlay.nix - ./vanadium/kernel-overlay.nix + ./vanadium/overlay.nix + ./vanadium/kernel-overlay.nix + + # removed, but I need it for PLFA! + ../overlays/pin-emacs28.nix - # removed, but I need it for PLFA! - ../overlays/pin-emacs28.nix - ] # use lix everywhere and wrap it with nom - ++ [ - (import (sources.lix-module + "/overlay.nix") {inherit (sources) lix;}) - (import ../overlays/nix-monitored.nix) - ]; + ../overlays/lix.nix + ../overlays/nix-monitored.nix + ]; # Set NIX_PATH and flake registry at the same time # https://github.com/NixOS/nixpkgs/pull/254405 @@ -93,7 +90,6 @@ in ./vanadium/nixos/audio.nix ./vanadium/nixos/connectivity.nix - ./vanadium/nixos/secure_dns.nix ./vanadium/nixos/input.nix ./vanadium/nixos/misc.nix @@ -111,6 +107,7 @@ in ../nixosModules/common/system-nixconf.nix ../nixosModules/common/xscreensaver.nix + ../nixosModules/extra/secure_dns.nix ../nixosModules/extra/zram.nix ../nixosModules/extra/leana.nix diff --git a/nix/configurations/vanadium/nixos/connectivity.nix b/nix/configurations/vanadium/nixos/connectivity.nix index 5a0891fc..ab4aa177 100644 --- a/nix/configurations/vanadium/nixos/connectivity.nix +++ b/nix/configurations/vanadium/nixos/connectivity.nix @@ -70,7 +70,7 @@ in lib.mkMerge (map go ns); in - fromList (import ./connectivity/networks.nix); + fromList (import ../../../connectivity/networks.nix); }; }; diff --git a/nix/configurations/vanadium/nixos/misc.nix b/nix/configurations/vanadium/nixos/misc.nix index db83b159..91579fc2 100644 --- a/nix/configurations/vanadium/nixos/misc.nix +++ b/nix/configurations/vanadium/nixos/misc.nix @@ -1,4 +1,4 @@ -{ +{config, ...}: { system.stateVersion = "24.11"; boot.loader = { @@ -13,4 +13,9 @@ # https://community.frame.work/t/stability-issues-random-crashes-reboots-and-boot-freezes/62675/4 "pcie_aspm=off" ]; + + # Cross building + # https://discourse.nixos.org/t/how-do-i-get-my-aarch64-linux-machine-to-build-x86-64-linux-extra-platforms-doesnt-seem-to-work/38106/2?u=leana8959 + boot.binfmt.emulatedSystems = ["aarch64-linux"]; + nix.settings.extra-platforms = config.boot.binfmt.emulatedSystems; } diff --git a/nix/configurations/vanadium/nixos/connectivity/networks.nix b/nix/connectivity/networks.nix similarity index 100% rename from nix/configurations/vanadium/nixos/connectivity/networks.nix rename to nix/connectivity/networks.nix diff --git a/nix/configurations/vanadium/nixos/connectivity/universite_de_rennes.pem b/nix/connectivity/universite_de_rennes.pem similarity index 100% rename from nix/configurations/vanadium/nixos/connectivity/universite_de_rennes.pem rename to nix/connectivity/universite_de_rennes.pem diff --git a/nix/homeModules/common/git.nix b/nix/homeModules/common/git.nix index a50ba2a5..68f151c6 100644 --- a/nix/homeModules/common/git.nix +++ b/nix/homeModules/common/git.nix @@ -1,12 +1,22 @@ { lib, config, + pkgs, ... }: { # git plugins programs.git = { lfs.enable = true; - patdiff.enable = true; + patdiff.enable = lib.mkMerge [ + # known to fail on aarch64-linux + (lib.mkIf (pkgs.system == "aarch64-linux") ( + # TODO: investigate this + lib.warn "patdiff has been forcibly disabled because it has previously failed to build" + lib.mkForce + false + )) + (lib.mkDefault true) + ]; }; # 懶惰鬼賴皮 diff --git a/nix/identities.nix b/nix/identities.nix index 649c1ca8..9e94fd65 100644 --- a/nix/identities.nix +++ b/nix/identities.nix @@ -3,4 +3,8 @@ leana = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGPq2o9pbmLRGrOpAP76eYCAscmfakDC7wPm9fmsCCQM leana@vanadium"; root = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDc55vENX+13c4s2w7zjTb8T/AnBnTi96yRC5+fy7Z2A root@vanadium"; }; + hydrogen = { + leana = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEXzNdCA0zZ+WmeKZnhQSQtUcxnQhhDl59E3BPQfLj7Q leana@hydrogen"; + root = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIMVDmEt/12u9U4QGDZBx/Sx8itzqfQ4zWJvcC3pRZqP root@hydrogen"; + }; } diff --git a/nix/configurations/vanadium/nixos/secure_dns.nix b/nix/nixosModules/extra/secure_dns.nix similarity index 98% rename from nix/configurations/vanadium/nixos/secure_dns.nix rename to nix/nixosModules/extra/secure_dns.nix index 1aeeff7f..f662db89 100644 --- a/nix/configurations/vanadium/nixos/secure_dns.nix +++ b/nix/nixosModules/extra/secure_dns.nix @@ -1,9 +1,5 @@ # https://nixos.wiki/wiki/Encrypted_DNS -{ - lib, - pkgs, - ... -}: { +{pkgs, ...}: { networking = { nameservers = ["127.0.0.1" "::1"]; dhcpcd.extraConfig = "nohook resolv.conf"; diff --git a/nix/overlays/lix.nix b/nix/overlays/lix.nix new file mode 100644 index 00000000..6be56324 --- /dev/null +++ b/nix/overlays/lix.nix @@ -0,0 +1,3 @@ +final: _: { + nix = final.lixPackageSets.stable.lix; +} diff --git a/nix/secrets/four_pwd.age b/nix/secrets/four_pwd.age index 2ca25498..cb33568c 100644 --- a/nix/secrets/four_pwd.age +++ b/nix/secrets/four_pwd.age @@ -1,11 +1,14 @@ age-encryption.org/v1 --> ssh-ed25519 7owkuQ WbwyERolRsVLr0HxjKOzEPdaxegb+l+BESYvmMhtzXc -2CDufbW6viuui2Oqmgo/Fd23tQxJJMnFEgmaz0hYn+E --> ssh-ed25519 yg55bA qyqMmtbigot7wP0FuWNQ4mDd6GtSqECCTjf9E5r57HQ -VVYdcCpjGC0TeCoM0r1Ei/kCrYtCN55Kitr5KhyuNXU --> 9"tCN!-grease y p32_~6 -Eer9vu1p9YYXVrYVnRgnlb3htCmnM7sGcbSE9dwLMchbMYnxUNLZ2U9YQscGe4+G -9d1XaRMAKxPmALzNqap3WSbcEZLTmw ---- OfKe6yO+TKKai6mRvprUxhgq5smJqtYMLh1wT26YtlQ -Umt -sCLwǂ^  >EO?C_F \ No newline at end of file +-> ssh-ed25519 0LL3PQ pZvOUiznF408OPkjuasLZmbQZLS5RuRJwVucLpTe2xQ +OgLqiLgT/4Df13l2l2CdsYnMUZSmfh3xZWb3k0ALjdY +-> ssh-ed25519 0dJ6Mg SzGIUfJrv6L09LhVbzMvvaSpP4Cwr6hFFNbcCH6RO3E +jsFof9xMH73XPH/PWv//j9Fc0MPTSwwwIyNzdXd8FxM +-> ssh-ed25519 7owkuQ xtSm22EfAFkscUZ3r69V+S3guCJJu0KjXtWcE+Tv1S4 +13QkwIuZFMz1zIrWRZUfOzPVmc2eK56ruBgUD8lK+aE +-> ssh-ed25519 yg55bA 9ie4rBiJfwrUg/952DPXOY6sHFeTf8Os3bwJ8ZBphFg +PAuEQKfravJxYejS10EgB7aR+pwadl+zVtG57UGj6rA +-> p-grease TV+^qU1F ^'dkwO+: UF.{ e#KV!IV +/ASx0x3SOZzaktns0hYlSYnTzOkfn3SPaiPNbYGuSnzTSzcPEjUBTGAuk7/u7g95 +o8M5T14bFx1Mqyk +--- XGK2yNNL5UzmgLZiQvOK0jB13HiioVOHGzAwzVte7no + )7dYФ?GgYĴlr4E0]DpuD3t E&Ԕx!}I ot]KQd \ No newline at end of file diff --git a/nix/secrets/hoot_token.age b/nix/secrets/hoot_token.age index 76995e5c..dce00a08 100644 --- a/nix/secrets/hoot_token.age +++ b/nix/secrets/hoot_token.age @@ -1,11 +1,14 @@ age-encryption.org/v1 --> ssh-ed25519 7owkuQ JknIZGtwwI5E7eDTM+T5BpOoSmw2IRG49Mm3WwRC9Tw -Z1wjHJNZvQNIUwgoF0+r0JEVFfg4a+X/QA2g+IbfZ+E --> ssh-ed25519 yg55bA 6O5KVqgZDGEVXurVbiVU/jYq6wz4YymiI/2RzvOgdD4 -w3DVArFB8xsjYXmctyV0mqXE5EqAXJ8sBW5C02YztuY --> \.-grease !v -A25MQQ41zOq6KNAIgBSpCWnPZ53XrWnEL58GWVtn8pVlavGACpAV/CcstsUa6yM2 -jmYYTv2AU+BYuZ/JTqGb0vM35e3vODlzGu8MsrQ ---- qm7/iVxbQgrBnoNrGpPzBaHbBeDlQud3HsP2U/epY9g -|YPJe@&~U։Hr9,4~tAcҰu[JL20_Mb^KPH -{(E[|]t&RFY$ Tv6K\=ɨ \ No newline at end of file +-> ssh-ed25519 0LL3PQ 7sq+E69e1+k7Ofs+qrBzfX3ZrHWNl4L7W3tw44WEmFo +EjIviQjW6FD5x9yDoWwdrs1WlTxbnMhMJqqwQApz3DM +-> ssh-ed25519 0dJ6Mg Mbwr0B2vgrfG/AP6kWo/74krh8q0J9ROM0sRZDuPf3E +QW7FLw9SYZDl4ROdXRo1UgxNrkPg8/50wfskI3EycS4 +-> ssh-ed25519 7owkuQ 0jALH8GNUFc4+MVE79olkEINRmlqq8HVCoj/MO514l4 +k7i1YfC6YW0l0IN6rO9bpqCT+j3FBDg7p1yW1YAuSB0 +-> ssh-ed25519 yg55bA UDTNYKv1s+zKRZGbbZshXegb1qS+wfneqJjm7ZV9lmI +a8NLjIzKIFNf96ayOZJcJujuwA1inEsAmzfLaQyLHsw +-> $ww-grease /* +UtyDg6e07OmivhdTTl/Mz+mg/SmDC/cYqI0QDRmvd9hYhgTHG87mcevhyoLXQywp +aH1G2/deE+4+d2PEiXLOJIMM8A +--- b58ZKMa5/o53ttgY/NRQ1zcRTI5i/zWv2+BNwaAxAV8 +OrٖpMGک[E_ߢ VuljCpb+[~ %@ JDop'*ϮИV&~ַei#TL@ mcl(<󒄼bq \ No newline at end of file diff --git a/nix/secrets/iambconfig.age b/nix/secrets/iambconfig.age index c98a06d72f4058cbadcebd8331cfe1107464eab3..707377f3cd7fcbb756c8b4ad92f88701d30481ba 100644 GIT binary patch literal 1054 zcmZY6`)?Bk0KoB(IFJrmqWgitGEV9?wdwBBH;B;ou4{YOZrAR*wqub#uGd~4*X#9l zTk$#E5;QuOff=|2VOe+y;&9-?P$9$MW7)EYx-1Z*WIE936xKk7_$&SepKtQ@F|?dc z1X5x$9pMsnT#5m+utfeMAP8YO9YjDT&8w zgm{^tr9*5^5S2tA>&$|2v{4k?uu-N%-C~&Wsl(Z9v;IHrxmMm0kTWUTC(wZO86Zaj z2d=8PsYt5J*&O zGW*hICy~v9nA;jR=pX))%K@WE1w)1it5<}h(R#BLQVJFahCy1CQw22*K`ziFna#Q`=S7+MmqZkXcb#OzijY+8(CnFo?S8uH!kq^$97%W zcyQ>1ym)5wD>Gv^|M0JQd`Cok`tWQQwp5z?rQPdXWyr7Rk4_+Y)k~dk zF$eaS7i*@ESBP^ delta 734 zcmV<40wMjL2#N-fC0;jgcWZS~AaiwMZ)$R5FGV*{Gj(igRWW&aGH5blPeWBTIa66> zN;WG{WOiXgMPpG_3OF)QN_8+VZg*@iI97U7Z)jRGb97QMI5KB5Of*a~L3T|~b8%`~ zQ%zS@lV1TBe@ay}XiG{?bwPMoXg63wPjys6d0}g8XmC?!LSt}NRd!)?GfFZqPcyBH!yKQN>Nu=SXNGAF;PNKaZ*@hNpVY5WJ^jx3N1b$UnXWP zXL4m>b7de+OJg8YVIm?lWo{rxE_FU2d_-&tcxFR4e`r}RP*G6|EiEk|T2gv2aYu7w zQ!!$9LpEhlK~YmpVr@(^O-C?kO)q&+F++25Qb<-YRzXb)h+ArbMW1cVxwp5lUvpTW=iiP|48)rV@(pPy68?uU4x_X-PDNrvL|P# zim-V|-}cGWY3za0ukmVu6a!-i87I0KKx_dZGaoj-*)R;P4c|l`8<;2?IP7jJd#esd zikd-(QO!`Hv(PyqTb}0108k-&s=ou$@S*cT=_^9tFwURiBrFgOPE4%~-!7m ssh-ed25519 7owkuQ g+/zzLQiHuiuauXP4VvPXWFxmxX9NftrSl88fNcwwC4 -O5kQ1yL3MdlxkRknXStZ+QzMCuIDFK31v8w4YvGXGE4 --> ssh-ed25519 yg55bA GN2EuwUUtBN1p8u8m0Ghn0HEP4yNuYz4whRv55kmnCc -Ck1buWhftdknrJEGak/pJ+mGEPdICNqnzDEazhAQAeQ --> %.'9AY-grease -UyOK7WEX6LgO1Z0AmtClsynfIj1OGcuIlJjIwMwiK+CHGoVjOIIRkbHiarTQw12V -kL7BR6EZRAsEpmoDYVNZrTspogQ4kDKi2KsQRoNuemiTEg ---- W1SmO6s+WRW5fxwneQ0MEv5GzbFc4IX0pNaVGHSWTTA -בs˺#\p-PKh+4Ws=0PC5ЎZ2ny,]gSd9qo?(9UАDJOr(b&hBQ\vp]emYKŞ`S`1 @ (/eYP0 \ No newline at end of file +-> ssh-ed25519 0LL3PQ 6Ue4UZAASHIQDJm8F+qrw7cdlvw+jDlrhIfTOb2mlj8 +F768h+HzBohopJJ584wcHXdKUz3CLW/ATO4nyAW1aw4 +-> ssh-ed25519 0dJ6Mg LYCAlM525ANfQAvAaYPvUpLic7FrSKXkZCDF4PIsWxU +5CrVrQdhARNiCup5fgmQH05sb2k0z/yzDElim66194o +-> ssh-ed25519 7owkuQ MNGb3zFfaJ+oTY0Vtc43uS4Gb0d+vmeEq7kZeV5t02Q +RM8dX2yW9r4QLTsBQY2uSB4fzBQSK1sxjhG/f1qNCcI +-> ssh-ed25519 yg55bA ZVbIzTEmenGD1F8KkwTPGLit7znypUiFIOW6OWhO8wo +Ai2Y2QdfZ3pZGaPWoY7HfMEstOzMDp8+BTHS7zpOwlU +-> ,%y9?-grease r(S=ghd1 +FPKkbTLe5kxzDs3dEVKa8MJ7o8t4OJ4/gO0nwP55OJlV51nRPxpsd9WWdhVv0h69 +7jZNBCF9CgB72huPFZR/50TvctOILmGmTfnIv0mpsIFjYl4QHrr6qPzuHQ +--- VJ27uwCEZSWYS99nH1OIiYNKg9Rqn1qTQnMCAVTbv6E +69]hĪ&>Z $“ nVڠCR3nT2`l;V;y[ݱY|7\하9=YHԭN[J1i'aa372NKZlDͣI* ?L@V`,vʞD \ No newline at end of file diff --git a/nix/secrets/restic_backblaze_env.age b/nix/secrets/restic_backblaze_env.age index 1c5a33d1f9d979a015fade7f151d4c91f17f7cc9..a456d90b45b27e31b44cf7a15553f06db5e229a2 100644 GIT binary patch literal 695 zcmZY4J8RSc003a2Tc8vX7ZC|qy4mm)*dCCnx}| zfMIAtx|YImlmrou!vqoR3~*Oa3qvh!qH!Ug!|6t`Y0R@XnWQ#oK<#5ljvc{bL$bY*+lkpW(;g1S6^_O7?NwiHn8b{= z6s{)zuMzIl9*ZDMWVCFaWnitBkqcP4=2D#z)+Hx((sqc3k0DcsLFtt z!falnQ=HA~OxsH6tOMKQTyCJV!jP0J{Zdgmaf=KbS17P=i4; zM|Qc=$^?BP+ssOy9aItDbOA=F+jRn$@Q80u>qUpq&8Rh?Co&38G#OV4)zA}hj4s*k zzgu%%zZAoe5$N4e2L%L7`kl!V10>9HTMe{{~xBM;n`1H=v-k&oU7pP}Hv_tFoe183X_QT?fqu}!P*8Ll^d3j-5h$(pE$*Bjg H@6P=NgxmDk delta 449 zcmV;y0Y3h>1@8lpC0;jgcWZS~AZ%)6Pi8|_Y&dRMV_H{6S$afGGI2*za#&edct|f% zc}I6aXmM{;OhRf^3VJI?GE{m?FgH$1S66RURBlN*HfVG~M`~zuH)}_AS6NAFHAzEO zO?Y}ylV1TBe`IDwNk(@}Sa>yaY7> ssh-ed25519 7owkuQ q458BCC+1ChqixcO2bMdBMktANq3d3nwzvs8hb9ityM -FjbGE5gA0lvPg0Ybp3WyqrfzmF9b7LsMp24vv/5hRHo --> ssh-ed25519 yg55bA lNCW4DBdwsFxGhw75WAUOTRkbY7ljMilARPNdI4sFTk -zULx2aX+PHxOEPyYfGEJEugaYHUwgBFminlXybrrTSo --> .C(--grease Mk?! JvhX04'M -s8AZa58 ---- Ja48d/9lY/dhamU1RxGqpweLwGI6Y/rr9npilNd9cp4 -eJ#tql DvΎa=uԢ8k&4J4G \ No newline at end of file +-> ssh-ed25519 0LL3PQ kAkdTH8kPHnYR5GncurnYL6atChq9B2ugqJYK0xUAHs +doCoG+lJAlbygvWg31BycpMf4K6dWihcJ4Vb3308ypA +-> ssh-ed25519 0dJ6Mg aWeQi7cyFZwEgcJb4GkROumwptaRTPrCBQCCpMdKQXA +ORlGsAxLgWIeRhDwv58FFIZP3vUqTipOl3Q2bdq1nEs +-> ssh-ed25519 7owkuQ aUTN8z+aD4ltDJ/7oBRhZZlsyp6blSGoeJdDDzwTsiI +00/DiiSDI3N2c1l4apPYKwQwWX/7FaxzupPnTPSzgDw +-> ssh-ed25519 yg55bA QN8RxfPk+yAL/veq7aLX7Z9LMBaMPiq7edju0xSbOjU ++Q+IADzBZB5H5PwFD3jVZOsPJdwbsiN0t6vs5tqF5HQ +-> 1-grease "[wrG8^D YH)pk=`h +OFsK01MRbG/Ds1s+xEDF5D37ijhhCuRCWAXHL+kXlJ3lXulkMpAA/QBUj2/Y9RIY +veiOf8/qizBR +--- rpmIeN8PqT0PRmiykzweztzDkzVNp1mCetqj1WJNerM +hjr@oپ$'@#ʚ 3G.U'0+|ϭna/ \ No newline at end of file diff --git a/nix/secrets/restic_backblaze_repo.age b/nix/secrets/restic_backblaze_repo.age index 167e78cd3acf345c47547dbded638d616e0c64d7..3c0928ffe42cf9dfaecc4699ca5ad1b3c6c0ffec 100644 GIT binary patch literal 709 zcmZY2J&V&|003ZglAv;k=;Dw`4nj=RG;M-#m?q7~+w?0Ocj<;6sU`jKCW+$Z8dp5mDQSc3=*s zMVb%IaYIxG7*!0$TrJZbXCIDwLe3ogyR9Kj+Z@VCv%(*@hiqbPhD$(k?Ew@*;k+~W=V7a_M1hl5*1h`T2!&U>DnU{eM2;ta9sY~pcy$h zOkHc~qI`<_>wc3)?+XOV`7>ma$X4NM-4c}jl`aXbs7p1-o-mFrlU#cNwyM*trnWpK z&RQ1G2|fZQ<5(h96;!c0N0KRr;5d#(B&#pTer7jPYi`CVmN=;_X*u662&^khKpC$6 zv=_97Bjn@mWn=N^E`KL$zde1Zzu$tBSMP$u^2jpmbC0;jgcWZS~AZ0~EX-j%cQcW~PR&+#9ZgOQuHg!cfZbNBpVJ~t< zXHI2iNLFl6Pk4EA3Tk3?Q#3+&Phn+vd2e?|D=SZFHFHZzYEVjbNNi?JR!mr8azrpj zT6$P>lV1TBe|LFwT2DYjR0WLUl7YXg5(&3N1b$b5v(R zXH;k{XL4m>b7de;Aaf^maSCroM_P12QZO-hI81qGe{wlPbZ1O$L{BzYNKax&QDsnY zFHTNuPg!C}S5ZVVFm*6zVsa}`Z%#*SL~dbDFfwWiGC>M0EiE7~YcEq!M?q0EZ8S?# zFi%xeOmNX1av#_JR5 z9SxK2Nik!%Y%}jAQK5B+hs>D#v{R81Cc-JrDYut#8Nk*Ie2D!uFIZ0 d-S?&i!BliaVKVLRI|jl{i|itpeFzT diff --git a/nix/secrets/restic_four_pwd.age b/nix/secrets/restic_four_pwd.age index 46b980de..b67cc300 100644 --- a/nix/secrets/restic_four_pwd.age +++ b/nix/secrets/restic_four_pwd.age @@ -1,10 +1,14 @@ age-encryption.org/v1 --> ssh-ed25519 7owkuQ /LOUFKCJMDbwGmRbKmtA5YibEwXaC+bn3qzr2G5PNjU -8sFd/TH7CotBpgE9IcBUjpl1HQDoVWcBnKMs+65yWFM --> ssh-ed25519 yg55bA zfExS48sAVvVfmhoNjrqu7b6YBPF8Nj+Uz7LyAswexk -0m8ezLoCMw71c+HlEDgNA/V1IZeMsWu5MV+fvQEKsRA --> .5;c~,-grease M^}>kjw ;yYsB Z 1}Z@jDzv -2ZhEqtWhM/7boxsNVSQHc+eDs41VyWaj3JoyYPBdQf1Gm9OVToKAfM03EuTYKvGk -IgoyvRNeEsXRJA3gnApmlQC/gGsaR/bMs+/sDuZzsNpMo7cFjPcfQZ+TM3A ---- ACmisGCqSllpxxoCa1FKK79Jmf1TjNCcQe+ouccHttA -mm5f}r._%) 7G~}{ {oubN3@>V4:?, \ No newline at end of file +-> ssh-ed25519 0LL3PQ xLhj3/Y4owHlZ9wSvSUO6J5QRDbAwbaMO2MNAIW/S34 +T86CtE8vACVDH34OnmUVokUY4NctvHcaVunoCvGUxEo +-> ssh-ed25519 0dJ6Mg 0sZCeLLGHhQ/ZppSTuyeZBOKdypMBNaJrI84Sdya6C0 +3koAeP0eIaSj/TQEGHYJ0GSUx9T35WQiALzLj8cykM8 +-> ssh-ed25519 7owkuQ fOjqhSibMqCebX44ODbi5B6T1KGBVjgAl78XcQbGnUs +LqRR+NxqMGi0gW3DLubo0k00mkW5onuhKWw4Oaq4o2g +-> ssh-ed25519 yg55bA xl59uoVVAsDwAik1iN+aMxAvmX2yBW6Tgngt6nrAy38 +NnAGx9qDQScgbA8eMd6JmOWV14Kp3enpuzMeTpVLSQM +-> *-grease 8-(+ vYaB m6U +8gdvu5Df7a7QJC+s3/x4OMEp3nGRQo+v6GKMo957cTIofYQrX1zPIscugjB+Ua/R +mqSUmYM +--- IYRDnT9/tIxleM47lmOA5wp3e5TrJGqn/faxfMTq7po +Q&]cӵҷrJիϘzaBd $Y['s8pZ \ No newline at end of file diff --git a/nix/secrets/restic_sgbk_pwd.age b/nix/secrets/restic_sgbk_pwd.age index 04cd71dc..ea4711ba 100644 --- a/nix/secrets/restic_sgbk_pwd.age +++ b/nix/secrets/restic_sgbk_pwd.age @@ -1,10 +1,14 @@ age-encryption.org/v1 --> ssh-ed25519 7owkuQ 4qJGfzwkiTLxMp29ap8xS4Yrr4v5+WuEgR2l6kk1u3g -/ez+z5soKOZJYd1ETWcZ9WwGQkcI4hdOhS63oshjBWM --> ssh-ed25519 yg55bA is0cfph0fc3Yd4btpE4+HqN9YWWlkkQ9hj0LDtkCPwQ -K3zdjEN3dlTaticQtVi774mQOM1KUg+dk0JvjQxctnk --> zou8qv-grease $$C.n1_ # -N5iTy0ERftclPNDFgpa4ClqGCIvTDIKj03Iyzy+az2l3bs8MXUS/4hqh+uDCW3GG -t4gL59TG ---- U3g4gGvkEQKWkM6gMEA3AFK9y5y4i7jnoNWb7xgDqeo -(}A2t80_s#5kˀ|A&p@F#p \ No newline at end of file +-> ssh-ed25519 0LL3PQ KHSf9ndwbU+gp/EjEqb6BizoDld2P0IUE+NyNq41qRU +nnjQ6RxRj/oVI4lrmGx3YA9xru2wIkV6tyYnF/Qj4gA +-> ssh-ed25519 0dJ6Mg FoLEamzgj2WZxiEGjWEacLtP+YvwPK4S961Mz4QVo0Q +LRV7YndQRyZxFWgxjZ8+KhnHY3NmQjtBx9D9SkEfdBk +-> ssh-ed25519 7owkuQ +ERZ/SyjyHNDMUcZftWjPPg/+Y4vNNhY9qcXYJTocEo +WvRkkgWh+t1O2574vvIRYkDav6XJaZe1H8+bMk6Rt2U +-> ssh-ed25519 yg55bA T1koZe8t1aK3Z8t102m9Q3sTFo68ml8hjbm5oTDxqXg +OuVwNZFJokgz3ZubnQJbhdmgfYnpKSyt+2f0pfJ0zMM +-> 1I-grease SAO!z + 1 +dor0+AdeMZtvH6XIh/8UOwtKIeqTckMwS64fXpQC15sQN4s01iZ0E2fmfxlOd7sF +CEjwIjD/c76eWsm4HXnFKPMn +--- PtcipNj2Ol00OQXMJnvGfBPLxAkxB5/JrqUNXWKRqEE +p3ו!3`S^' To[F"WQF5H$ \ No newline at end of file diff --git a/nix/secrets/sgbk_pwd.age b/nix/secrets/sgbk_pwd.age index 58602dda..ddc824b7 100644 --- a/nix/secrets/sgbk_pwd.age +++ b/nix/secrets/sgbk_pwd.age @@ -1,10 +1,14 @@ age-encryption.org/v1 --> ssh-ed25519 7owkuQ rAj9h0wtf1gsdtlvGDmaxdHjRreUyfRpZBNnI01edhY -jCTGmhWgEy3BPdWQdv7goL0Vd2obIdRFn1HHApQdIpI --> ssh-ed25519 yg55bA 9oZRoMwVSR5W7gFufctfhQcrunzGABm0eY5Zrd30CHw -10sx6yDe/qhGSo7yfJi33bqrilLE5BBMjLuw46xZ/xo --> 6<-grease # $q0gf& d+*Zn G7~` -4wM1yc2zThJt4kjBR5Evb0sKVQTk+2/UxCyRclcj+c5WoFnZAUkweu5J9NKKZZY1 -eQDsxMy2VTCwKH21kt6GMThqd8uFLWlNIG8Rd+p1UQ ---- 4ITweNL+AK2o11O1NyophxQQsMYL4Lu6iBedFz9c7TE -BQe~n bʙk86q}gې+c;]ɣK \ No newline at end of file +-> ssh-ed25519 0LL3PQ EaH3FSFURTrKNRQgBzRJHwScLs+0++zx8L5xtiv2Thg +zb9BAe2Mh3Dnq7xQTsV3FKSLfti6qk1fMuVU3jnkvSE +-> ssh-ed25519 0dJ6Mg wOmgGAMbqQD3agi6iH7ncke5yIuWwI3JK2+Z4Z6LAGQ +aPyfZ96NlrP7/XIMpKJkgvONfzdgjrm18CFGpE8rWjo +-> ssh-ed25519 7owkuQ Siq/BgJuW1G34eBHL5rUTaR/D1R8AKxo3oWNfKkjNjg +8/qCD7Z8Pnnpz2fwzcZuRKi/NqU4sOUdEn97JT5sy7U +-> ssh-ed25519 yg55bA JHUJBdwb6/vcw3g2JCZVSs/dm96PE7dhOW1gEi5Nokc +NiT7i0XArZPVz4UqN4IR+Dc47tjU1jVe8SFUbM17fBo +-> %-grease R +5njLYJJMaDrRkP6qA1AUGy375lHVqP2WzUlhYX8HLtBL95VysXoW+PTzIEc+PQNs +UMxNTezEFXnww4E06+rPE5JN/VN+lOtb1uaEFdc +--- TKX4YuCK4DPsLEB0A1XSywqEt2gysGHbYtL59hudEkQ +|oKw5tU|Gg(f\@9â0_j \ No newline at end of file diff --git a/nix/secrets/sshconfig.age b/nix/secrets/sshconfig.age index 7ddfaa729802317936df00a56733db93f554ede4..75bd6ee3f8e4771e56de40f497fe3bbea9845184 100644 GIT binary patch literal 975 zcmZY2-H+1*008iW^RsYze#OL~HWBb(8Qa=!Yfp06bzAq*?bfbz>&@g?yRO~Zt?S3y z^%4(}7fc`*K<*&-pvFre2$D-cR`!9M94R9YcIt*3e^jmL^mEEVT@$t^>kU66DJ;|12%2HXxrL}@lvBovYn=u27D!(iqw2{UiFe> zC!Zxp81!Gz6APl&G2>=AmPs2;E25Uux-IKYFg1) z2@9n&yp+;)-OICtp}2sGQ7sLY>*lChieoOTjoZx{EEa>fBFBSWO5?hAH&pOg8hL#4 z2bSrc|{gP@mXd8FEsfHaxbG8FFDD z;UsJ&AD5!8LIeX*Rd8H~iZw_og}5YSW)oyKH*Te!e931wEH?!^cqv`?=ur}<11Q7- zrA{7ld8BT{T7u`$vdb0=aFdWYj>fV&s;NTD*T!1;WYK{|3mO-DLaY`RY7kNl(ojMJ z5;)-Z`@uHu;{&;-8Xy=d5Wt<5KB6$;(kSk@fgT%2TIEK}PAKJwfdHom7N2sT89WJm z^<8C#U%mU2&9|*vSw$@2W#XOGRdqL(hChgW|0@7}*^`ttfmpZz(z>ihZYJ3IZe%!5UE z>a;+-bY<>7s$V@(JT(md)FXp}lE1_D0*^~Zl&651) qt^0eJU-v&+=vJ;Bhju%n1d_*_kNk&*FGo>^-%|wcl`sSP;IyX delta 805 zcmV+=1KRx02hawPC0;jgcWZS~ATnBIX+%wTRC04`R&r=`LvA@%NMUJgb98SsOmcWO zWkFR+H+fepZACCi3Tk>|G&6Efb~QzDMmcjuVPbZ8OF4L2HdaqgdS^jTVpUm4P-9VN zQ$=Y(lV1TBe@=2WPDwUIYiVqAOKnzSRdQB(Vq{`OK{HKJG-@?gLuxB?MlWJed2wfR z3Px0UM>8^GcUVnYP;FsNQ)y*tWlC#pH#TlnOEgMYM|xvHIYM!DdN65k3N1b$d@Evm zFECj~FMbL*Id3;sbuv^=e_2;KV|qa8-Il zc1l7ubW$=!c{gfsYg$S;Ic-&LXKq4uLugQ8W@=S3W^!tBFlItGR0=IEEg*DAZC5Ka zdU8-ye`{(+YHvz8Lrq$FcU4zpNLNBcd1^OLLQ--=Vo7;NHdzV}BF(#qn~7z{U=m2! z??%>vuWJ25E%1!E#w$kZ=lrXY0FhO9R(0Z-$X7eUOgRWtcI1Du6l{V0ncSG8g0)v zP?tuj4kXb)PBfo>R0(_wvEB}3AGc$fduVZH`8$wc^n8O@g$MzRqG^OVSYcXg1!Lx@ z+w{sfN5cSe;*)RkH41geCL2I#pdxF}JN{8|u+#NiHzu$7cH#&u1LO_0PuNwaeASqP jKsxW2#{=F|ym+5pI&}Ud8a_nKNSG(nS>N!eUD(JvQJh7{ diff --git a/nix/secrets/two_pwd.age b/nix/secrets/two_pwd.age index 54ff2e64..857b8c72 100644 --- a/nix/secrets/two_pwd.age +++ b/nix/secrets/two_pwd.age @@ -1,10 +1,14 @@ age-encryption.org/v1 --> ssh-ed25519 7owkuQ 19/isGgYZjRCPON85JEAYTaM766DiIvvFaaoijZivxU -OE/HYTXVW4JMx7naMAORiYfQXyfrJEuegco97PBlfs4 --> ssh-ed25519 yg55bA qsSTyN6LX3FPcfS9Mo0zZFxlv8bN+tSm3kfr7JInzE8 -OUNksovVTZjecBLo2G2EksGl/f1qMfCv2IKcgWWc7hA --> 8~-grease ^ -TtU/CcXzUV6vxDjnnSs4UHT0skFZdOOGAPZ54XYS9VI5qD5zYPdxlt4Xs293QALL -+EYnfX/02ga1Xik2diAn2/pefStizBztyrqZ6n4ZSFwbYlg66WmG7y+mW+M ---- skqsOtKqWNBNuPKITV3vEQp27npkPn8DmVvT98XFnTw -s2[>m虠JHO[{=ʆ{`sjw: 4);vRp F{9TX< \ No newline at end of file +-> ssh-ed25519 0LL3PQ bOMlgebRdu00Y6AMCMzfMDHz20hmxFZKXZXTV0GxrXI +h8g+yA6VbtKmSpJQd7jRXbI3XZ4t9onF9HAAFZqGfjo +-> ssh-ed25519 0dJ6Mg re3MAlJT/+Cv3JuX32+DDsCpX2fyjmbf6lHWEPo2cS4 +eoGwzNSWZsz7MraRl+WszHPtV/Js5miEpyPW80qE2Rk +-> ssh-ed25519 7owkuQ jVPzIG/BaqhF0pDsQGyTszSYk9uqxgT+gkI3isFfXjw +KNYecxPhASdkrX9HksZvd3PklumBxhT56cwuAvrjrCI +-> ssh-ed25519 yg55bA RQqNeR7/CnTikL1PmjuB8wbrbB/ePXDL5Vc68nwglms +XSdnfZRny11PwqNz2RQXZTJkebgpcIlLPH41anP+bE0 +-> Fwm.uTZQ-grease 0 l*:+ KkJHBhG ++GHIrzesQEN5gofR9foQBAispJYm7Q+ZpcaGA5c +--- BeBZdmPhZssR+92iYgQ/62hlCIiY6SUQaggAZkXTw8I +|.hv"՟i +|pw4ni؟WB?l`[2(ᨿ_i' \ No newline at end of file diff --git a/nix/secrets/typst-bot_token.age b/nix/secrets/typst-bot_token.age index da1052de38e996ea8c0c0dba00fb6f45d5f64624..82ff09f70d27f78294142c915949f7611700b4b8 100644 GIT binary patch literal 776 zcmZY4&C8Pv008i)n-yK6TV$7@#&Uj5C8(UwGu_;D&Q0Bj$fCzvMTdflh&mK>?hq00B{~%J!9$mbE*+w4{RKaMx@}dhg%Oo&i4!dL2ayeBFi<@R z#__CbnFx-<6jXVYEv6 z<#K2fCTV!agq68G3=3AWS#O~#G+<~6gTrM@#WKtnAw;n1<|s>oJXJ`|so@h;rEFbX zGt$2_BFN{d1bVE=Qp;dopfxH$U6v1$hCf4>1~zXXZb%q$TaxltpOY~FtH4GpUrpmw z4N2IFgvJaRq#0g^5 z#LBFv&czG>s?{n;MHI7^5JF^f0zdBy9aTVRGZZ*I#RfChCp{Q)?2#UmL*US>=CfN5 z_V3=KeWebJwqN{loIEREp$|X4vn4K<*T9!Bx7pftaRz`DbIZSwS3Q}TKQAJWvQ$j~*T5(EPOHwsLGC68&IYMK4HCAIwNpM7Sc{xsW zHaRy@lV1TBe{oiCHZM*yHZ^%pa8Ff3WNKAHYNRZC|}NqBHkH7ibVSxr|tGEh@jWJ^$PdPYY%MsasIL^U#Lb#G!c3N1b$buDLd zWnpt=ASxhoS$=pZN^~G~b6_bZSxX9PN_cKdW@BPBe^EwucWhC0D>P$daZG1oMK*IV zW^+L|YePkNGIe1wD>5(&EiEk|ZBuqgc2jv!Z&hVWI`F~2A0=R~BCM97-e1XnM3*&TJeYZ##| diff --git a/nix/secrets/wpa_password.age b/nix/secrets/wpa_password.age index 805ead8d7f71ee66b2043c2481d39bc92dad0fb3..2ac609b7abad4d76e5230daca0b9cbdf8a0339cf 100644 GIT binary patch delta 843 zcmX@h`j~BkYQ2Gvk8wbtLS&FxKtQUAXJLt_uWyoTNp?t5Znkz-SYno`VMRt@QF38v zzP7WzufAI-S5s6qcD`$Yn`fX`ah0pHTS=|~ zm#&>cadC!jYKoDmsiCEUL5i1|Z@PkCaCnY+XrQBcX}yn2NlHnShkL3)UTB`DV`;d1 zxpQE6c~W9QMP_M9QAHqEhMQ4tgtw!=vrmOjM3I|IdP<6sSzcslmA8JbuUVl{USOcU znVDf^hDScSb>{iy*`!hmC8kEHzNUWl<-sY1E+*yP z^JW_e|XrKTooJ6i;V28HMOc!YRWg00gnDbWr$ z)=e);O)O63%FND;@GFTb@y*LC@kz>b$uJG7;L_FARmhJBGxW<12rKpuD=;@G$_mVm zD)fpfa?HpGEDtRA_6RjH*S0Xs@yMt*3FWHaX!NqelxbaYxcZhu3}(D5?VJif?cTTc z9Q%X6E>%XYs}?_uGiA-|mwC9YYv0m$l1C2B*}L}T4Yt+nWrsg9ZjF2%c4YO!n5Ws_ z{_elL)8^Njx=m3t4y_OC`6Xk%$x>w*AEWwDbFQiXIUl&q+?AFjtm(kh$M{@DDQR0* z)xmmS#enH2S==*ID-JqN+qbaNwe>Z_w_bnm;szc6pPTM5Z4mhvci%{B|J>Ylf$Dr3 z?{8j^t=xHB*F5B6F>mvPvlZ+!&wl&O<9%dNmHqX!W=o@IQ!D?w3FQba$Yhhd&Y^59 zVIy_S`@udz+nDf&&HH>cyH)m1yju4wd7iLoPP0XvOEu$O<>*(BTxIPW`u^2@sWWHG z5;MKfIqh;@xW9~k_gq`nx+pQbO{a2d;zUmzeK8^P0W-Vi&GwUCD`NbfZ@=adR>9f= E0QdDlCjbBd delta 673 zcmV;S0$%;&2F(SKC0;jgcWZS~AY@o`MomgDP)=%UZ!2V4N?J{ANHujaNMTE1PGxjC zXLxFPdUI4OWH4?x3PN@;Mk_W;V=yvma&L8OZfb7dfHC@3IJNk(`eOKw;r3QJQ;YGz0@H+5lGe`9b?Z*etgI9D=ORBvH5XHaQ+ zR(Ux~c2##qVnR|(cTG1>VQqF{bTe9ca9MOVIWTcWLo*6)VNYi>MLA@5bZ$8@Q3@?B zEg)ujXGAeIRCH2kL03{|b#5zeb#6ydSV~rBY8C8~O-%f03@NrQ9Q@q??5By>dkT#L45L*{g~ed2xZ=?rQey+cy;zxv-jF zX@Q2dDJsq^(LgAX(8az*1%7ttG~WDusyuGz@r#0IixHH;vRL}c5IjFq`j$bi@vQ}N zLO>Q^u4p4u?tQ_E)C`2ZRi3M7J^RfDVnnhye*_vL_v=M9zH5bQn3ZF!cH!g>ADgX+ zl&~qgs6=v!gv`Mj0fOENN_25F@sfBAin9eh3c^7*;3=n9VxV6W-u>fQ-0;s>v%8In zKK@&@#QIRbRfn`CpzHIrmr_z;@v-30Q+4ML1UIp`<$N_=YfZwTOcEOf^IgT)SN Date: Sun, 2 Nov 2025 12:25:01 +0800 Subject: [PATCH 027/178] tree-wide: init fish completion module --- nix/configurations/hydrogen.nix | 9 +++++---- nix/configurations/vanadium.nix | 1 + nix/nixosModules/common/fish.nix | 22 ++++++++++++++++++++++ nix/nixosModules/extra/leana.nix | 6 ------ 4 files changed, 28 insertions(+), 10 deletions(-) create mode 100644 nix/nixosModules/common/fish.nix diff --git a/nix/configurations/hydrogen.nix b/nix/configurations/hydrogen.nix index d0196449..2ceccff2 100644 --- a/nix/configurations/hydrogen.nix +++ b/nix/configurations/hydrogen.nix @@ -58,15 +58,16 @@ in ./hydrogen/nixos/programs.nix ./hydrogen/nixos/connectivity.nix - # QUIRK: - # Had issue when building the installer as it fails to bootstrap itself - # Might be useful to disable for the first build. - ../nixosModules/extra/secure_dns.nix + ../nixosModules/common/fish.nix ../nixosModules/common/disable-command-not-found.nix ../nixosModules/common/network.nix ../nixosModules/common/sudo-conf.nix ../nixosModules/common/system-nixconf.nix + # QUIRK: + # Had issue when building the installer as it fails to bootstrap itself + # Might be useful to disable for the first build. + ../nixosModules/extra/secure_dns.nix ../nixosModules/extra/leana.nix # diff --git a/nix/configurations/vanadium.nix b/nix/configurations/vanadium.nix index 0e72a47e..9d3f7cbc 100644 --- a/nix/configurations/vanadium.nix +++ b/nix/configurations/vanadium.nix @@ -101,6 +101,7 @@ in ./vanadium/nixos/unfree-predicate.nix ./vanadium/nixos/programs.nix + ../nixosModules/common/fish.nix ../nixosModules/common/disable-command-not-found.nix ../nixosModules/common/network.nix ../nixosModules/common/sudo-conf.nix diff --git a/nix/nixosModules/common/fish.nix b/nix/nixosModules/common/fish.nix new file mode 100644 index 00000000..af742154 --- /dev/null +++ b/nix/nixosModules/common/fish.nix @@ -0,0 +1,22 @@ +# +# This module links fish vendor completions, otherwise tab completion would be broken. +# +{ + config, + lib, + ... +}: let + fishNixOSEnabled = config.programs.fish.enable; + fishHMEnabled = + if config ? home-manager + then lib.any (userConfig: userConfig.programs.fish.enable) (lib.attrValues config.home-manager.users) + else false; + + fishEnabled = fishNixOSEnabled || fishHMEnabled; +in { + environment.pathsToLink = lib.mkIf fishEnabled [ + "/share/fish/vendor_conf.d" + "/share/fish/vendor_completions.d" + "/share/fish/vendor_functions.d" + ]; +} diff --git a/nix/nixosModules/extra/leana.nix b/nix/nixosModules/extra/leana.nix index 0f884580..d61e958b 100644 --- a/nix/nixosModules/extra/leana.nix +++ b/nix/nixosModules/extra/leana.nix @@ -18,12 +18,6 @@ }; users.groups.leana = {}; - environment.pathsToLink = [ - "/share/fish/vendor_conf.d" - "/share/fish/vendor_completions.d" - "/share/fish/vendor_functions.d" - ]; - # # My nix binary cache # From 0cdd300498ce6fb5623eff46f7f04bfd43b4eeaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sun, 2 Nov 2025 13:00:16 +0800 Subject: [PATCH 028/178] Just: remove sudo usages --- Justfile | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Justfile b/Justfile index 17d6a417..2696c757 100644 --- a/Justfile +++ b/Justfile @@ -6,7 +6,7 @@ os host action: set -euo pipefail nixpkgs=$(nix-instantiate --eval -E "let sources = import ./npins; in sources.nixpkgs.outPath" | jq -r .) - sudo nixos-rebuild {{ action }} \ + nixos-rebuild {{ action }} \ -I nixpkgs=${nixpkgs} \ -I nixos-config=./nix/configurations/{{ host }}.nix \ --fast \ @@ -18,15 +18,18 @@ install host: set -euo pipefail nixpkgs=$(nix-instantiate --eval -E "let sources = import ./npins; in sources.nixpkgs.outPath" | jq -r .) - sudo nixos-install \ + nixos-install \ -I nixpkgs=${nixpkgs} \ -I nixos-config=./nix/configurations/{{ host }}.nix \ --file ./default.nix \ --attr "nixosConfigurations.{{ host }}" -cleanup: - sudo nix-env --delete-generations +10 -p /nix/var/nix/profiles/system - nix-env --delete-generations +10 -p ~/.local/state/nix/profiles/home-manager +# Retain four weeks of generations so I don't fuck up +clean-os: + nix-env --delete-generations 28d -p /nix/var/nix/profiles/system + +clean-hm: + nix-env --delete-generations 28d -p ~/.local/state/nix/profiles/home-manager update: npins update From 06426aa62df01038222a342013789792e6efc8dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sun, 2 Nov 2025 13:00:23 +0800 Subject: [PATCH 029/178] nixos/sudo-conf: fix doas rule to include path --- nix/nixosModules/common/sudo-conf.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/nix/nixosModules/common/sudo-conf.nix b/nix/nixosModules/common/sudo-conf.nix index ad4c6a6a..af85bab6 100644 --- a/nix/nixosModules/common/sudo-conf.nix +++ b/nix/nixosModules/common/sudo-conf.nix @@ -8,10 +8,18 @@ enable = true; extraRules = [ { - # invoke just with doas directly as a nixos-rebuild helper + # Invoke just with doas directly as a nixos-rebuild helper + # + # Specifiying just here is impractical, because + # - Use absolute path? + # Works only for a specific version of just binary. + # Also, for some reason, the rule won't match. + # - Use relative path? + # doas's docs says it searches in a "limited subset of PATH" if it's relative. + # I suspect that it doesn't search the PATH added ad-hoc by the nix-shell, also not a good solution. + # Also, for some reason, the rule won't match. users = [":wheel"]; setEnv = ["PATH"]; - cmd = "just"; } ]; }; From cb1310015ed41333ec1151e9713b3d6851a9a89d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sun, 2 Nov 2025 12:29:23 +0800 Subject: [PATCH 030/178] tree-wide: disable secure_dns I'm not sure if this is going to bother me if I had to reinstall. Reproducibility first. --- nix/configurations/hydrogen.nix | 2 +- nix/configurations/vanadium.nix | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/nix/configurations/hydrogen.nix b/nix/configurations/hydrogen.nix index 2ceccff2..6cc9c558 100644 --- a/nix/configurations/hydrogen.nix +++ b/nix/configurations/hydrogen.nix @@ -67,7 +67,7 @@ in # QUIRK: # Had issue when building the installer as it fails to bootstrap itself # Might be useful to disable for the first build. - ../nixosModules/extra/secure_dns.nix + # ../nixosModules/extra/secure_dns.nix ../nixosModules/extra/leana.nix # diff --git a/nix/configurations/vanadium.nix b/nix/configurations/vanadium.nix index 9d3f7cbc..4ffe85bf 100644 --- a/nix/configurations/vanadium.nix +++ b/nix/configurations/vanadium.nix @@ -108,7 +108,10 @@ in ../nixosModules/common/system-nixconf.nix ../nixosModules/common/xscreensaver.nix - ../nixosModules/extra/secure_dns.nix + # QUIRK: + # Had issue when building the installer as it fails to bootstrap itself + # Might be useful to disable for the first build. + # ../nixosModules/extra/secure_dns.nix ../nixosModules/extra/zram.nix ../nixosModules/extra/leana.nix From 2ec26ff49e547b4ed132137aa3a0127d981cb0f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sun, 2 Nov 2025 14:51:11 +0800 Subject: [PATCH 031/178] packages/{ai,hategroup}_blocklist: include two versions of blocklist --- nix/nixosModules/extra/secure_dns.nix | 9 ++++++--- nix/packages/by-name/ai_blocklist/package.nix | 8 ++++++-- nix/packages/by-name/hategroup_blocklist/package.nix | 6 +++++- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/nix/nixosModules/extra/secure_dns.nix b/nix/nixosModules/extra/secure_dns.nix index f662db89..439090b4 100644 --- a/nix/nixosModules/extra/secure_dns.nix +++ b/nix/nixosModules/extra/secure_dns.nix @@ -28,11 +28,14 @@ blocked_names.blocked_names_file = pkgs.concatText "dnsblocklist_combined" [ # Prevent building up reliance on chatbots # Gotta preserve that thinking ability of my smoof bwain - pkgs.ai_blocklist - pkgs.hategroup_blocklist + "${pkgs.ai_blocklist}/share/hosts.txt" + "${pkgs.hategroup_blocklist}/share/hosts.txt" - # Gotta purify my smoos brain for a while (pkgs.writeText "extra_dns_blocklist" '' + # This is the fascist one, just block it because I can't tell + nixos.wiki + + # Gotta purify my smoos brain for a while instagram.com youtube.com '') diff --git a/nix/packages/by-name/ai_blocklist/package.nix b/nix/packages/by-name/ai_blocklist/package.nix index dc8967a8..0a683cbf 100644 --- a/nix/packages/by-name/ai_blocklist/package.nix +++ b/nix/packages/by-name/ai_blocklist/package.nix @@ -17,7 +17,11 @@ in }; installPhase = '' - cp noai_hosts.txt $out - sed -i 's/^0.0.0.0 //' $out + mkdir -p $out/share + cp noai_hosts.txt $out/share/hosts.txt + + # drop domain names + cat $out/share/hosts.txt | + sed 's/^0.0.0.0 //' > $out/share/domains.txt ''; } diff --git a/nix/packages/by-name/hategroup_blocklist/package.nix b/nix/packages/by-name/hategroup_blocklist/package.nix index 09d1b687..9f320335 100644 --- a/nix/packages/by-name/hategroup_blocklist/package.nix +++ b/nix/packages/by-name/hategroup_blocklist/package.nix @@ -17,6 +17,10 @@ in }; installPhase = '' - cp blocklist.txt $out + mkdir -p $out/share + cp blocklist.txt $out/share/domains.txt + + cat $out/share/domains.txt | + sed 's/^\([^#].*\)$/0.0.0.0 \1/' > $out/share/hosts.txt ''; } From 9242a3dfb5d58ea0553d86cef5c27d81f3f5b43f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sun, 2 Nov 2025 14:47:26 +0800 Subject: [PATCH 032/178] vanadium/connectivity: use /etc/hosts blocklist --- .../vanadium/nixos/connectivity.nix | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/nix/configurations/vanadium/nixos/connectivity.nix b/nix/configurations/vanadium/nixos/connectivity.nix index ab4aa177..1c20f9ae 100644 --- a/nix/configurations/vanadium/nixos/connectivity.nix +++ b/nix/configurations/vanadium/nixos/connectivity.nix @@ -74,6 +74,32 @@ }; }; + networking = { + hostFiles = [ + # Prevent building up reliance on chatbots + # Gotta preserve that thinking ability of my smoof bwain + "${pkgs.ai_blocklist}/share/hosts.txt" + "${pkgs.hategroup_blocklist}/share/hosts.txt" + + # TODO: extraHosts option is overwritten by this + # We should emit a warning because it trips me up and it shouldn't >:( + (pkgs.writeText "etc-extra-hosts" '' + # + # Generated from nixos configuartion + # + + # This is the fascist one, just block it because I can't tell + nixos.wiki + + # Gotta purify my smoos brain for a while + 0.0.0.0 instagram.com + 0.0.0.0 www.instagram.com + 0.0.0.0 youtube.com + 0.0.0.0 www.youtube.com + '') + ]; + }; + services.mullvad-vpn.enable = true; hardware.bluetooth.enable = true; From 5447573e69c7f54b4997004ddfdc471030fb853d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sun, 2 Nov 2025 16:12:04 +0800 Subject: [PATCH 033/178] hydrogen: enable some dev tools --- nix/configurations/hydrogen.nix | 1 + nix/configurations/hydrogen/home/dev.nix | 90 ++++++++++++++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 nix/configurations/hydrogen/home/dev.nix diff --git a/nix/configurations/hydrogen.nix b/nix/configurations/hydrogen.nix index 6cc9c558..f4d95050 100644 --- a/nix/configurations/hydrogen.nix +++ b/nix/configurations/hydrogen.nix @@ -98,6 +98,7 @@ in # home modules # ./hydrogen/home/programs.nix + ./hydrogen/home/dev.nix ../homeModules/common/btop ../homeModules/common/fish diff --git a/nix/configurations/hydrogen/home/dev.nix b/nix/configurations/hydrogen/home/dev.nix new file mode 100644 index 00000000..d10f4926 --- /dev/null +++ b/nix/configurations/hydrogen/home/dev.nix @@ -0,0 +1,90 @@ +{pkgs, ...}: { + home.packages = [ + pkgs.nil # nix + pkgs.pyright # python + ]; + + programs.git = { + enable = true; + signing.signByDefault = false; # no need to setup the key + includes = let + hasconfigRemoteCondition = cfg: let + cfg' = builtins.removeAttrs cfg ["url" "path"]; + path = cfg.path or "*/**"; + in [ + (cfg' // {condition = "hasconfig:remote.*.url:git@${cfg.url}:${path}";}) + (cfg' // {condition = "hasconfig:remote.*.url:https://${cfg.url}/${path}";}) + ]; + + haskellIdentity = { + init.defaultBranch = "main"; + user.name = "Léana Jiang"; + }; + + universityIdentity = { + init.defaultBranch = "main"; + user = { + name = "Léana CHIANG"; + email = "leana.chiang@etudiant.univ-rennes1.fr"; + signingKey = "0x32035DB97E777EEB"; + }; + }; + + blameIgnore = { + blame.ignoreRevsFile = ".git-blame-ignore-revs"; + }; + in + builtins.concatMap hasconfigRemoteCondition [ + # Univ stuff + { + url = "gitlab.istic.univ-rennes1.fr"; + contents = universityIdentity; + } + { + url = "gitlab2.istic.univ-rennes1.fr"; + contents = universityIdentity; + } + + # Haskell + { + url = "gitlab.haskell.org"; + contents = haskellIdentity; + } + + # Blame + # Turning this on globally will fail if the file doesn't exist + { + url = "github.com"; + path = "nixos/nixpkgs.git"; + contents = blameIgnore; + } + { + url = "gitlab.haskell.org"; + path = "ghc/ghc.git"; + contents = blameIgnore; + } + { + url = "github.com"; + path = "haskell/cabal.git"; + contents = blameIgnore; + } + ]; + }; + + programs.gpg.enable = true; + + nix = { + settings = { + extra-substituters = [ + "https://ghc-nix.cachix.org" + "https://haskell-language-server.cachix.org" + "https://cache.iog.io" + ]; + extra-trusted-public-keys = [ + "ghc-nix.cachix.org-1:ziC/I4BPqeA4VbtOFpFpu6D1t6ymFvRWke/lc2+qjcg=" + "haskell-language-server.cachix.org-1:juFfHrwkOxqIOZShtC4YC1uT1bBcq2RSvC7OMKx0Nz8=" + "hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" + ]; + }; + }; +} From 432efd430c50cd2855f87a9f335de51d6436b59f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sun, 2 Nov 2025 16:35:11 +0800 Subject: [PATCH 034/178] tree-wide: deduplicate network compat script --- .../hydrogen/nixos/connectivity.nix | 40 ++----------------- .../vanadium/nixos/connectivity.nix | 35 ++-------------- .../networks.nix => networks/list.nix} | 0 .../universite_de_rennes.pem | 0 nix/networks/wpa_supplicant-compat.nix | 37 +++++++++++++++++ 5 files changed, 43 insertions(+), 69 deletions(-) rename nix/{connectivity/networks.nix => networks/list.nix} (100%) rename nix/{connectivity => networks}/universite_de_rennes.pem (100%) create mode 100644 nix/networks/wpa_supplicant-compat.nix diff --git a/nix/configurations/hydrogen/nixos/connectivity.nix b/nix/configurations/hydrogen/nixos/connectivity.nix index a71fc30c..6366ad80 100644 --- a/nix/configurations/hydrogen/nixos/connectivity.nix +++ b/nix/configurations/hydrogen/nixos/connectivity.nix @@ -26,45 +26,11 @@ secretsFile = config.age.secrets.wpa_password.path; scanOnLowSignal = false; networks = let - # wpa_supplicant uses `strchr` to seek to the first `=`, so the only forbidden character is `=`. - escapePwdKey = lib.replaceStrings ["="] ["_"]; - - fromList = ns: let - go = networkArgs @ { - ssid, - # Custom fields wrapping nixpkgs module options - hasPassword ? false, - scanOnLowSignal ? false, - randomizeMac ? false, - ... - }: { - ${ssid} = lib.mkMerge [ - (builtins.removeAttrs networkArgs ["ssid" "hasPassword" "scanOnLowSignal" "randomizeMac"]) - (lib.optionalAttrs hasPassword { - pskRaw = "ext:${escapePwdKey ssid}"; - }) - (lib.optionalAttrs scanOnLowSignal { - extraConfig = '' - bgscan="simple:30:-70:3600" - ''; - }) - (lib.optionalAttrs randomizeMac { - extraConfig = '' - mac_addr=1 - ''; - }) - ]; - }; - in - lib.mkMerge (map go ns); - - allowList = builtins.filter (x: x.ssid == "~"); + fromList = import ../../../networks/wpa_supplicant-compat.nix; + networks = import ../../../networks/list.nix; in fromList ( - # We only want to use my own network - allowList ( - import ../../../connectivity/networks.nix - ) + builtins.filter (x: x.ssid == "~") networks ); }; }; diff --git a/nix/configurations/vanadium/nixos/connectivity.nix b/nix/configurations/vanadium/nixos/connectivity.nix index 1c20f9ae..6beafb00 100644 --- a/nix/configurations/vanadium/nixos/connectivity.nix +++ b/nix/configurations/vanadium/nixos/connectivity.nix @@ -38,39 +38,10 @@ secretsFile = config.age.secrets.wpa_password.path; scanOnLowSignal = false; networks = let - # wpa_supplicant uses `strchr` to seek to the first `=`, so the only forbidden character is `=`. - escapePwdKey = lib.replaceStrings ["="] ["_"]; - - fromList = ns: let - go = networkArgs @ { - ssid, - # Custom fields wrapping nixpkgs module options - hasPassword ? false, - scanOnLowSignal ? false, - randomizeMac ? false, - ... - }: { - ${ssid} = lib.mkMerge [ - (builtins.removeAttrs networkArgs ["ssid" "hasPassword" "scanOnLowSignal" "randomizeMac"]) - (lib.optionalAttrs hasPassword { - pskRaw = "ext:${escapePwdKey ssid}"; - }) - (lib.optionalAttrs scanOnLowSignal { - extraConfig = '' - bgscan="simple:30:-70:3600" - ''; - }) - (lib.optionalAttrs randomizeMac { - extraConfig = '' - mac_addr=1 - ''; - }) - ]; - }; - in - lib.mkMerge (map go ns); + fromList = import ../../../networks/wpa_supplicant-compat.nix; + networks = import ../../../networks/list.nix; in - fromList (import ../../../connectivity/networks.nix); + fromList networks; }; }; diff --git a/nix/connectivity/networks.nix b/nix/networks/list.nix similarity index 100% rename from nix/connectivity/networks.nix rename to nix/networks/list.nix diff --git a/nix/connectivity/universite_de_rennes.pem b/nix/networks/universite_de_rennes.pem similarity index 100% rename from nix/connectivity/universite_de_rennes.pem rename to nix/networks/universite_de_rennes.pem diff --git a/nix/networks/wpa_supplicant-compat.nix b/nix/networks/wpa_supplicant-compat.nix new file mode 100644 index 00000000..7b4424a2 --- /dev/null +++ b/nix/networks/wpa_supplicant-compat.nix @@ -0,0 +1,37 @@ +# +# This loads the list of networks as a NixOS wpa_supplicant compatible attrset +# +let + sources = import ../../npins; + lib = import (sources.nixpkgs + "/lib"); + + # wpa_supplicant uses `strchr` to seek to the first `=`, so the only forbidden character is `=`. + escapePwdKey = lib.replaceStrings ["="] ["_"]; + + go = networkArgs @ { + ssid, + # Custom fields wrapping nixpkgs module options + hasPassword ? false, + scanOnLowSignal ? false, + randomizeMac ? false, + ... + }: { + ${ssid} = lib.mkMerge [ + (builtins.removeAttrs networkArgs ["ssid" "hasPassword" "scanOnLowSignal" "randomizeMac"]) + (lib.optionalAttrs hasPassword { + pskRaw = "ext:${escapePwdKey ssid}"; + }) + (lib.optionalAttrs scanOnLowSignal { + extraConfig = '' + bgscan="simple:30:-70:3600" + ''; + }) + (lib.optionalAttrs randomizeMac { + extraConfig = '' + mac_addr=1 + ''; + }) + ]; + }; +in + ns: lib.mkMerge (map go ns) From 50db96001e026178d4db8f6d186ed02090ed2424 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sun, 2 Nov 2025 16:43:48 +0800 Subject: [PATCH 035/178] tree-wide: deduplicate git identity --- nix/configurations/hydrogen/home/dev.nix | 62 --------------------- nix/configurations/vanadium/home/dev.nix | 71 ++---------------------- nix/git-identities/git-compat.nix | 14 +++++ nix/git-identities/list.nix | 53 ++++++++++++++++++ 4 files changed, 73 insertions(+), 127 deletions(-) create mode 100644 nix/git-identities/git-compat.nix create mode 100644 nix/git-identities/list.nix diff --git a/nix/configurations/hydrogen/home/dev.nix b/nix/configurations/hydrogen/home/dev.nix index d10f4926..93d1e440 100644 --- a/nix/configurations/hydrogen/home/dev.nix +++ b/nix/configurations/hydrogen/home/dev.nix @@ -7,68 +7,6 @@ programs.git = { enable = true; signing.signByDefault = false; # no need to setup the key - includes = let - hasconfigRemoteCondition = cfg: let - cfg' = builtins.removeAttrs cfg ["url" "path"]; - path = cfg.path or "*/**"; - in [ - (cfg' // {condition = "hasconfig:remote.*.url:git@${cfg.url}:${path}";}) - (cfg' // {condition = "hasconfig:remote.*.url:https://${cfg.url}/${path}";}) - ]; - - haskellIdentity = { - init.defaultBranch = "main"; - user.name = "Léana Jiang"; - }; - - universityIdentity = { - init.defaultBranch = "main"; - user = { - name = "Léana CHIANG"; - email = "leana.chiang@etudiant.univ-rennes1.fr"; - signingKey = "0x32035DB97E777EEB"; - }; - }; - - blameIgnore = { - blame.ignoreRevsFile = ".git-blame-ignore-revs"; - }; - in - builtins.concatMap hasconfigRemoteCondition [ - # Univ stuff - { - url = "gitlab.istic.univ-rennes1.fr"; - contents = universityIdentity; - } - { - url = "gitlab2.istic.univ-rennes1.fr"; - contents = universityIdentity; - } - - # Haskell - { - url = "gitlab.haskell.org"; - contents = haskellIdentity; - } - - # Blame - # Turning this on globally will fail if the file doesn't exist - { - url = "github.com"; - path = "nixos/nixpkgs.git"; - contents = blameIgnore; - } - { - url = "gitlab.haskell.org"; - path = "ghc/ghc.git"; - contents = blameIgnore; - } - { - url = "github.com"; - path = "haskell/cabal.git"; - contents = blameIgnore; - } - ]; }; programs.gpg.enable = true; diff --git a/nix/configurations/vanadium/home/dev.nix b/nix/configurations/vanadium/home/dev.nix index 5d3b2068..8fbe473b 100644 --- a/nix/configurations/vanadium/home/dev.nix +++ b/nix/configurations/vanadium/home/dev.nix @@ -35,74 +35,15 @@ signing.signByDefault = true; maintenance = { enable = true; - repositories = - lib.map (path: config.home.homeDirectory + "/${path}") - [ - "r/nixos/nixpkgs" - ]; + repositories = lib.map (path: config.home.homeDirectory + "/${path}") [ + "r/nixos/nixpkgs" + ]; }; includes = let - hasconfigRemoteCondition = cfg: let - cfg' = builtins.removeAttrs cfg ["url" "path"]; - path = cfg.path or "*/**"; - in [ - (cfg' // {condition = "hasconfig:remote.*.url:git@${cfg.url}:${path}";}) - (cfg' // {condition = "hasconfig:remote.*.url:https://${cfg.url}/${path}";}) - ]; - - haskellIdentity = { - init.defaultBranch = "main"; - user.name = "Léana Jiang"; - }; - - universityIdentity = { - init.defaultBranch = "main"; - user = { - name = "Léana CHIANG"; - email = "leana.chiang@etudiant.univ-rennes1.fr"; - signingKey = "0x32035DB97E777EEB"; - }; - }; - - blameIgnore = { - blame.ignoreRevsFile = ".git-blame-ignore-revs"; - }; + fromList = import ../../../git-identities/git-compat.nix; + identities = import ../../../git-identities/list.nix; in - builtins.concatMap hasconfigRemoteCondition [ - # Univ stuff - { - url = "gitlab.istic.univ-rennes1.fr"; - contents = universityIdentity; - } - { - url = "gitlab2.istic.univ-rennes1.fr"; - contents = universityIdentity; - } - - # Haskell - { - url = "gitlab.haskell.org"; - contents = haskellIdentity; - } - - # Blame - # Turning this on globally will fail if the file doesn't exist - { - url = "github.com"; - path = "nixos/nixpkgs.git"; - contents = blameIgnore; - } - { - url = "gitlab.haskell.org"; - path = "ghc/ghc.git"; - contents = blameIgnore; - } - { - url = "github.com"; - path = "haskell/cabal.git"; - contents = blameIgnore; - } - ]; + fromList identities; }; programs.gpg.enable = true; diff --git a/nix/git-identities/git-compat.nix b/nix/git-identities/git-compat.nix new file mode 100644 index 00000000..28bc74a6 --- /dev/null +++ b/nix/git-identities/git-compat.nix @@ -0,0 +1,14 @@ +let + hasconfigRemoteCondition = { + # Custom arguments + url, + path ? "*/**", + ... + } @ cfg: let + cfg' = builtins.removeAttrs cfg ["url" "path"]; + in [ + (cfg' // {condition = "hasconfig:remote.*.url:git@${url}:${path}";}) + (cfg' // {condition = "hasconfig:remote.*.url:https://${url}/${path}";}) + ]; +in + builtins.concatMap hasconfigRemoteCondition diff --git a/nix/git-identities/list.nix b/nix/git-identities/list.nix new file mode 100644 index 00000000..9568c0c1 --- /dev/null +++ b/nix/git-identities/list.nix @@ -0,0 +1,53 @@ +let + haskellIdentity = { + init.defaultBranch = "main"; + user.name = "Léana Jiang"; + }; + + universityIdentity = { + init.defaultBranch = "main"; + user = { + name = "Léana CHIANG"; + email = "leana.chiang@etudiant.univ-rennes1.fr"; + signingKey = "0x32035DB97E777EEB"; + }; + }; + + blameIgnore = { + blame.ignoreRevsFile = ".git-blame-ignore-revs"; + }; +in [ + # Univ stuff + { + url = "gitlab.istic.univ-rennes1.fr"; + contents = universityIdentity; + } + { + url = "gitlab2.istic.univ-rennes1.fr"; + contents = universityIdentity; + } + + # Haskell + { + url = "gitlab.haskell.org"; + contents = haskellIdentity; + } + + # Blame + # Turning this on globally will fail if the file doesn't exist + { + url = "github.com"; + path = "nixos/nixpkgs.git"; + contents = blameIgnore; + } + { + url = "gitlab.haskell.org"; + path = "ghc/ghc.git"; + contents = blameIgnore; + } + { + url = "github.com"; + path = "haskell/cabal.git"; + contents = blameIgnore; + } +] From 62a710c542b0733e6f5193441aff719b68b91b0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sun, 2 Nov 2025 16:47:48 +0800 Subject: [PATCH 036/178] tree-wide!: flatten identities structure It was never used with the names in mind --- .../hydrogen/nixos/connectivity.nix | 5 +---- .../vanadium/nixos/connectivity.nix | 5 +---- nix/identities.nix | 17 +++++++---------- nix/secrets/secrets.nix | 5 +---- 4 files changed, 10 insertions(+), 22 deletions(-) diff --git a/nix/configurations/hydrogen/nixos/connectivity.nix b/nix/configurations/hydrogen/nixos/connectivity.nix index 6366ad80..767374c3 100644 --- a/nix/configurations/hydrogen/nixos/connectivity.nix +++ b/nix/configurations/hydrogen/nixos/connectivity.nix @@ -3,10 +3,7 @@ lib, ... }: { - users.users.root.openssh.authorizedKeys.keys = let - ids = import ../../../identities.nix; - in - builtins.concatMap builtins.attrValues (builtins.attrValues ids); + users.users.root.openssh.authorizedKeys.keys = import ../../../identities.nix; networking = { networkmanager.enable = lib.mkForce false; diff --git a/nix/configurations/vanadium/nixos/connectivity.nix b/nix/configurations/vanadium/nixos/connectivity.nix index 6beafb00..46e53b78 100644 --- a/nix/configurations/vanadium/nixos/connectivity.nix +++ b/nix/configurations/vanadium/nixos/connectivity.nix @@ -15,10 +15,7 @@ SUBSYSTEM=="usb", ACTION=="add", DRIVER=="apple-mfi-fastcharge", RUN+="/bin/sh -c 'echo Fast > /sys/class/power_supply/apple_mfi_fastcharge/charge_type'" ''; - users.users.root.openssh.authorizedKeys.keys = let - ids = import ../../../identities.nix; - in - builtins.concatMap builtins.attrValues (builtins.attrValues ids); + users.users.root.openssh.authorizedKeys.keys = import ../../../identities.nix; networking = { networkmanager.enable = lib.mkForce false; diff --git a/nix/identities.nix b/nix/identities.nix index 9e94fd65..8d491a18 100644 --- a/nix/identities.nix +++ b/nix/identities.nix @@ -1,10 +1,7 @@ -{ - vanadium = { - leana = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGPq2o9pbmLRGrOpAP76eYCAscmfakDC7wPm9fmsCCQM leana@vanadium"; - root = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDc55vENX+13c4s2w7zjTb8T/AnBnTi96yRC5+fy7Z2A root@vanadium"; - }; - hydrogen = { - leana = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEXzNdCA0zZ+WmeKZnhQSQtUcxnQhhDl59E3BPQfLj7Q leana@hydrogen"; - root = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIMVDmEt/12u9U4QGDZBx/Sx8itzqfQ4zWJvcC3pRZqP root@hydrogen"; - }; -} +[ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGPq2o9pbmLRGrOpAP76eYCAscmfakDC7wPm9fmsCCQM leana@vanadium" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDc55vENX+13c4s2w7zjTb8T/AnBnTi96yRC5+fy7Z2A root@vanadium" + + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEXzNdCA0zZ+WmeKZnhQSQtUcxnQhhDl59E3BPQfLj7Q leana@hydrogen" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIMVDmEt/12u9U4QGDZBx/Sx8itzqfQ4zWJvcC3pRZqP root@hydrogen" +] diff --git a/nix/secrets/secrets.nix b/nix/secrets/secrets.nix index a3b4ab52..311e3b60 100644 --- a/nix/secrets/secrets.nix +++ b/nix/secrets/secrets.nix @@ -1,8 +1,5 @@ let - ids = import ../identities.nix; - - all = - builtins.concatMap builtins.attrValues (builtins.attrValues ids); + all = import ../identities.nix; in { "wpa_password.age".publicKeys = all; From 089a055d29b74e6ee9e54461fb2887b5f4d0b466 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sun, 2 Nov 2025 19:55:35 +0800 Subject: [PATCH 037/178] vanadium/connectivity: remove todo I was wrong and I made a mistake, it should work --- .../vanadium/nixos/connectivity.nix | 32 +++++++++---------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/nix/configurations/vanadium/nixos/connectivity.nix b/nix/configurations/vanadium/nixos/connectivity.nix index 46e53b78..3a23eb64 100644 --- a/nix/configurations/vanadium/nixos/connectivity.nix +++ b/nix/configurations/vanadium/nixos/connectivity.nix @@ -48,24 +48,22 @@ # Gotta preserve that thinking ability of my smoof bwain "${pkgs.ai_blocklist}/share/hosts.txt" "${pkgs.hategroup_blocklist}/share/hosts.txt" - - # TODO: extraHosts option is overwritten by this - # We should emit a warning because it trips me up and it shouldn't >:( - (pkgs.writeText "etc-extra-hosts" '' - # - # Generated from nixos configuartion - # - - # This is the fascist one, just block it because I can't tell - nixos.wiki - - # Gotta purify my smoos brain for a while - 0.0.0.0 instagram.com - 0.0.0.0 www.instagram.com - 0.0.0.0 youtube.com - 0.0.0.0 www.youtube.com - '') ]; + + extraHosts = '' + # + # Generated from nixos configuartion + # + + # This is the fascist one, just block it because I can't tell + nixos.wiki + + # Gotta purify my smoos brain for a while + 0.0.0.0 instagram.com + 0.0.0.0 www.instagram.com + 0.0.0.0 youtube.com + 0.0.0.0 www.youtube.com + ''; }; services.mullvad-vpn.enable = true; From 46ef4a3312571723ecd5dd3a0da4eba0bd5ddd90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sun, 2 Nov 2025 20:03:28 +0800 Subject: [PATCH 038/178] vanadium/dev: add more repositories to maintenance list --- nix/configurations/vanadium/home/dev.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/nix/configurations/vanadium/home/dev.nix b/nix/configurations/vanadium/home/dev.nix index 8fbe473b..57bcf93e 100644 --- a/nix/configurations/vanadium/home/dev.nix +++ b/nix/configurations/vanadium/home/dev.nix @@ -35,8 +35,11 @@ signing.signByDefault = true; maintenance = { enable = true; - repositories = lib.map (path: config.home.homeDirectory + "/${path}") [ - "r/nixos/nixpkgs" + # We don't deal with worktree folders anyway + repositories = lib.map (path: "${config.home.homeDirectory}/r/${path}") [ + "nixos/nixpkgs" + "ghc/ghc" + "haskell/cabal" ]; }; includes = let From 3084711044e70c7dd140c5740bd1b77f3ff78b49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sun, 2 Nov 2025 20:05:17 +0800 Subject: [PATCH 039/178] installer: use doas as well --- nix/configurations/installer.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nix/configurations/installer.nix b/nix/configurations/installer.nix index 44ae03b3..035d918d 100644 --- a/nix/configurations/installer.nix +++ b/nix/configurations/installer.nix @@ -12,6 +12,7 @@ }: { imports = [ ../nixosModules/common/system-nixconf.nix + ../nixosModules/common/sudo-conf.nix (modulesPath + "/installer/cd-dvd/installation-cd-minimal.nix") ]; From 45e0882b0ceaf18b4a25eb4c1926ed6a430391ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sun, 2 Nov 2025 22:46:41 +0800 Subject: [PATCH 040/178] vanadium: update wallpaper --- nix/configurations/vanadium/home/misc.nix | 2 +- npins/sources.json | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/nix/configurations/vanadium/home/misc.nix b/nix/configurations/vanadium/home/misc.nix index b7741b36..c1fff0e5 100644 --- a/nix/configurations/vanadium/home/misc.nix +++ b/nix/configurations/vanadium/home/misc.nix @@ -30,7 +30,7 @@ home.file = { ".xscreensaver".source = "${./xscreensaver/.xscreensaver}"; - ".wallpaper".source = "${pkgs.wallpapers_source}/images/KnightsOfGuinevere/guinevere_francesca.png"; + ".wallpaper".source = "${pkgs.wallpapers.packages.knights_of_guinevere.fixing_gwen}"; }; xdg.configFile = { "xmonad".source = "${./xmonad}"; diff --git a/npins/sources.json b/npins/sources.json index 4201f4b0..95188c05 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -352,9 +352,9 @@ }, "branch": "mistress", "submodules": false, - "revision": "3e3ed2f3773a4e61db1f4ae8f55dc99c574ee6e1", - "url": "https://git.confusedcompiler.org/leana8959/wallpapers/archive/3e3ed2f3773a4e61db1f4ae8f55dc99c574ee6e1.tar.gz", - "hash": "1bkxfbxck16zvby5ynhgriv9yf137jmjxfihlwz03lr5cwvdbxbf" + "revision": "fed75a7eb0459c4a3187fd7e4464163c1b3a554c", + "url": "https://git.confusedcompiler.org/leana8959/wallpapers/archive/fed75a7eb0459c4a3187fd7e4464163c1b3a554c.tar.gz", + "hash": "1a1lpvrm6gyw12xsc9g0c7qyw1xsmfllbrmjrpc3yr1sb1kfjqmk" }, "wired-notify": { "type": "Git", From d22bd9ae28bc9192d9c02cce701a01072e22ff99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Mon, 3 Nov 2025 08:41:03 +0800 Subject: [PATCH 041/178] docs: lan connection when using mullvad --- nix/configurations/vanadium/nixos/connectivity.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nix/configurations/vanadium/nixos/connectivity.nix b/nix/configurations/vanadium/nixos/connectivity.nix index 3a23eb64..b2f9a380 100644 --- a/nix/configurations/vanadium/nixos/connectivity.nix +++ b/nix/configurations/vanadium/nixos/connectivity.nix @@ -66,6 +66,10 @@ ''; }; + # LAN CONNECTION + # ~~~~~~~~~~~~~~ + # Note that when you're corrected to mullvad, you can't ssh into your local machines. + # I wonder if there's an option to turn this off. services.mullvad-vpn.enable = true; hardware.bluetooth.enable = true; From 4d4363ced1f352fd2b466f85396ee8a29c878d00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Mon, 3 Nov 2025 09:23:37 +0800 Subject: [PATCH 042/178] vanadium/display: it seems like removing the delay works --- nix/configurations/vanadium/nixos/display.nix | 4 ---- 1 file changed, 4 deletions(-) diff --git a/nix/configurations/vanadium/nixos/display.nix b/nix/configurations/vanadium/nixos/display.nix index 66a45f8c..a9b2267b 100644 --- a/nix/configurations/vanadium/nixos/display.nix +++ b/nix/configurations/vanadium/nixos/display.nix @@ -61,11 +61,7 @@ device, # obtain with `xrandr` brightness, # [0..1] }: - # Hack: - # xrandr would consider the display being connected before we can change its brightness - # For that reason, we can't base our delay on its output, sadly. singleton "10_xrandr_brightness" '' - sleep 10 ${lib.getExe pkgs.xorg.xrandr} --output ${device} --brightness ${toString brightness} ''; From 29a779cfe1ff5766cfe7282565e9c6499b368285 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Mon, 3 Nov 2025 09:51:02 +0800 Subject: [PATCH 043/178] npins: update sources --- npins/sources.json | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/npins/sources.json b/npins/sources.json index 95188c05..c25c916a 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -187,9 +187,9 @@ }, "branch": "master", "submodules": false, - "revision": "43ffe9ac82567512abb83187cb673de1091bdfa8", - "url": "https://github.com/NixOS/nixos-hardware/archive/43ffe9ac82567512abb83187cb673de1091bdfa8.tar.gz", - "hash": "1amgw52j0z8mgfklgz3nfa1qcr4sj0vblapamqzsw148ii4xblsx" + "revision": "7467f155fcba189eb088a7601f44fbef7688669b", + "url": "https://github.com/NixOS/nixos-hardware/archive/7467f155fcba189eb088a7601f44fbef7688669b.tar.gz", + "hash": "04rpy1nq8bmxbrbqjq0ghvnvmnqay4l2vwncimw0zb6rdnhdxldc" }, "nixpkgs": { "type": "Git", @@ -200,9 +200,9 @@ }, "branch": "nixos-25.05-small", "submodules": false, - "revision": "90b70846420ac681b72176a88d9fd0a5a06c74b1", - "url": "https://github.com/NixOS/nixpkgs/archive/90b70846420ac681b72176a88d9fd0a5a06c74b1.tar.gz", - "hash": "05ba9jcr3kgg9pn8alnk7bn63xxq2xahw8gpaclsy67q6nbya375" + "revision": "0257fc3c4a1ba60fb2a9d19c2915e7315bad41db", + "url": "https://github.com/NixOS/nixpkgs/archive/0257fc3c4a1ba60fb2a9d19c2915e7315bad41db.tar.gz", + "hash": "18f5jn4wm3g1alfv168bg2xk9zidp0826x4d149li9bljjnp1j29" }, "nur": { "type": "Git", @@ -213,9 +213,9 @@ }, "branch": "main", "submodules": false, - "revision": "fd763567eda0a287d5512590a89b8bdf86f8cf4b", - "url": "https://github.com/nix-community/nur/archive/fd763567eda0a287d5512590a89b8bdf86f8cf4b.tar.gz", - "hash": "148rl5ckahjw99vvk2xiq17hbfggxp0nqvsr8f22sqs94i171hqh" + "revision": "213fb0b7a376c1c901c0d0779a0a8e5985868c42", + "url": "https://github.com/nix-community/nur/archive/213fb0b7a376c1c901c0d0779a0a8e5985868c42.tar.gz", + "hash": "0503ipivmx0nxm11vbzkpfzn2v7ng19s9zb17a2ipnfr0kkj78p9" }, "pin-emacs28": { "type": "Git", @@ -352,9 +352,9 @@ }, "branch": "mistress", "submodules": false, - "revision": "fed75a7eb0459c4a3187fd7e4464163c1b3a554c", - "url": "https://git.confusedcompiler.org/leana8959/wallpapers/archive/fed75a7eb0459c4a3187fd7e4464163c1b3a554c.tar.gz", - "hash": "1a1lpvrm6gyw12xsc9g0c7qyw1xsmfllbrmjrpc3yr1sb1kfjqmk" + "revision": "0eec270ac5fcbc939f475c7954504cfcbde8f7d9", + "url": "https://git.confusedcompiler.org/leana8959/wallpapers/archive/0eec270ac5fcbc939f475c7954504cfcbde8f7d9.tar.gz", + "hash": "1y5r6gm7b781s70x89ya24sqj9rfza83as0749hkd77b8zncvkkl" }, "wired-notify": { "type": "Git", From 70a9c78bfcd76d92a704c4a3d61c923581ec9c7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Mon, 3 Nov 2025 13:56:34 +0800 Subject: [PATCH 044/178] vanadium/overlays: patch xorg temporarily --- nix/configurations/vanadium/overlay.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/nix/configurations/vanadium/overlay.nix b/nix/configurations/vanadium/overlay.nix index 7f973f21..5e5c3279 100644 --- a/nix/configurations/vanadium/overlay.nix +++ b/nix/configurations/vanadium/overlay.nix @@ -62,4 +62,20 @@ in ./patches/fcitx5-chinese-addons/disable-fullwidth.patch # Note: disabling pinyin helper breaks canjie ]; + + # Security, Xorg vuln + # Backport has failed in upstream currently , + # might as well patch it while people are blogging about it + # Upstream talks about it here https://lists.x.org/archives/xorg-announce/2025-October/003635.html + xorg.xorgserver.__output.version = oldVersion: let + version = "21.1.20"; + in + if oldVersion == version + then throw "This patch has been merged upstream" + else version; + xorg.xorgserver.__output.src = _: + final.fetchurl { + url = "mirror://xorg/individual/xserver/xorg-server-21.1.20.tar.xz"; + sha256 = "sha256-dpW8YYJLOoG2utL3iwVADKAVAD3kAtGzIhFxBbcC6Tc="; + }; } From 5ee9d8b245d1e0bc3cf7913d317efa5e40ae8ab5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Mon, 3 Nov 2025 20:08:02 +0800 Subject: [PATCH 045/178] vanadium/xmonad: remove fade --- .../vanadium/home/xmonad/xmonad.hs | 31 +------------------ 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/nix/configurations/vanadium/home/xmonad/xmonad.hs b/nix/configurations/vanadium/home/xmonad/xmonad.hs index c60fb6d7..6576a161 100644 --- a/nix/configurations/vanadium/home/xmonad/xmonad.hs +++ b/nix/configurations/vanadium/home/xmonad/xmonad.hs @@ -6,7 +6,6 @@ import XMonad.Actions.Submap import XMonad.Actions.SwapWorkspaces import XMonad.Hooks.DynamicLog import XMonad.Hooks.EwmhDesktops -import XMonad.Hooks.FadeWindows import XMonad.Hooks.InsertPosition import XMonad.Hooks.ManageDocks import XMonad.Hooks.ManageHelpers @@ -48,32 +47,7 @@ main = , terminal = myTerm , workspaces = myWorkspaces - , logHook = - let - fadeHook = - composeOne - [ -- easier to paint over stuff - isFloating - <&&> isFocused - <&&> title ~? "Wplace" - -?> transparency 0.5 - - -- matches the second string of the WM_CLASS - , className `isOneOf` - [ "firefox" - , "Signal" - , "steam" - , "discord" - , "vlc" - ] - -?> opaque - - , isFloating -?> ifM isFocused (transparency 0.04) (transparency 0.08) - , isUnfocused -?> transparency 0.02 - ] - in - fadeWindowsLogHook fadeHook - <> refocusLastLogHook + , logHook = refocusLastLogHook , startupHook = do spawnOnce "fcitx5 &" -- Input method @@ -267,9 +241,6 @@ xmobarConfig = statusBarProp "xmobar -x 0" (pure myPrettyPrinter) isOneOf :: Eq a => Query a -> [a] -> Query Bool isOneOf q = fmap or . traverse (q =?) -isFocused :: Query Bool -isFocused = fmap not isUnfocused - isFirefoxPIP :: Query Bool isFirefoxPIP = className =? "firefox" From 4874f1f39b2c87a5457a1affe6fae492c9a450a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Mon, 3 Nov 2025 20:10:14 +0800 Subject: [PATCH 046/178] vanadium/xmonad: clean up language extensions --- nix/configurations/vanadium/home/xmonad/leanamonad.cabal | 2 +- .../home/xmonad/lib/Leanamonad/Layouts/ReflectMsg.hs | 3 ++- nix/configurations/vanadium/home/xmonad/xmonad.hs | 5 ++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/nix/configurations/vanadium/home/xmonad/leanamonad.cabal b/nix/configurations/vanadium/home/xmonad/leanamonad.cabal index 63d6b030..de874f27 100644 --- a/nix/configurations/vanadium/home/xmonad/leanamonad.cabal +++ b/nix/configurations/vanadium/home/xmonad/leanamonad.cabal @@ -18,7 +18,7 @@ common common , xmonad-contrib , containers , X11 - default-language: GHC2021 + default-language: Haskell2010 library import: common diff --git a/nix/configurations/vanadium/home/xmonad/lib/Leanamonad/Layouts/ReflectMsg.hs b/nix/configurations/vanadium/home/xmonad/lib/Leanamonad/Layouts/ReflectMsg.hs index c8cbd263..f86e4632 100644 --- a/nix/configurations/vanadium/home/xmonad/lib/Leanamonad/Layouts/ReflectMsg.hs +++ b/nix/configurations/vanadium/home/xmonad/lib/Leanamonad/Layouts/ReflectMsg.hs @@ -1,4 +1,5 @@ -{-# LANGUAGE NegativeLiterals #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE MultiParamTypeClasses #-} module Leanamonad.Layouts.ReflectMsg where diff --git a/nix/configurations/vanadium/home/xmonad/xmonad.hs b/nix/configurations/vanadium/home/xmonad/xmonad.hs index 6576a161..301d0afc 100644 --- a/nix/configurations/vanadium/home/xmonad/xmonad.hs +++ b/nix/configurations/vanadium/home/xmonad/xmonad.hs @@ -1,5 +1,4 @@ {-# LANGUAGE NegativeLiterals #-} -{-# LANGUAGE LambdaCase #-} import XMonad import XMonad.Actions.Submap @@ -16,14 +15,14 @@ import XMonad.Layout.Reflect import XMonad.Layout.Renamed import XMonad.Layout.ResizableTile import XMonad.Layout.Spacing -import XMonad.StackSet qualified as W +import qualified XMonad.StackSet as W import XMonad.Util.EZConfig import XMonad.Util.Hacks import XMonad.Util.NamedScratchpad import XMonad.Util.SpawnOnce import XMonad.Layout.Magnifier -import Data.Map.Strict qualified as M +import qualified Data.Map.Strict as M import System.Posix import Graphics.X11.ExtraTypes.XF86 From 3a3e38dfa4612a7536ebb8ff314acc65375d9627 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Mon, 3 Nov 2025 20:16:24 +0800 Subject: [PATCH 047/178] vanadium/picom: document choices --- nix/configurations/vanadium/nixos/gui.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nix/configurations/vanadium/nixos/gui.nix b/nix/configurations/vanadium/nixos/gui.nix index 2bf33ca7..57153696 100644 --- a/nix/configurations/vanadium/nixos/gui.nix +++ b/nix/configurations/vanadium/nixos/gui.nix @@ -36,8 +36,10 @@ services.picom = { enable = true; - backend = "glx"; + # avoid tearing vSync = true; + + # buttery smooth fade = true; fadeDelta = 3; settings = { From b123f1650d39fb54b32ce950fb1ab2b129cdbd58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Mon, 3 Nov 2025 20:24:10 +0800 Subject: [PATCH 048/178] nvim: update milou --- .config/nvim/lazy-lock.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index 8d98d8f2..3a97f25e 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -15,7 +15,7 @@ "lazy.nvim": { "branch": "main", "commit": "59334064f8604ca073791c25dcc5c9698865406e" }, "lazydev.nvim": { "branch": "main", "commit": "258d2a5ef4a3e3d6d9ba9da72c9725c53e9afcbd" }, "leap.nvim": { "branch": "main", "commit": "07304103f6bd923004fdef9262d9a4d7925fb70a" }, - "milou": { "branch": "haddock", "commit": "4b3ab4976ff53b029f73d039fea016520af813d6" }, + "milou": { "branch": "haddock", "commit": "ae95eb2ebdbc4228931ceefa64f86b877213dc62" }, "no-neck-pain.nvim": { "branch": "main", "commit": "ecc584150f5c8a2a82f2e1d43201df0f65c63d0e" }, "nvim-autopairs": { "branch": "master", "commit": "23320e75953ac82e559c610bec5a90d9c6dfa743" }, "nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" }, From 073078a9223d70ad50fbac853ec5048a5b8be6b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Tue, 4 Nov 2025 10:50:29 +0800 Subject: [PATCH 049/178] vanadium/xmonad: show nmaster count in description --- .../vanadium/home/xmonad/leanamonad.cabal | 3 ++- .../{Layouts => Layout}/ReflectMsg.hs | 2 +- .../lib/Leanamonad/Layout/ResizableTile.hs | 27 +++++++++++++++++++ .../vanadium/home/xmonad/xmonad.hs | 7 +++-- 4 files changed, 35 insertions(+), 4 deletions(-) rename nix/configurations/vanadium/home/xmonad/lib/Leanamonad/{Layouts => Layout}/ReflectMsg.hs (94%) create mode 100644 nix/configurations/vanadium/home/xmonad/lib/Leanamonad/Layout/ResizableTile.hs diff --git a/nix/configurations/vanadium/home/xmonad/leanamonad.cabal b/nix/configurations/vanadium/home/xmonad/leanamonad.cabal index de874f27..c1978c6c 100644 --- a/nix/configurations/vanadium/home/xmonad/leanamonad.cabal +++ b/nix/configurations/vanadium/home/xmonad/leanamonad.cabal @@ -24,7 +24,8 @@ library import: common hs-source-dirs: lib exposed-modules: - Leanamonad.Layouts.ReflectMsg + Leanamonad.Layout.ReflectMsg + Leanamonad.Layout.ResizableTile Leanamonad.GreekChar executable leanamonad diff --git a/nix/configurations/vanadium/home/xmonad/lib/Leanamonad/Layouts/ReflectMsg.hs b/nix/configurations/vanadium/home/xmonad/lib/Leanamonad/Layout/ReflectMsg.hs similarity index 94% rename from nix/configurations/vanadium/home/xmonad/lib/Leanamonad/Layouts/ReflectMsg.hs rename to nix/configurations/vanadium/home/xmonad/lib/Leanamonad/Layout/ReflectMsg.hs index f86e4632..8b69af56 100644 --- a/nix/configurations/vanadium/home/xmonad/lib/Leanamonad/Layouts/ReflectMsg.hs +++ b/nix/configurations/vanadium/home/xmonad/lib/Leanamonad/Layout/ReflectMsg.hs @@ -1,7 +1,7 @@ {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} -module Leanamonad.Layouts.ReflectMsg where +module Leanamonad.Layout.ReflectMsg where import XMonad ( Resize (Expand, Shrink), diff --git a/nix/configurations/vanadium/home/xmonad/lib/Leanamonad/Layout/ResizableTile.hs b/nix/configurations/vanadium/home/xmonad/lib/Leanamonad/Layout/ResizableTile.hs new file mode 100644 index 00000000..7692147d --- /dev/null +++ b/nix/configurations/vanadium/home/xmonad/lib/Leanamonad/Layout/ResizableTile.hs @@ -0,0 +1,27 @@ +{-# LANGUAGE NamedFieldPuns #-} +{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-} + +module Leanamonad.Layout.ResizableTile + ( module XMonad.Layout.ResizableTile + , RTFixDescription(..) + ) where + +import XMonad +import qualified XMonad.StackSet as W +import XMonad.Layout.ResizableTile + +newtype RTFixDescription a = RTFixDescription { unwrapRT :: ResizableTall a } + deriving (Read, Show) + +instance LayoutClass RTFixDescription a where + runLayout (W.Workspace t l s) = + let ws' = W.Workspace t (unwrapRT l) s + in fmap (fmap (fmap RTFixDescription)) + . runLayout ws' + + handleMessage (RTFixDescription l) m = + fmap (fmap RTFixDescription) + $ handleMessage l m + + description (RTFixDescription l) = + description l <> " " <> show (_nmaster l) diff --git a/nix/configurations/vanadium/home/xmonad/xmonad.hs b/nix/configurations/vanadium/home/xmonad/xmonad.hs index 301d0afc..d7921849 100644 --- a/nix/configurations/vanadium/home/xmonad/xmonad.hs +++ b/nix/configurations/vanadium/home/xmonad/xmonad.hs @@ -26,7 +26,9 @@ import qualified Data.Map.Strict as M import System.Posix import Graphics.X11.ExtraTypes.XF86 -import Leanamonad.Layouts.ReflectMsg +import Leanamonad.Layout.ReflectMsg +-- TODO: rename this module +import Leanamonad.Layout.ResizableTile import Leanamonad.GreekChar main :: IO () @@ -65,9 +67,10 @@ main = putEnv "MOZ_USE_XINPUT2=1" -- Force touchpad for firefox , layoutHook = - let tallr = named "Normal" + let tallr = renamed [ KeepWordsRight 2 ] {- keep "ResizableTall n" -} $ smartSpacingWithEdge 5 $ reflectMsg . reflectHoriz + $ RTFixDescription $ ResizableTall 1 (1/10) (3/7) [] mag = magnifyxy 1.05 1.3 (NoMaster 3) False in avoidStruts . smartBorders $ From d243e6c32ff2dee0c5ef4017ea4f6a3b5ce05ff6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Wed, 5 Nov 2025 08:54:06 +0800 Subject: [PATCH 050/178] vanadium/xmonad: refactor --- nix/configurations/vanadium/home/xmonad/leanamonad.cabal | 6 +++--- .../lib/{Leanamonad/GreekChar.hs => Data/Char/Greek.hs} | 2 +- .../ReflectMsg.hs => XMonad/Layout/Reflect/Message.hs} | 2 +- .../Layout/ResizableTile/FixDescription.hs} | 5 ++--- nix/configurations/vanadium/home/xmonad/xmonad.hs | 7 +++---- 5 files changed, 10 insertions(+), 12 deletions(-) rename nix/configurations/vanadium/home/xmonad/lib/{Leanamonad/GreekChar.hs => Data/Char/Greek.hs} (95%) rename nix/configurations/vanadium/home/xmonad/lib/{Leanamonad/Layout/ReflectMsg.hs => XMonad/Layout/Reflect/Message.hs} (94%) rename nix/configurations/vanadium/home/xmonad/lib/{Leanamonad/Layout/ResizableTile.hs => XMonad/Layout/ResizableTile/FixDescription.hs} (86%) diff --git a/nix/configurations/vanadium/home/xmonad/leanamonad.cabal b/nix/configurations/vanadium/home/xmonad/leanamonad.cabal index c1978c6c..250a2d53 100644 --- a/nix/configurations/vanadium/home/xmonad/leanamonad.cabal +++ b/nix/configurations/vanadium/home/xmonad/leanamonad.cabal @@ -24,9 +24,9 @@ library import: common hs-source-dirs: lib exposed-modules: - Leanamonad.Layout.ReflectMsg - Leanamonad.Layout.ResizableTile - Leanamonad.GreekChar + XMonad.Layout.Reflect.Message + XMonad.Layout.ResizableTile.FixDescription + Data.Char.Greek executable leanamonad import: common diff --git a/nix/configurations/vanadium/home/xmonad/lib/Leanamonad/GreekChar.hs b/nix/configurations/vanadium/home/xmonad/lib/Data/Char/Greek.hs similarity index 95% rename from nix/configurations/vanadium/home/xmonad/lib/Leanamonad/GreekChar.hs rename to nix/configurations/vanadium/home/xmonad/lib/Data/Char/Greek.hs index 844e05b5..43e8b23f 100644 --- a/nix/configurations/vanadium/home/xmonad/lib/Leanamonad/GreekChar.hs +++ b/nix/configurations/vanadium/home/xmonad/lib/Data/Char/Greek.hs @@ -1,4 +1,4 @@ -module Leanamonad.GreekChar where +module Data.Char.Greek where import Data.List (find) diff --git a/nix/configurations/vanadium/home/xmonad/lib/Leanamonad/Layout/ReflectMsg.hs b/nix/configurations/vanadium/home/xmonad/lib/XMonad/Layout/Reflect/Message.hs similarity index 94% rename from nix/configurations/vanadium/home/xmonad/lib/Leanamonad/Layout/ReflectMsg.hs rename to nix/configurations/vanadium/home/xmonad/lib/XMonad/Layout/Reflect/Message.hs index 8b69af56..61811072 100644 --- a/nix/configurations/vanadium/home/xmonad/lib/Leanamonad/Layout/ReflectMsg.hs +++ b/nix/configurations/vanadium/home/xmonad/lib/XMonad/Layout/Reflect/Message.hs @@ -1,7 +1,7 @@ {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} -module Leanamonad.Layout.ReflectMsg where +module XMonad.Layout.Reflect.Message where import XMonad ( Resize (Expand, Shrink), diff --git a/nix/configurations/vanadium/home/xmonad/lib/Leanamonad/Layout/ResizableTile.hs b/nix/configurations/vanadium/home/xmonad/lib/XMonad/Layout/ResizableTile/FixDescription.hs similarity index 86% rename from nix/configurations/vanadium/home/xmonad/lib/Leanamonad/Layout/ResizableTile.hs rename to nix/configurations/vanadium/home/xmonad/lib/XMonad/Layout/ResizableTile/FixDescription.hs index 7692147d..18a813cd 100644 --- a/nix/configurations/vanadium/home/xmonad/lib/Leanamonad/Layout/ResizableTile.hs +++ b/nix/configurations/vanadium/home/xmonad/lib/XMonad/Layout/ResizableTile/FixDescription.hs @@ -1,9 +1,8 @@ {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-} -module Leanamonad.Layout.ResizableTile - ( module XMonad.Layout.ResizableTile - , RTFixDescription(..) +module XMonad.Layout.ResizableTile.FixDescription + ( RTFixDescription(..) ) where import XMonad diff --git a/nix/configurations/vanadium/home/xmonad/xmonad.hs b/nix/configurations/vanadium/home/xmonad/xmonad.hs index d7921849..d4ec6659 100644 --- a/nix/configurations/vanadium/home/xmonad/xmonad.hs +++ b/nix/configurations/vanadium/home/xmonad/xmonad.hs @@ -12,8 +12,10 @@ import XMonad.Hooks.RefocusLast import XMonad.Hooks.StatusBar import XMonad.Layout.NoBorders import XMonad.Layout.Reflect +import XMonad.Layout.Reflect.Message import XMonad.Layout.Renamed import XMonad.Layout.ResizableTile +import XMonad.Layout.ResizableTile.FixDescription import XMonad.Layout.Spacing import qualified XMonad.StackSet as W import XMonad.Util.EZConfig @@ -26,10 +28,7 @@ import qualified Data.Map.Strict as M import System.Posix import Graphics.X11.ExtraTypes.XF86 -import Leanamonad.Layout.ReflectMsg --- TODO: rename this module -import Leanamonad.Layout.ResizableTile -import Leanamonad.GreekChar +import Data.Char.Greek main :: IO () main = From 2922707f17e3462c4d8c02349f0ddd13b310cc7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Wed, 5 Nov 2025 09:13:06 +0800 Subject: [PATCH 051/178] vanadium/xmonad: break into small bindings We noticed that this makes error message smaller and easier to understand. --- .../vanadium/home/xmonad/xmonad.hs | 330 +++++++++--------- 1 file changed, 165 insertions(+), 165 deletions(-) diff --git a/nix/configurations/vanadium/home/xmonad/xmonad.hs b/nix/configurations/vanadium/home/xmonad/xmonad.hs index d4ec6659..27a744ad 100644 --- a/nix/configurations/vanadium/home/xmonad/xmonad.hs +++ b/nix/configurations/vanadium/home/xmonad/xmonad.hs @@ -46,170 +46,175 @@ main = , focusFollowsMouse = True , terminal = myTerm , workspaces = myWorkspaces - - , logHook = refocusLastLogHook - - , startupHook = do - spawnOnce "fcitx5 &" -- Input method - - spawn "feh --no-fehbg --bg-fill ~/.wallpaper &" -- wallpaper - - -- Needed to make gnome keyring work - -- https://wiki.archlinux.org/title/GNOME/Keyring#Using_gnome-keyring-daemon_outside_desktop_environments_(KDE,_GNOME,_XFCE,_...) - spawn "dbus-update-activation-environment DISPLAY XAUTHORITY WAYLAND_DISPLAY" - - io $ do - -- This is done here because: - -- - setting `home.sessionVariable` (home-manager) would only effect shells, probably due to the order of launched processes blah blah - -- - setting `environment.sessionVariables` (NixOS) would make my set up less portable - putEnv "GLFW_IM_MODULE=ibus" -- Make sure kitty knows how to talk to fcitx - putEnv "MOZ_USE_XINPUT2=1" -- Force touchpad for firefox - - , layoutHook = - let tallr = renamed [ KeepWordsRight 2 ] {- keep "ResizableTall n" -} - $ smartSpacingWithEdge 5 - $ reflectMsg . reflectHoriz - $ RTFixDescription - $ ResizableTall 1 (1/10) (3/7) [] - mag = magnifyxy 1.05 1.3 (NoMaster 3) False - in avoidStruts . smartBorders $ - mag tallr ||| Full - - , manageHook = - composeAll - [ className ~? "NautilusPreviewer" --> customFloating centeredFloat - , className =? "feh" --> customFloating buttomRightFloat - , className =? "Minder" - <&&> not <$> title ~? "Pick a Color" -- ignore the color picker - --> customFloating centeredFloat - , isFirefoxPIP --> doFloat - - , namedScratchpadManageHook myScratchpads - ] - - <> - composeOne - [ className =? "firefox" -?> insertPosition Master Newer - , className =? "kitty" -?> insertPosition Below Newer - , className `isOneOf` - [ "sioyek" - , "Nautilus" - ] - -?> insertPosition End Older - ] + , logHook = refocusLastLogHook + , startupHook = myStartupHook + , layoutHook = myLayout + , manageHook = myManageHook } - -- Only remove mappings that needs pass through (it's a map). - `removeKeys` - [ (superMask, xK_h) - , (superMask, xK_l) - , (superMask, xK_p) + -- Only remove mappings that needs pass through + `removeKeys` removedKeybinds + `additionalKeys` keybinds - -- It has been more than once that I actidently killed xmonad >:( - , (superMask .|. shiftMask, xK_q) - ] - ++ [ (superMask , n) | n <- [xK_1 .. xK_9] ] - ++ [ (superMask .|. shiftMask, n) | n <- [xK_1 .. xK_9] ] +myLayout = + let tallr = renamed [ KeepWordsRight 2 ] {- keep "ResizableTall n" -} + $ smartSpacingWithEdge 5 + $ reflectMsg . reflectHoriz + $ RTFixDescription + $ ResizableTall 1 (1/10) (3/7) [] + mag = magnifyxy 1.05 1.3 (NoMaster 3) False + in avoidStruts . smartBorders $ + mag tallr ||| Full - `additionalKeys` - [ - -- Display - ((0, xF86XK_MonBrightnessDown), spawn "light -U 5") - , ((0, xF86XK_MonBrightnessUp ), spawn "light -A 5") - , ((shiftMask, xF86XK_MonBrightnessDown), spawn "light -U 1") - , ((shiftMask, xF86XK_MonBrightnessUp ), spawn "light -A 1") - , ((altMask, xF86XK_MonBrightnessUp ), spawn "autorandr --change --ignore-lid") - , ((altMask, xF86XK_MonBrightnessDown), spawn "autorandr --change --ignore-lid") +isOneOf :: Eq a => Query a -> [a] -> Query Bool +isOneOf q = fmap or . traverse (q =?) - -- Volume adjustments - -- Don't overload the mute button - -- In case of doubt, smashing the button becomes deterministic - , ((0, xF86XK_AudioMute), spawn "pactl -- set-sink-mute 0 1" ) -- mute - , ((controlMask, xF86XK_AudioMute), spawn "pactl -- set-sink-mute 0 0" ) -- unmute - , ((0, xF86XK_AudioLowerVolume), spawn "pactl -- set-sink-volume 0 -5%") - , ((0, xF86XK_AudioRaiseVolume), spawn "pactl -- set-sink-volume 0 +5%") - , ((shiftMask, xF86XK_AudioLowerVolume), spawn "pactl -- set-sink-volume 0 -1%") - , ((shiftMask, xF86XK_AudioRaiseVolume), spawn "pactl -- set-sink-volume 0 +1%") +myManageHook :: ManageHook +myManageHook = + composeAll + [ className ~? "NautilusPreviewer" --> customFloating centeredFloat + , className =? "feh" --> customFloating buttomRightFloat + , className =? "Minder" + <&&> not <$> title ~? "Pick a Color" -- ignore the color picker + --> customFloating centeredFloat + , className =? "firefox" + <&&> title =? "Picture-in-Picture" + --> doFloat + , namedScratchpadManageHook myScratchpads + ] + <> composeOne + [ className =? "firefox" -?> insertPosition Master Newer + , className =? "kitty" -?> insertPosition Below Newer + , className `isOneOf` + [ "sioyek" + , "Nautilus" + ] + -?> insertPosition End Older + ] - -- Playback control - , ((0, xF86XK_AudioPrev), spawn "playerctl previous" ) - , ((0, xF86XK_AudioPlay), spawn "playerctl play-pause") - , ((0, xF86XK_AudioNext), spawn "playerctl next" ) +myStartupHook :: X () +myStartupHook = do + spawnOnce "fcitx5 &" -- Input method - -- Toggle fullscreen - , ((superMask, xK_Escape), sendMessage NextLayout) + spawn "feh --no-fehbg --bg-fill ~/.wallpaper &" -- wallpaper - -- Resize windows - , ((superMask, xK_equal ), sendMessage $ IncMasterN 1) - , ((superMask, xK_minus ), sendMessage $ IncMasterN -1) - , ((superMask, xK_comma ), sendMessage Shrink ) - , ((superMask, xK_period ), sendMessage Expand ) - , ((superMask .|. shiftMask, xK_comma ), sendMessage MirrorShrink ) - , ((superMask .|. shiftMask, xK_period), sendMessage MirrorExpand ) - , ((superMask , xK_apostrophe), sendMessage Toggle ) + -- Needed to make gnome keyring work + -- https://wiki.archlinux.org/title/GNOME/Keyring#Using_gnome-keyring-daemon_outside_desktop_environments_(KDE,_GNOME,_XFCE,_...) + spawn "dbus-update-activation-environment DISPLAY XAUTHORITY WAYLAND_DISPLAY" - -- [D]o sink and lift - , ( (superMask, xK_d) - , submap $ M.fromList - [ ((0, xK_t), withFocused $ windows . W.sink) - , ((0, xK_l), withFocused $ windows . flip W.float centeredFloat) - ] - ) - ] + io $ do + -- This is done here because: + -- - setting `home.sessionVariable` (home-manager) would only effect shells, probably due to the order of launched processes blah blah + -- - setting `environment.sessionVariables` (NixOS) would make my set up less portable + putEnv "GLFW_IM_MODULE=ibus" -- Make sure kitty knows how to talk to fcitx + putEnv "MOZ_USE_XINPUT2=1" -- Force touchpad for firefox - -- Screenshots - ++ (let - fullscreen = "maim -u | xclip -in -selection clipboard -t image/png" +removedKeybinds :: [(KeyMask, KeySym)] +removedKeybinds = + [ (superMask, xK_h) + , (superMask, xK_l) + , (superMask, xK_p) + + -- It has been more than once that I actidently killed xmonad >:( + , (superMask .|. shiftMask, xK_q) + ] + ++ [ (superMask , n) | n <- [xK_1 .. xK_9] ] + ++ [ (superMask .|. shiftMask, n) | n <- [xK_1 .. xK_9] ] + +keybinds :: [((KeyMask, KeySym), X ())] +keybinds = + [ + -- Display + ((0, xF86XK_MonBrightnessDown), spawn "light -U 5") + , ((0, xF86XK_MonBrightnessUp ), spawn "light -A 5") + , ((shiftMask, xF86XK_MonBrightnessDown), spawn "light -U 1") + , ((shiftMask, xF86XK_MonBrightnessUp ), spawn "light -A 1") + , ((altMask, xF86XK_MonBrightnessUp ), spawn "autorandr --change --ignore-lid") + , ((altMask, xF86XK_MonBrightnessDown), spawn "autorandr --change --ignore-lid") + + -- Volume adjustments + -- Don't overload the mute button + -- In case of doubt, smashing the button becomes deterministic + , ((0, xF86XK_AudioMute), spawn "pactl -- set-sink-mute 0 1" ) -- mute + , ((controlMask, xF86XK_AudioMute), spawn "pactl -- set-sink-mute 0 0" ) -- unmute + , ((0, xF86XK_AudioLowerVolume), spawn "pactl -- set-sink-volume 0 -5%") + , ((0, xF86XK_AudioRaiseVolume), spawn "pactl -- set-sink-volume 0 +5%") + , ((shiftMask, xF86XK_AudioLowerVolume), spawn "pactl -- set-sink-volume 0 -1%") + , ((shiftMask, xF86XK_AudioRaiseVolume), spawn "pactl -- set-sink-volume 0 +1%") + + -- Playback control + , ((0, xF86XK_AudioPrev), spawn "playerctl previous" ) + , ((0, xF86XK_AudioPlay), spawn "playerctl play-pause") + , ((0, xF86XK_AudioNext), spawn "playerctl next" ) + + -- Toggle fullscreen + , ((superMask, xK_Escape), sendMessage NextLayout) + + -- Resize windows + , ((superMask, xK_equal ), sendMessage $ IncMasterN 1) + , ((superMask, xK_minus ), sendMessage $ IncMasterN -1) + , ((superMask, xK_comma ), sendMessage Shrink ) + , ((superMask, xK_period ), sendMessage Expand ) + , ((superMask .|. shiftMask, xK_comma ), sendMessage MirrorShrink ) + , ((superMask .|. shiftMask, xK_period), sendMessage MirrorExpand ) + , ((superMask , xK_apostrophe), sendMessage Toggle ) + + -- [D]o sink and lift + , ( (superMask, xK_d) + , submap $ M.fromList + [ ((0, xK_t), withFocused $ windows . W.sink) + , ((0, xK_l), withFocused $ windows . flip W.float centeredFloat) + ] + ) + ] + + -- Screenshots + ++ (let fullscreen = "maim -u | xclip -in -selection clipboard -t image/png" withSelection = "maim -u -s -b 5 -o | xclip -in -selection clipboard -t image/png" toFloat = "maim -u -s -b 5 -o | feh --auto-zoom -" - in - [ ((0, xK_Print), spawn fullscreen ) - , ((superMask .|. shiftMask, xK_3 ), spawn fullscreen ) - , ((superMask .|. shiftMask, xK_4 ), spawn withSelection) - , ((superMask .|. shiftMask, xK_5 ), spawn toFloat ) - ]) + in [ ((0, xK_Print), spawn fullscreen ) + , ((superMask .|. shiftMask, xK_3 ), spawn fullscreen ) + , ((superMask .|. shiftMask, xK_4 ), spawn withSelection) + , ((superMask .|. shiftMask, xK_5 ), spawn toFloat ) + ] + ) - -- Yeet - ++ (let - workspaceKeys = [xK_h, xK_t, xK_n, xK_s, xK_m, xK_w, xK_v, xK_z] - in - [ ((superMask, k), windows $ W.greedyView space) - | (k, space) <- zip workspaceKeys myWorkspaces - ] - ++ - [ ((superMask .|. altMask, k), windows $ W.greedyView space . W.shift space) - | (k, space) <- zip workspaceKeys myWorkspaces - ] - ++ - [ ((superMask .|. controlMask, k), windows $ swapWithCurrent space) - | (k, space) <- zip workspaceKeys myWorkspaces - ]) + -- Yeet + ++ (let workspaceKeys = [xK_h, xK_t, xK_n, xK_s, xK_m, xK_w, xK_v, xK_z] + in [ ((superMask, k), windows $ W.greedyView space) + | (k, space) <- zip workspaceKeys myWorkspaces + ] + ++ [ ((superMask .|. altMask, k), windows $ W.greedyView space . W.shift space) + | (k, space) <- zip workspaceKeys myWorkspaces + ] + ++ [ ((superMask .|. controlMask, k), windows $ swapWithCurrent space) + | (k, space) <- zip workspaceKeys myWorkspaces + ] + ) - -- Launcher - ++ (let - launchFirefox = "if type firefox; then firefox; else firefox-esr; fi" + -- Launcher + ++ (let launchFirefox = "if type firefox; then firefox; else firefox-esr; fi" launchDmenu = "dmenu_run -i -fn \"Iosevka-14\" -nb \"#36363a\" -nf \"#e2e2e4\" -sb \"#f7f7f8\" -sf \"#36363a\" -l 10" lock = "xscreensaver-command -lock" - in - [ ((controlMask .|. altMask, xK_m), namedScratchpadAction myScratchpads "cmus" ) - , ((controlMask .|. altMask, xK_t), namedScratchpadAction myScratchpads "btop" ) - , ((controlMask .|. altMask, xK_p), namedScratchpadAction myScratchpads "pass" ) - , ((controlMask .|. altMask, xK_e), namedScratchpadAction myScratchpads "emoji-picker") - , ((controlMask .|. altMask, xK_b), spawn launchFirefox ) - , ((superMask, xK_o), spawn launchDmenu ) - , ((superMask, xK_l), spawn lock ) - ]) + in [ ((controlMask .|. altMask, xK_m), namedScratchpadAction myScratchpads "cmus" ) + , ((controlMask .|. altMask, xK_t), namedScratchpadAction myScratchpads "btop" ) + , ((controlMask .|. altMask, xK_p), namedScratchpadAction myScratchpads "pass" ) + , ((controlMask .|. altMask, xK_e), namedScratchpadAction myScratchpads "emoji-picker") + , ((controlMask .|. altMask, xK_b), spawn launchFirefox ) + , ((superMask, xK_o), spawn launchDmenu ) + , ((superMask, xK_l), spawn lock ) + ] + ) - ++ (let - powerprofile p = (p, spawn $ "powerprofilesctl set " ++ p) - in - [ ( (superMask, xK_p), visualSubmap def $ M.fromList - [ ((0, xK_1), powerprofile "power-saver") - , ((0, xK_2), powerprofile "balanced" ) - , ((0, xK_3), powerprofile "performance") - ] - ) - ]) + ++ (let powerprofile p = (p, spawn $ "powerprofilesctl set " ++ p) + in [ ( (superMask, xK_p), visualSubmap def $ M.fromList + [ ((0, xK_1), powerprofile "power-saver") + , ((0, xK_2), powerprofile "balanced" ) + , ((0, xK_3), powerprofile "performance") + ] + ) + ] + ) myTerm :: String myTerm = "kitty" @@ -219,13 +224,13 @@ superMask = mod4Mask altMask = mod1Mask myWorkspaces :: [String] -myWorkspaces = take 8 . fmap (:[]) $ greekLower +myWorkspaces = map (:[]) $ take 8 greekLower centeredFloat, smallFloat, fullFloat, buttomRightFloat :: W.RationalRect -centeredFloat = W.RationalRect (1/9) (1/9) (7/9) (7/9) -smallFloat = W.RationalRect (3/5) (3/5) (2/7) (2/7) -fullFloat = W.RationalRect 0 0 1 1 -buttomRightFloat = W.RationalRect (1/2) (1/2) (1/2) (1/2) +centeredFloat = W.RationalRect (1/9) (1/9) (7/9) (7/9) +smallFloat = W.RationalRect (3/5) (3/5) (2/7) (2/7) +fullFloat = W.RationalRect 0 0 1 1 +buttomRightFloat = W.RationalRect (1/2) (1/2) (1/2) (1/2) xmobarConfig :: StatusBarConfig xmobarConfig = statusBarProp "xmobar -x 0" (pure myPrettyPrinter) @@ -238,30 +243,25 @@ xmobarConfig = statusBarProp "xmobar -x 0" (pure myPrettyPrinter) , ppSep = " | " } - -isOneOf :: Eq a => Query a -> [a] -> Query Bool -isOneOf q = fmap or . traverse (q =?) - -isFirefoxPIP :: Query Bool -isFirefoxPIP = - className =? "firefox" - <&&> title =? "Picture-in-Picture" - myScratchpads :: [NamedScratchpad] myScratchpads = - [ NS "cmus" + [ NS + "cmus" (myTerm ++ " -T 'cmus' cmus") (title =? "cmus") (customFloating centeredFloat) - , NS "btop" + , NS + "btop" (myTerm ++ " -T 'btop' btop") (title =? "btop") (customFloating fullFloat) - , NS "pass" + , NS + "pass" (myTerm ++ " -T 'pass' -- fish -i -c 'while :; fzf-pass; end'") (title =? "pass") (customFloating smallFloat) - , NS "emoji-picker" + , NS + "emoji-picker" (myTerm ++ " -T 'emoji-picker' -- fish -i -c 'while :; emoji-picker; end'") (title =? "emoji-picker") (customFloating smallFloat) From 6f530c8e35ad7f5077ea2d3d0e45e95105df688b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Wed, 5 Nov 2025 09:25:49 +0800 Subject: [PATCH 052/178] vanadium/connectivity: remove braincell purification block on youtube --- nix/configurations/vanadium/nixos/connectivity.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/nix/configurations/vanadium/nixos/connectivity.nix b/nix/configurations/vanadium/nixos/connectivity.nix index b2f9a380..29927865 100644 --- a/nix/configurations/vanadium/nixos/connectivity.nix +++ b/nix/configurations/vanadium/nixos/connectivity.nix @@ -61,8 +61,6 @@ # Gotta purify my smoos brain for a while 0.0.0.0 instagram.com 0.0.0.0 www.instagram.com - 0.0.0.0 youtube.com - 0.0.0.0 www.youtube.com ''; }; From 57e19055c44983d7d5140f327a3c0be804de012a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Wed, 5 Nov 2025 17:57:52 +0800 Subject: [PATCH 053/178] packages/ruler: update --- nix/packages/by-name/ruler/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nix/packages/by-name/ruler/package.nix b/nix/packages/by-name/ruler/package.nix index e217fae0..fb88291c 100644 --- a/nix/packages/by-name/ruler/package.nix +++ b/nix/packages/by-name/ruler/package.nix @@ -12,8 +12,8 @@ domain = "git.confusedcompiler.org"; owner = "leana8959"; repo = "ruler"; - rev = "12b287522215781b21791101bf85f8a0dddd1225"; - hash = "sha256-XoTTxKxlUmtM9mxguwdEsMSp6qBkEgBcviM8bTgs95o="; + rev = "f328620a52b25d4c9dea64425afe5995dfb8cb5a"; + hash = "sha256-8nSVFckWXkf9dRTdzjbHRhf/qPdbXHEkVI4DyW3zfSo="; }) {}; From e218086537971a0773bd4e174053333fdf254627 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Fri, 7 Nov 2025 09:42:55 +0800 Subject: [PATCH 054/178] home/firefox: use leta by default --- nix/configurations/vanadium/home/firefox.nix | 172 +++++++++---------- nix/homeModules/common/firefox.nix | 19 +- 2 files changed, 97 insertions(+), 94 deletions(-) diff --git a/nix/configurations/vanadium/home/firefox.nix b/nix/configurations/vanadium/home/firefox.nix index c91b2222..95e9dbd6 100644 --- a/nix/configurations/vanadium/home/firefox.nix +++ b/nix/configurations/vanadium/home/firefox.nix @@ -8,103 +8,89 @@ in { programs.firefox = { enable = true; - policies = { - SearchEngines = { - Default = "leta"; - Remove = ["Google"]; - Add = [ - { - Name = "leta"; - Alias = "@lt"; - IconURL = "https://leta.mullvad.net/favicon.ico"; - URLTemplate = "https://leta.mullvad.net/search?q={searchTerms}&engine=brave"; - SuggestURLTemplate = "https://suggestqueries.google.com/complete/search?q={searchTerms}"; - } + policies.SearchEngines.Add = [ + # Forges + { + Name = "GitHub"; + Alias = "@gh"; + IconURL = "https://github.com/favicon.ico"; + Description = "Your code yum yum"; + URLTemplate = "https://github.com/search?q={searchTerms}&type=repositories"; + } + { + Name = "GitHub (Code Search)"; + Alias = "@ghc"; + IconURL = "https://github.com/favicon.ico"; + Description = "Your code yum yum"; + URLTemplate = "https://github.com/search?q={searchTerms}&type=code"; + } + { + Name = "Codeberg"; + Alias = "@cb"; + IconURL = "https://codeberg.org/favicon.ico"; + Description = "Software development, but free!"; + URLTemplate = "https://codeberg.org/explore/repos?q={searchTerms}"; + } + { + Name = "?C"; + Alias = "@cc"; + IconURL = "https://git.confusedcompiler.org/favicon.ico"; + URLTemplate = "https://git.confusedcompiler.org/explore/repos?q={searchTerms}"; + } - # Forges - { - Name = "GitHub"; - Alias = "@gh"; - IconURL = "https://github.com/favicon.ico"; - Description = "Your code yum yum"; - URLTemplate = "https://github.com/search?q={searchTerms}&type=repositories"; - } - { - Name = "GitHub (Code Search)"; - Alias = "@ghc"; - IconURL = "https://github.com/favicon.ico"; - Description = "Your code yum yum"; - URLTemplate = "https://github.com/search?q={searchTerms}&type=code"; - } - { - Name = "Codeberg"; - Alias = "@cb"; - IconURL = "https://codeberg.org/favicon.ico"; - Description = "Software development, but free!"; - URLTemplate = "https://codeberg.org/explore/repos?q={searchTerms}"; - } - { - Name = "?C"; - Alias = "@cc"; - IconURL = "https://git.confusedcompiler.org/favicon.ico"; - URLTemplate = "https://git.confusedcompiler.org/explore/repos?q={searchTerms}"; - } + # Nix{,OS,pkgs} + { + Name = "NixOS Search (Package)"; + Alias = "@np"; + IconURL = "https://nixos.org/favicon.ico"; + Description = "Search in nixpkgs"; + URLTemplate = "https://search.nixos.org/packages?query={searchTerms}"; + } + { + Name = "NixOS Search (Options)"; + Alias = "@no"; + IconURL = "https://nixos.org/favicon.ico"; + Description = "Search in NixOS options"; + URLTemplate = "https://search.nixos.org/options?query={searchTerms}"; + } - # Nix{,OS,pkgs} - { - Name = "NixOS Search (Package)"; - Alias = "@np"; - IconURL = "https://nixos.org/favicon.ico"; - Description = "Search in nixpkgs"; - URLTemplate = "https://search.nixos.org/packages?query={searchTerms}"; - } - { - Name = "NixOS Search (Options)"; - Alias = "@no"; - IconURL = "https://nixos.org/favicon.ico"; - Description = "Search in NixOS options"; - URLTemplate = "https://search.nixos.org/options?query={searchTerms}"; - } + # Haskell + { + Name = "Flora"; + Alias = "@hs"; + IconURL = "https://flora.pm/static/icons/favicon-32x32.png"; + URLTemplate = "https://flora.pm/search?q={searchTerms}"; + } - # Haskell - { - Name = "Flora"; - Alias = "@hs"; - IconURL = "https://flora.pm/static/icons/favicon-32x32.png"; - URLTemplate = "https://flora.pm/search?q={searchTerms}"; - } + # Discourse + { + Name = "NixOS Discourse"; + Alias = "@nd"; + IconURL = "https://nixos.org/favicon.ico"; + URLTemplate = "https://discourse.nixos.org/search?q={searchTerms}"; + } + { + Name = "Framework Discourse"; + Alias = "@fd"; + IconURL = "https://frame.work/favicon.ico"; + URLTemplate = "https://community.frame.work/search?q={searchTerms}"; + } - # Discourse - { - Name = "NixOS Discourse"; - Alias = "@nd"; - IconURL = "https://nixos.org/favicon.ico"; - URLTemplate = "https://discourse.nixos.org/search?q={searchTerms}"; - } - { - Name = "Framework Discourse"; - Alias = "@fd"; - IconURL = "https://frame.work/favicon.ico"; - URLTemplate = "https://community.frame.work/search?q={searchTerms}"; - } - - # Misc - { - Name = "YouTube"; - Alias = "@yt"; - IconURL = "https://youtube.com/favicon.ico"; - SuggestURLTemplate = "http://suggestqueries.google.com/complete/search?q={searchTerms}&ds=yt"; - URLTemplate = "https://www.youtube.com/results?search_query={searchTerms}"; - } - { - Name = "Genius"; - Alias = "@geni"; - IconURL = "https://genius.com/favicon.ico"; - URLTemplate = "https://genius.com/search?q={searchTerms}"; - } - ]; - }; - }; + # Misc + { + Name = "YouTube"; + Alias = "@yt"; + IconURL = "https://youtube.com/favicon.ico"; + SuggestURLTemplate = "http://suggestqueries.google.com/complete/search?q={searchTerms}&ds=yt"; + URLTemplate = "https://www.youtube.com/results?search_query={searchTerms}"; + } + { + Name = "Genius"; + Alias = "@geni"; + IconURL = "https://genius.com/favicon.ico"; + URLTemplate = "https://genius.com/search?q={searchTerms}"; + } + ]; profiles = { default = { diff --git a/nix/homeModules/common/firefox.nix b/nix/homeModules/common/firefox.nix index ed1c54f5..2f349d00 100644 --- a/nix/homeModules/common/firefox.nix +++ b/nix/homeModules/common/firefox.nix @@ -19,7 +19,24 @@ in { ]; SearchEngines = { - Remove = ["Bing" "DuckDuckGo" "Qwant" "eBay" "Perplexity"]; + Remove = ["Google" "Bing" "DuckDuckGo" "Qwant" "eBay" "Perplexity"]; + Default = "leta"; + Add = [ + { + Name = "leta"; + Alias = "@lt"; + IconURL = "https://leta.mullvad.net/favicon.ico"; + URLTemplate = "https://leta.mullvad.net/search?q={searchTerms}&engine=brave"; + SuggestURLTemplate = "https://suggestqueries.google.com/complete/search?q={searchTerms}"; + } + { + Name = "leta"; + Alias = "@ltfr"; + IconURL = "https://leta.mullvad.net/favicon.ico"; + URLTemplate = "https://leta.mullvad.net/search?q={searchTerms}&engine=brave&language=fr"; + SuggestURLTemplate = "https://suggestqueries.google.com/complete/search?q={searchTerms}"; + } + ]; }; NoDefaultBookmarks = true; DisplayMenuBar = "never"; From ec704b52728b64e0f89deed62aa3d7dbc3a4575d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sat, 8 Nov 2025 10:12:42 +0800 Subject: [PATCH 055/178] vanadium: use nixfmt --- .config/nvim/plugin/lsp.lua | 2 +- nix/configurations/vanadium/home/programs.nix | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.config/nvim/plugin/lsp.lua b/.config/nvim/plugin/lsp.lua index d8cca152..7af2d20f 100644 --- a/.config/nvim/plugin/lsp.lua +++ b/.config/nvim/plugin/lsp.lua @@ -21,7 +21,7 @@ local servers = { tinymist = {}, nil_ls = { settings = { - ["nil"] = { formatting = { command = { "alejandra" } } }, + ["nil"] = { formatting = { command = { "nixfmt" } } }, }, }, } diff --git a/nix/configurations/vanadium/home/programs.nix b/nix/configurations/vanadium/home/programs.nix index 597e550a..c0296f94 100644 --- a/nix/configurations/vanadium/home/programs.nix +++ b/nix/configurations/vanadium/home/programs.nix @@ -69,7 +69,10 @@ pkgs.just # nix tools - pkgs.alejandra + # # Alejandra handles inline comments poorly + # # https://github.com/kamadorueda/alejandra/issues/429 + # pkgs.alejandra + pkgs.nixfmt-rfc-style pkgs.nurl pkgs.dix pkgs.niv From ebf84688079b537b3a34a7f5decdf30e165b7933 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sat, 8 Nov 2025 10:15:58 +0800 Subject: [PATCH 056/178] tree-wide: format with nixfmt Another saturday another useless formatter change. It's my dotfiles, after all alejandra doesn't handle c-style inline comments well. --- default.nix | 37 +- nix/configurations/hydrogen.nix | 250 +++++------ nix/configurations/hydrogen/home/dev.nix | 3 +- nix/configurations/hydrogen/home/programs.nix | 15 +- .../hydrogen/nixos/connectivity.nix | 16 +- nix/configurations/hydrogen/nixos/misc.nix | 3 +- .../hydrogen/nixos/programs.nix | 3 +- nix/configurations/installer.nix | 18 +- nix/configurations/vanadium.nix | 420 +++++++++--------- nix/configurations/vanadium/home/dev.nix | 12 +- nix/configurations/vanadium/home/firefox.nix | 44 +- nix/configurations/vanadium/home/misc.nix | 23 +- nix/configurations/vanadium/home/programs.nix | 21 +- nix/configurations/vanadium/home/xmobar.nix | 44 +- .../vanadium/kernel-overlay.nix | 6 +- nix/configurations/vanadium/nixos/audio.nix | 2 +- .../vanadium/nixos/connectivity.nix | 17 +- nix/configurations/vanadium/nixos/display.nix | 278 ++++++------ nix/configurations/vanadium/nixos/fs.nix | 39 +- nix/configurations/vanadium/nixos/gui.nix | 3 +- .../vanadium/nixos/hardware-configuration.nix | 15 +- nix/configurations/vanadium/nixos/input.nix | 2 +- nix/configurations/vanadium/nixos/locale.nix | 23 +- nix/configurations/vanadium/nixos/misc.nix | 5 +- .../vanadium/nixos/programs.nix | 5 +- nix/configurations/vanadium/nixos/restic.nix | 149 ++++--- .../vanadium/nixos/unfree-predicate.nix | 34 +- nix/configurations/vanadium/overlay.nix | 126 +++--- nix/devShells/flora.nix | 93 ++-- nix/devShells/forgejo.nix | 34 +- nix/devShells/haddock2.nix | 4 +- nix/devShells/masna3.nix | 86 ++-- nix/devShells/necro-man.nix | 57 +-- nix/devShells/vim-tw.nix | 24 +- nix/disko/tungsten/btrfs.nix | 11 +- nix/disko/tungsten/default.nix | 8 +- nix/disko/vanadium/btrfs.nix | 13 +- nix/disko/vanadium/default.nix | 8 +- nix/git-identities/git-compat.nix | 30 +- nix/git-identities/list.nix | 3 +- nix/homeModules/common/atuin.nix | 2 +- nix/homeModules/common/btop/default.nix | 3 +- nix/homeModules/common/cmus/default.nix | 82 ++-- nix/homeModules/common/direnv.nix | 3 +- nix/homeModules/common/fcitx5/default.nix | 6 +- nix/homeModules/common/firefox.nix | 47 +- nix/homeModules/common/fish/aliasesAbbrs.nix | 3 +- nix/homeModules/common/fish/default.nix | 13 +- nix/homeModules/common/git.nix | 15 +- nix/homeModules/common/gpg.nix | 34 +- nix/homeModules/common/kitty.nix | 6 +- nix/homeModules/common/lazygit.nix | 6 +- nix/homeModules/common/leana.nix | 10 +- nix/homeModules/common/locale.nix | 3 +- nix/homeModules/common/packages.nix | 26 +- nix/homeModules/common/password-store.nix | 6 +- nix/homeModules/common/sioyek.nix | 12 +- nix/homeModules/common/starship/default.nix | 6 +- nix/homeModules/common/tmux/default.nix | 3 +- nix/homeModules/common/user-nixconf.nix | 3 +- nix/homeModules/common/vim/default.nix | 45 +- nix/homeModules/common/wired/default.nix | 5 +- .../extra/tmux-fish-integration.nix | 7 +- nix/lib/mkNerdFont.nix | 45 +- nix/networks/list.nix | 19 +- nix/networks/wpa_supplicant-compat.nix | 61 +-- .../common/disable-command-not-found.nix | 2 +- nix/nixosModules/common/fish.nix | 13 +- nix/nixosModules/common/network.nix | 3 +- nix/nixosModules/common/sudo-conf.nix | 7 +- nix/nixosModules/common/system-nixconf.nix | 3 +- nix/nixosModules/common/xscreensaver.nix | 43 +- nix/nixosModules/extra/leana.nix | 9 +- nix/nixosModules/extra/macbook-pro-radeon.nix | 2 +- nix/nixosModules/extra/parrot.nix | 12 +- nix/nixosModules/extra/secure_dns.nix | 10 +- nix/nixosModules/extra/typst-bot.nix | 14 +- nix/nixosModules/extra/zram.nix | 2 +- nix/overlays/agenix.nix | 8 +- nix/overlays/calibre-no-mime.nix | 4 +- nix/overlays/disko.nix | 6 +- nix/overlays/dix.nix | 6 +- nix/overlays/eepy.nix | 6 +- nix/overlays/fcitx5-table-extra-taiwanese.nix | 26 +- nix/overlays/iosevka.nix | 7 +- nix/overlays/nil.nix | 29 +- nix/overlays/nix-monitored.nix | 16 +- nix/overlays/nix-tree.nix | 6 +- nix/overlays/nur.nix | 2 +- nix/overlays/pin-emacs28.nix | 6 +- nix/overlays/pin-isabelle-2023.nix | 8 +- nix/overlays/pin-wireshark.nix | 10 +- nix/overlays/wallpapers.nix | 8 +- nix/overlays/wired-notify.nix | 2 +- nix/packages/by-name/ai_blocklist/package.nix | 37 +- nix/packages/by-name/audio-lint/package.nix | 34 +- .../by-name/emoji-picker-rs/package.nix | 48 +- .../by-name/hategroup_blocklist/package.nix | 35 +- nix/packages/by-name/hbrainfuck/package.nix | 39 +- nix/packages/by-name/hutils/package.nix | 22 +- nix/packages/by-name/maeel/package.nix | 2 +- nix/packages/by-name/necrolib/package.nix | 39 +- nix/packages/by-name/nix-which/package.nix | 35 +- nix/packages/by-name/prop-solveur/package.nix | 39 +- nix/packages/by-name/ruler/package.nix | 39 +- .../by-name/tmux-sessionizer/package.nix | 35 +- nix/packages/by-name/tokei/package.nix | 46 +- nix/packages/by-name/typst-bot/package.nix | 59 +-- .../by-name/typst-mutilate/package.nix | 46 +- .../by-name/webtoon_downloader/package.nix | 2 +- nix/packages/by-name/xbrightness/package.nix | 2 +- nix/packages/default.nix | 21 +- nix/packages/overlay.nix | 10 +- nix/secrets/secrets.nix | 3 +- npins/default.nix | 215 ++++----- shell.nix | 51 +-- 116 files changed, 1895 insertions(+), 1689 deletions(-) diff --git a/default.nix b/default.nix index 7445744d..ccf69117 100644 --- a/default.nix +++ b/default.nix @@ -1,22 +1,27 @@ -{sources ? import ./npins}: { +{ + sources ? import ./npins, +}: +{ # for repl sessions inherit sources; lib = import (sources.nixpkgs + "/lib"); - nixosConfigurations = builtins.mapAttrs (_: import (sources.nixpkgs + "/nixos/lib/eval-config.nix")) { - vanadium = { - system = "x86_64-linux"; - modules = [./nix/configurations/vanadium.nix]; - }; - hydrogen = { - system = "aarch64-linux"; - modules = [./nix/configurations/hydrogen.nix]; - }; - installer = { - system = "x86_64-linux"; - modules = [./nix/configurations/installer.nix]; - }; - }; + nixosConfigurations = + builtins.mapAttrs (_: import (sources.nixpkgs + "/nixos/lib/eval-config.nix")) + { + vanadium = { + system = "x86_64-linux"; + modules = [ ./nix/configurations/vanadium.nix ]; + }; + hydrogen = { + system = "aarch64-linux"; + modules = [ ./nix/configurations/hydrogen.nix ]; + }; + installer = { + system = "x86_64-linux"; + modules = [ ./nix/configurations/installer.nix ]; + }; + }; - packages = import ./nix/packages {inherit sources;}; + packages = import ./nix/packages { inherit sources; }; } diff --git a/nix/configurations/hydrogen.nix b/nix/configurations/hydrogen.nix index f4d95050..8db8304c 100644 --- a/nix/configurations/hydrogen.nix +++ b/nix/configurations/hydrogen.nix @@ -4,133 +4,135 @@ let hostname = "hydrogen"; username = "leana"; in - { - modulesPath, - config, - pkgs, - lib, - ... - }: let - inherit (lib.modules) mkAliasOptionModule; - in { - imports = [ - # The generator and hardware configuration - (modulesPath + "/installer/sd-card/sd-image-aarch64.nix") +{ + modulesPath, + config, + pkgs, + lib, + ... +}: +let + inherit (lib.modules) mkAliasOptionModule; +in +{ + imports = [ + # The generator and hardware configuration + (modulesPath + "/installer/sd-card/sd-image-aarch64.nix") - # - # Shorthands - # - (mkAliasOptionModule ["me"] ["users" "users" username]) - (mkAliasOptionModule ["hm"] ["home-manager" "users" username]) + # + # Shorthands + # + (mkAliasOptionModule [ "me" ] [ "users" "users" username ]) + (mkAliasOptionModule [ "hm" ] [ "home-manager" "users" username ]) - # - # hostname - # - {_module.args = {inherit hostname;};} + # + # hostname + # + { _module.args = { inherit hostname; }; } - # - # nixpkgs - # - { - nixpkgs = { - overlays = map import [ - ../overlays/agenix.nix - ../overlays/nur.nix - ../overlays/nix-tree.nix - ../packages/overlay.nix + # + # nixpkgs + # + { + nixpkgs = { + overlays = map import [ + ../overlays/agenix.nix + ../overlays/nur.nix + ../overlays/nix-tree.nix + ../packages/overlay.nix - # use lix everywhere and wrap it with nom - ../overlays/lix.nix - ../overlays/nix-monitored.nix - ]; - - # Set NIX_PATH and flake registry at the same time - # https://github.com/NixOS/nixpkgs/pull/254405 - flake.source = sources.nixpkgs; - }; - - nix.package = pkgs.nix-monitored; - - system.nixos.version = lib.substring 0 8 sources.nixpkgs.revision; - } - - ./hydrogen/nixos/misc.nix - ./hydrogen/nixos/programs.nix - ./hydrogen/nixos/connectivity.nix - - ../nixosModules/common/fish.nix - ../nixosModules/common/disable-command-not-found.nix - ../nixosModules/common/network.nix - ../nixosModules/common/sudo-conf.nix - ../nixosModules/common/system-nixconf.nix - - # QUIRK: - # Had issue when building the installer as it fails to bootstrap itself - # Might be useful to disable for the first build. - # ../nixosModules/extra/secure_dns.nix - ../nixosModules/extra/leana.nix - - # - # Extern modules - # - (sources.agenix + "/modules/age.nix") - - (sources.nixos-hardware + "/raspberry-pi/4") - - # - # home-manager - # - (sources.home-manager + "/nixos") - { - home-manager = { - useGlobalPkgs = true; - useUserPackages = true; - sharedModules = [{home.stateVersion = lib.mkDefault config.system.stateVersion;}]; - }; - - hm.imports = [ - # - # hostname - # - {_module.args = {inherit hostname;};} - - # - # home modules - # - ./hydrogen/home/programs.nix - ./hydrogen/home/dev.nix - - ../homeModules/common/btop - ../homeModules/common/fish - ../homeModules/common/starship - ../homeModules/common/fzf.nix - ../homeModules/common/tmux - ../homeModules/common/vim - ../homeModules/common/direnv.nix - ../homeModules/common/git.nix - ../homeModules/common/gpg.nix - ../homeModules/common/leana.nix - ../homeModules/common/locale.nix - ../homeModules/common/packages.nix - ../homeModules/common/tealdeer.nix - - ../homeModules/extra/tmux-fish-integration.nix - - # - # Extern modules - # - (sources.agenix + "/modules/age-home.nix") - (import sources.wired-notify).homeManagerModules.default + # use lix everywhere and wrap it with nom + ../overlays/lix.nix + ../overlays/nix-monitored.nix ]; - } - # - # Secrets - # - { - age.secrets = { - wpa_password.file = "${../secrets/wpa_password.age}"; - }; - } - ]; - } + # Set NIX_PATH and flake registry at the same time + # https://github.com/NixOS/nixpkgs/pull/254405 + flake.source = sources.nixpkgs; + }; + + nix.package = pkgs.nix-monitored; + + system.nixos.version = lib.substring 0 8 sources.nixpkgs.revision; + } + + ./hydrogen/nixos/misc.nix + ./hydrogen/nixos/programs.nix + ./hydrogen/nixos/connectivity.nix + + ../nixosModules/common/fish.nix + ../nixosModules/common/disable-command-not-found.nix + ../nixosModules/common/network.nix + ../nixosModules/common/sudo-conf.nix + ../nixosModules/common/system-nixconf.nix + + # QUIRK: + # Had issue when building the installer as it fails to bootstrap itself + # Might be useful to disable for the first build. + # ../nixosModules/extra/secure_dns.nix + ../nixosModules/extra/leana.nix + + # + # Extern modules + # + (sources.agenix + "/modules/age.nix") + + (sources.nixos-hardware + "/raspberry-pi/4") + + # + # home-manager + # + (sources.home-manager + "/nixos") + { + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + sharedModules = [ { home.stateVersion = lib.mkDefault config.system.stateVersion; } ]; + }; + + hm.imports = [ + # + # hostname + # + { _module.args = { inherit hostname; }; } + + # + # home modules + # + ./hydrogen/home/programs.nix + ./hydrogen/home/dev.nix + + ../homeModules/common/btop + ../homeModules/common/fish + ../homeModules/common/starship + ../homeModules/common/fzf.nix + ../homeModules/common/tmux + ../homeModules/common/vim + ../homeModules/common/direnv.nix + ../homeModules/common/git.nix + ../homeModules/common/gpg.nix + ../homeModules/common/leana.nix + ../homeModules/common/locale.nix + ../homeModules/common/packages.nix + ../homeModules/common/tealdeer.nix + + ../homeModules/extra/tmux-fish-integration.nix + + # + # Extern modules + # + (sources.agenix + "/modules/age-home.nix") + (import sources.wired-notify).homeManagerModules.default + ]; + } + + # + # Secrets + # + { + age.secrets = { + wpa_password.file = "${../secrets/wpa_password.age}"; + }; + } + ]; +} diff --git a/nix/configurations/hydrogen/home/dev.nix b/nix/configurations/hydrogen/home/dev.nix index 93d1e440..28a2d449 100644 --- a/nix/configurations/hydrogen/home/dev.nix +++ b/nix/configurations/hydrogen/home/dev.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ home.packages = [ pkgs.nil # nix pkgs.pyright # python diff --git a/nix/configurations/hydrogen/home/programs.nix b/nix/configurations/hydrogen/home/programs.nix index bfe508c8..1f2da428 100644 --- a/nix/configurations/hydrogen/home/programs.nix +++ b/nix/configurations/hydrogen/home/programs.nix @@ -3,12 +3,15 @@ lib, config, ... -}: { - home.sessionVariables = let - fishCfg = config.programs.fish; - in { - "SHELL" = lib.mkIf fishCfg.enable (lib.getExe fishCfg.package); - }; +}: +{ + home.sessionVariables = + let + fishCfg = config.programs.fish; + in + { + "SHELL" = lib.mkIf fishCfg.enable (lib.getExe fishCfg.package); + }; home.packages = [ pkgs.nmap diff --git a/nix/configurations/hydrogen/nixos/connectivity.nix b/nix/configurations/hydrogen/nixos/connectivity.nix index 767374c3..41c5a29f 100644 --- a/nix/configurations/hydrogen/nixos/connectivity.nix +++ b/nix/configurations/hydrogen/nixos/connectivity.nix @@ -2,7 +2,8 @@ config, lib, ... -}: { +}: +{ users.users.root.openssh.authorizedKeys.keys = import ../../../identities.nix; networking = { @@ -22,13 +23,12 @@ userControlled.enable = true; secretsFile = config.age.secrets.wpa_password.path; scanOnLowSignal = false; - networks = let - fromList = import ../../../networks/wpa_supplicant-compat.nix; - networks = import ../../../networks/list.nix; - in - fromList ( - builtins.filter (x: x.ssid == "~") networks - ); + networks = + let + fromList = import ../../../networks/wpa_supplicant-compat.nix; + networks = import ../../../networks/list.nix; + in + fromList (builtins.filter (x: x.ssid == "~") networks); }; }; diff --git a/nix/configurations/hydrogen/nixos/misc.nix b/nix/configurations/hydrogen/nixos/misc.nix index 3cb2c3d4..7dc4601c 100644 --- a/nix/configurations/hydrogen/nixos/misc.nix +++ b/nix/configurations/hydrogen/nixos/misc.nix @@ -13,8 +13,7 @@ # modprobe: FATAL: Module sun4i-drm not found in directory /nix/store/gvvwpdckzcr4iamp1iyrqw3nzb7bg6c4-linux-rpi-6.6.51-stable_20241008-modules/lib/modules/6.6.51 nixpkgs.overlays = [ (final: prev: { - makeModulesClosure = x: - prev.makeModulesClosure (x // {allowMissing = true;}); + makeModulesClosure = x: prev.makeModulesClosure (x // { allowMissing = true; }); }) ]; } diff --git a/nix/configurations/hydrogen/nixos/programs.nix b/nix/configurations/hydrogen/nixos/programs.nix index 5f281024..b77c0323 100644 --- a/nix/configurations/hydrogen/nixos/programs.nix +++ b/nix/configurations/hydrogen/nixos/programs.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ environment.systemPackages = [ pkgs.man-pages pkgs.man-pages-posix diff --git a/nix/configurations/installer.nix b/nix/configurations/installer.nix index 035d918d..c821744a 100644 --- a/nix/configurations/installer.nix +++ b/nix/configurations/installer.nix @@ -9,7 +9,8 @@ lib, modulesPath, ... -}: { +}: +{ imports = [ ../nixosModules/common/system-nixconf.nix ../nixosModules/common/sudo-conf.nix @@ -18,10 +19,15 @@ ]; nix.settings = { - extra-substituters = ["https://leana8959.cachix.org"]; - extra-trusted-substituters = ["https://leana8959.cachix.org"]; - extra-trusted-public-keys = ["leana8959.cachix.org-1:CxQSAp8lcgMv8Me459of0jdXRW2tcyeYRKTiiUq8z0M="]; - experimental-features = ["nix-command" "flakes"]; + extra-substituters = [ "https://leana8959.cachix.org" ]; + extra-trusted-substituters = [ "https://leana8959.cachix.org" ]; + extra-trusted-public-keys = [ + "leana8959.cachix.org-1:CxQSAp8lcgMv8Me459of0jdXRW2tcyeYRKTiiUq8z0M=" + ]; + experimental-features = [ + "nix-command" + "flakes" + ]; }; nixpkgs = { @@ -45,7 +51,7 @@ pkgs.btop ]; - networking.firewall.allowedTCPPorts = [8080]; # in case you wanna nc + networking.firewall.allowedTCPPorts = [ 8080 ]; # in case you wanna nc programs.tmux.enable = true; users.users.nixos.shell = pkgs.fish; diff --git a/nix/configurations/vanadium.nix b/nix/configurations/vanadium.nix index 4ffe85bf..725c460f 100644 --- a/nix/configurations/vanadium.nix +++ b/nix/configurations/vanadium.nix @@ -5,225 +5,227 @@ let hostname = "vanadium"; username = "leana"; in - { - config, - lib, - pkgs, - ... - }: let - inherit (lib.modules) mkAliasOptionModule; - in { - imports = [ - # - # Shorthands - # - (mkAliasOptionModule ["me"] ["users" "users" username]) - (mkAliasOptionModule ["hm"] ["home-manager" "users" username]) +{ + config, + lib, + pkgs, + ... +}: +let + inherit (lib.modules) mkAliasOptionModule; +in +{ + imports = [ + # + # Shorthands + # + (mkAliasOptionModule [ "me" ] [ "users" "users" username ]) + (mkAliasOptionModule [ "hm" ] [ "home-manager" "users" username ]) - # - # hostname - # - {_module.args = {inherit hostname;};} + # + # hostname + # + { _module.args = { inherit hostname; }; } - # - # nixpkgs - # - { - # affect the generated nix.conf, doesn't need to be turned off during nixos-install - nix = { - distributedBuilds = true; - settings.builders-use-substitutes = true; + # + # nixpkgs + # + { + # affect the generated nix.conf, doesn't need to be turned off during nixos-install + nix = { + distributedBuilds = true; + settings.builders-use-substitutes = true; + }; + + nixpkgs = { + config = { + # For btop, ROCm support is needed for AMD GPU + # https://github.com/aristocratos/btop?tab=readme-ov-file#gpu-compatibility + rocmSupport = true; }; - nixpkgs = { - config = { - # For btop, ROCm support is needed for AMD GPU - # https://github.com/aristocratos/btop?tab=readme-ov-file#gpu-compatibility - rocmSupport = true; - }; + overlays = map import [ + ../overlays/agenix.nix + ../overlays/disko.nix + ../overlays/nur.nix + ../overlays/wired-notify.nix + ../overlays/nix-tree.nix + ../overlays/wallpapers.nix + ../overlays/nil.nix + ../overlays/dix.nix + ../overlays/eepy.nix + ../overlays/calibre-no-mime.nix + ../overlays/fcitx5-table-extra-taiwanese.nix - overlays = map import [ - ../overlays/agenix.nix - ../overlays/disko.nix - ../overlays/nur.nix - ../overlays/wired-notify.nix - ../overlays/nix-tree.nix - ../overlays/wallpapers.nix - ../overlays/nil.nix - ../overlays/dix.nix - ../overlays/eepy.nix - ../overlays/calibre-no-mime.nix - ../overlays/fcitx5-table-extra-taiwanese.nix + ../overlays/iosevka.nix + ../packages/overlay.nix - ../overlays/iosevka.nix - ../packages/overlay.nix + ./vanadium/overlay.nix + ./vanadium/kernel-overlay.nix - ./vanadium/overlay.nix - ./vanadium/kernel-overlay.nix + # removed, but I need it for PLFA! + ../overlays/pin-emacs28.nix - # removed, but I need it for PLFA! - ../overlays/pin-emacs28.nix - - # use lix everywhere and wrap it with nom - ../overlays/lix.nix - ../overlays/nix-monitored.nix - ]; - - # Set NIX_PATH and flake registry at the same time - # https://github.com/NixOS/nixpkgs/pull/254405 - flake.source = sources.nixpkgs; - }; - - nix.package = pkgs.nix-monitored; - - system.nixos.version = lib.substring 0 8 sources.nixpkgs.revision; - } - - # - # NixOS modules - # - ./vanadium/nixos/hardware-configuration.nix # generated - ./vanadium/nixos/fs.nix - ./vanadium/nixos/restic.nix - - ./vanadium/nixos/battery.nix - - ./vanadium/nixos/audio.nix - ./vanadium/nixos/connectivity.nix - ./vanadium/nixos/input.nix - - ./vanadium/nixos/misc.nix - - ./vanadium/nixos/display.nix - ./vanadium/nixos/gui.nix - - ./vanadium/nixos/locale.nix - ./vanadium/nixos/unfree-predicate.nix - ./vanadium/nixos/programs.nix - - ../nixosModules/common/fish.nix - ../nixosModules/common/disable-command-not-found.nix - ../nixosModules/common/network.nix - ../nixosModules/common/sudo-conf.nix - ../nixosModules/common/system-nixconf.nix - ../nixosModules/common/xscreensaver.nix - - # QUIRK: - # Had issue when building the installer as it fails to bootstrap itself - # Might be useful to disable for the first build. - # ../nixosModules/extra/secure_dns.nix - ../nixosModules/extra/zram.nix - ../nixosModules/extra/leana.nix - - # - # Extern modules - # - (sources.disko + "/module.nix") - ../disko/vanadium/btrfs.nix - - (sources.agenix + "/modules/age.nix") - - (import sources.url-eater).nixosModules.default - - (sources.nixos-hardware + "/framework/13-inch/7040-amd") - - # - # home-manager - # - (sources.home-manager + "/nixos") - { - home-manager = { - useGlobalPkgs = true; - useUserPackages = true; - sharedModules = [{home.stateVersion = lib.mkDefault config.system.stateVersion;}]; - }; - - hm.imports = [ - # - # hostname - # - {_module.args = {inherit hostname;};} - - # - # home modules - # - ./vanadium/home/programs.nix - ./vanadium/home/misc.nix - - ./vanadium/home/firefox.nix - ./vanadium/home/xmobar.nix - - # Language server packages, etc - ./vanadium/home/dev.nix - - ../homeModules/common/btop - ../homeModules/common/cmus - ../homeModules/common/fcitx5 - ../homeModules/common/fish - ../homeModules/common/nushell.nix - ../homeModules/common/starship - ../homeModules/common/tmux - ../homeModules/common/vim - ../homeModules/common/wired - ../homeModules/common/atuin.nix - ../homeModules/common/direnv.nix - ../homeModules/common/feh.nix - ../homeModules/common/firefox.nix - ../homeModules/common/fzf.nix - ../homeModules/common/git.nix - ../homeModules/common/gpg.nix - ../homeModules/common/kitty.nix - ../homeModules/common/leana.nix - ../homeModules/common/locale.nix - ../homeModules/common/lazygit.nix - ../homeModules/common/packages.nix - ../homeModules/common/password-store.nix - ../homeModules/common/sioyek.nix - ../homeModules/common/tealdeer.nix - ../homeModules/common/user-nixconf.nix - - ../homeModules/extra/tmux-fish-integration.nix - - # - # Extern modules - # - (sources.agenix + "/modules/age-home.nix") - (import sources.wired-notify).homeManagerModules.default + # use lix everywhere and wrap it with nom + ../overlays/lix.nix + ../overlays/nix-monitored.nix ]; - } - # - # Secrets - # - { + # Set NIX_PATH and flake registry at the same time + # https://github.com/NixOS/nixpkgs/pull/254405 + flake.source = sources.nixpkgs; + }; + + nix.package = pkgs.nix-monitored; + + system.nixos.version = lib.substring 0 8 sources.nixpkgs.revision; + } + + # + # NixOS modules + # + ./vanadium/nixos/hardware-configuration.nix # generated + ./vanadium/nixos/fs.nix + ./vanadium/nixos/restic.nix + + ./vanadium/nixos/battery.nix + + ./vanadium/nixos/audio.nix + ./vanadium/nixos/connectivity.nix + ./vanadium/nixos/input.nix + + ./vanadium/nixos/misc.nix + + ./vanadium/nixos/display.nix + ./vanadium/nixos/gui.nix + + ./vanadium/nixos/locale.nix + ./vanadium/nixos/unfree-predicate.nix + ./vanadium/nixos/programs.nix + + ../nixosModules/common/fish.nix + ../nixosModules/common/disable-command-not-found.nix + ../nixosModules/common/network.nix + ../nixosModules/common/sudo-conf.nix + ../nixosModules/common/system-nixconf.nix + ../nixosModules/common/xscreensaver.nix + + # QUIRK: + # Had issue when building the installer as it fails to bootstrap itself + # Might be useful to disable for the first build. + # ../nixosModules/extra/secure_dns.nix + ../nixosModules/extra/zram.nix + ../nixosModules/extra/leana.nix + + # + # Extern modules + # + (sources.disko + "/module.nix") + ../disko/vanadium/btrfs.nix + + (sources.agenix + "/modules/age.nix") + + (import sources.url-eater).nixosModules.default + + (sources.nixos-hardware + "/framework/13-inch/7040-amd") + + # + # home-manager + # + (sources.home-manager + "/nixos") + { + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + sharedModules = [ { home.stateVersion = lib.mkDefault config.system.stateVersion; } ]; + }; + + hm.imports = [ + # + # hostname + # + { _module.args = { inherit hostname; }; } + + # + # home modules + # + ./vanadium/home/programs.nix + ./vanadium/home/misc.nix + + ./vanadium/home/firefox.nix + ./vanadium/home/xmobar.nix + + # Language server packages, etc + ./vanadium/home/dev.nix + + ../homeModules/common/btop + ../homeModules/common/cmus + ../homeModules/common/fcitx5 + ../homeModules/common/fish + ../homeModules/common/nushell.nix + ../homeModules/common/starship + ../homeModules/common/tmux + ../homeModules/common/vim + ../homeModules/common/wired + ../homeModules/common/atuin.nix + ../homeModules/common/direnv.nix + ../homeModules/common/feh.nix + ../homeModules/common/firefox.nix + ../homeModules/common/fzf.nix + ../homeModules/common/git.nix + ../homeModules/common/gpg.nix + ../homeModules/common/kitty.nix + ../homeModules/common/leana.nix + ../homeModules/common/locale.nix + ../homeModules/common/lazygit.nix + ../homeModules/common/packages.nix + ../homeModules/common/password-store.nix + ../homeModules/common/sioyek.nix + ../homeModules/common/tealdeer.nix + ../homeModules/common/user-nixconf.nix + + ../homeModules/extra/tmux-fish-integration.nix + + # + # Extern modules + # + (sources.agenix + "/modules/age-home.nix") + (import sources.wired-notify).homeManagerModules.default + ]; + } + + # + # Secrets + # + { + age.secrets = { + wpa_password.file = "${../secrets/wpa_password.age}"; + + restic_backblaze_pwd.file = "${../secrets/restic_backblaze_pwd.age}"; + restic_backblaze_repo.file = "${../secrets/restic_backblaze_repo.age}"; + restic_backblaze_env.file = "${../secrets/restic_backblaze_env.age}"; + + four_pwd.file = "${../secrets/four_pwd.age}"; + restic_four_pwd.file = "${../secrets/restic_four_pwd.age}"; + + sgbk_pwd.file = "${../secrets/sgbk_pwd.age}"; + restic_sgbk_pwd.file = "${../secrets/restic_sgbk_pwd.age}"; + + two_pwd.file = "${../secrets/two_pwd.age}"; + }; + + hm = { age.secrets = { - wpa_password.file = "${../secrets/wpa_password.age}"; - - restic_backblaze_pwd.file = "${../secrets/restic_backblaze_pwd.age}"; - restic_backblaze_repo.file = "${../secrets/restic_backblaze_repo.age}"; - restic_backblaze_env.file = "${../secrets/restic_backblaze_env.age}"; - - four_pwd.file = "${../secrets/four_pwd.age}"; - restic_four_pwd.file = "${../secrets/restic_four_pwd.age}"; - - sgbk_pwd.file = "${../secrets/sgbk_pwd.age}"; - restic_sgbk_pwd.file = "${../secrets/restic_sgbk_pwd.age}"; - - two_pwd.file = "${../secrets/two_pwd.age}"; - }; - - hm = { - age.secrets = { - sshconfig = { - file = "${../secrets/sshconfig.age}"; - path = "/home/leana/.ssh/config"; - }; - iambconfig = { - file = "${../secrets/iambconfig.age}"; - path = "/home/leana/.config/iamb/config.toml"; - }; + sshconfig = { + file = "${../secrets/sshconfig.age}"; + path = "/home/leana/.ssh/config"; + }; + iambconfig = { + file = "${../secrets/iambconfig.age}"; + path = "/home/leana/.config/iamb/config.toml"; }; }; - } - ]; - } + }; + } + ]; +} diff --git a/nix/configurations/vanadium/home/dev.nix b/nix/configurations/vanadium/home/dev.nix index 57bcf93e..9420274e 100644 --- a/nix/configurations/vanadium/home/dev.nix +++ b/nix/configurations/vanadium/home/dev.nix @@ -3,7 +3,8 @@ lib, config, ... -}: { +}: +{ home.packages = [ # preview markdown pkgs.python3Packages.grip @@ -42,10 +43,11 @@ "haskell/cabal" ]; }; - includes = let - fromList = import ../../../git-identities/git-compat.nix; - identities = import ../../../git-identities/list.nix; - in + includes = + let + fromList = import ../../../git-identities/git-compat.nix; + identities = import ../../../git-identities/list.nix; + in fromList identities; }; diff --git a/nix/configurations/vanadium/home/firefox.nix b/nix/configurations/vanadium/home/firefox.nix index 95e9dbd6..aab6da3f 100644 --- a/nix/configurations/vanadium/home/firefox.nix +++ b/nix/configurations/vanadium/home/firefox.nix @@ -2,9 +2,11 @@ pkgs, config, ... -}: let +}: +let inherit (pkgs) nur; -in { +in +{ programs.firefox = { enable = true; @@ -106,26 +108,29 @@ in { font-family: monospace; } ''; - extensions.packages = let - addons = nur.repos.rycee.firefox-addons; - in [ - addons.sponsorblock - addons.return-youtube-dislikes - addons.consent-o-matic - ]; + extensions.packages = + let + addons = nur.repos.rycee.firefox-addons; + in + [ + addons.sponsorblock + addons.return-youtube-dislikes + addons.consent-o-matic + ]; }; junk = { id = 1; - inherit - (config.programs.firefox.profiles.default) + inherit (config.programs.firefox.profiles.default) settings userChrome ; - extensions.packages = let - addons = nur.repos.rycee.firefox-addons; - in [addons.multi-account-containers]; + extensions.packages = + let + addons = nur.repos.rycee.firefox-addons; + in + [ addons.multi-account-containers ]; containers = { raisin = { @@ -144,15 +149,16 @@ in { # Isolate it because it's proprietary tampermonkey = { id = 2; - inherit - (config.programs.firefox.profiles.default) + inherit (config.programs.firefox.profiles.default) settings userChrome ; - extensions.packages = let - addons = nur.repos.rycee.firefox-addons; - in [addons.tampermonkey]; + extensions.packages = + let + addons = nur.repos.rycee.firefox-addons; + in + [ addons.tampermonkey ]; }; }; }; diff --git a/nix/configurations/vanadium/home/misc.nix b/nix/configurations/vanadium/home/misc.nix index c1fff0e5..33210803 100644 --- a/nix/configurations/vanadium/home/misc.nix +++ b/nix/configurations/vanadium/home/misc.nix @@ -1,19 +1,23 @@ { pkgs, lib, - nixosConfig ? {}, + nixosConfig ? { }, ... -}: { +}: +{ # # fonts # fonts.fontconfig = { enable = true; - defaultFonts = lib.mapAttrsRecursive (_: v: v ++ ["Last Resort"]) { - sansSerif = ["Ubuntu" "Noto Sans CJK TC"]; - serif = ["Noto Serif CJK TC"]; - monospace = ["Iosevka"]; - emoji = ["Noto Color Emoji"]; + defaultFonts = lib.mapAttrsRecursive (_: v: v ++ [ "Last Resort" ]) { + sansSerif = [ + "Ubuntu" + "Noto Sans CJK TC" + ]; + serif = [ "Noto Serif CJK TC" ]; + monospace = [ "Iosevka" ]; + emoji = [ "Noto Color Emoji" ]; }; }; home.packages = [ @@ -39,8 +43,7 @@ x11.enable = true; gtk.enable = true; - inherit - (nixosConfig.services.xserver.displayManager.lightdm.greeters.gtk.cursorTheme) + inherit (nixosConfig.services.xserver.displayManager.lightdm.greeters.gtk.cursorTheme) name package size @@ -55,7 +58,7 @@ xdg.mimeApps = { enable = true; defaultApplications = { - "x-scheme-handler/mailto" = ["org.gnome.Evolution.desktop"]; + "x-scheme-handler/mailto" = [ "org.gnome.Evolution.desktop" ]; }; }; } diff --git a/nix/configurations/vanadium/home/programs.nix b/nix/configurations/vanadium/home/programs.nix index c0296f94..f7030c31 100644 --- a/nix/configurations/vanadium/home/programs.nix +++ b/nix/configurations/vanadium/home/programs.nix @@ -3,16 +3,19 @@ lib, config, ... -}: { +}: +{ home.sessionPath = [ "${config.home.homeDirectory}/.local/bin" ]; - home.sessionVariables = let - fishCfg = config.programs.fish; - in { - "SHELL" = lib.mkIf fishCfg.enable (lib.getExe fishCfg.package); - }; + home.sessionVariables = + let + fishCfg = config.programs.fish; + in + { + "SHELL" = lib.mkIf fishCfg.enable (lib.getExe fishCfg.package); + }; home.packages = [ pkgs.ghc # my favorite calculator @@ -37,9 +40,7 @@ # lol pkgs.macchanger - /* - The file picker is not ergonomic enough, sadly - */ + # The file picker is not ergonomic enough, sadly # pkgs.helix # pkgs.nushell @@ -172,7 +173,7 @@ gnome-keyring = { enable = true; - components = ["secrets"]; + components = [ "secrets" ]; }; }; } diff --git a/nix/configurations/vanadium/home/xmobar.nix b/nix/configurations/vanadium/home/xmobar.nix index 40476f66..7dc65e8f 100644 --- a/nix/configurations/vanadium/home/xmobar.nix +++ b/nix/configurations/vanadium/home/xmobar.nix @@ -1,23 +1,31 @@ -{pkgs, ...}: { - home.packages = let - inherit (pkgs) lib; +{ pkgs, ... }: +{ + home.packages = + let + inherit (pkgs) lib; - ghc = pkgs.haskellPackages.ghc.withPackages (haskellPackages: [ - haskellPackages.xmobar - ]); + ghc = pkgs.haskellPackages.ghc.withPackages (haskellPackages: [ + haskellPackages.xmobar + ]); - wrapped-xmobar = pkgs.symlinkJoin { - name = "xmobar"; - paths = [pkgs.xmobar]; - buildInputs = [pkgs.makeWrapper]; - postBuild = '' - wrapProgram $out/bin/xmobar \ - --prefix PATH : "${lib.makeBinPath [ghc pkgs.libnotify]}" - ''; - }; - in [ - wrapped-xmobar - ]; + wrapped-xmobar = pkgs.symlinkJoin { + name = "xmobar"; + paths = [ pkgs.xmobar ]; + buildInputs = [ pkgs.makeWrapper ]; + postBuild = '' + wrapProgram $out/bin/xmobar \ + --prefix PATH : "${ + lib.makeBinPath [ + ghc + pkgs.libnotify + ] + }" + ''; + }; + in + [ + wrapped-xmobar + ]; xdg.configFile = { "xmobar" = { diff --git a/nix/configurations/vanadium/kernel-overlay.nix b/nix/configurations/vanadium/kernel-overlay.nix index 4243b3f6..d2ceda7b 100644 --- a/nix/configurations/vanadium/kernel-overlay.nix +++ b/nix/configurations/vanadium/kernel-overlay.nix @@ -1,6 +1,8 @@ -final: prev: let +final: prev: +let inherit (final) lib; -in { +in +{ linuxPackages = final.linuxPackagesFor ( prev.linuxPackages.kernel.override { # TODO: The error message is quite unintuitive, maybe improve it? diff --git a/nix/configurations/vanadium/nixos/audio.nix b/nix/configurations/vanadium/nixos/audio.nix index f5ef99f5..f4c036de 100644 --- a/nix/configurations/vanadium/nixos/audio.nix +++ b/nix/configurations/vanadium/nixos/audio.nix @@ -5,5 +5,5 @@ jack.enable = true; }; - me.extraGroups = ["audio"]; + me.extraGroups = [ "audio" ]; } diff --git a/nix/configurations/vanadium/nixos/connectivity.nix b/nix/configurations/vanadium/nixos/connectivity.nix index 29927865..e2bf050a 100644 --- a/nix/configurations/vanadium/nixos/connectivity.nix +++ b/nix/configurations/vanadium/nixos/connectivity.nix @@ -3,12 +3,16 @@ pkgs, lib, ... -}: { +}: +{ # For nautilius and iOS services.gvfs.enable = true; # iOS services.usbmuxd.enable = true; - environment.systemPackages = with pkgs; [libimobiledevice idevicerestore]; + environment.systemPackages = with pkgs; [ + libimobiledevice + idevicerestore + ]; # https://unix.stackexchange.com/questions/592775/how-can-i-enable-apple-ios-fast-charge-support services.udev.extraRules = '' @@ -34,10 +38,11 @@ userControlled.enable = true; secretsFile = config.age.secrets.wpa_password.path; scanOnLowSignal = false; - networks = let - fromList = import ../../../networks/wpa_supplicant-compat.nix; - networks = import ../../../networks/list.nix; - in + networks = + let + fromList = import ../../../networks/wpa_supplicant-compat.nix; + networks = import ../../../networks/list.nix; + in fromList networks; }; }; diff --git a/nix/configurations/vanadium/nixos/display.nix b/nix/configurations/vanadium/nixos/display.nix index a9b2267b..cccc8ef2 100644 --- a/nix/configurations/vanadium/nixos/display.nix +++ b/nix/configurations/vanadium/nixos/display.nix @@ -2,13 +2,14 @@ pkgs, lib, ... -}: { +}: +{ imports = [ # # builtin screen # { - me.extraGroups = ["video"]; + me.extraGroups = [ "video" ]; programs.light.enable = true; } @@ -16,10 +17,10 @@ # external screen # { - me.extraGroups = ["i2c"]; + me.extraGroups = [ "i2c" ]; hardware.i2c.enable = true; - environment.systemPackages = [pkgs.ddcutil]; - boot.kernelModules = ["i2c-dev"]; + environment.systemPackages = [ pkgs.ddcutil ]; + boot.kernelModules = [ "i2c-dev" ]; } ]; @@ -33,145 +34,160 @@ "20_xmonad" = "${lib.getExe pkgs.haskellPackages.xmonad} --restart"; # make sure feh keeps up }; - profiles = let - singleton = k: v: {${k} = v;}; + profiles = + let + singleton = k: v: { ${k} = v; }; - fingerprints = { - built-in = singleton "eDP-1" "00ffffffffffff0009e5ca0b000000002f200104a51c137803de50a3544c99260f505400000001010101010101010101010101010101115cd01881e02d50302036001dbe1000001aa749d01881e02d50302036001dbe1000001a000000fe00424f452043510a202020202020000000fe004e4531333546424d2d4e34310a0073"; - amethyst = device: singleton device "00ffffffffffff0006b35b27010101012c210103803c22782a29d5ad4f44a7240f5054bfef00714f81809500d1c0d1e8d1fc01010101565e00a0a0a029503020350055502100001a000000fd0030901edf3c000a202020202020000000fc005647323741514c33410a202020000000ff0052414c4d51533139373533370a0111020347f14a90030204014061603f1f230907078301000067030c002000384468d85dc401788003026d1a000002013090f00069096909e305ff01e6060701696900e2006ae20fc0eae70070a0a067500820980455502100001a6fc200a0a0a055503020350055502100001a5aa000a0a0a046503020350055502100001a0000bc"; - orchid = device: singleton device "00ffffffffffff0004699a24642900002416010380341d782a2ac5a4564f9e280f5054b7ef00714f814081809500b300d1c081c08100023a801871382d40582c450009252100001e000000ff0043394c4d54463031303539360a000000fd00324b185311000a202020202020000000fc00415355532056533234370a20200173020322714f0102031112130414050e0f1d1e1f10230917078301000065030c0010008c0ad08a20e02d10103e9600092521000018011d007251d01e206e28550009252100001e011d00bc52d01e20b828554009252100001e8c0ad090204031200c4055000925210000180000000000000000000000000000000000000000005d"; - }; + fingerprints = { + built-in = singleton "eDP-1" "00ffffffffffff0009e5ca0b000000002f200104a51c137803de50a3544c99260f505400000001010101010101010101010101010101115cd01881e02d50302036001dbe1000001aa749d01881e02d50302036001dbe1000001a000000fe00424f452043510a202020202020000000fe004e4531333546424d2d4e34310a0073"; + amethyst = + device: + singleton device "00ffffffffffff0006b35b27010101012c210103803c22782a29d5ad4f44a7240f5054bfef00714f81809500d1c0d1e8d1fc01010101565e00a0a0a029503020350055502100001a000000fd0030901edf3c000a202020202020000000fc005647323741514c33410a202020000000ff0052414c4d51533139373533370a0111020347f14a90030204014061603f1f230907078301000067030c002000384468d85dc401788003026d1a000002013090f00069096909e305ff01e6060701696900e2006ae20fc0eae70070a0a067500820980455502100001a6fc200a0a0a055503020350055502100001a5aa000a0a0a046503020350055502100001a0000bc"; + orchid = + device: + singleton device "00ffffffffffff0004699a24642900002416010380341d782a2ac5a4564f9e280f5054b7ef00714f814081809500b300d1c081c08100023a801871382d40582c450009252100001e000000ff0043394c4d54463031303539360a000000fd00324b185311000a202020202020000000fc00415355532056533234370a20200173020322714f0102031112130414050e0f1d1e1f10230917078301000065030c0010008c0ad08a20e02d10103e9600092521000018011d007251d01e206e28550009252100001e011d00bc52d01e20b828554009252100001e8c0ad090204031200c4055000925210000180000000000000000000000000000000000000000005d"; + }; - devices = rec { - built-in = "eDP-1"; - # Run `xrandr` to see the max number - extern = map (portNumber: "DP-${toString portNumber}") (lib.range 1 8); - all = [built-in] ++ extern; - }; + devices = rec { + built-in = "eDP-1"; + # Run `xrandr` to see the max number + extern = map (portNumber: "DP-${toString portNumber}") (lib.range 1 8); + all = [ built-in ] ++ extern; + }; - switches = { - setDPI = {dpi}: - singleton "10_xrdb-dpi" "${lib.getExe pkgs.xorg.xrdb} -merge ${pkgs.writeText "xrdb-dpi-config" '' - Xcursor.size: 64 - Xft.dpi: ${toString dpi} - ''}"; + switches = { + setDPI = + { dpi }: + singleton "10_xrdb-dpi" "${lib.getExe pkgs.xorg.xrdb} -merge ${pkgs.writeText "xrdb-dpi-config" '' + Xcursor.size: 64 + Xft.dpi: ${toString dpi} + ''}"; - # Is scoped to an output device, no need to be called on built-in display - setSoftwareBrightness = { - device, # obtain with `xrandr` - brightness, # [0..1] - }: - singleton "10_xrandr_brightness" '' - ${lib.getExe pkgs.xorg.xrandr} --output ${device} --brightness ${toString brightness} - ''; + # Is scoped to an output device, no need to be called on built-in display + setSoftwareBrightness = + { + device, # obtain with `xrandr` + brightness, # [0..1] + }: + singleton "10_xrandr_brightness" '' + ${lib.getExe pkgs.xorg.xrandr} --output ${device} --brightness ${toString brightness} + ''; - # Is scoped to an output device, no need to be called on built-in display - setDDCBrightness = { - modelName, # obtain with `ddcutil detect` - brightness, # [0..1] - }: - singleton "10_ddc_brightness" '' - ${lib.getExe pkgs.ddcutil} --model ${modelName} setvcp 10 ${toString (builtins.floor (brightness * 100))} - ''; + # Is scoped to an output device, no need to be called on built-in display + setDDCBrightness = + { + modelName, # obtain with `ddcutil detect` + brightness, # [0..1] + }: + singleton "10_ddc_brightness" '' + ${lib.getExe pkgs.ddcutil} --model ${modelName} setvcp 10 ${ + toString (builtins.floor (brightness * 100)) + } + ''; - setDDCContrast = { - modelName, # obtain with `ddcutil detect` - contrast, # [0..1] - }: - singleton "10_ddc_contrast" '' - ${lib.getExe pkgs.ddcutil} --model ${modelName} setvcp 12 ${toString (builtins.floor (contrast * 100))} - ''; - }; + setDDCContrast = + { + modelName, # obtain with `ddcutil detect` + contrast, # [0..1] + }: + singleton "10_ddc_contrast" '' + ${lib.getExe pkgs.ddcutil} --model ${modelName} setvcp 12 ${ + toString (builtins.floor (contrast * 100)) + } + ''; + }; - # Note: the "position" field corresponds to the "pos" field outputted by autorandr - # To get the current config, run `xrandr --auto` and then `autorandr --config` - configs = { - allOff = lib.genAttrs devices.all (_: {enable = lib.mkDefault false;}); - enableBuiltin = { - eDP-1 = { - enable = true; - crtc = 0; - mode = "2256x1504"; - rate = "60.00"; - primary = true; + # Note: the "position" field corresponds to the "pos" field outputted by autorandr + # To get the current config, run `xrandr --auto` and then `autorandr --config` + configs = { + allOff = lib.genAttrs devices.all (_: { + enable = lib.mkDefault false; + }); + enableBuiltin = { + eDP-1 = { + enable = true; + crtc = 0; + mode = "2256x1504"; + rate = "60.00"; + primary = true; + }; + }; + enableAmethyst = name: { + ${name} = { + enable = true; + primary = true; + crtc = 1; + mode = "2560x1440"; + rate = "59.95"; + }; + }; + enableOrchid = name: { + ${name} = { + enable = true; + primary = true; + crtc = 1; + mode = "1920x1080"; + rate = "60.00"; + }; }; }; - enableAmethyst = name: { - ${name} = { - enable = true; - primary = true; - crtc = 1; - mode = "2560x1440"; - rate = "59.95"; - }; + + frameworkBuiltin = { + fingerprint = fingerprints.built-in; + config = lib.mkMerge [ + configs.allOff + configs.enableBuiltin + ]; + hooks.postswitch = switches.setDPI { dpi = 150; }; }; - enableOrchid = name: { - ${name} = { - enable = true; - primary = true; - crtc = 1; - mode = "1920x1080"; - rate = "60.00"; - }; + + mkAmethyst = name: { + fingerprint = lib.mkMerge [ + fingerprints.built-in + (fingerprints.amethyst name) + ]; + config = lib.mkMerge [ + configs.allOff + (configs.enableAmethyst name) + ]; + hooks.postswitch = lib.mkMerge [ + (switches.setDPI { dpi = 110; }) + (switches.setSoftwareBrightness { + device = name; + brightness = 1; + }) + (switches.setDDCBrightness { + modelName = "VG27AQL3A"; + brightness = 0; + }) + (switches.setDDCContrast { + modelName = "VG27AQL3A"; + contrast = 0.5; + }) + ]; }; - }; - frameworkBuiltin = { - fingerprint = fingerprints.built-in; - config = lib.mkMerge [ - configs.allOff - configs.enableBuiltin - ]; - hooks.postswitch = switches.setDPI {dpi = 150;}; - }; - - mkAmethyst = name: { - fingerprint = lib.mkMerge [ - fingerprints.built-in - (fingerprints.amethyst name) - ]; - config = lib.mkMerge [ - configs.allOff - (configs.enableAmethyst name) - ]; - hooks.postswitch = lib.mkMerge [ - (switches.setDPI {dpi = 110;}) - (switches.setSoftwareBrightness { - device = name; - brightness = 1; - }) - (switches.setDDCBrightness { - modelName = "VG27AQL3A"; - brightness = 0; - }) - (switches.setDDCContrast { - modelName = "VG27AQL3A"; - contrast = 0.5; - }) - ]; - }; - - mkOrchid = name: { - fingerprint = lib.mkMerge [ - fingerprints.built-in - (fingerprints.orchid name) - ]; - config = lib.mkMerge [ - configs.allOff - (configs.enableOrchid name) - ]; - # seems like this display doesn't support DDC - hooks.postswitch = lib.mkMerge [ - (switches.setDPI {dpi = 100;}) - (switches.setSoftwareBrightness { - device = name; - brightness = 0.5; - }) - ]; - }; - in + mkOrchid = name: { + fingerprint = lib.mkMerge [ + fingerprints.built-in + (fingerprints.orchid name) + ]; + config = lib.mkMerge [ + configs.allOff + (configs.enableOrchid name) + ]; + # seems like this display doesn't support DDC + hooks.postswitch = lib.mkMerge [ + (switches.setDPI { dpi = 100; }) + (switches.setSoftwareBrightness { + device = name; + brightness = 0.5; + }) + ]; + }; + in lib.mkMerge [ - {default = frameworkBuiltin;} + { default = frameworkBuiltin; } (lib.genAttrs' devices.extern (name: lib.nameValuePair "amethyst-${name}" (mkAmethyst name))) (lib.genAttrs' devices.extern (name: lib.nameValuePair "orchid-${name}" (mkOrchid name))) ]; diff --git a/nix/configurations/vanadium/nixos/fs.nix b/nix/configurations/vanadium/nixos/fs.nix index 93c4d2c4..bfe64d4a 100644 --- a/nix/configurations/vanadium/nixos/fs.nix +++ b/nix/configurations/vanadium/nixos/fs.nix @@ -2,7 +2,8 @@ config, pkgs, ... -}: { +}: +{ services.btrfs.autoScrub = { enable = true; fileSystems = [ @@ -21,9 +22,9 @@ fileSystems = { /* - WARNING: - Use "noauto" if you want to mount the drive at a later time and not all the time - Otherwise the mount would fail and cascade into the graphical session being stopped + WARNING: + Use "noauto" if you want to mount the drive at a later time and not all the time + Otherwise the mount would fail and cascade into the graphical session being stopped */ "/home/leana/mnt/tdk32" = { @@ -53,21 +54,23 @@ sgbk /dev/disk/by-uuid/21b5207e-c3cf-49da-b944-fb405ae1eee2 ${config.age.secrets.sgbk_pwd.path} noauto ''; - systemd.mounts = let - bindToCryptDev = dev: { - what = "/dev/mapper/${dev}"; - where = "/mnt/${dev}"; - unitConfig = { - Requires = ["systemd-cryptsetup@${dev}.service"]; - After = ["systemd-cryptsetup@${dev}.service"]; - PropagatesStopTo = ["systemd-cryptsetup@${dev}.service"]; + systemd.mounts = + let + bindToCryptDev = dev: { + what = "/dev/mapper/${dev}"; + where = "/mnt/${dev}"; + unitConfig = { + Requires = [ "systemd-cryptsetup@${dev}.service" ]; + After = [ "systemd-cryptsetup@${dev}.service" ]; + PropagatesStopTo = [ "systemd-cryptsetup@${dev}.service" ]; + }; }; - }; - in [ - (bindToCryptDev "four") - (bindToCryptDev "two") - (bindToCryptDev "sgbk") - ]; + in + [ + (bindToCryptDev "four") + (bindToCryptDev "two") + (bindToCryptDev "sgbk") + ]; environment.systemPackages = [ pkgs.lsof diff --git a/nix/configurations/vanadium/nixos/gui.nix b/nix/configurations/vanadium/nixos/gui.nix index 57153696..836883ad 100644 --- a/nix/configurations/vanadium/nixos/gui.nix +++ b/nix/configurations/vanadium/nixos/gui.nix @@ -2,7 +2,8 @@ pkgs, lib, ... -}: { +}: +{ services.xserver.windowManager.xmonad = { enable = true; enableContribAndExtras = true; diff --git a/nix/configurations/vanadium/nixos/hardware-configuration.nix b/nix/configurations/vanadium/nixos/hardware-configuration.nix index 32be11fa..9b75a244 100644 --- a/nix/configurations/vanadium/nixos/hardware-configuration.nix +++ b/nix/configurations/vanadium/nixos/hardware-configuration.nix @@ -7,15 +7,20 @@ pkgs, modulesPath, ... -}: { +}: +{ imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "thunderbolt"]; - boot.initrd.kernelModules = ["dm-snapshot"]; - boot.kernelModules = ["kvm-amd"]; - boot.extraModulePackages = []; + boot.initrd.availableKernelModules = [ + "nvme" + "xhci_pci" + "thunderbolt" + ]; + boot.initrd.kernelModules = [ "dm-snapshot" ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; # 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 diff --git a/nix/configurations/vanadium/nixos/input.nix b/nix/configurations/vanadium/nixos/input.nix index 246d07f6..452c5678 100644 --- a/nix/configurations/vanadium/nixos/input.nix +++ b/nix/configurations/vanadium/nixos/input.nix @@ -13,7 +13,7 @@ }; }; - me.extraGroups = ["scanner"]; + me.extraGroups = [ "scanner" ]; hardware.sane = { enable = true; brscan5.enable = true; diff --git a/nix/configurations/vanadium/nixos/locale.nix b/nix/configurations/vanadium/nixos/locale.nix index de1bd43f..666053d8 100644 --- a/nix/configurations/vanadium/nixos/locale.nix +++ b/nix/configurations/vanadium/nixos/locale.nix @@ -1,4 +1,5 @@ -{lib, ...}: { +{ lib, ... }: +{ # https://en.wikipedia.org/wiki/List_of_tz_database_time_zones # `timedatectl list-timezones` time.timeZone = "Asia/Taipei"; @@ -28,16 +29,16 @@ let genLocale = locale: lib.flip lib.genAttrs (_: locale); in - # - xscreensaver freaks out on the time display - # - evolution add event becomes hard to use - # https://gitlab.gnome.org/GNOME/evolution/-/issues/3120 - genLocale "fr_FR.UTF-8" [ - "LC_TIME" - ] - // genLocale "zh_TW.UTF-8" [ - "LC_MONETARY" - "LC_ADDRESS" - ]; + # - xscreensaver freaks out on the time display + # - evolution add event becomes hard to use + # https://gitlab.gnome.org/GNOME/evolution/-/issues/3120 + genLocale "fr_FR.UTF-8" [ + "LC_TIME" + ] + // genLocale "zh_TW.UTF-8" [ + "LC_MONETARY" + "LC_ADDRESS" + ]; }; # Wireless Regulatory Domain, uses ISO / IEC 3166 country code diff --git a/nix/configurations/vanadium/nixos/misc.nix b/nix/configurations/vanadium/nixos/misc.nix index 91579fc2..4d512a82 100644 --- a/nix/configurations/vanadium/nixos/misc.nix +++ b/nix/configurations/vanadium/nixos/misc.nix @@ -1,4 +1,5 @@ -{config, ...}: { +{ config, ... }: +{ system.stateVersion = "24.11"; boot.loader = { @@ -16,6 +17,6 @@ # Cross building # https://discourse.nixos.org/t/how-do-i-get-my-aarch64-linux-machine-to-build-x86-64-linux-extra-platforms-doesnt-seem-to-work/38106/2?u=leana8959 - boot.binfmt.emulatedSystems = ["aarch64-linux"]; + boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; nix.settings.extra-platforms = config.boot.binfmt.emulatedSystems; } diff --git a/nix/configurations/vanadium/nixos/programs.nix b/nix/configurations/vanadium/nixos/programs.nix index 2f479f34..0fbaf33c 100644 --- a/nix/configurations/vanadium/nixos/programs.nix +++ b/nix/configurations/vanadium/nixos/programs.nix @@ -2,14 +2,15 @@ lib, pkgs, ... -}: { +}: +{ imports = [ # # Docker # { virtualisation.docker.enable = true; - me.extraGroups = ["docker"]; + me.extraGroups = [ "docker" ]; } # # diff --git a/nix/configurations/vanadium/nixos/restic.nix b/nix/configurations/vanadium/nixos/restic.nix index 7e9eeefd..b90a92bc 100644 --- a/nix/configurations/vanadium/nixos/restic.nix +++ b/nix/configurations/vanadium/nixos/restic.nix @@ -1,91 +1,94 @@ -{config, ...}: { - services.restic.backups = let - pruneOpts = [ - "--keep-daily 7" - "--keep-weekly 4" - "--keep-monthly 12" - "--keep-yearly 10" - ]; - in { - "backblaze" = { - paths = [ - "/home/leana/Documents" - "/home/leana/Calibre" +{ config, ... }: +{ + services.restic.backups = + let + pruneOpts = [ + "--keep-daily 7" + "--keep-weekly 4" + "--keep-monthly 12" + "--keep-yearly 10" ]; + in + { + "backblaze" = { + paths = [ + "/home/leana/Documents" + "/home/leana/Calibre" + ]; - passwordFile = config.age.secrets.restic_backblaze_pwd.path; - repositoryFile = config.age.secrets.restic_backblaze_repo.path; - environmentFile = config.age.secrets.restic_backblaze_env.path; + passwordFile = config.age.secrets.restic_backblaze_pwd.path; + repositoryFile = config.age.secrets.restic_backblaze_repo.path; + environmentFile = config.age.secrets.restic_backblaze_env.path; - timerConfig = { - OnCalendar = "daily"; - Persistent = true; - RandomizedDelaySec = "1h"; + timerConfig = { + OnCalendar = "daily"; + Persistent = true; + RandomizedDelaySec = "1h"; + }; + + inherit pruneOpts; }; - inherit pruneOpts; + "four" = { + paths = [ + "/home/leana/Music" + "/home/leana/Documents" + "/home/leana/Calibre" + "/home/leana/Images" + ]; + + repository = "/mnt/four/restic"; + passwordFile = config.age.secrets.restic_four_pwd.path; + + timerConfig = null; + + inherit pruneOpts; + }; + + "sgbk" = { + paths = [ + "/home/leana/Music" + "/home/leana/Documents" + "/home/leana/Calibre" + "/home/leana/Images" + ]; + + timerConfig = null; + + repository = "/mnt/sgbk/restic"; + passwordFile = config.age.secrets.restic_sgbk_pwd.path; + + inherit pruneOpts; + }; + + "two-to-four" = { + paths = [ "/mnt/two" ]; + + timerConfig = null; + + repository = "/mnt/four/restic"; + passwordFile = config.age.secrets.restic_four_pwd.path; + + exclude = [ "lost+found" ]; + + inherit pruneOpts; + }; }; - "four" = { - paths = [ - "/home/leana/Music" - "/home/leana/Documents" - "/home/leana/Calibre" - "/home/leana/Images" - ]; - - repository = "/mnt/four/restic"; - passwordFile = config.age.secrets.restic_four_pwd.path; - - timerConfig = null; - - inherit pruneOpts; - }; - - "sgbk" = { - paths = [ - "/home/leana/Music" - "/home/leana/Documents" - "/home/leana/Calibre" - "/home/leana/Images" - ]; - - timerConfig = null; - - repository = "/mnt/sgbk/restic"; - passwordFile = config.age.secrets.restic_sgbk_pwd.path; - - inherit pruneOpts; - }; - - "two-to-four" = { - paths = ["/mnt/two"]; - - timerConfig = null; - - repository = "/mnt/four/restic"; - passwordFile = config.age.secrets.restic_four_pwd.path; - - exclude = ["lost+found"]; - - inherit pruneOpts; - }; - }; - systemd.services = { # TODO: # Wait for upstream to introduce direct access to unitConfig # c.f. https://github.com/NixOS/nixpkgs/pull/368234 "restic-backups-four" = { - requires = ["mnt-four.mount"]; - after = ["mnt-four.mount"]; - unitConfig.PropagatesStopTo = ["mnt-four.mount"]; + requires = [ "mnt-four.mount" ]; + after = [ "mnt-four.mount" ]; + unitConfig.PropagatesStopTo = [ "mnt-four.mount" ]; }; "restic-backups-sgbk" = { - requires = ["mnt-sgbk.mount"]; - after = ["mnt-sgbk.mount"]; - unitConfig.PropagatesStopTo = ["mnt-sgbk.mount"]; + requires = [ "mnt-sgbk.mount" ]; + after = [ "mnt-sgbk.mount" ]; + unitConfig.PropagatesStopTo = [ "mnt-sgbk.mount" ]; }; "restic-backups-two-to-four" = { diff --git a/nix/configurations/vanadium/nixos/unfree-predicate.nix b/nix/configurations/vanadium/nixos/unfree-predicate.nix index 97456b73..d880c61f 100644 --- a/nix/configurations/vanadium/nixos/unfree-predicate.nix +++ b/nix/configurations/vanadium/nixos/unfree-predicate.nix @@ -1,27 +1,29 @@ -{lib, ...}: { +{ lib, ... }: +{ nixpkgs.config.allowUnfreePredicate = lib.mkDefault ( - pkg: let + pkg: + let name = lib.getName pkg; in - builtins.elem name [ - "languagetool" + builtins.elem name [ + "languagetool" - "vscode" - "code" + "vscode" + "code" - "tampermonkey" + "tampermonkey" - "aseprite" + "aseprite" - "posy-cursors" + "posy-cursors" - "discord" - ] - || builtins.any (lib.flip lib.hasInfix name) [ - # Scanner - "brscan5" + "discord" + ] + || builtins.any (lib.flip lib.hasInfix name) [ + # Scanner + "brscan5" - "steam" - ] + "steam" + ] ); } diff --git a/nix/configurations/vanadium/overlay.nix b/nix/configurations/vanadium/overlay.nix index 5e5c3279..f7ee7a78 100644 --- a/nix/configurations/vanadium/overlay.nix +++ b/nix/configurations/vanadium/overlay.nix @@ -9,73 +9,75 @@ let infuse = lib.flip infuse-lib.v1.infuse; in - # Why shouldn't I go crazy with overlays? - final: - infuse { - cmus.__input.alsaSupport = _: false; +# Why shouldn't I go crazy with overlays? +final: +infuse { + cmus.__input.alsaSupport = _: false; - fish.__input.usePython = _: false; + fish.__input.usePython = _: false; - tmux.__input.withSixel = _: false; + tmux.__input.withSixel = _: false; - vlc.__input.chromecastSupport = _: false; - vlc.__input.waylandSupport = _: false; + vlc.__input.chromecastSupport = _: false; + vlc.__input.waylandSupport = _: false; - # I don't really use helix, but it's nice to have the W alias just in case - helix.__output.patches.__append = [ - ./patches/helix/W-as-write.patch - ]; + # I don't really use helix, but it's nice to have the W alias just in case + helix.__output.patches.__append = [ + ./patches/helix/W-as-write.patch + ]; - # Too loud - alejandra.__output.patches.__append = [ - ./patches/alejandra/no-ads.patch - ]; - alejandra.__output.doCheck = _: false; + # Too loud + alejandra.__output.patches.__append = [ + ./patches/alejandra/no-ads.patch + ]; + alejandra.__output.doCheck = _: false; - # TODO: - # pinned branch of https://github.com/astrand/xclip/tree/xerror - # use this until #43 gets resolved properly - xclip.__output.src = _: - final.fetchFromGitHub { - owner = "astrand"; - repo = "xclip"; - rev = "2c3b811002b35d3be7f39cc1145dd06bdb32e31c"; - hash = "sha256-hHbq97GTKiRw8LZa/LY4LUOFOd/5H4+S+NR0BJfcu6M="; - }; + # TODO: + # pinned branch of https://github.com/astrand/xclip/tree/xerror + # use this until #43 gets resolved properly + xclip.__output.src = + _: + final.fetchFromGitHub { + owner = "astrand"; + repo = "xclip"; + rev = "2c3b811002b35d3be7f39cc1145dd06bdb32e31c"; + hash = "sha256-hHbq97GTKiRw8LZa/LY4LUOFOd/5H4+S+NR0BJfcu6M="; + }; - fcitx5.__output.cmakeFlags.__append = [ - (lib.cmakeFeature "ENABLE_EMOJI" "Off") - (lib.cmakeFeature "ENABLE_WAYLAND" "Off") - ]; - fcitx5.__output.patches.__append = [ - ./patches/fcitx5/disable-clipboard.patch - ./patches/fcitx5/disable-quickphrase.patch - ./patches/fcitx5/disable-unicode.patch - ]; - fcitx5-chinese-addons.__output.cmakeFlags.__append = [ - (lib.cmakeFeature "ENABLE_BROWSER" "Off") - (lib.cmakeFeature "ENABLE_CLOUDPINYIN" "Off") - (lib.cmakeFeature "ENABLE_DATA" "Off") - ]; - fcitx5-chinese-addons.__output.patches.__append = [ - ./patches/fcitx5-chinese-addons/disable-chttrans.patch - ./patches/fcitx5-chinese-addons/disable-fullwidth.patch - # Note: disabling pinyin helper breaks canjie - ]; + fcitx5.__output.cmakeFlags.__append = [ + (lib.cmakeFeature "ENABLE_EMOJI" "Off") + (lib.cmakeFeature "ENABLE_WAYLAND" "Off") + ]; + fcitx5.__output.patches.__append = [ + ./patches/fcitx5/disable-clipboard.patch + ./patches/fcitx5/disable-quickphrase.patch + ./patches/fcitx5/disable-unicode.patch + ]; + fcitx5-chinese-addons.__output.cmakeFlags.__append = [ + (lib.cmakeFeature "ENABLE_BROWSER" "Off") + (lib.cmakeFeature "ENABLE_CLOUDPINYIN" "Off") + (lib.cmakeFeature "ENABLE_DATA" "Off") + ]; + fcitx5-chinese-addons.__output.patches.__append = [ + ./patches/fcitx5-chinese-addons/disable-chttrans.patch + ./patches/fcitx5-chinese-addons/disable-fullwidth.patch + # Note: disabling pinyin helper breaks canjie + ]; - # Security, Xorg vuln - # Backport has failed in upstream currently , - # might as well patch it while people are blogging about it - # Upstream talks about it here https://lists.x.org/archives/xorg-announce/2025-October/003635.html - xorg.xorgserver.__output.version = oldVersion: let - version = "21.1.20"; - in - if oldVersion == version - then throw "This patch has been merged upstream" - else version; - xorg.xorgserver.__output.src = _: - final.fetchurl { - url = "mirror://xorg/individual/xserver/xorg-server-21.1.20.tar.xz"; - sha256 = "sha256-dpW8YYJLOoG2utL3iwVADKAVAD3kAtGzIhFxBbcC6Tc="; - }; - } + # Security, Xorg vuln + # Backport has failed in upstream currently , + # might as well patch it while people are blogging about it + # Upstream talks about it here https://lists.x.org/archives/xorg-announce/2025-October/003635.html + xorg.xorgserver.__output.version = + oldVersion: + let + version = "21.1.20"; + in + if oldVersion == version then throw "This patch has been merged upstream" else version; + xorg.xorgserver.__output.src = + _: + final.fetchurl { + url = "mirror://xorg/individual/xserver/xorg-server-21.1.20.tar.xz"; + sha256 = "sha256-dpW8YYJLOoG2utL3iwVADKAVAD3kAtGzIhFxBbcC6Tc="; + }; +} diff --git a/nix/devShells/flora.nix b/nix/devShells/flora.nix index 21c35fb8..1b94c3ee 100644 --- a/nix/devShells/flora.nix +++ b/nix/devShells/flora.nix @@ -4,56 +4,65 @@ let sources = import ../../npins; in - {pkgs ? import sources.pin-florashell {}}: - pkgs.mkShell (let - libs = with pkgs; [ - zlib - libpq - libsodium - ]; +{ + pkgs ? import sources.pin-florashell { }, +}: +pkgs.mkShell ( + let + libs = with pkgs; [ + zlib + libpq + libsodium + ]; - hlib = pkgs.haskell.lib; + hlib = pkgs.haskell.lib; - callHackage = { + callHackage = + { name, version, - }: let - pkg = pkgs.haskell.packages.ghc910.callHackage name version {}; + }: + let + pkg = pkgs.haskell.packages.ghc910.callHackage name version { }; in - hlib.dontCheck (hlib.doJailbreak pkg); - in { - name = "flora"; - packages = with pkgs; let + hlib.dontCheck (hlib.doJailbreak pkg); + in + { + name = "flora"; + packages = + with pkgs; + let haskellPackages = haskell.packages.ghc910; in - # These don't build directly and need to be pinned - map callHackage [ - { - name = "fourmolu"; - version = "0.17.0.0"; - } - { - name = "postgresql-migration"; - version = "0.2.1.8"; - } - ] - ++ [ - haskellPackages.ghcid - haskellPackages.cabal-fmt - haskellPackages.cabal-install - haskellPackages.ghc - haskellPackages.haskell-language-server + # These don't build directly and need to be pinned + map callHackage [ + { + name = "fourmolu"; + version = "0.17.0.0"; + } + { + name = "postgresql-migration"; + version = "0.2.1.8"; + } + ] + ++ [ + haskellPackages.ghcid + haskellPackages.cabal-fmt + haskellPackages.cabal-install + haskellPackages.ghc + haskellPackages.haskell-language-server - postgresql_14 - postgresqlTestHook + postgresql_14 + postgresqlTestHook - yarn + yarn - pkg-config - esbuild - changelog-d - ] - ++ libs; + pkg-config + esbuild + changelog-d + ] + ++ libs; - LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath libs; - }) + LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath libs; + } +) diff --git a/nix/devShells/forgejo.nix b/nix/devShells/forgejo.nix index 103ae074..ed8eba15 100644 --- a/nix/devShells/forgejo.nix +++ b/nix/devShells/forgejo.nix @@ -1,20 +1,26 @@ -{pkgs ? import {}}: let +{ + pkgs ? import { }, +}: +let inherit (pkgs) lib; in - pkgs.mkShell { - name = "forgejo"; - packages = with pkgs; [ - gnumake +pkgs.mkShell { + name = "forgejo"; + packages = with pkgs; [ + gnumake - go - golangci-lint - gofumpt + go + golangci-lint + gofumpt - nodejs - nodePackages.npm - ]; + nodejs + nodePackages.npm + ]; - LD_LIBRARY_PATH = lib.makeLibraryPath (with pkgs; [ + LD_LIBRARY_PATH = lib.makeLibraryPath ( + with pkgs; + [ libuuid - ]); - } + ] + ); +} diff --git a/nix/devShells/haddock2.nix b/nix/devShells/haddock2.nix index 47c4d064..447cc726 100644 --- a/nix/devShells/haddock2.nix +++ b/nix/devShells/haddock2.nix @@ -1,4 +1,6 @@ -{pkgs ? import {}}: +{ + pkgs ? import { }, +}: pkgs.mkShell rec { name = "haddock2"; diff --git a/nix/devShells/masna3.nix b/nix/devShells/masna3.nix index 89da2ccb..60c9a391 100644 --- a/nix/devShells/masna3.nix +++ b/nix/devShells/masna3.nix @@ -1,53 +1,59 @@ let sources = import ../../npins; in - {pkgs ? import sources.pin-masna3shell {}}: - pkgs.mkShell (let - libs = with pkgs; [ - zlib - libpq - libsodium - ]; +{ + pkgs ? import sources.pin-masna3shell { }, +}: +pkgs.mkShell ( + let + libs = with pkgs; [ + zlib + libpq + libsodium + ]; - hlib = pkgs.haskell.lib; + hlib = pkgs.haskell.lib; - callHackage = { + callHackage = + { name, version, haskellPackages ? pkgs.haskellPackages, - }: let - pkg = haskellPackages.callHackage name version {}; + }: + let + pkg = haskellPackages.callHackage name version { }; in - hlib.dontCheck (hlib.doJailbreak pkg); + hlib.dontCheck (hlib.doJailbreak pkg); - haskellPackages = pkgs.haskell.packages.ghc910; - in { - name = "masna3"; - packages = - [ - pkgs.haskell.packages.ghc9102.ghc - pkgs.haskell.packages.ghc9102.haskell-language-server + haskellPackages = pkgs.haskell.packages.ghc910; + in + { + name = "masna3"; + packages = [ + pkgs.haskell.packages.ghc9102.ghc + pkgs.haskell.packages.ghc9102.haskell-language-server - haskellPackages.cabal-install - haskellPackages.postgresql-migration - (callHackage { - name = "fourmolu"; - version = "0.18.0.0"; - haskellPackages = pkgs.haskell.packages.ghc912; - }) - (callHackage { - name = "hlint"; - version = "3.10"; - haskellPackages = pkgs.haskell.packages.ghc912; - }) - pkgs.haskell.packages.ghc98.apply-refact - haskellPackages.ghc-tags - haskellPackages.cabal-gild + haskellPackages.cabal-install + haskellPackages.postgresql-migration + (callHackage { + name = "fourmolu"; + version = "0.18.0.0"; + haskellPackages = pkgs.haskell.packages.ghc912; + }) + (callHackage { + name = "hlint"; + version = "3.10"; + haskellPackages = pkgs.haskell.packages.ghc912; + }) + pkgs.haskell.packages.ghc98.apply-refact + haskellPackages.ghc-tags + haskellPackages.cabal-gild - pkgs.gnumake - pkgs.pkg-config - ] - ++ libs; + pkgs.gnumake + pkgs.pkg-config + ] + ++ libs; - LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath libs; - }) + LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath libs; + } +) diff --git a/nix/devShells/necro-man.nix b/nix/devShells/necro-man.nix index 098e0cdc..6039be67 100644 --- a/nix/devShells/necro-man.nix +++ b/nix/devShells/necro-man.nix @@ -1,37 +1,40 @@ let sources = import ../../npins; in - {pkgs ? import sources.pin-necro-man-nixpkgs {}}: let - shell = { +{ + pkgs ? import sources.pin-necro-man-nixpkgs { }, +}: +let + shell = + { mkShell, # pkgs, python310Packages, texlive, }: - mkShell { - name = "necro-manual"; - packages = [ - pkgs.emacs - python310Packages.pygments + mkShell { + name = "necro-manual"; + packages = [ + pkgs.emacs + python310Packages.pygments - (texlive.combine { - inherit - (texlive) - scheme-medium - # - wrapfig - capt-of - minted - upquote - todonotes - fvextra - catchfile - xstring - framed - ; - }) - ]; - }; - in - pkgs.callPackage shell {} + (texlive.combine { + inherit (texlive) + scheme-medium + # + wrapfig + capt-of + minted + upquote + todonotes + fvextra + catchfile + xstring + framed + ; + }) + ]; + }; +in +pkgs.callPackage shell { } diff --git a/nix/devShells/vim-tw.nix b/nix/devShells/vim-tw.nix index 58c6678c..1e5595b1 100644 --- a/nix/devShells/vim-tw.nix +++ b/nix/devShells/vim-tw.nix @@ -1,14 +1,16 @@ let sources = import ../../npins; in - {pkgs ? import sources.pin-vim-tw {}}: - pkgs.mkShell { - name = "vim-tw"; - packages = with pkgs; [ - haskellPackages.cabal-fmt - haskellPackages.cabal-install - haskellPackages.ghc - haskellPackages.haskell-language-server - haskellPackages.retrie - ]; - } +{ + pkgs ? import sources.pin-vim-tw { }, +}: +pkgs.mkShell { + name = "vim-tw"; + packages = with pkgs; [ + haskellPackages.cabal-fmt + haskellPackages.cabal-install + haskellPackages.ghc + haskellPackages.haskell-language-server + haskellPackages.retrie + ]; +} diff --git a/nix/disko/tungsten/btrfs.nix b/nix/disko/tungsten/btrfs.nix index 88f5a492..66201153 100644 --- a/nix/disko/tungsten/btrfs.nix +++ b/nix/disko/tungsten/btrfs.nix @@ -14,7 +14,7 @@ type = "filesystem"; format = "vfat"; mountpoint = "/boot"; - mountOptions = ["umask=0077"]; + mountOptions = [ "umask=0077" ]; }; }; @@ -24,7 +24,7 @@ content = { type = "luks"; name = "crypted"; - extraOpenArgs = []; + extraOpenArgs = [ ]; settings.allowDiscards = true; content = { type = "lvm_pv"; @@ -74,12 +74,15 @@ }; "/home" = { - mountOptions = ["compress=zstd"]; + mountOptions = [ "compress=zstd" ]; mountpoint = "/home"; }; "/nix" = { - mountOptions = ["compress=zstd" "noatime"]; + mountOptions = [ + "compress=zstd" + "noatime" + ]; mountpoint = "/nix"; }; }; diff --git a/nix/disko/tungsten/default.nix b/nix/disko/tungsten/default.nix index 172e29f5..0df2006c 100644 --- a/nix/disko/tungsten/default.nix +++ b/nix/disko/tungsten/default.nix @@ -18,7 +18,7 @@ type = "filesystem"; format = "vfat"; mountpoint = "/boot"; - mountOptions = ["umask=0077"]; + mountOptions = [ "umask=0077" ]; }; }; luks = { @@ -26,7 +26,7 @@ content = { type = "luks"; name = "crypted"; - extraOpenArgs = []; + extraOpenArgs = [ ]; settings = { allowDiscards = true; }; @@ -50,7 +50,7 @@ type = "filesystem"; format = "ext4"; mountpoint = "/"; - mountOptions = ["defaults"]; + mountOptions = [ "defaults" ]; }; }; nix = { @@ -59,7 +59,7 @@ type = "filesystem"; format = "ext4"; mountpoint = "/nix"; - mountOptions = ["noatime"]; + mountOptions = [ "noatime" ]; }; }; swap = { diff --git a/nix/disko/vanadium/btrfs.nix b/nix/disko/vanadium/btrfs.nix index 7ee68251..84b9efb0 100644 --- a/nix/disko/vanadium/btrfs.nix +++ b/nix/disko/vanadium/btrfs.nix @@ -14,7 +14,7 @@ type = "filesystem"; format = "vfat"; mountpoint = "/boot"; - mountOptions = ["umask=0077"]; + mountOptions = [ "umask=0077" ]; }; }; @@ -24,7 +24,7 @@ content = { type = "luks"; name = "crypted"; - extraOpenArgs = []; + extraOpenArgs = [ ]; settings.allowDiscards = true; content = { type = "lvm_pv"; @@ -70,17 +70,20 @@ subvolumes = { "/root" = { - mountOptions = ["noatime"]; + mountOptions = [ "noatime" ]; mountpoint = "/"; }; "/home" = { - mountOptions = ["noatime"]; + mountOptions = [ "noatime" ]; mountpoint = "/home"; }; "/nix" = { - mountOptions = ["compress=zstd" "noatime"]; + mountOptions = [ + "compress=zstd" + "noatime" + ]; mountpoint = "/nix"; }; }; diff --git a/nix/disko/vanadium/default.nix b/nix/disko/vanadium/default.nix index 2590fceb..22941fd0 100644 --- a/nix/disko/vanadium/default.nix +++ b/nix/disko/vanadium/default.nix @@ -15,7 +15,7 @@ type = "filesystem"; format = "vfat"; mountpoint = "/boot"; - mountOptions = ["umask=0077"]; + mountOptions = [ "umask=0077" ]; }; }; luks = { @@ -23,7 +23,7 @@ content = { type = "luks"; name = "crypted"; - extraOpenArgs = []; + extraOpenArgs = [ ]; settings = { allowDiscards = true; }; @@ -47,7 +47,7 @@ type = "filesystem"; format = "ext4"; mountpoint = "/"; - mountOptions = ["defaults"]; + mountOptions = [ "defaults" ]; }; }; nix = { @@ -56,7 +56,7 @@ type = "filesystem"; format = "ext4"; mountpoint = "/nix"; - mountOptions = ["noatime"]; + mountOptions = [ "noatime" ]; }; }; swap = { diff --git a/nix/git-identities/git-compat.nix b/nix/git-identities/git-compat.nix index 28bc74a6..d9806d98 100644 --- a/nix/git-identities/git-compat.nix +++ b/nix/git-identities/git-compat.nix @@ -1,14 +1,20 @@ let - hasconfigRemoteCondition = { - # Custom arguments - url, - path ? "*/**", - ... - } @ cfg: let - cfg' = builtins.removeAttrs cfg ["url" "path"]; - in [ - (cfg' // {condition = "hasconfig:remote.*.url:git@${url}:${path}";}) - (cfg' // {condition = "hasconfig:remote.*.url:https://${url}/${path}";}) - ]; + hasconfigRemoteCondition = + { + # Custom arguments + url, + path ? "*/**", + ... + }@cfg: + let + cfg' = builtins.removeAttrs cfg [ + "url" + "path" + ]; + in + [ + (cfg' // { condition = "hasconfig:remote.*.url:git@${url}:${path}"; }) + (cfg' // { condition = "hasconfig:remote.*.url:https://${url}/${path}"; }) + ]; in - builtins.concatMap hasconfigRemoteCondition +builtins.concatMap hasconfigRemoteCondition diff --git a/nix/git-identities/list.nix b/nix/git-identities/list.nix index 9568c0c1..7df85864 100644 --- a/nix/git-identities/list.nix +++ b/nix/git-identities/list.nix @@ -16,7 +16,8 @@ let blameIgnore = { blame.ignoreRevsFile = ".git-blame-ignore-revs"; }; -in [ +in +[ # Univ stuff { url = "gitlab.istic.univ-rennes1.fr"; diff --git a/nix/homeModules/common/atuin.nix b/nix/homeModules/common/atuin.nix index 940d0e02..86c5b17a 100644 --- a/nix/homeModules/common/atuin.nix +++ b/nix/homeModules/common/atuin.nix @@ -1,6 +1,6 @@ { programs.atuin = { - flags = ["--disable-up-arrow"]; + flags = [ "--disable-up-arrow" ]; settings = { history_filter = [ # privacy diff --git a/nix/homeModules/common/btop/default.nix b/nix/homeModules/common/btop/default.nix index b5344c6c..3a3c2389 100644 --- a/nix/homeModules/common/btop/default.nix +++ b/nix/homeModules/common/btop/default.nix @@ -1,4 +1,5 @@ -{config, ...}: { +{ config, ... }: +{ programs.btop = { settings.color_theme = "${config.programs.btop.package}/share/btop/themes/onedark.theme"; extraConfig = builtins.readFile ./btop.conf; diff --git a/nix/homeModules/common/cmus/default.nix b/nix/homeModules/common/cmus/default.nix index 07c185db..7ebf12b9 100644 --- a/nix/homeModules/common/cmus/default.nix +++ b/nix/homeModules/common/cmus/default.nix @@ -2,49 +2,51 @@ pkgs, lib, ... -}: { - programs.cmus.extraConfig = let - # dispatch to multiple callbacks - callback-script = pkgs.writeShellApplication { - name = "cmus-callback-script"; - runtimeInputs = [ - pkgs.cmusfm - pkgs.libnotify - ]; - text = '' - # All keys contain only chars a-z. Values are UTF-8 strings. - # - # Keys: status file url artist album discnumber tracknumber title date - # - status (stopped, playing, paused) is always given - # - file or url is given only if track is 'loaded' in cmus - # - other keys/values are given only if they are available +}: +{ + programs.cmus.extraConfig = + let + # dispatch to multiple callbacks + callback-script = pkgs.writeShellApplication { + name = "cmus-callback-script"; + runtimeInputs = [ + pkgs.cmusfm + pkgs.libnotify + ]; + text = '' + # All keys contain only chars a-z. Values are UTF-8 strings. + # + # Keys: status file url artist album discnumber tracknumber title date + # - status (stopped, playing, paused) is always given + # - file or url is given only if track is 'loaded' in cmus + # - other keys/values are given only if they are available - # Use a map so that we can redirect all the args to cmusfm - argv=("$@") - declare -A map - while [ $# -gt 0 ]; do - map["$1"]="$2" - shift - shift - done + # Use a map so that we can redirect all the args to cmusfm + argv=("$@") + declare -A map + while [ $# -gt 0 ]; do + map["$1"]="$2" + shift + shift + done - # Setup pretty symbols - case ''${map[status]} in - paused) - SYMB="⏸" - ;; - playing) - SYMB="⏵" - ;; - esac + # Setup pretty symbols + case ''${map[status]} in + paused) + SYMB="⏸" + ;; + playing) + SYMB="⏵" + ;; + esac - notify-send \ - "$SYMB ''${map[title]}" \ - "''${map[artist]} / ''${map[album]}" - cmusfm "''${argv[@]}" - ''; - }; - in + notify-send \ + "$SYMB ''${map[title]}" \ + "''${map[artist]} / ''${map[album]}" + cmusfm "''${argv[@]}" + ''; + }; + in builtins.readFile ./rc + lib.optionalString pkgs.stdenv.isLinux '' set status_display_program=${lib.getExe callback-script} diff --git a/nix/homeModules/common/direnv.nix b/nix/homeModules/common/direnv.nix index aa4f2673..6ea2fc3d 100644 --- a/nix/homeModules/common/direnv.nix +++ b/nix/homeModules/common/direnv.nix @@ -1,4 +1,5 @@ -{config, ...}: { +{ config, ... }: +{ programs.direnv = { nix-direnv.enable = true; config = { diff --git a/nix/homeModules/common/fcitx5/default.nix b/nix/homeModules/common/fcitx5/default.nix index d0e86339..4e1cc178 100644 --- a/nix/homeModules/common/fcitx5/default.nix +++ b/nix/homeModules/common/fcitx5/default.nix @@ -3,9 +3,11 @@ config, lib, ... -}: let +}: +let cfg = config.i18n.inputMethod; -in { +in +{ i18n.inputMethod = { fcitx5.addons = [ pkgs.fcitx5-chinese-addons diff --git a/nix/homeModules/common/firefox.nix b/nix/homeModules/common/firefox.nix index 2f349d00..9831eb4f 100644 --- a/nix/homeModules/common/firefox.nix +++ b/nix/homeModules/common/firefox.nix @@ -3,11 +3,13 @@ config, lib, ... -}: let +}: +let inherit (pkgs) nur; cfg = config.programs.firefox; -in { +in +{ programs.firefox = { # https://mozilla.github.io/policy-templates # The following have more complex logic, keep them as policies and not profiles @@ -19,7 +21,14 @@ in { ]; SearchEngines = { - Remove = ["Google" "Bing" "DuckDuckGo" "Qwant" "eBay" "Perplexity"]; + Remove = [ + "Google" + "Bing" + "DuckDuckGo" + "Qwant" + "eBay" + "Perplexity" + ]; Default = "leta"; Add = [ { @@ -102,23 +111,25 @@ in { "media.peerconnection.enabled" = false; }; - extensions.packages = let - addons = nur.repos.rycee.firefox-addons; - in [ - addons.ublock-origin - addons.privacy-badger - addons.user-agent-string-switcher + extensions.packages = + let + addons = nur.repos.rycee.firefox-addons; + in + [ + addons.ublock-origin + addons.privacy-badger + addons.user-agent-string-switcher - /* - Here's to you who want to remove news feed eradicator because you find it annoying: - It is here to annoy you so it is less likely for you to be on the agency inversion path. - DO NOT REMOVE IT. I repeat, DO NOT REMOVE IT. + /* + Here's to you who want to remove news feed eradicator because you find it annoying: + It is here to annoy you so it is less likely for you to be on the agency inversion path. + DO NOT REMOVE IT. I repeat, DO NOT REMOVE IT. - If you think it's annoying, go do some jump rope, sing, live. - */ - addons.news-feed-eradicator # did you read the comment above? - addons.multi-account-containers - ]; + If you think it's annoying, go do some jump rope, sing, live. + */ + addons.news-feed-eradicator # did you read the comment above? + addons.multi-account-containers + ]; }; }; diff --git a/nix/homeModules/common/fish/aliasesAbbrs.nix b/nix/homeModules/common/fish/aliasesAbbrs.nix index 253dae7f..330a0159 100644 --- a/nix/homeModules/common/fish/aliasesAbbrs.nix +++ b/nix/homeModules/common/fish/aliasesAbbrs.nix @@ -2,7 +2,8 @@ pkgs, lib, ... -}: { +}: +{ programs.fish = { shellAbbrs = lib.mkMerge [ (lib.mkIf pkgs.stdenv.isLinux { diff --git a/nix/homeModules/common/fish/default.nix b/nix/homeModules/common/fish/default.nix index 240a6c29..6a866084 100644 --- a/nix/homeModules/common/fish/default.nix +++ b/nix/homeModules/common/fish/default.nix @@ -2,7 +2,8 @@ lib, pkgs, ... -}: { +}: +{ imports = [ ./aliasesAbbrs.nix ]; @@ -10,7 +11,7 @@ # # Script dependencies # - home.packages = [pkgs.vivid]; + home.packages = [ pkgs.vivid ]; programs = { fd.enable = true; fzf.enable = true; @@ -24,11 +25,9 @@ # # Scripts and functions # - xdg.configFile = - lib.mapAttrs' - (path: _: - lib.nameValuePair "fish/functions/${path}" {source = "${./functions}/${path}";}) - (builtins.readDir ./functions); + xdg.configFile = lib.mapAttrs' ( + path: _: lib.nameValuePair "fish/functions/${path}" { source = "${./functions}/${path}"; } + ) (builtins.readDir ./functions); programs.fish = { interactiveShellInit = builtins.readFile ./shellInit.fish; diff --git a/nix/homeModules/common/git.nix b/nix/homeModules/common/git.nix index 68f151c6..c3a19f91 100644 --- a/nix/homeModules/common/git.nix +++ b/nix/homeModules/common/git.nix @@ -3,7 +3,8 @@ config, pkgs, ... -}: { +}: +{ # git plugins programs.git = { lfs.enable = true; @@ -11,18 +12,18 @@ # known to fail on aarch64-linux (lib.mkIf (pkgs.system == "aarch64-linux") ( # TODO: investigate this - lib.warn "patdiff has been forcibly disabled because it has previously failed to build" - lib.mkForce - false + lib.warn "patdiff has been forcibly disabled because it has previously failed to build" lib.mkForce + false )) (lib.mkDefault true) ]; }; # 懶惰鬼賴皮 - programs.lazygit = let - patdiffCfg = config.programs.git.patdiff; - in + programs.lazygit = + let + patdiffCfg = config.programs.git.patdiff; + in lib.mkIf patdiffCfg.enable { settings = { git.paging.externalDiffCommand = "${lib.getExe' patdiffCfg.package "patdiff-git-wrapper"}"; diff --git a/nix/homeModules/common/gpg.nix b/nix/homeModules/common/gpg.nix index 02df7fa6..1ef69531 100644 --- a/nix/homeModules/common/gpg.nix +++ b/nix/homeModules/common/gpg.nix @@ -1,25 +1,27 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ services = { gpg-agent.defaultCacheTtl = 1209600; gpg-agent.pinentry.package = pkgs.pinentry-tty; }; - programs.gpg.publicKeys = let - fromUrl = { - url, - hash, - trust ? 5, - }: { - source = pkgs.fetchurl {inherit url hash;}; - inherit trust; - }; + programs.gpg.publicKeys = + let + fromUrl = + { + url, + hash, + trust ? 5, + }: + { + source = pkgs.fetchurl { inherit url hash; }; + inherit trust; + }; - github = {user, ...} @ args: - fromUrl ( - builtins.removeAttrs args ["user"] - // {url = "https://github.com/${user}.gpg";} - ); - in + github = + { user, ... }@args: + fromUrl (builtins.removeAttrs args [ "user" ] // { url = "https://github.com/${user}.gpg"; }); + in map github [ # Do not depend on my own forgejo instance / self-host server to avoid a single point of failure { diff --git a/nix/homeModules/common/kitty.nix b/nix/homeModules/common/kitty.nix index 24b5e1b8..afe1a9c5 100644 --- a/nix/homeModules/common/kitty.nix +++ b/nix/homeModules/common/kitty.nix @@ -3,9 +3,11 @@ lib, config, ... -}: let +}: +let cfg = config.programs.kitty; -in { +in +{ config = lib.mkIf cfg.enable { home.packages = [ pkgs.nerd-fonts.iosevka diff --git a/nix/homeModules/common/lazygit.nix b/nix/homeModules/common/lazygit.nix index be6c2aef..f6a56eb6 100644 --- a/nix/homeModules/common/lazygit.nix +++ b/nix/homeModules/common/lazygit.nix @@ -2,9 +2,11 @@ config, lib, ... -}: let +}: +let cfg = config.programs.lazygit; -in { +in +{ programs.tmux.extraConfig = lib.mkIf cfg.enable '' bind g run-shell "tmux new-window ${lib.getExe cfg.package}" ''; diff --git a/nix/homeModules/common/leana.nix b/nix/homeModules/common/leana.nix index 760a6549..ae64efef 100644 --- a/nix/homeModules/common/leana.nix +++ b/nix/homeModules/common/leana.nix @@ -3,12 +3,14 @@ lib, config, ... -}: { +}: +{ home = { username = lib.mkDefault "leana"; - homeDirectory = let - inherit (config.home) username; - in + homeDirectory = + let + inherit (config.home) username; + in lib.mkMerge [ (lib.mkIf pkgs.stdenv.isLinux ("/home/" + username)) (lib.mkIf pkgs.stdenv.isDarwin ("/Users/" + username)) diff --git a/nix/homeModules/common/locale.nix b/nix/homeModules/common/locale.nix index 21e96dc5..e8949aef 100644 --- a/nix/homeModules/common/locale.nix +++ b/nix/homeModules/common/locale.nix @@ -2,7 +2,8 @@ nixosConfig ? null, lib, ... -}: { +}: +{ home.language = { base = lib.mkDefault nixosConfig.i18n.defaultLocale or "en_US.UTF-8"; }; diff --git a/nix/homeModules/common/packages.nix b/nix/homeModules/common/packages.nix index 470c527d..fac0711a 100644 --- a/nix/homeModules/common/packages.nix +++ b/nix/homeModules/common/packages.nix @@ -2,21 +2,21 @@ pkgs, lib, ... -}: { +}: +{ programs = { vim.enable = true; }; - home.packages = - [ - pkgs.file - pkgs.gnused - pkgs.tree - pkgs.findutils # xargs and more - pkgs.rsync - pkgs.parallel - pkgs.jq - ] - # coreutils for darwin - ++ lib.optional pkgs.stdenv.isDarwin pkgs.uutils-coreutils-noprefix; + home.packages = [ + pkgs.file + pkgs.gnused + pkgs.tree + pkgs.findutils # xargs and more + pkgs.rsync + pkgs.parallel + pkgs.jq + ] + # coreutils for darwin + ++ lib.optional pkgs.stdenv.isDarwin pkgs.uutils-coreutils-noprefix; } diff --git a/nix/homeModules/common/password-store.nix b/nix/homeModules/common/password-store.nix index 159152e0..04d8c5f9 100644 --- a/nix/homeModules/common/password-store.nix +++ b/nix/homeModules/common/password-store.nix @@ -3,9 +3,11 @@ pkgs, lib, ... -}: let +}: +let cfg = config.programs.password-store; -in { +in +{ home.packages = lib.mkIf cfg.enable [ pkgs.pwgen pkgs.diceware diff --git a/nix/homeModules/common/sioyek.nix b/nix/homeModules/common/sioyek.nix index 9c018fc8..6547d74d 100644 --- a/nix/homeModules/common/sioyek.nix +++ b/nix/homeModules/common/sioyek.nix @@ -2,7 +2,8 @@ config, lib, ... -}: { +}: +{ programs.sioyek = { bindings = { "move_up" = "k"; @@ -17,8 +18,11 @@ "u" "" ]; - "toggle_two_page_mode" = ["T"]; - "goto_mark" = ["`" "'"]; + "toggle_two_page_mode" = [ "T" ]; + "goto_mark" = [ + "`" + "'" + ]; }; config.should_launch_new_window = "1"; @@ -27,7 +31,7 @@ xdg.mimeApps = lib.mkIf config.programs.sioyek.enable { enable = true; defaultApplications = { - "application/pdf" = ["sioyek.desktop"]; + "application/pdf" = [ "sioyek.desktop" ]; }; }; } diff --git a/nix/homeModules/common/starship/default.nix b/nix/homeModules/common/starship/default.nix index 664103c0..e61b90b0 100644 --- a/nix/homeModules/common/starship/default.nix +++ b/nix/homeModules/common/starship/default.nix @@ -2,9 +2,11 @@ lib, config, ... -}: let +}: +let cfg = config.programs.starship; -in { +in +{ xdg.configFile = lib.mkIf cfg.enable { "starship.toml".source = "${./starship.toml}"; }; diff --git a/nix/homeModules/common/tmux/default.nix b/nix/homeModules/common/tmux/default.nix index 7efa8f11..47ecb2a2 100644 --- a/nix/homeModules/common/tmux/default.nix +++ b/nix/homeModules/common/tmux/default.nix @@ -2,7 +2,8 @@ pkgs, lib, ... -}: { +}: +{ programs.tmux.extraConfig = builtins.readFile ./tmux.conf + lib.optionalString pkgs.stdenv.isDarwin '' diff --git a/nix/homeModules/common/user-nixconf.nix b/nix/homeModules/common/user-nixconf.nix index 574a939e..9ca3a09e 100644 --- a/nix/homeModules/common/user-nixconf.nix +++ b/nix/homeModules/common/user-nixconf.nix @@ -3,7 +3,8 @@ lib, pkgs, ... -}: { +}: +{ nix = { package = lib.mkDefault (nixosConfig.nix.package or pkgs.nix); diff --git a/nix/homeModules/common/vim/default.nix b/nix/homeModules/common/vim/default.nix index ee264962..81944c7f 100644 --- a/nix/homeModules/common/vim/default.nix +++ b/nix/homeModules/common/vim/default.nix @@ -1,27 +1,30 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ programs.vim = { extraConfig = builtins.readFile ./vimrc; - plugins = let - vpkgs = pkgs.vimPlugins; + plugins = + let + vpkgs = pkgs.vimPlugins; - paramount = pkgs.vimUtils.buildVimPlugin { - name = "paramount"; - src = pkgs.fetchFromGitHub { - owner = "owickstrom"; - repo = "vim-colors-paramount"; - rev = "a5601d36fb6932e8d1a6f8b37b179a99b1456798"; - hash = "sha256-j9nMjKYK7bqrGHprYp0ddLEWs1CNMudxXD13sOROVmY="; + paramount = pkgs.vimUtils.buildVimPlugin { + name = "paramount"; + src = pkgs.fetchFromGitHub { + owner = "owickstrom"; + repo = "vim-colors-paramount"; + rev = "a5601d36fb6932e8d1a6f8b37b179a99b1456798"; + hash = "sha256-j9nMjKYK7bqrGHprYp0ddLEWs1CNMudxXD13sOROVmY="; + }; }; - }; - in [ - vpkgs.vim-sleuth - vpkgs.vim-surround - vpkgs.vim-fugitive - vpkgs.vim-commentary - vpkgs.undotree - vpkgs.tabular - vpkgs.vim-caddyfile - paramount - ]; + in + [ + vpkgs.vim-sleuth + vpkgs.vim-surround + vpkgs.vim-fugitive + vpkgs.vim-commentary + vpkgs.undotree + vpkgs.tabular + vpkgs.vim-caddyfile + paramount + ]; }; } diff --git a/nix/homeModules/common/wired/default.nix b/nix/homeModules/common/wired/default.nix index bc522eaa..2b3a7d2f 100644 --- a/nix/homeModules/common/wired/default.nix +++ b/nix/homeModules/common/wired/default.nix @@ -1,5 +1,6 @@ -{pkgs, ...}: { - home.packages = [pkgs.iosevka]; +{ pkgs, ... }: +{ + home.packages = [ pkgs.iosevka ]; services.wired = { config = "${./wired.ron}"; }; diff --git a/nix/homeModules/extra/tmux-fish-integration.nix b/nix/homeModules/extra/tmux-fish-integration.nix index 37061609..4480f567 100644 --- a/nix/homeModules/extra/tmux-fish-integration.nix +++ b/nix/homeModules/extra/tmux-fish-integration.nix @@ -4,7 +4,8 @@ lib, config, ... -}: { +}: +{ assertions = [ { assertion = config.programs.fish.enable; @@ -22,7 +23,9 @@ WORKTREE_PATH = "wt"; }; - programs.direnv.config.whitelist.prefix = [(config.home.sessionVariables.REPO_PATH + "/leana8959")]; + programs.direnv.config.whitelist.prefix = [ + (config.home.sessionVariables.REPO_PATH + "/leana8959") + ]; programs.tmux.extraConfig = lib.mkBefore '' # sessionizer binds bind -n C-f run-shell "tmux new-window tmux-sessionizer" diff --git a/nix/lib/mkNerdFont.nix b/nix/lib/mkNerdFont.nix index 1c9e72a2..9753577a 100644 --- a/nix/lib/mkNerdFont.nix +++ b/nix/lib/mkNerdFont.nix @@ -3,19 +3,20 @@ nerd-font-patcher, parallel, stdenvNoCC, -}: { +}: +{ font, - extraArgs ? [], + extraArgs ? [ ], useDefaultsArgs ? true, }: stdenvNoCC.mkDerivation { /* - Credits: - https://github.com/NixOS/nixpkgs/issues/44329#issuecomment-1231189572 - https://github.com/NixOS/nixpkgs/issues/44329#issuecomment-1544597422 + Credits: + https://github.com/NixOS/nixpkgs/issues/44329#issuecomment-1231189572 + https://github.com/NixOS/nixpkgs/issues/44329#issuecomment-1544597422 - long font names is not problematic: - https://github.com/ryanoasis/nerd-fonts/issues/1018#issuecomment-1953555781 + long font names is not problematic: + https://github.com/ryanoasis/nerd-fonts/issues/1018#issuecomment-1953555781 */ name = "${font.name}-NerdFont"; src = font; @@ -24,20 +25,22 @@ stdenvNoCC.mkDerivation { parallel ]; - buildPhase = let - args = - lib.optionals useDefaultsArgs [ - "--careful" - "--complete" - "--quiet" - "--no-progressbars" - ] - ++ extraArgs; - in '' - mkdir -p nerd-font - find \( -name \*.ttf -o -name \*.otf \) | parallel --jobs=$NIX_BUILD_CORES nerd-font-patcher {} \ - --outputdir nerd-font ${builtins.concatStringsSep " " args} - ''; + buildPhase = + let + args = + lib.optionals useDefaultsArgs [ + "--careful" + "--complete" + "--quiet" + "--no-progressbars" + ] + ++ extraArgs; + in + '' + mkdir -p nerd-font + find \( -name \*.ttf -o -name \*.otf \) | parallel --jobs=$NIX_BUILD_CORES nerd-font-patcher {} \ + --outputdir nerd-font ${builtins.concatStringsSep " " args} + ''; installPhase = '' exists() { [ -e "$1" ]; } diff --git a/nix/networks/list.nix b/nix/networks/list.nix index e87052ce..de5c9fc9 100644 --- a/nix/networks/list.nix +++ b/nix/networks/list.nix @@ -2,7 +2,8 @@ let preferredPriority = 20; privatePriority = 10; limitedPriority = -10; -in [ +in +[ { ssid = "~"; priority = preferredPriority; @@ -36,7 +37,7 @@ in [ priority = privatePriority; scanOnLowSignal = true; - authProtocols = ["WPA-EAP"]; + authProtocols = [ "WPA-EAP" ]; auth = '' pairwise=CCMP group=CCMP TKIP @@ -81,13 +82,13 @@ in [ randomizeMac = true; } - {ssid = "_SNCF_WIFI_INOUI";} - {ssid = "_WIFI_LYRIA";} - {ssid = "EurostarTrainsWiFi";} - {ssid = "SBB-FREE";} - {ssid = "AOT Airport Free Wi-Fi by NT";} - {ssid = "NewTaipei";} - {ssid = "Fami-WiFi";} + { ssid = "_SNCF_WIFI_INOUI"; } + { ssid = "_WIFI_LYRIA"; } + { ssid = "EurostarTrainsWiFi"; } + { ssid = "SBB-FREE"; } + { ssid = "AOT Airport Free Wi-Fi by NT"; } + { ssid = "NewTaipei"; } + { ssid = "Fami-WiFi"; } { ssid = "iPhone de Léana 江"; diff --git a/nix/networks/wpa_supplicant-compat.nix b/nix/networks/wpa_supplicant-compat.nix index 7b4424a2..02c2c26c 100644 --- a/nix/networks/wpa_supplicant-compat.nix +++ b/nix/networks/wpa_supplicant-compat.nix @@ -6,32 +6,39 @@ let lib = import (sources.nixpkgs + "/lib"); # wpa_supplicant uses `strchr` to seek to the first `=`, so the only forbidden character is `=`. - escapePwdKey = lib.replaceStrings ["="] ["_"]; + escapePwdKey = lib.replaceStrings [ "=" ] [ "_" ]; - go = networkArgs @ { - ssid, - # Custom fields wrapping nixpkgs module options - hasPassword ? false, - scanOnLowSignal ? false, - randomizeMac ? false, - ... - }: { - ${ssid} = lib.mkMerge [ - (builtins.removeAttrs networkArgs ["ssid" "hasPassword" "scanOnLowSignal" "randomizeMac"]) - (lib.optionalAttrs hasPassword { - pskRaw = "ext:${escapePwdKey ssid}"; - }) - (lib.optionalAttrs scanOnLowSignal { - extraConfig = '' - bgscan="simple:30:-70:3600" - ''; - }) - (lib.optionalAttrs randomizeMac { - extraConfig = '' - mac_addr=1 - ''; - }) - ]; - }; + go = + networkArgs@{ + ssid, + # Custom fields wrapping nixpkgs module options + hasPassword ? false, + scanOnLowSignal ? false, + randomizeMac ? false, + ... + }: + { + ${ssid} = lib.mkMerge [ + (builtins.removeAttrs networkArgs [ + "ssid" + "hasPassword" + "scanOnLowSignal" + "randomizeMac" + ]) + (lib.optionalAttrs hasPassword { + pskRaw = "ext:${escapePwdKey ssid}"; + }) + (lib.optionalAttrs scanOnLowSignal { + extraConfig = '' + bgscan="simple:30:-70:3600" + ''; + }) + (lib.optionalAttrs randomizeMac { + extraConfig = '' + mac_addr=1 + ''; + }) + ]; + }; in - ns: lib.mkMerge (map go ns) +ns: lib.mkMerge (map go ns) diff --git a/nix/nixosModules/common/disable-command-not-found.nix b/nix/nixosModules/common/disable-command-not-found.nix index f81c9a8b..89d6638a 100644 --- a/nix/nixosModules/common/disable-command-not-found.nix +++ b/nix/nixosModules/common/disable-command-not-found.nix @@ -1 +1 @@ -{programs.command-not-found.enable = false;} +{ programs.command-not-found.enable = false; } diff --git a/nix/nixosModules/common/fish.nix b/nix/nixosModules/common/fish.nix index af742154..be194799 100644 --- a/nix/nixosModules/common/fish.nix +++ b/nix/nixosModules/common/fish.nix @@ -5,15 +5,18 @@ config, lib, ... -}: let +}: +let fishNixOSEnabled = config.programs.fish.enable; fishHMEnabled = - if config ? home-manager - then lib.any (userConfig: userConfig.programs.fish.enable) (lib.attrValues config.home-manager.users) - else false; + if config ? home-manager then + lib.any (userConfig: userConfig.programs.fish.enable) (lib.attrValues config.home-manager.users) + else + false; fishEnabled = fishNixOSEnabled || fishHMEnabled; -in { +in +{ environment.pathsToLink = lib.mkIf fishEnabled [ "/share/fish/vendor_conf.d" "/share/fish/vendor_completions.d" diff --git a/nix/nixosModules/common/network.nix b/nix/nixosModules/common/network.nix index 0a52670b..6d36fbfb 100644 --- a/nix/nixosModules/common/network.nix +++ b/nix/nixosModules/common/network.nix @@ -1,4 +1,5 @@ -{hostname, ...}: { +{ hostname, ... }: +{ networking.hostName = hostname; services.openssh = { diff --git a/nix/nixosModules/common/sudo-conf.nix b/nix/nixosModules/common/sudo-conf.nix index af85bab6..35494b1b 100644 --- a/nix/nixosModules/common/sudo-conf.nix +++ b/nix/nixosModules/common/sudo-conf.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ security.sudo.enable = false; environment.systemPackages = [ @@ -18,8 +19,8 @@ # doas's docs says it searches in a "limited subset of PATH" if it's relative. # I suspect that it doesn't search the PATH added ad-hoc by the nix-shell, also not a good solution. # Also, for some reason, the rule won't match. - users = [":wheel"]; - setEnv = ["PATH"]; + users = [ ":wheel" ]; + setEnv = [ "PATH" ]; } ]; }; diff --git a/nix/nixosModules/common/system-nixconf.nix b/nix/nixosModules/common/system-nixconf.nix index 637e7d71..9a0d8783 100644 --- a/nix/nixosModules/common/system-nixconf.nix +++ b/nix/nixosModules/common/system-nixconf.nix @@ -2,7 +2,8 @@ lib, pkgs, ... -}: { +}: +{ nix = { package = lib.mkDefault pkgs.nix; diff --git a/nix/nixosModules/common/xscreensaver.nix b/nix/nixosModules/common/xscreensaver.nix index 2d18a6a1..49aebbd0 100644 --- a/nix/nixosModules/common/xscreensaver.nix +++ b/nix/nixosModules/common/xscreensaver.nix @@ -5,14 +5,16 @@ config, lib, ... -}: let +}: +let cfg = config.services.xscreensaver; -in { +in +{ options = { services.xscreensaver.hooks = lib.mkOption { type = with lib.types; attrsOf str; description = "An attrset of events mapped a block of shell command to be run"; - default = {}; + default = { }; }; }; @@ -20,26 +22,29 @@ in { systemd.user.services = { "xscreensaver-hooks" = { description = "Run commands on xscreensaver events"; - after = ["graphical-session.target" "xscreensaver.service"]; - partOf = ["graphical-session.target"]; - wantedBy = ["graphical-session.target"]; - script = let - handlers = - lib.concatMapAttrsStringSep "\n" (event: action: '' + after = [ + "graphical-session.target" + "xscreensaver.service" + ]; + partOf = [ "graphical-session.target" ]; + wantedBy = [ "graphical-session.target" ]; + script = + let + handlers = lib.concatMapAttrsStringSep "\n" (event: action: '' "${event}") ( ${action} ) ;; - '') - cfg.hooks; - in '' - xscreensaver-command -watch | while read event rest; do - echo "The handler script got \"$event\"" - case $event in - ${handlers} - esac - done - ''; + '') cfg.hooks; + in + '' + xscreensaver-command -watch | while read event rest; do + echo "The handler script got \"$event\"" + case $event in + ${handlers} + esac + done + ''; path = [ cfg.package # contains xscreensaver-command ]; diff --git a/nix/nixosModules/extra/leana.nix b/nix/nixosModules/extra/leana.nix index d61e958b..1412fd3d 100644 --- a/nix/nixosModules/extra/leana.nix +++ b/nix/nixosModules/extra/leana.nix @@ -2,21 +2,22 @@ config, pkgs, ... -}: { +}: +{ # # My user # - nix.settings.trusted-users = ["leana"]; + nix.settings.trusted-users = [ "leana" ]; users.users."leana" = { isNormalUser = true; home = "/home/leana"; description = "Leana"; group = "leana"; - extraGroups = ["wheel"]; + extraGroups = [ "wheel" ]; shell = pkgs.bash; openssh.authorizedKeys.keys = config.users.users.root.openssh.authorizedKeys.keys; }; - users.groups.leana = {}; + users.groups.leana = { }; # # My nix binary cache diff --git a/nix/nixosModules/extra/macbook-pro-radeon.nix b/nix/nixosModules/extra/macbook-pro-radeon.nix index 0c664321..34de14fa 100644 --- a/nix/nixosModules/extra/macbook-pro-radeon.nix +++ b/nix/nixosModules/extra/macbook-pro-radeon.nix @@ -1,5 +1,5 @@ { # This will temporarily disable the dedicated graphics and boot into the system. # If your computer suffers from the GPU's death it won't boot unless you do this. - boot.kernelParams = ["radeon.modeset=0"]; + boot.kernelParams = [ "radeon.modeset=0" ]; } diff --git a/nix/nixosModules/extra/parrot.nix b/nix/nixosModules/extra/parrot.nix index c1ead149..0d491ddb 100644 --- a/nix/nixosModules/extra/parrot.nix +++ b/nix/nixosModules/extra/parrot.nix @@ -3,10 +3,12 @@ lib, config, ... -}: let +}: +let cfg = config.services.parrot; t = lib.types; -in { +in +{ options = { services.parrot = { enable = lib.mkEnableOption "parrot"; @@ -23,12 +25,12 @@ in { group = "parrot"; isSystemUser = true; }; - users.groups."parrot" = {}; + users.groups."parrot" = { }; systemd.services."parrot" = { description = " A hassle-free, highly performant, self-hosted Discord music bot with YouTube and Spotify support. Powered by yt-dlp."; - after = ["network.target"]; - wantedBy = ["multi-user.target"]; + after = [ "network.target" ]; + wantedBy = [ "multi-user.target" ]; serviceConfig = { User = "parrot"; diff --git a/nix/nixosModules/extra/secure_dns.nix b/nix/nixosModules/extra/secure_dns.nix index 439090b4..321d8455 100644 --- a/nix/nixosModules/extra/secure_dns.nix +++ b/nix/nixosModules/extra/secure_dns.nix @@ -1,7 +1,11 @@ # https://nixos.wiki/wiki/Encrypted_DNS -{pkgs, ...}: { +{ pkgs, ... }: +{ networking = { - nameservers = ["127.0.0.1" "::1"]; + nameservers = [ + "127.0.0.1" + "::1" + ]; dhcpcd.extraConfig = "nohook resolv.conf"; # networkmanager.dns = "none"; }; @@ -13,7 +17,7 @@ # Settings reference: # https://github.com/DNSCrypt/dnscrypt-proxy/blob/master/dnscrypt-proxy/example-dnscrypt-proxy.toml settings = { - listen_addresses = ["127.0.0.1:53"]; + listen_addresses = [ "127.0.0.1:53" ]; ipv4_servers = true; require_dnssec = true; diff --git a/nix/nixosModules/extra/typst-bot.nix b/nix/nixosModules/extra/typst-bot.nix index dbadaea3..153fea31 100644 --- a/nix/nixosModules/extra/typst-bot.nix +++ b/nix/nixosModules/extra/typst-bot.nix @@ -3,10 +3,12 @@ config, lib, ... -}: let +}: +let cfg = config.services.typst-bot; t = lib.types; -in { +in +{ options = { services.typst-bot = { enable = lib.mkEnableOption "typst-bot"; @@ -30,7 +32,7 @@ in { isSystemUser = true; home = cfg.dataDir; }; - users.groups."typst-bot" = {}; + users.groups."typst-bot" = { }; systemd.tmpfiles.rules = [ "d ${cfg.dataDir}/cache 700 typst-bot typst-bot - -" @@ -39,15 +41,15 @@ in { systemd.services."typst-bot" = { description = "A discord bot to render Typst code"; - after = ["network.target"]; - wantedBy = ["multi-user.target"]; + after = [ "network.target" ]; + wantedBy = [ "multi-user.target" ]; preStart = '' : >${cfg.dataDir}/sqlite/db.sqlite ''; # Don't pollute the global path - path = [pkgs.typst-bot]; + path = [ pkgs.typst-bot ]; script = "typst-bot"; serviceConfig = { diff --git a/nix/nixosModules/extra/zram.nix b/nix/nixosModules/extra/zram.nix index 0f13d841..bcf848ba 100644 --- a/nix/nixosModules/extra/zram.nix +++ b/nix/nixosModules/extra/zram.nix @@ -1 +1 @@ -{zramSwap.enable = true;} +{ zramSwap.enable = true; } diff --git a/nix/overlays/agenix.nix b/nix/overlays/agenix.nix index eded6cc7..33db93ab 100644 --- a/nix/overlays/agenix.nix +++ b/nix/overlays/agenix.nix @@ -1,7 +1,7 @@ let sources = import ../../npins; in - final: _: { - # Use flake so the package inputs is pinned - agenix = sources.agenix.asFlake.packages.${final.system}.default; - } +final: _: { + # Use flake so the package inputs is pinned + agenix = sources.agenix.asFlake.packages.${final.system}.default; +} diff --git a/nix/overlays/calibre-no-mime.nix b/nix/overlays/calibre-no-mime.nix index f6436085..bfc2d604 100644 --- a/nix/overlays/calibre-no-mime.nix +++ b/nix/overlays/calibre-no-mime.nix @@ -2,8 +2,8 @@ final: prev: { calibre = final.symlinkJoin { name = "calibre"; - paths = [prev.calibre]; - buildInputs = [final.makeWrapper]; + paths = [ prev.calibre ]; + buildInputs = [ final.makeWrapper ]; postBuild = '' rm -r $out/share/mime ''; diff --git a/nix/overlays/disko.nix b/nix/overlays/disko.nix index 038ae26d..cb013aad 100644 --- a/nix/overlays/disko.nix +++ b/nix/overlays/disko.nix @@ -1,6 +1,6 @@ let sources = import ../../npins; in - final: _: { - disko = sources.disko.asFlake.packages.${final.system}.default; - } +final: _: { + disko = sources.disko.asFlake.packages.${final.system}.default; +} diff --git a/nix/overlays/dix.nix b/nix/overlays/dix.nix index ada5e33a..60717e01 100644 --- a/nix/overlays/dix.nix +++ b/nix/overlays/dix.nix @@ -1,6 +1,6 @@ let sources = import ../../npins; in - final: _: { - dix = sources.dix.asFlake.packages.${final.system}.default; - } +final: _: { + dix = sources.dix.asFlake.packages.${final.system}.default; +} diff --git a/nix/overlays/eepy.nix b/nix/overlays/eepy.nix index 1c821d2b..70f4f78a 100644 --- a/nix/overlays/eepy.nix +++ b/nix/overlays/eepy.nix @@ -1,6 +1,6 @@ let sources = import ../../npins; in - final: _: { - eepy = sources.eepy.asFlake.packages.${final.system}.default; - } +final: _: { + eepy = sources.eepy.asFlake.packages.${final.system}.default; +} diff --git a/nix/overlays/fcitx5-table-extra-taiwanese.nix b/nix/overlays/fcitx5-table-extra-taiwanese.nix index b24003f8..af7e17df 100644 --- a/nix/overlays/fcitx5-table-extra-taiwanese.nix +++ b/nix/overlays/fcitx5-table-extra-taiwanese.nix @@ -1,18 +1,14 @@ let sources = import ../../npins; in - final: prev: { - fcitx5-table-extra = prev.fcitx5-table-extra.overrideAttrs (oldAttrs: { - src = sources.fcitx5-table-extra; - nativeBuildInputs = - oldAttrs.nativeBuildInputs or [] - ++ [ - final.python3 - ]; - preConfigure = - oldAttrs.preConfigure or "" - + '' - python3 ./generate.py - ''; - }); - } +final: prev: { + fcitx5-table-extra = prev.fcitx5-table-extra.overrideAttrs (oldAttrs: { + src = sources.fcitx5-table-extra; + nativeBuildInputs = oldAttrs.nativeBuildInputs or [ ] ++ [ + final.python3 + ]; + preConfigure = oldAttrs.preConfigure or "" + '' + python3 ./generate.py + ''; + }); +} diff --git a/nix/overlays/iosevka.nix b/nix/overlays/iosevka.nix index e5760ec1..2239f2ae 100644 --- a/nix/overlays/iosevka.nix +++ b/nix/overlays/iosevka.nix @@ -1,7 +1,8 @@ final: prev: rec { - nerd-fonts = let - mkNerdFont = final.callPackage ../lib/mkNerdFont.nix {}; - in + nerd-fonts = + let + mkNerdFont = final.callPackage ../lib/mkNerdFont.nix { }; + in prev.nerd-fonts // { iosevka = mkNerdFont { diff --git a/nix/overlays/nil.nix b/nix/overlays/nil.nix index ab05b204..4ada807b 100644 --- a/nix/overlays/nil.nix +++ b/nix/overlays/nil.nix @@ -2,21 +2,18 @@ let sources = import ../../npins; in - final: _: { - nil = let +final: _: { + nil = + let pkg = sources.nil.asFlake.packages.${final.system}.default; in - pkg.overrideAttrs ( - oldAttrs: { - patches = - oldAttrs.patches or [] - ++ [ - (final.fetchpatch { - name = "fix-handling-inherit-and-patfield-in-inline-assist"; - url = "https://github.com/oxalica/nil/pull/178.patch"; - hash = "sha256-4f7DeWJtt63IyOjqlwzz0f05rv1NBYZO4JWEkFeDimk="; - }) - ]; - } - ); - } + pkg.overrideAttrs (oldAttrs: { + patches = oldAttrs.patches or [ ] ++ [ + (final.fetchpatch { + name = "fix-handling-inherit-and-patfield-in-inline-assist"; + url = "https://github.com/oxalica/nil/pull/178.patch"; + hash = "sha256-4f7DeWJtt63IyOjqlwzz0f05rv1NBYZO4JWEkFeDimk="; + }) + ]; + }); +} diff --git a/nix/overlays/nix-monitored.nix b/nix/overlays/nix-monitored.nix index 91aa2cfd..ee3b06ac 100644 --- a/nix/overlays/nix-monitored.nix +++ b/nix/overlays/nix-monitored.nix @@ -1,12 +1,10 @@ let sources = import ../../npins; in - # The final nix is lix in this case - final: prev: { - nix-monitored = - sources.nix-monitored.asFlake.packages.${final.system}.default - .override { - inherit (final) nix; - withNotify = false; # noisy, spams "command completed" even for nix shells - }; - } +# The final nix is lix in this case +final: prev: { + nix-monitored = sources.nix-monitored.asFlake.packages.${final.system}.default.override { + inherit (final) nix; + withNotify = false; # noisy, spams "command completed" even for nix shells + }; +} diff --git a/nix/overlays/nix-tree.nix b/nix/overlays/nix-tree.nix index 36c30bfe..2fcc6cbf 100644 --- a/nix/overlays/nix-tree.nix +++ b/nix/overlays/nix-tree.nix @@ -3,6 +3,6 @@ let sources = import ../../npins; in - final: _: { - nix-tree = (import sources.nix-tree).packages.${final.system}.default; - } +final: _: { + nix-tree = (import sources.nix-tree).packages.${final.system}.default; +} diff --git a/nix/overlays/nur.nix b/nix/overlays/nur.nix index f0ff694f..e78d54fb 100644 --- a/nix/overlays/nur.nix +++ b/nix/overlays/nur.nix @@ -1,4 +1,4 @@ let sources = import ../../npins; in - sources.nur.asFlake.overlays.default +sources.nur.asFlake.overlays.default diff --git a/nix/overlays/pin-emacs28.nix b/nix/overlays/pin-emacs28.nix index f37787d7..11f1ed50 100644 --- a/nix/overlays/pin-emacs28.nix +++ b/nix/overlays/pin-emacs28.nix @@ -1,6 +1,6 @@ let sources = import ../../npins; in - _: _: { - unsafe-emacs28 = (import sources.pin-emacs28 {}).emacs; - } +_: _: { + unsafe-emacs28 = (import sources.pin-emacs28 { }).emacs; +} diff --git a/nix/overlays/pin-isabelle-2023.nix b/nix/overlays/pin-isabelle-2023.nix index 38a100c5..c5cbab6f 100644 --- a/nix/overlays/pin-isabelle-2023.nix +++ b/nix/overlays/pin-isabelle-2023.nix @@ -1,7 +1,7 @@ let sources = import ../../npins; in - _: _: { - # Isabelle version 2023 - isabelle-2023 = (import sources.pin-isabelle {}).isabelle; - } +_: _: { + # Isabelle version 2023 + isabelle-2023 = (import sources.pin-isabelle { }).isabelle; +} diff --git a/nix/overlays/pin-wireshark.nix b/nix/overlays/pin-wireshark.nix index dd9c800a..e1708117 100644 --- a/nix/overlays/pin-wireshark.nix +++ b/nix/overlays/pin-wireshark.nix @@ -1,8 +1,8 @@ let sources = import ../../npins; in - _: _: { - # Wireshark bug - # https://gitlab.com/wireshark/wireshark/-/issues/19574 - inherit (import sources.pin-wireshark {}) wireshark; - } +_: _: { + # Wireshark bug + # https://gitlab.com/wireshark/wireshark/-/issues/19574 + inherit (import sources.pin-wireshark { }) wireshark; +} diff --git a/nix/overlays/wallpapers.nix b/nix/overlays/wallpapers.nix index b25035b2..759b93ff 100644 --- a/nix/overlays/wallpapers.nix +++ b/nix/overlays/wallpapers.nix @@ -1,7 +1,7 @@ let sources = import ../../npins; in - _: _: rec { - wallpapers_source = sources.wallpapers; - wallpapers = import wallpapers_source {}; - } +_: _: rec { + wallpapers_source = sources.wallpapers; + wallpapers = import wallpapers_source { }; +} diff --git a/nix/overlays/wired-notify.nix b/nix/overlays/wired-notify.nix index 2e158aa5..05831369 100644 --- a/nix/overlays/wired-notify.nix +++ b/nix/overlays/wired-notify.nix @@ -1,4 +1,4 @@ let sources = import ../../npins; in - (import sources.wired-notify).overlays.default +(import sources.wired-notify).overlays.default diff --git a/nix/packages/by-name/ai_blocklist/package.nix b/nix/packages/by-name/ai_blocklist/package.nix index 0a683cbf..ecfd0db0 100644 --- a/nix/packages/by-name/ai_blocklist/package.nix +++ b/nix/packages/by-name/ai_blocklist/package.nix @@ -2,26 +2,27 @@ fetchFromGitHub, stdenvNoCC, lib, -}: let +}: +let rev = "9bb188e2701138e03f73bacebd6b19b181ca0012"; in - stdenvNoCC.mkDerivation { - pname = "ai_blocklist"; - version = "unstable-" + lib.substring 0 8 rev; +stdenvNoCC.mkDerivation { + pname = "ai_blocklist"; + version = "unstable-" + lib.substring 0 8 rev; - src = fetchFromGitHub { - owner = "laylavish"; - repo = "uBlockOrigin-HUGE-AI-Blocklist"; - inherit rev; - hash = "sha256-p3wfR28DH6V8BHn9DT10d09Yq3mdbBecWwlR1CdDYUA="; - }; + src = fetchFromGitHub { + owner = "laylavish"; + repo = "uBlockOrigin-HUGE-AI-Blocklist"; + inherit rev; + hash = "sha256-p3wfR28DH6V8BHn9DT10d09Yq3mdbBecWwlR1CdDYUA="; + }; - installPhase = '' - mkdir -p $out/share - cp noai_hosts.txt $out/share/hosts.txt + installPhase = '' + mkdir -p $out/share + cp noai_hosts.txt $out/share/hosts.txt - # drop domain names - cat $out/share/hosts.txt | - sed 's/^0.0.0.0 //' > $out/share/domains.txt - ''; - } + # drop domain names + cat $out/share/hosts.txt | + sed 's/^0.0.0.0 //' > $out/share/domains.txt + ''; +} diff --git a/nix/packages/by-name/audio-lint/package.nix b/nix/packages/by-name/audio-lint/package.nix index 5f95c4aa..e4aacdf6 100644 --- a/nix/packages/by-name/audio-lint/package.nix +++ b/nix/packages/by-name/audio-lint/package.nix @@ -2,20 +2,24 @@ rustPlatform, fetchFromGitea, }: -rustPlatform.buildRustPackage (finalAttrs: let - cargoToml = fromTOML (builtins.readFile (finalAttrs.src + "/Cargo.toml")); - cargoLock = finalAttrs.src + "/Cargo.lock"; -in { - pname = "audio-lint"; - version = cargoToml.package.version; +rustPlatform.buildRustPackage ( + finalAttrs: + let + cargoToml = fromTOML (builtins.readFile (finalAttrs.src + "/Cargo.toml")); + cargoLock = finalAttrs.src + "/Cargo.lock"; + in + { + pname = "audio-lint"; + version = cargoToml.package.version; - src = fetchFromGitea { - domain = "git.confusedcompiler.org"; - owner = "leana8959"; - repo = "audio-lint"; - rev = "3ea38c85c5f6135958e51ad4ff13a96ccd68a21c"; - hash = "sha256-h1SnWAh3FPL5GweOXVXXtp+swZApgecYaWjy7rM/J+w="; - }; + src = fetchFromGitea { + domain = "git.confusedcompiler.org"; + owner = "leana8959"; + repo = "audio-lint"; + rev = "3ea38c85c5f6135958e51ad4ff13a96ccd68a21c"; + hash = "sha256-h1SnWAh3FPL5GweOXVXXtp+swZApgecYaWjy7rM/J+w="; + }; - cargoLock.lockFile = cargoLock; -}) + cargoLock.lockFile = cargoLock; + } +) diff --git a/nix/packages/by-name/emoji-picker-rs/package.nix b/nix/packages/by-name/emoji-picker-rs/package.nix index 11d2d75c..3e96dc06 100644 --- a/nix/packages/by-name/emoji-picker-rs/package.nix +++ b/nix/packages/by-name/emoji-picker-rs/package.nix @@ -6,29 +6,33 @@ libxcb, fetchFromGitHub, }: -rustPlatform.buildRustPackage (finalAttrs: let - cargoToml = fromTOML (builtins.readFile (finalAttrs.src + "/Cargo.toml")); - cargoLock = finalAttrs.src + "/Cargo.lock"; -in { - pname = "emoji-picker"; - version = cargoToml.package.version; +rustPlatform.buildRustPackage ( + finalAttrs: + let + cargoToml = fromTOML (builtins.readFile (finalAttrs.src + "/Cargo.toml")); + cargoLock = finalAttrs.src + "/Cargo.lock"; + in + { + pname = "emoji-picker"; + version = cargoToml.package.version; - src = fetchFromGitHub { - owner = "leana8959"; - repo = "emoji-picker"; - rev = "d77c086bb3ed1ba55560c5027cc58e2c033c9ca7"; - hash = "sha256-gLsBhtSnrOdU/qH9WR3UnsclfptRAP0Wv+MJjY+wYGc="; - }; + src = fetchFromGitHub { + owner = "leana8959"; + repo = "emoji-picker"; + rev = "d77c086bb3ed1ba55560c5027cc58e2c033c9ca7"; + hash = "sha256-gLsBhtSnrOdU/qH9WR3UnsclfptRAP0Wv+MJjY+wYGc="; + }; - cargoLock.lockFile = cargoLock; + cargoLock.lockFile = cargoLock; - nativeBuildInputs = [ - python3 - pkg-config - ]; + nativeBuildInputs = [ + python3 + pkg-config + ]; - buildInputs = [ - openssl.dev - libxcb - ]; -}) + buildInputs = [ + openssl.dev + libxcb + ]; + } +) diff --git a/nix/packages/by-name/hategroup_blocklist/package.nix b/nix/packages/by-name/hategroup_blocklist/package.nix index 9f320335..d7fb0e86 100644 --- a/nix/packages/by-name/hategroup_blocklist/package.nix +++ b/nix/packages/by-name/hategroup_blocklist/package.nix @@ -2,25 +2,26 @@ fetchFromGitHub, stdenvNoCC, lib, -}: let +}: +let rev = "cc19c050997d5f54014bb20c764b131e003dfb17"; in - stdenvNoCC.mkDerivation { - pname = "hategroup_blocklist"; - version = "unstable-" + lib.substring 0 8 rev; +stdenvNoCC.mkDerivation { + pname = "hategroup_blocklist"; + version = "unstable-" + lib.substring 0 8 rev; - src = fetchFromGitHub { - owner = "chigh"; - repo = "hategroup-dnsbl"; - inherit rev; - hash = "sha256-SZBrjIBUw687MdrbOV7WrP5IhAAtKvPL2GqdcICHNvQ="; - }; + src = fetchFromGitHub { + owner = "chigh"; + repo = "hategroup-dnsbl"; + inherit rev; + hash = "sha256-SZBrjIBUw687MdrbOV7WrP5IhAAtKvPL2GqdcICHNvQ="; + }; - installPhase = '' - mkdir -p $out/share - cp blocklist.txt $out/share/domains.txt + installPhase = '' + mkdir -p $out/share + cp blocklist.txt $out/share/domains.txt - cat $out/share/domains.txt | - sed 's/^\([^#].*\)$/0.0.0.0 \1/' > $out/share/hosts.txt - ''; - } + cat $out/share/domains.txt | + sed 's/^\([^#].*\)$/0.0.0.0 \1/' > $out/share/hosts.txt + ''; +} diff --git a/nix/packages/by-name/hbrainfuck/package.nix b/nix/packages/by-name/hbrainfuck/package.nix index 2236c773..cf4859d3 100644 --- a/nix/packages/by-name/hbrainfuck/package.nix +++ b/nix/packages/by-name/hbrainfuck/package.nix @@ -3,31 +3,26 @@ haskell, fetchFromGitea, installShellFiles, -}: let +}: +let inherit (haskell.lib.compose) justStaticExecutables overrideCabal; - drv = - haskellPackages.callCabal2nix "hbrainfuck" - (fetchFromGitea { - domain = "git.confusedcompiler.org"; - owner = "leana8959"; - repo = "hbrainfuck"; - rev = "5eea5ff0d7efc0bd866a2273686032ba9cab5baa"; - hash = "sha256-/htXOULUJN8+PsAYaG281Ge/9ULZoWip63IUxuVbTSg="; - }) - {}; + drv = haskellPackages.callCabal2nix "hbrainfuck" (fetchFromGitea { + domain = "git.confusedcompiler.org"; + owner = "leana8959"; + repo = "hbrainfuck"; + rev = "5eea5ff0d7efc0bd866a2273686032ba9cab5baa"; + hash = "sha256-/htXOULUJN8+PsAYaG281Ge/9ULZoWip63IUxuVbTSg="; + }) { }; cabalOverrides = o: { - buildTools = o.buildTools or [] ++ [installShellFiles]; - postInstall = - o.postInstall or "" - + '' - installShellCompletion --cmd hbrainfuck \ - --bash <("$out/bin/hbf" --bash-completion-script "$out/bin/hbf") \ - --fish <("$out/bin/hbf" --fish-completion-script "$out/bin/hbf") \ - --zsh <("$out/bin/hbf" --zsh-completion-script "$out/bin/hbf") - ''; + buildTools = o.buildTools or [ ] ++ [ installShellFiles ]; + postInstall = o.postInstall or "" + '' + installShellCompletion --cmd hbrainfuck \ + --bash <("$out/bin/hbf" --bash-completion-script "$out/bin/hbf") \ + --fish <("$out/bin/hbf" --fish-completion-script "$out/bin/hbf") \ + --zsh <("$out/bin/hbf" --zsh-completion-script "$out/bin/hbf") + ''; }; in - justStaticExecutables - (overrideCabal cabalOverrides drv) +justStaticExecutables (overrideCabal cabalOverrides drv) diff --git a/nix/packages/by-name/hutils/package.nix b/nix/packages/by-name/hutils/package.nix index f068bd8c..d5423044 100644 --- a/nix/packages/by-name/hutils/package.nix +++ b/nix/packages/by-name/hutils/package.nix @@ -2,18 +2,16 @@ haskellPackages, haskell, fetchFromGitea, -}: let +}: +let inherit (haskell.lib.compose) justStaticExecutables; - drv = - haskellPackages.callCabal2nix "hutils" - (fetchFromGitea { - domain = "git.confusedcompiler.org"; - owner = "leana8959"; - repo = "hutils"; - rev = "30b503bec011f8908e26c0e1e961936d56da74cc"; - hash = "sha256-lPwqxsz7WXdDMonjdWvTziR5HuE5HY2GyU2rQkwn0VU="; - }) - {}; + drv = haskellPackages.callCabal2nix "hutils" (fetchFromGitea { + domain = "git.confusedcompiler.org"; + owner = "leana8959"; + repo = "hutils"; + rev = "30b503bec011f8908e26c0e1e961936d56da74cc"; + hash = "sha256-lPwqxsz7WXdDMonjdWvTziR5HuE5HY2GyU2rQkwn0VU="; + }) { }; in - justStaticExecutables drv +justStaticExecutables drv diff --git a/nix/packages/by-name/maeel/package.nix b/nix/packages/by-name/maeel/package.nix index 54234d04..0d987aa5 100644 --- a/nix/packages/by-name/maeel/package.nix +++ b/nix/packages/by-name/maeel/package.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation { hash = "sha256-Ee4/N2Q90xsbyGVtpE/yUFWC/ELt8nBAICkR/FlZQOo="; }; - nativeBuildInputs = [rustc]; + nativeBuildInputs = [ rustc ]; installPhase = '' mkdir -p "$out/bin" cp --reflink=auto ./maeel "$out/bin" diff --git a/nix/packages/by-name/necrolib/package.nix b/nix/packages/by-name/necrolib/package.nix index 3c85c9a5..9b8ac1c2 100644 --- a/nix/packages/by-name/necrolib/package.nix +++ b/nix/packages/by-name/necrolib/package.nix @@ -2,27 +2,28 @@ fetchFromGitLab, ocaml-ng, ocamlPackages ? ocaml-ng.ocamlPackages_5_1, -}: let +}: +let version = "v0.16.2"; in - ocamlPackages.buildDunePackage { - pname = "necrolib"; - inherit version; +ocamlPackages.buildDunePackage { + pname = "necrolib"; + inherit version; - minimalOCamlVersion = "5.1.1"; + minimalOCamlVersion = "5.1.1"; - src = fetchFromGitLab { - domain = "gitlab.inria.fr"; - owner = "skeletons"; - repo = "necro"; - rev = version; - hash = "sha256-KoSKJD5jy+GY5QKKMUTW5gc0V/5l/klHrJMdC8aPnj8="; - }; + src = fetchFromGitLab { + domain = "gitlab.inria.fr"; + owner = "skeletons"; + repo = "necro"; + rev = version; + hash = "sha256-KoSKJD5jy+GY5QKKMUTW5gc0V/5l/klHrJMdC8aPnj8="; + }; - duneVersion = "3"; - nativeBuildInputs = [ocamlPackages.menhir]; - buildInputs = [ - ocamlPackages.ocamlgraph - ocamlPackages.dune-build-info - ]; - } + duneVersion = "3"; + nativeBuildInputs = [ ocamlPackages.menhir ]; + buildInputs = [ + ocamlPackages.ocamlgraph + ocamlPackages.dune-build-info + ]; +} diff --git a/nix/packages/by-name/nix-which/package.nix b/nix/packages/by-name/nix-which/package.nix index 896ab411..a33f12b2 100644 --- a/nix/packages/by-name/nix-which/package.nix +++ b/nix/packages/by-name/nix-which/package.nix @@ -2,26 +2,27 @@ writeShellApplication, which, lib, -}: let +}: +let # Use this to not pollute the PATH inside # Otherwise nix-which which will be an edge case whichExe = "${lib.getExe which}"; in - writeShellApplication { - name = "nix-which"; - text = '' - if [ "$#" -ne 1 ]; then - echo "Must provide exactly one argument, the package to be dereferenced" - exit 1 - fi - target="$1" +writeShellApplication { + name = "nix-which"; + text = '' + if [ "$#" -ne 1 ]; then + echo "Must provide exactly one argument, the package to be dereferenced" + exit 1 + fi + target="$1" - target="$(${whichExe} "$target")" - echo "==> $target" + target="$(${whichExe} "$target")" + echo "==> $target" - while [ -L "$target" ]; do - target="$(readlink "$target")" - echo "==> $target" - done - ''; - } + while [ -L "$target" ]; do + target="$(readlink "$target")" + echo "==> $target" + done + ''; +} diff --git a/nix/packages/by-name/prop-solveur/package.nix b/nix/packages/by-name/prop-solveur/package.nix index c9200357..19ec5af4 100644 --- a/nix/packages/by-name/prop-solveur/package.nix +++ b/nix/packages/by-name/prop-solveur/package.nix @@ -3,31 +3,26 @@ haskell, fetchFromGitea, installShellFiles, -}: let +}: +let inherit (haskell.lib.compose) justStaticExecutables overrideCabal; - drv = - haskellPackages.callCabal2nix "prop-solveur" - (fetchFromGitea { - domain = "git.confusedcompiler.org"; - owner = "leana8959"; - repo = "prop_solveur"; - rev = "cc2430dc5a396b01d02bd925070ce5d009d05bc4"; - hash = "sha256-jwNfRBytf/w0d2CWczXp+rVRXYNzptkuFE3OKSdOhLc="; - }) - {}; + drv = haskellPackages.callCabal2nix "prop-solveur" (fetchFromGitea { + domain = "git.confusedcompiler.org"; + owner = "leana8959"; + repo = "prop_solveur"; + rev = "cc2430dc5a396b01d02bd925070ce5d009d05bc4"; + hash = "sha256-jwNfRBytf/w0d2CWczXp+rVRXYNzptkuFE3OKSdOhLc="; + }) { }; cabalOverrides = o: { - buildTools = o.buildTools or [] ++ [installShellFiles]; - postInstall = - o.postInstall or "" - + '' - installShellCompletion --cmd prop-solveur \ - --bash <("$out/bin/prop-solveur" --bash-completion-script "$out/bin/prop-solveur") \ - --fish <("$out/bin/prop-solveur" --fish-completion-script "$out/bin/prop-solveur") \ - --zsh <("$out/bin/prop-solveur" --zsh-completion-script "$out/bin/prop-solveur") - ''; + buildTools = o.buildTools or [ ] ++ [ installShellFiles ]; + postInstall = o.postInstall or "" + '' + installShellCompletion --cmd prop-solveur \ + --bash <("$out/bin/prop-solveur" --bash-completion-script "$out/bin/prop-solveur") \ + --fish <("$out/bin/prop-solveur" --fish-completion-script "$out/bin/prop-solveur") \ + --zsh <("$out/bin/prop-solveur" --zsh-completion-script "$out/bin/prop-solveur") + ''; }; in - justStaticExecutables - (overrideCabal cabalOverrides drv) +justStaticExecutables (overrideCabal cabalOverrides drv) diff --git a/nix/packages/by-name/ruler/package.nix b/nix/packages/by-name/ruler/package.nix index fb88291c..7ab3f55b 100644 --- a/nix/packages/by-name/ruler/package.nix +++ b/nix/packages/by-name/ruler/package.nix @@ -3,31 +3,26 @@ haskell, fetchFromGitea, installShellFiles, -}: let +}: +let inherit (haskell.lib.compose) justStaticExecutables overrideCabal; - drv = - haskellPackages.callCabal2nix "ruler" - (fetchFromGitea { - domain = "git.confusedcompiler.org"; - owner = "leana8959"; - repo = "ruler"; - rev = "f328620a52b25d4c9dea64425afe5995dfb8cb5a"; - hash = "sha256-8nSVFckWXkf9dRTdzjbHRhf/qPdbXHEkVI4DyW3zfSo="; - }) - {}; + drv = haskellPackages.callCabal2nix "ruler" (fetchFromGitea { + domain = "git.confusedcompiler.org"; + owner = "leana8959"; + repo = "ruler"; + rev = "f328620a52b25d4c9dea64425afe5995dfb8cb5a"; + hash = "sha256-8nSVFckWXkf9dRTdzjbHRhf/qPdbXHEkVI4DyW3zfSo="; + }) { }; cabalOverrides = o: { - buildTools = o.buildTools or [] ++ [installShellFiles]; - postInstall = - o.postInstall or "" - + '' - installShellCompletion --cmd ruler \ - --bash <("$out/bin/ruler" --bash-completion-script "$out/bin/ruler") \ - --fish <("$out/bin/ruler" --fish-completion-script "$out/bin/ruler") \ - --zsh <("$out/bin/ruler" --zsh-completion-script "$out/bin/ruler") - ''; + buildTools = o.buildTools or [ ] ++ [ installShellFiles ]; + postInstall = o.postInstall or "" + '' + installShellCompletion --cmd ruler \ + --bash <("$out/bin/ruler" --bash-completion-script "$out/bin/ruler") \ + --fish <("$out/bin/ruler" --fish-completion-script "$out/bin/ruler") \ + --zsh <("$out/bin/ruler" --zsh-completion-script "$out/bin/ruler") + ''; }; in - justStaticExecutables - (overrideCabal cabalOverrides drv) +justStaticExecutables (overrideCabal cabalOverrides drv) diff --git a/nix/packages/by-name/tmux-sessionizer/package.nix b/nix/packages/by-name/tmux-sessionizer/package.nix index e60e8a45..63ebfc67 100644 --- a/nix/packages/by-name/tmux-sessionizer/package.nix +++ b/nix/packages/by-name/tmux-sessionizer/package.nix @@ -6,10 +6,11 @@ gnused, lib, symlinkJoin, -}: let +}: +let tmux-register-session = writeShellApplication { name = "__tmux-register-session"; - runtimeInputs = [tmux]; + runtimeInputs = [ tmux ]; text = '' last=/tmp/TMUX_LAST @@ -27,7 +28,10 @@ tmux-maybe-create = writeShellApplication { name = "__tmux-maybe-create"; - runtimeInputs = [procps tmux]; + runtimeInputs = [ + procps + tmux + ]; text = '' session_name="$1" session_dir="$2" @@ -40,7 +44,7 @@ tmux-attach-or-switch = writeShellApplication { name = "__tmux-attach-or-switch"; - runtimeInputs = [tmux]; + runtimeInputs = [ tmux ]; text = '' session_name="$1" TMUX=''${TMUX:-} @@ -55,7 +59,10 @@ tmux-sessionizer = writeShellApplication { name = "tmux-sessionizer"; - runtimeInputs = [fzf gnused]; + runtimeInputs = [ + fzf + gnused + ]; text = '' selected=$( { @@ -93,12 +100,12 @@ ''; }; in - symlinkJoin { - name = "tmux-sessionizer"; - paths = [ - tmux-register-session - tmux-maybe-create - tmux-attach-or-switch - tmux-sessionizer - ]; - } +symlinkJoin { + name = "tmux-sessionizer"; + paths = [ + tmux-register-session + tmux-maybe-create + tmux-attach-or-switch + tmux-sessionizer + ]; +} diff --git a/nix/packages/by-name/tokei/package.nix b/nix/packages/by-name/tokei/package.nix index fbaee2fc..77399046 100644 --- a/nix/packages/by-name/tokei/package.nix +++ b/nix/packages/by-name/tokei/package.nix @@ -7,29 +7,33 @@ darwin, zlib, }: -rustPlatform.buildRustPackage (finalAttrs: let - cargoToml = fromTOML (builtins.readFile (finalAttrs.src + "/Cargo.toml")); - cargoLock = finalAttrs.src + "/Cargo.lock"; -in { - pname = "tokei"; - version = cargoToml.package.version; +rustPlatform.buildRustPackage ( + finalAttrs: + let + cargoToml = fromTOML (builtins.readFile (finalAttrs.src + "/Cargo.toml")); + cargoLock = finalAttrs.src + "/Cargo.lock"; + in + { + pname = "tokei"; + version = cargoToml.package.version; - src = fetchFromGitHub { - owner = "XAMPPRocky"; - repo = "tokei"; - rev = "v13.0.0-alpha.9"; - hash = "sha256-OSIJYSUwc8SvszEOMgt+d/ljCW2jtBkPw6buof4JpUc="; - }; + src = fetchFromGitHub { + owner = "XAMPPRocky"; + repo = "tokei"; + rev = "v13.0.0-alpha.9"; + hash = "sha256-OSIJYSUwc8SvszEOMgt+d/ljCW2jtBkPw6buof4JpUc="; + }; - cargoLock.lockFile = cargoLock; + cargoLock.lockFile = cargoLock; - buildInputs = lib.optionals stdenv.isDarwin [ - libiconv - darwin.Security - ]; + buildInputs = lib.optionals stdenv.isDarwin [ + libiconv + darwin.Security + ]; - checkInputs = lib.optionals stdenv.isDarwin [zlib]; + checkInputs = lib.optionals stdenv.isDarwin [ zlib ]; - # enable all output formats - buildFeatures = ["all"]; -}) + # enable all output formats + buildFeatures = [ "all" ]; + } +) diff --git a/nix/packages/by-name/typst-bot/package.nix b/nix/packages/by-name/typst-bot/package.nix index 184ac9ab..f7a50b00 100644 --- a/nix/packages/by-name/typst-bot/package.nix +++ b/nix/packages/by-name/typst-bot/package.nix @@ -2,36 +2,37 @@ lib, rustPlatform, fetchFromGitHub, -}: let +}: +let rev = "c9d4b164ff5dc2567bb0de3876460e51da62ba94"; in - rustPlatform.buildRustPackage (finalAttrs: { - pname = "typst-bot"; - version = lib.substring 0 8 rev; +rustPlatform.buildRustPackage (finalAttrs: { + pname = "typst-bot"; + version = lib.substring 0 8 rev; - src = fetchFromGitHub { - owner = "mattfbacon"; - repo = "typst-bot"; - inherit rev; - hash = "sha256-tB+zrE5p7zOloOgoP2fmFsajd4IBf94ET1v/0W3aNcM="; + src = fetchFromGitHub { + owner = "mattfbacon"; + repo = "typst-bot"; + inherit rev; + hash = "sha256-tB+zrE5p7zOloOgoP2fmFsajd4IBf94ET1v/0W3aNcM="; + }; + + preBuild = '' + # Don't use the upstream way of embedding the git rev + echo 'fn main() { println!("cargo:rustc-env=BUILD_SHA=${rev}"); }' > crates/bot/build.rs + + # Patch the command calling the worker by name. + substituteInPlace crates/bot/src/worker.rs --replace-fail \ + '"./worker"' \ + '"${placeholder "out"}/bin/worker"' + ''; + + cargoBuildFlags = [ "--workspace" ]; + + cargoLock = { + lockFile = "${finalAttrs.src}/Cargo.lock"; + outputHashes = { + "poise-0.6.1" = "sha256-iXyp9sR/vzPsexGPdRjfuKyFcGqvDdqiBAXnuw/HFo8="; }; - - preBuild = '' - # Don't use the upstream way of embedding the git rev - echo 'fn main() { println!("cargo:rustc-env=BUILD_SHA=${rev}"); }' > crates/bot/build.rs - - # Patch the command calling the worker by name. - substituteInPlace crates/bot/src/worker.rs --replace-fail \ - '"./worker"' \ - '"${placeholder "out"}/bin/worker"' - ''; - - cargoBuildFlags = ["--workspace"]; - - cargoLock = { - lockFile = "${finalAttrs.src}/Cargo.lock"; - outputHashes = { - "poise-0.6.1" = "sha256-iXyp9sR/vzPsexGPdRjfuKyFcGqvDdqiBAXnuw/HFo8="; - }; - }; - }) + }; +}) diff --git a/nix/packages/by-name/typst-mutilate/package.nix b/nix/packages/by-name/typst-mutilate/package.nix index 1b11b08e..cad4762b 100644 --- a/nix/packages/by-name/typst-mutilate/package.nix +++ b/nix/packages/by-name/typst-mutilate/package.nix @@ -3,27 +3,31 @@ fetchFromGitHub, fetchpatch, }: -rustPlatform.buildRustPackage (finalAttrs: let - cargoToml = fromTOML (builtins.readFile (finalAttrs.src + "/Cargo.toml")); - cargoLock = finalAttrs.src + "/Cargo.lock"; -in { - pname = "typst-mutilate"; - version = cargoToml.package.version; +rustPlatform.buildRustPackage ( + finalAttrs: + let + cargoToml = fromTOML (builtins.readFile (finalAttrs.src + "/Cargo.toml")); + cargoLock = finalAttrs.src + "/Cargo.lock"; + in + { + pname = "typst-mutilate"; + version = cargoToml.package.version; - src = fetchFromGitHub { - owner = "frozolotl"; - repo = "typst-mutilate"; - rev = "9bf5ed1f8a2f91055a91077f0a8545ff1f229933"; - hash = "sha256-r4fkFv1np8xhff3m8yev1rU1vfKRz8zQMIKIc+fOjew="; - }; + src = fetchFromGitHub { + owner = "frozolotl"; + repo = "typst-mutilate"; + rev = "9bf5ed1f8a2f91055a91077f0a8545ff1f229933"; + hash = "sha256-r4fkFv1np8xhff3m8yev1rU1vfKRz8zQMIKIc+fOjew="; + }; - cargoLock.lockFile = cargoLock; + cargoLock.lockFile = cargoLock; - patches = [ - (fetchpatch { - name = "raw-block-fix"; - url = "https://github.com/frozolotl/typst-mutilate/pull/2/commits/223bc31abb2d5fef4e743a1582bb126a2ef47a45.patch"; - hash = "sha256-+6DMQo4cjVASgkX4gcYrEkwQ/uxttV/61fDnXBqbNcg="; - }) - ]; -}) + patches = [ + (fetchpatch { + name = "raw-block-fix"; + url = "https://github.com/frozolotl/typst-mutilate/pull/2/commits/223bc31abb2d5fef4e743a1582bb126a2ef47a45.patch"; + hash = "sha256-+6DMQo4cjVASgkX4gcYrEkwQ/uxttV/61fDnXBqbNcg="; + }) + ]; + } +) diff --git a/nix/packages/by-name/webtoon_downloader/package.nix b/nix/packages/by-name/webtoon_downloader/package.nix index 3ee408c1..c625ab1a 100644 --- a/nix/packages/by-name/webtoon_downloader/package.nix +++ b/nix/packages/by-name/webtoon_downloader/package.nix @@ -44,7 +44,7 @@ python3.pkgs.buildPythonApplication { "rich" ]; - pythonImportsCheck = ["webtoon_downloader"]; + pythonImportsCheck = [ "webtoon_downloader" ]; nativeCheckInputs = with python3.pkgs; [ pytestCheckHook diff --git a/nix/packages/by-name/xbrightness/package.nix b/nix/packages/by-name/xbrightness/package.nix index c2efe449..1977b4fb 100644 --- a/nix/packages/by-name/xbrightness/package.nix +++ b/nix/packages/by-name/xbrightness/package.nix @@ -4,7 +4,7 @@ }: writeShellApplication { name = "xbrightness"; - runtimeInputs = [bc]; + runtimeInputs = [ bc ]; text = '' device=$1 rel=$2 diff --git a/nix/packages/default.nix b/nix/packages/default.nix index 62311f0f..b72b05c0 100644 --- a/nix/packages/default.nix +++ b/nix/packages/default.nix @@ -1,11 +1,12 @@ -{sources ? import ../../npins}: let - scopeOverlay = overlay: final: prev: {export = prev.export or {} // overlay final prev;}; +{ + sources ? import ../../npins, +}: +let + scopeOverlay = overlay: final: prev: { export = prev.export or { } // overlay final prev; }; in - ( - import sources.nixpkgs { - overlays = map scopeOverlay [ - (import ./overlay.nix) - (import ../overlays/iosevka.nix) - ]; - } - ).export +(import sources.nixpkgs { + overlays = map scopeOverlay [ + (import ./overlay.nix) + (import ../overlays/iosevka.nix) + ]; +}).export diff --git a/nix/packages/overlay.nix b/nix/packages/overlay.nix index 2b635dc2..5ab57ec9 100644 --- a/nix/packages/overlay.nix +++ b/nix/packages/overlay.nix @@ -1,7 +1,7 @@ -final: prev: let +final: prev: +let inherit (prev) lib; in - lib.mapAttrs (name: _: final.callPackage (./by-name + "/${name}/package.nix") {}) - ( - lib.filterAttrs (_: type: type == "directory") (builtins.readDir ./by-name) - ) +lib.mapAttrs (name: _: final.callPackage (./by-name + "/${name}/package.nix") { }) ( + lib.filterAttrs (_: type: type == "directory") (builtins.readDir ./by-name) +) diff --git a/nix/secrets/secrets.nix b/nix/secrets/secrets.nix index 311e3b60..2ac15506 100644 --- a/nix/secrets/secrets.nix +++ b/nix/secrets/secrets.nix @@ -1,6 +1,7 @@ let all = import ../identities.nix; -in { +in +{ "wpa_password.age".publicKeys = all; "restic_backblaze_pwd.age".publicKeys = all; diff --git a/npins/default.nix b/npins/default.nix index 78ca0251..850b02ae 100644 --- a/npins/default.nix +++ b/npins/default.nix @@ -1,11 +1,11 @@ /* -This file is provided under the MIT licence: + This file is provided under the MIT licence: -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ # Generated by npins. Do not modify; will be overwritten regularly let @@ -13,10 +13,8 @@ let version = data.version; # https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/lists.nix#L295 - range = first: last: - if first > last - then [] - else builtins.genList (n: first + n) (last - first + 1); + range = + first: last: if first > last then [ ] else builtins.genList (n: first + n) (last - first + 1); # https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/strings.nix#L257 stringToCharacters = s: map (p: builtins.substring p 1 s) (range 0 (builtins.stringLength s - 1)); @@ -29,137 +27,142 @@ let # If the environment variable NPINS_OVERRIDE_${name} is set, then use # the path directly as opposed to the fetched source. # (Taken from Niv for compatibility) - mayOverride = name: path: let - envVarName = "NPINS_OVERRIDE_${saneName}"; - saneName = stringAsChars (c: - if (builtins.match "[a-zA-Z0-9]" c) == null - then "_" - else c) - name; - ersatz = builtins.getEnv envVarName; - in - if ersatz == "" - then path + mayOverride = + name: path: + let + envVarName = "NPINS_OVERRIDE_${saneName}"; + saneName = stringAsChars (c: if (builtins.match "[a-zA-Z0-9]" c) == null then "_" else c) name; + ersatz = builtins.getEnv envVarName; + in + if ersatz == "" then + path else # this turns the string into an actual Nix path (for both absolute and # relative paths) builtins.trace "Overriding path of \"${name}\" with \"${ersatz}\" due to set \"${envVarName}\"" ( - if builtins.substring 0 1 ersatz == "/" - then /. + ersatz - else /. + builtins.getEnv "PWD" + "/${ersatz}" + if builtins.substring 0 1 ersatz == "/" then + /. + ersatz + else + /. + builtins.getEnv "PWD" + "/${ersatz}" ); - mkSource = name: spec: - assert spec ? type; let + mkSource = + name: spec: + assert spec ? type; + let path = - if spec.type == "Git" - then mkGitSource spec - else if spec.type == "GitRelease" - then mkGitSource spec - else if spec.type == "PyPi" - then mkPyPiSource spec - else if spec.type == "Channel" - then mkChannelSource spec - else if spec.type == "Tarball" - then mkTarballSource spec - else builtins.throw "Unknown source type ${spec.type}"; + if spec.type == "Git" then + mkGitSource spec + else if spec.type == "GitRelease" then + mkGitSource spec + else if spec.type == "PyPi" then + mkPyPiSource spec + else if spec.type == "Channel" then + mkChannelSource spec + else if spec.type == "Tarball" then + mkTarballSource spec + else + builtins.throw "Unknown source type ${spec.type}"; in - spec - // rec { - outPath = mayOverride name path; + spec + // rec { + outPath = mayOverride name path; - # Waiting for discussion upstream - # https://github.com/andir/npins/issues/159 - asFlake = - if sources ? flake-compat - then (import sources.flake-compat {src = outPath;}).outputs - else throw ".asFlake needs flake-compat as a source"; - }; + # Waiting for discussion upstream + # https://github.com/andir/npins/issues/159 + asFlake = + if sources ? flake-compat then + (import sources.flake-compat { src = outPath; }).outputs + else + throw ".asFlake needs flake-compat as a source"; + }; - mkGitSource = { - repository, - revision, - url ? null, - submodules, - hash, - branch ? null, - ... - }: + mkGitSource = + { + repository, + revision, + url ? null, + submodules, + hash, + branch ? null, + ... + }: assert repository ? type; # At the moment, either it is a plain git repository (which has an url), or it is a GitHub/GitLab repository # In the latter case, there we will always be an url to the tarball - if url != null && !submodules - then - builtins.fetchTarball { - inherit url; - sha256 = hash; # FIXME: check nix version & use SRI hashes - } - else let + if url != null && !submodules then + builtins.fetchTarball { + inherit url; + sha256 = hash; # FIXME: check nix version & use SRI hashes + } + else + let url = - if repository.type == "Git" - then repository.url - else if repository.type == "GitHub" - then "https://github.com/${repository.owner}/${repository.repo}.git" - else if repository.type == "GitLab" - then "${repository.server}/${repository.repo_path}.git" - else throw "Unrecognized repository type ${repository.type}"; - urlToName = url: rev: let - matched = builtins.match "^.*/([^/]*)(\\.git)?$" url; + if repository.type == "Git" then + repository.url + else if repository.type == "GitHub" then + "https://github.com/${repository.owner}/${repository.repo}.git" + else if repository.type == "GitLab" then + "${repository.server}/${repository.repo_path}.git" + else + throw "Unrecognized repository type ${repository.type}"; + urlToName = + url: rev: + let + matched = builtins.match "^.*/([^/]*)(\\.git)?$" url; - short = builtins.substring 0 7 rev; + short = builtins.substring 0 7 rev; - appendShort = - if (builtins.match "[a-f0-9]*" rev) != null - then "-${short}" - else ""; - in "${ - if matched == null - then "source" - else builtins.head matched - }${appendShort}"; + appendShort = if (builtins.match "[a-f0-9]*" rev) != null then "-${short}" else ""; + in + "${if matched == null then "source" else builtins.head matched}${appendShort}"; name = urlToName url revision; in - builtins.fetchGit { - rev = revision; - inherit name; - # hash = hash; - inherit url submodules; - }; + builtins.fetchGit { + rev = revision; + inherit name; + # hash = hash; + inherit url submodules; + }; - mkPyPiSource = { - url, - hash, - ... - }: + mkPyPiSource = + { + url, + hash, + ... + }: builtins.fetchurl { inherit url; sha256 = hash; }; - mkChannelSource = { - url, - hash, - ... - }: + mkChannelSource = + { + url, + hash, + ... + }: builtins.fetchTarball { inherit url; sha256 = hash; }; - mkTarballSource = { - url, - locked_url ? url, - hash, - ... - }: + mkTarballSource = + { + url, + locked_url ? url, + hash, + ... + }: builtins.fetchTarball { url = locked_url; sha256 = hash; }; sources = - if version == 5 - then builtins.mapAttrs mkSource data.pins - else throw "Unsupported format version ${toString version} in sources.json. Try running `npins upgrade`"; + if version == 5 then + builtins.mapAttrs mkSource data.pins + else + throw "Unsupported format version ${toString version} in sources.json. Try running `npins upgrade`"; in - sources +sources diff --git a/shell.nix b/shell.nix index 292dd1f7..26e3e073 100644 --- a/shell.nix +++ b/shell.nix @@ -1,30 +1,31 @@ { sources ? import ./npins, - pkgs ? - import sources.nixpkgs { - overlays = map import [ - ./nix/overlays/disko.nix - ]; - }, + pkgs ? import sources.nixpkgs { + overlays = map import [ + ./nix/overlays/disko.nix + ]; + }, withGHC ? false, -}: let +}: +let inherit (pkgs) lib; in - pkgs.mkShell { - packages = with pkgs; - [ - just - jq - npins - disko - ] - ++ lib.optionals withGHC [ - (haskellPackages.ghcWithPackages (self: [ - self.xmonad-contrib - self.xmonad-extras - self.xmobar - ])) - haskell-language-server - cabal-install - ]; - } +pkgs.mkShell { + packages = + with pkgs; + [ + just + jq + npins + disko + ] + ++ lib.optionals withGHC [ + (haskellPackages.ghcWithPackages (self: [ + self.xmonad-contrib + self.xmonad-extras + self.xmobar + ])) + haskell-language-server + cabal-install + ]; +} From fe52691061eeb30dbde40771d33fd676ad8690b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sat, 8 Nov 2025 10:17:14 +0800 Subject: [PATCH 057/178] gitblame ignore nixfmt --- .git-blame-ignore-revs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index 249934f5..3b969a4c 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -7,3 +7,6 @@ e91471432f7b7e3e5cb6cdb245819998d6653b5e # Reformat with stylua 94ab5d51f10e609cee0159636c29cd404e3a6570 + +# Reformat with nixfmt +ebf84688079b537b3a34a7f5decdf30e165b7933 From 9e79cd2347a9b2bec300aea4fffc097f56ec6d97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sat, 8 Nov 2025 10:20:00 +0800 Subject: [PATCH 058/178] nvim/haskell: smartindent should be scoped to buffer --- .config/nvim/ftplugin/haskell.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/nvim/ftplugin/haskell.lua b/.config/nvim/ftplugin/haskell.lua index ee1dba9a..ddc57c09 100644 --- a/.config/nvim/ftplugin/haskell.lua +++ b/.config/nvim/ftplugin/haskell.lua @@ -5,4 +5,4 @@ vim.bo.shiftwidth = 2 vim.bo.expandtab = true -- useful for CPP extension -vim.o.smartindent = true +vim.bo.smartindent = true From a9701f83b30711e1d37a7dd88d17d8d8df3ff70c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sat, 8 Nov 2025 10:46:06 +0800 Subject: [PATCH 059/178] npins: update sources --- npins/sources.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/npins/sources.json b/npins/sources.json index c25c916a..edba230d 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -187,9 +187,9 @@ }, "branch": "master", "submodules": false, - "revision": "7467f155fcba189eb088a7601f44fbef7688669b", - "url": "https://github.com/NixOS/nixos-hardware/archive/7467f155fcba189eb088a7601f44fbef7688669b.tar.gz", - "hash": "04rpy1nq8bmxbrbqjq0ghvnvmnqay4l2vwncimw0zb6rdnhdxldc" + "revision": "52113c4f5cfd1e823001310e56d9c8d0699a6226", + "url": "https://github.com/NixOS/nixos-hardware/archive/52113c4f5cfd1e823001310e56d9c8d0699a6226.tar.gz", + "hash": "10gxzv78vk2sy4qwxc9ijbp3pssfnf4iwixvb7kkcggrk0dndzc6" }, "nixpkgs": { "type": "Git", @@ -200,9 +200,9 @@ }, "branch": "nixos-25.05-small", "submodules": false, - "revision": "0257fc3c4a1ba60fb2a9d19c2915e7315bad41db", - "url": "https://github.com/NixOS/nixpkgs/archive/0257fc3c4a1ba60fb2a9d19c2915e7315bad41db.tar.gz", - "hash": "18f5jn4wm3g1alfv168bg2xk9zidp0826x4d149li9bljjnp1j29" + "revision": "8660acf86a1f5a14dacf049f9a5b8aff143e9111", + "url": "https://github.com/NixOS/nixpkgs/archive/8660acf86a1f5a14dacf049f9a5b8aff143e9111.tar.gz", + "hash": "0y3l82414w0h1bvh63630irqxj139al479j49r6z4d1p86ygjkzm" }, "nur": { "type": "Git", @@ -213,9 +213,9 @@ }, "branch": "main", "submodules": false, - "revision": "213fb0b7a376c1c901c0d0779a0a8e5985868c42", - "url": "https://github.com/nix-community/nur/archive/213fb0b7a376c1c901c0d0779a0a8e5985868c42.tar.gz", - "hash": "0503ipivmx0nxm11vbzkpfzn2v7ng19s9zb17a2ipnfr0kkj78p9" + "revision": "e7b4921cad8b7492ab9c441bda269be625bd2acc", + "url": "https://github.com/nix-community/nur/archive/e7b4921cad8b7492ab9c441bda269be625bd2acc.tar.gz", + "hash": "1yya5jag6gvcxrajc24hz9zisxygabfjr2r86jgadyjykv0dm3s8" }, "pin-emacs28": { "type": "Git", From 5fa1113757a6eb7ad4bc7dbfd51893b25c038dca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sat, 8 Nov 2025 12:20:13 +0800 Subject: [PATCH 060/178] hydrogen: remove leftovers from vanadium --- nix/configurations/hydrogen.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/nix/configurations/hydrogen.nix b/nix/configurations/hydrogen.nix index 8db8304c..f26705ea 100644 --- a/nix/configurations/hydrogen.nix +++ b/nix/configurations/hydrogen.nix @@ -122,7 +122,6 @@ in # Extern modules # (sources.agenix + "/modules/age-home.nix") - (import sources.wired-notify).homeManagerModules.default ]; } From fb1f6624f9aa06b0aa510c48351e93823ca4697f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sat, 8 Nov 2025 05:50:00 +0100 Subject: [PATCH 061/178] hetzner_benchmark: init (#21) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-on: https://codeberg.org/leana8959/.files/pulls/21 Co-authored-by: Léana 江 Co-committed-by: Léana 江 --- README.md | 24 ++++ default.nix | 6 + nix/configurations/hetzner_benchmark.nix | 111 ++++++++++++++++++ .../hetzner_benchmark/home/dev.nix | 23 ++++ .../hetzner_benchmark/home/programs.nix | 54 +++++++++ .../nixos/hardware-configuration.nix | 35 ++++++ .../hetzner_benchmark/nixos/misc.nix | 13 ++ nix/disko/hetzner_benchmark/ext4.nix | 37 ++++++ nix/disko/hetzner_benchmark/raid.nix | 93 +++++++++++++++ shell.nix | 3 +- 10 files changed, 398 insertions(+), 1 deletion(-) create mode 100644 nix/configurations/hetzner_benchmark.nix create mode 100644 nix/configurations/hetzner_benchmark/home/dev.nix create mode 100644 nix/configurations/hetzner_benchmark/home/programs.nix create mode 100644 nix/configurations/hetzner_benchmark/nixos/hardware-configuration.nix create mode 100644 nix/configurations/hetzner_benchmark/nixos/misc.nix create mode 100644 nix/disko/hetzner_benchmark/ext4.nix create mode 100644 nix/disko/hetzner_benchmark/raid.nix diff --git a/README.md b/README.md index 7da3091b..e89685ac 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,30 @@ The `(modulesPath + "/installer/sd-card/sd-image-aarch64.nix")` allows this. - profit +## Hetzner, nixos-anywhere +References: +- +- + +I haven't figured out how to use raid on this machine, as it failed half-way +through the installer when I used the raid configuration. + +### Pitfalls +- nixos-anywhere will wipe the disk, even if you use the flag `--generate-hardware-config`. + +- The command is quite long and isn't non-flake friendly. + Note that the diskoScript has to come before toplevel derivation. + Read more on the order . + ```fish + nixos-anywhere \ + --generate-hardware-config nixos-generate-config ./hardware-configuration.nix \ + -i \ + --store-paths $(nix-build --no-out-link \ + -A nixosConfigurations.hetzner_benchmark.config.system.build.diskoScript \ + -A nixosConfigurations.hetzner_benchmark.config.system.build.toplevel) \ + @ + ``` + # Pitfalls ## `users.mutableUsers` NEVER set this to true without declaratively setting the passwords. diff --git a/default.nix b/default.nix index ccf69117..729c5d87 100644 --- a/default.nix +++ b/default.nix @@ -21,6 +21,12 @@ system = "x86_64-linux"; modules = [ ./nix/configurations/installer.nix ]; }; + + # Not mine, rented on hetzner + hetzner_benchmark = { + system = "x86_64-linux"; + modules = [ ./nix/configurations/hetzner_benchmark.nix ]; + }; }; packages = import ./nix/packages { inherit sources; }; diff --git a/nix/configurations/hetzner_benchmark.nix b/nix/configurations/hetzner_benchmark.nix new file mode 100644 index 00000000..6664da7d --- /dev/null +++ b/nix/configurations/hetzner_benchmark.nix @@ -0,0 +1,111 @@ +# The hetzner machine rented to benchmark the cabal comment parser +let + sources = import ../../npins; + + hostname = "hetzner_benchmark"; + username = "leana"; +in +{ + pkgs, + config, + lib, + ... +}: +let + inherit (lib.modules) mkAliasOptionModule; +in +{ + imports = [ + # + # Shorthands + # + (mkAliasOptionModule [ "me" ] [ "users" "users" username ]) + (mkAliasOptionModule [ "hm" ] [ "home-manager" "users" username ]) + + # + # hostname + # + { _module.args = { inherit hostname; }; } + + # + # nixpkgs + # + { + nixpkgs = { + overlays = map import [ + ../packages/overlay.nix + + # use lix everywhere and wrap it with nom + ../overlays/lix.nix + ../overlays/nix-monitored.nix + ]; + + # Set NIX_PATH and flake registry at the same time + # https://github.com/NixOS/nixpkgs/pull/254405 + flake.source = sources.nixpkgs; + }; + + nix.package = pkgs.nix-monitored; + + system.nixos.version = lib.substring 0 8 sources.nixpkgs.revision; + } + + ./hetzner_benchmark/nixos/hardware-configuration.nix + ./hetzner_benchmark/nixos/misc.nix + + ../nixosModules/common/fish.nix + ../nixosModules/common/disable-command-not-found.nix + ../nixosModules/common/network.nix + ../nixosModules/common/sudo-conf.nix + ../nixosModules/common/system-nixconf.nix + + ../nixosModules/extra/leana.nix + + # + # Extern modules + # + (sources.disko + "/module.nix") + ../disko/hetzner_benchmark/ext4.nix + + # + # home-manager + # + (sources.home-manager + "/nixos") + { + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + sharedModules = [ { home.stateVersion = lib.mkDefault config.system.stateVersion; } ]; + }; + + hm.imports = [ + # + # hostname + # + { _module.args = { inherit hostname; }; } + + # + # home modules + # + ./hetzner_benchmark/home/programs.nix + ./hetzner_benchmark/home/dev.nix + + ../homeModules/common/btop + ../homeModules/common/fish + ../homeModules/common/starship + ../homeModules/common/fzf.nix + ../homeModules/common/tmux + ../homeModules/common/vim + ../homeModules/common/direnv.nix + ../homeModules/common/git.nix + ../homeModules/common/gpg.nix + ../homeModules/common/leana.nix + ../homeModules/common/locale.nix + ../homeModules/common/packages.nix + ../homeModules/common/tealdeer.nix + + ../homeModules/extra/tmux-fish-integration.nix + ]; + } + ]; +} diff --git a/nix/configurations/hetzner_benchmark/home/dev.nix b/nix/configurations/hetzner_benchmark/home/dev.nix new file mode 100644 index 00000000..1a816999 --- /dev/null +++ b/nix/configurations/hetzner_benchmark/home/dev.nix @@ -0,0 +1,23 @@ +{ + programs.git = { + enable = true; + signing.signByDefault = false; # no need to setup the key + }; + + programs.gpg.enable = true; + + nix = { + settings = { + extra-substituters = [ + "https://ghc-nix.cachix.org" + "https://haskell-language-server.cachix.org" + "https://cache.iog.io" + ]; + extra-trusted-public-keys = [ + "ghc-nix.cachix.org-1:ziC/I4BPqeA4VbtOFpFpu6D1t6ymFvRWke/lc2+qjcg=" + "haskell-language-server.cachix.org-1:juFfHrwkOxqIOZShtC4YC1uT1bBcq2RSvC7OMKx0Nz8=" + "hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" + ]; + }; + }; +} diff --git a/nix/configurations/hetzner_benchmark/home/programs.nix b/nix/configurations/hetzner_benchmark/home/programs.nix new file mode 100644 index 00000000..edd900cd --- /dev/null +++ b/nix/configurations/hetzner_benchmark/home/programs.nix @@ -0,0 +1,54 @@ +# TODO: remove some packages for this machine +{ + pkgs, + lib, + config, + ... +}: +{ + home.sessionVariables = + let + fishCfg = config.programs.fish; + in + { + "SHELL" = lib.mkIf fishCfg.enable (lib.getExe fishCfg.package); + }; + + home.packages = [ + pkgs.stow + pkgs.zip + pkgs.unzip + pkgs.gnutar + pkgs.p7zip + pkgs.bc + pkgs.dig + pkgs.hutils + + # pretty tui tools + pkgs.du-dust + pkgs.tokei + pkgs.hyperfine + pkgs.watchexec + pkgs.onefetch + pkgs.just + ]; + + programs = { + neovim = { + enable = true; + defaultEditor = true; + }; + lazygit.enable = true; + fish.enable = true; + starship.enable = true; + tmux.enable = true; + direnv.enable = true; + ripgrep.enable = true; + + btop.enable = true; + }; + + services = { + gpg-agent.enable = true; + }; +} diff --git a/nix/configurations/hetzner_benchmark/nixos/hardware-configuration.nix b/nix/configurations/hetzner_benchmark/nixos/hardware-configuration.nix new file mode 100644 index 00000000..2066ce8f --- /dev/null +++ b/nix/configurations/hetzner_benchmark/nixos/hardware-configuration.nix @@ -0,0 +1,35 @@ +# 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, + ... +}: + +{ + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ + "xhci_pci" + "ahci" + "nvme" + ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + # 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.enp41s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/nix/configurations/hetzner_benchmark/nixos/misc.nix b/nix/configurations/hetzner_benchmark/nixos/misc.nix new file mode 100644 index 00000000..d83a0e7b --- /dev/null +++ b/nix/configurations/hetzner_benchmark/nixos/misc.nix @@ -0,0 +1,13 @@ +{ + boot.loader.grub.enable = true; + + services.openssh.enable = true; + + users.users = { + "root".openssh.authorizedKeys.keys = import ../../../identities.nix ++ [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFza3UN1gWQqh//FkJBzmssQ4lxHdllQGfqPHzG4LQI8 benchmark-machine" + ]; + }; + + system.stateVersion = "25.05"; +} diff --git a/nix/disko/hetzner_benchmark/ext4.nix b/nix/disko/hetzner_benchmark/ext4.nix new file mode 100644 index 00000000..1bd10ef0 --- /dev/null +++ b/nix/disko/hetzner_benchmark/ext4.nix @@ -0,0 +1,37 @@ +{ + disko.devices = { + disk = { + main = { + type = "disk"; + device = "/dev/nvme1n1"; + content = { + type = "gpt"; + partitions = { + boot = { + size = "1M"; + type = "EF02"; + priority = 1; + }; + ESP = { + size = "512M"; + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + }; + }; + root = { + size = "100%"; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; + }; + }; + }; + }; + }; + }; + }; +} diff --git a/nix/disko/hetzner_benchmark/raid.nix b/nix/disko/hetzner_benchmark/raid.nix new file mode 100644 index 00000000..c6ed68d5 --- /dev/null +++ b/nix/disko/hetzner_benchmark/raid.nix @@ -0,0 +1,93 @@ +# I can't get this working for now :( +# Only nvme1n1 is detected in the installer environment +{ + disko.devices = { + disk = { + one = { + type = "disk"; + device = "/dev/nvme0n1"; + content = { + type = "gpt"; + partitions = { + BOOT = { + size = "1M"; + type = "EF02"; # for grub MBR + }; + ESP = { + size = "500M"; + type = "EF00"; + content = { + type = "mdraid"; + name = "boot"; + }; + }; + mdadm = { + size = "100%"; + content = { + type = "mdraid"; + name = "raid1"; + }; + }; + }; + }; + }; + two = { + type = "disk"; + device = "/dev/nvme1n1"; + content = { + type = "gpt"; + partitions = { + boot = { + size = "1M"; + type = "EF02"; # for grub MBR + }; + ESP = { + size = "500M"; + type = "EF00"; + content = { + type = "mdraid"; + name = "boot"; + }; + }; + mdadm = { + size = "100%"; + content = { + type = "mdraid"; + name = "raid1"; + }; + }; + }; + }; + }; + }; + + mdadm = { + boot = { + type = "mdadm"; + level = 1; + metadata = "1.0"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = [ "umask=0077" ]; + }; + }; + raid1 = { + type = "mdadm"; + level = 1; + content = { + type = "gpt"; + partitions.primary = { + size = "100%"; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; + }; + }; + }; + }; + }; + }; +} diff --git a/shell.nix b/shell.nix index 26e3e073..d11a2fa5 100644 --- a/shell.nix +++ b/shell.nix @@ -17,7 +17,8 @@ pkgs.mkShell { just jq npins - disko + nixos-anywhere # comes from nixpkgs + disko # comes from disko flake ] ++ lib.optionals withGHC [ (haskellPackages.ghcWithPackages (self: [ From eb9e56786502403e72bc5eda89dcc4ac801f16b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sat, 8 Nov 2025 12:31:26 +0800 Subject: [PATCH 062/178] hydrogen: remove tools I might won't use --- nix/configurations/hydrogen/home/dev.nix | 1 - nix/configurations/hydrogen/home/programs.nix | 22 ++++++------------- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/nix/configurations/hydrogen/home/dev.nix b/nix/configurations/hydrogen/home/dev.nix index 28a2d449..1d38b35c 100644 --- a/nix/configurations/hydrogen/home/dev.nix +++ b/nix/configurations/hydrogen/home/dev.nix @@ -1,7 +1,6 @@ { pkgs, ... }: { home.packages = [ - pkgs.nil # nix pkgs.pyright # python ]; diff --git a/nix/configurations/hydrogen/home/programs.nix b/nix/configurations/hydrogen/home/programs.nix index 1f2da428..67651b85 100644 --- a/nix/configurations/hydrogen/home/programs.nix +++ b/nix/configurations/hydrogen/home/programs.nix @@ -24,23 +24,15 @@ pkgs.dig pkgs.hutils pkgs.miniserve - pkgs.agenix pkgs.nix-which - # pretty tui tools - pkgs.du-dust - pkgs.tokei - pkgs.hyperfine - pkgs.watchexec - pkgs.onefetch - pkgs.just - - # nix tools - pkgs.alejandra - pkgs.nurl - pkgs.npins - pkgs.nix-tree - pkgs.nh + # # pretty tui tools + # pkgs.du-dust + # pkgs.tokei + # pkgs.hyperfine + # pkgs.watchexec + # pkgs.onefetch + # pkgs.just ]; programs = { From efdba54fc475c2d584982c2cbed2a6f24dc1668a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sat, 8 Nov 2025 12:36:57 +0800 Subject: [PATCH 063/178] age: update sshconfig --- nix/secrets/sshconfig.age | Bin 975 -> 923 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/nix/secrets/sshconfig.age b/nix/secrets/sshconfig.age index 75bd6ee3f8e4771e56de40f497fe3bbea9845184..a243b8b1b5a451ded90e4f909572017245aa616a 100644 GIT binary patch delta 881 zcmZY2>u(bU003~copqG}31K`8;i6kKYrDI)*XvaT*Z2BZAGhn%Iqda%*WR_)>s_xe zgPjj%A}qLp%U~rwASCi(h9RI|I>ASb#5lts%LE!RMZv|8jPSulF!8Iuf8h6%Vn*?P z&xkQ!W~Cs2l%gRD#!F60;!vIBABqLyZpQ9r!tQ8Q3X)~a3gSld5EX%yj%1Cf=HY~i zp2C;#pWr zfd+xcU}XVjNDv%EBLe8N*aHIP;7pLH;!tD8#pM!%-XKpAg_I?lgZ|f%Ze)-K7}A5P zq>@W4Gbj{Kg`t>DvYDB%U@2i)DHq0rbrQ|{0#%~SDtVhD$p$f@kQ3QrG7_qY{>V@; zWRUDILgFrKi1AvH1Spi8|8+)96f-|>*3d#KA*O)W)jXsvzMunqa5A=UfDr*!iI)-D zAK~JatFrhwDbDVj)?aA&mi|YRW<>G^2{wvSilh(@{FR za;|l9M*N|D{MlA?a_*G_2fIvfo;vpM_r`ZGx4!+z|Jjqb&P%&49i7^C`9Wj%HQ?I9 z%5PJl{_F0=us$(*aoUfxzPvT|RYCUQm8rc_H{H=Z)`_jQn;Qx*`B)Hf}xmYI}Khe@EBE`ibk`@APcFGyZeqy*1|a1>^CXo9tsB+tm6a z^NNc*-dSE<`K$59vf<`p_|y&J{-x=Gj_iiXr7kIAnQtB~vlrymU%x)Ta2m;Jk<{D7 zVaNFNX1SMJ+dbU-OLkq8+<8Sq)|Cr=`MX#9Cb$RB$@)F=t8dL#@1FRlQ});%`M!JF zXK4A1+O;jMZ;IoKeT_={#-D44W_wnw=Y&maX?FY5w|BI9+o8|j9p>-fp8H_^aRKa;?Cgyto*X+Z!ACh)MRVqizDayw&@g?yRO~Zt?S3y z^%4(}7fc`*K<*&-pvFre2$D-cR`!9M94R9YcIt*3e^jmL^mEEVT@$t^>kU66DJ;|12%2HXxrL}@lvBovYn=u27D!(iqw2{UiFe> zC!Zxp81!Gz6APl&G2>=AmPs2;E25Uux-IKYFg1) z2@9n&yp+;)-OICtp}2sGQ7sLY>*lChieoOTjoZx{EEa>fBFBSWO5?hAH&pOg8hL#4 z2bSrc|{gP@mXd8FEsfHaxbG8FFDD z;UsJ&AD5!8LIeX*Rd8H~iZw_og}5YSW)oyKH*Te!e931wEH?!^cqv`?=ur}<11Q7- zrA{7ld8BT{T7u`$vdb0=aFdWYj>fV&s;NTD*T!1;WYK{|3mO-DLaY`RY7kNl(ojMJ z5;)-Z`@uHu;{&;-8Xy=d5Wt<5KB6$;(kSk@fgT%2TIEK}PAKJwfdHom7N2sT89WJm z^<8C#U%mU2&9|*vSw$@2W#XOGRdqL(hChgW|0@7}*^`ttfmpZz(z>ihZYJ3IZe%!5UE z>a;+-bY<>7s$V@(JT(md)FXp}lE1_D0*^~Zl&651) qt^0eJU-v&+=vJ;Bhju%n1d_*_kNk&*FGo>^-%|wcl`sSP;IyX From 156181fc145c0472e7b7e2d47139b6097d4e0933 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sat, 8 Nov 2025 21:47:39 +0800 Subject: [PATCH 064/178] nvim/lazy: latex plugin --- .config/nvim/lazy-lock.json | 3 ++- .config/nvim/lua/_lazy.lua | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index 3a97f25e..52f9c7f9 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -38,5 +38,6 @@ "vim-fugitive": { "branch": "master", "commit": "61b51c09b7c9ce04e821f6cf76ea4f6f903e3cf4" }, "vim-repeat": { "branch": "master", "commit": "65846025c15494983dafe5e3b46c8f88ab2e9635" }, "vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" }, - "vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" } + "vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" }, + "vimtex": { "branch": "master", "commit": "2e1bbabeb2c34bb17d7bc8cfdf8f95b16dd0db0c" } } diff --git a/.config/nvim/lua/_lazy.lua b/.config/nvim/lua/_lazy.lua index 3b2e9541..9e228094 100644 --- a/.config/nvim/lua/_lazy.lua +++ b/.config/nvim/lua/_lazy.lua @@ -114,6 +114,12 @@ local plugins = { }, -- The haskell lexer "vim-scripts/alex.vim", + { + -- https://github.com/lervag/vimtex#lazynvim + "lervag/vimtex", + lazy = false, + version = "^2", + }, { "nvim-telescope/telescope.nvim", branch = "0.1.x", From eac1c86fe88e33ec584f1b9f5b560d09104fe836 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sun, 9 Nov 2025 09:01:13 +0800 Subject: [PATCH 065/178] vanadium/display: add language comments This helps neovim to syntax highlight the code --- nix/configurations/vanadium/nixos/display.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nix/configurations/vanadium/nixos/display.nix b/nix/configurations/vanadium/nixos/display.nix index cccc8ef2..43e9f953 100644 --- a/nix/configurations/vanadium/nixos/display.nix +++ b/nix/configurations/vanadium/nixos/display.nix @@ -69,7 +69,7 @@ device, # obtain with `xrandr` brightness, # [0..1] }: - singleton "10_xrandr_brightness" '' + singleton "10_xrandr_brightness" /* bash */ '' ${lib.getExe pkgs.xorg.xrandr} --output ${device} --brightness ${toString brightness} ''; @@ -79,7 +79,7 @@ modelName, # obtain with `ddcutil detect` brightness, # [0..1] }: - singleton "10_ddc_brightness" '' + singleton "10_ddc_brightness" /* bash */ '' ${lib.getExe pkgs.ddcutil} --model ${modelName} setvcp 10 ${ toString (builtins.floor (brightness * 100)) } @@ -90,7 +90,7 @@ modelName, # obtain with `ddcutil detect` contrast, # [0..1] }: - singleton "10_ddc_contrast" '' + singleton "10_ddc_contrast" /* bash */ '' ${lib.getExe pkgs.ddcutil} --model ${modelName} setvcp 12 ${ toString (builtins.floor (contrast * 100)) } From 29c4ca1a8122f5bd120febb010ace1b3bf0d7ab8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sun, 9 Nov 2025 23:05:20 +0800 Subject: [PATCH 066/178] packages/tmux-sessionizer: remove tmux-register-session We already use the builtin leader-l binding, no need to keep this. --- .../by-name/tmux-sessionizer/package.nix | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/nix/packages/by-name/tmux-sessionizer/package.nix b/nix/packages/by-name/tmux-sessionizer/package.nix index 63ebfc67..63c7cbc1 100644 --- a/nix/packages/by-name/tmux-sessionizer/package.nix +++ b/nix/packages/by-name/tmux-sessionizer/package.nix @@ -8,24 +8,6 @@ symlinkJoin, }: let - tmux-register-session = writeShellApplication { - name = "__tmux-register-session"; - runtimeInputs = [ tmux ]; - text = '' - last=/tmp/TMUX_LAST - - # bail if tmux not running - if ! pgrep tmux >/dev/null 2>&1; then - exit 1 - fi - - this="$(tmux display-message -p '#S')" - if [ ! -f "$last" ] || [ "$(cat "$last")" != "$this" ]; then - echo "$this" >"$last" - fi - ''; - }; - tmux-maybe-create = writeShellApplication { name = "__tmux-maybe-create"; runtimeInputs = [ @@ -94,7 +76,6 @@ let esac # effects - ${lib.getExe tmux-register-session} || : ${lib.getExe tmux-maybe-create} "$session_name" "$selected" ${lib.getExe tmux-attach-or-switch} "$session_name" ''; @@ -103,7 +84,6 @@ in symlinkJoin { name = "tmux-sessionizer"; paths = [ - tmux-register-session tmux-maybe-create tmux-attach-or-switch tmux-sessionizer From 89ae4c2ad7ea4812cfbbbcf606abc5fc35ab8e01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Tue, 11 Nov 2025 13:04:06 +0800 Subject: [PATCH 067/178] vanadium: pre-commits --- nix/git-identities/hooks/cabal/pre-commit | 4 ++++ nix/git-identities/list.nix | 10 +++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100755 nix/git-identities/hooks/cabal/pre-commit diff --git a/nix/git-identities/hooks/cabal/pre-commit b/nix/git-identities/hooks/cabal/pre-commit new file mode 100755 index 00000000..8d97c752 --- /dev/null +++ b/nix/git-identities/hooks/cabal/pre-commit @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +make style +make lint diff --git a/nix/git-identities/list.nix b/nix/git-identities/list.nix index 7df85864..b318462b 100644 --- a/nix/git-identities/list.nix +++ b/nix/git-identities/list.nix @@ -1,4 +1,7 @@ let + sources = import ../../npins; + lib = import (sources.nixpkgs + "/lib"); + haskellIdentity = { init.defaultBranch = "main"; user.name = "Léana Jiang"; @@ -16,6 +19,8 @@ let blameIgnore = { blame.ignoreRevsFile = ".git-blame-ignore-revs"; }; + + hooks = scriptsPath: { core.hooksPath = scriptsPath; }; in [ # Univ stuff @@ -49,6 +54,9 @@ in { url = "github.com"; path = "haskell/cabal.git"; - contents = blameIgnore; + contents = lib.mkMerge [ + blameIgnore + (hooks "${./hooks/cabal}") + ]; } ] From 2f1d8e61f87133276eb2e6ab53c1557c4fd50d7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Tue, 11 Nov 2025 13:30:22 +0800 Subject: [PATCH 068/178] git/cabal: run doctest in pre-commit --- nix/git-identities/hooks/cabal/pre-commit | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nix/git-identities/hooks/cabal/pre-commit b/nix/git-identities/hooks/cabal/pre-commit index 8d97c752..51217183 100755 --- a/nix/git-identities/hooks/cabal/pre-commit +++ b/nix/git-identities/hooks/cabal/pre-commit @@ -1,4 +1,6 @@ #!/usr/bin/env bash +set -euo pipefail make style +make doctest make lint From 6f9f2ba7f0a3eee069adc1b8b65fa3b74ca71946 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Tue, 11 Nov 2025 22:39:39 +0800 Subject: [PATCH 069/178] home/firefox: switch to brave search engine Because: - they don't have AI pop ups (for now) - leta is going to be closed (:pensive:) --- nix/homeModules/common/firefox.nix | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/nix/homeModules/common/firefox.nix b/nix/homeModules/common/firefox.nix index 9831eb4f..157c0a94 100644 --- a/nix/homeModules/common/firefox.nix +++ b/nix/homeModules/common/firefox.nix @@ -29,20 +29,12 @@ in "eBay" "Perplexity" ]; - Default = "leta"; + Default = "Brave"; Add = [ { - Name = "leta"; - Alias = "@lt"; - IconURL = "https://leta.mullvad.net/favicon.ico"; - URLTemplate = "https://leta.mullvad.net/search?q={searchTerms}&engine=brave"; - SuggestURLTemplate = "https://suggestqueries.google.com/complete/search?q={searchTerms}"; - } - { - Name = "leta"; - Alias = "@ltfr"; - IconURL = "https://leta.mullvad.net/favicon.ico"; - URLTemplate = "https://leta.mullvad.net/search?q={searchTerms}&engine=brave&language=fr"; + Name = "Brave"; + Alias = "@br"; + URLTemplate = "https://search.brave.com/search?q={searchTerms}&source=web"; SuggestURLTemplate = "https://suggestqueries.google.com/complete/search?q={searchTerms}"; } ]; From 2c2af2aea216e511eec38d86ea1683875ce32525 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Tue, 11 Nov 2025 23:27:13 +0800 Subject: [PATCH 070/178] packages/ruler: update --- nix/packages/by-name/ruler/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nix/packages/by-name/ruler/package.nix b/nix/packages/by-name/ruler/package.nix index 7ab3f55b..1a7da098 100644 --- a/nix/packages/by-name/ruler/package.nix +++ b/nix/packages/by-name/ruler/package.nix @@ -11,8 +11,8 @@ let domain = "git.confusedcompiler.org"; owner = "leana8959"; repo = "ruler"; - rev = "f328620a52b25d4c9dea64425afe5995dfb8cb5a"; - hash = "sha256-8nSVFckWXkf9dRTdzjbHRhf/qPdbXHEkVI4DyW3zfSo="; + rev = "00b6c4f1b5d764b049028ba4207ca1dc8ad74f2b"; + hash = "sha256-CI9jKcNoFqv4AgQIFFkqafcg2ybs2MN+RaEnuv72Mbc="; }) { }; cabalOverrides = o: { From c7e5e650623d1539ad0c1ec8dce2b463e59e9e8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Wed, 12 Nov 2025 16:21:27 +0800 Subject: [PATCH 071/178] network: update network list --- nix/networks/list.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nix/networks/list.nix b/nix/networks/list.nix index de5c9fc9..87ed22f5 100644 --- a/nix/networks/list.nix +++ b/nix/networks/list.nix @@ -81,6 +81,10 @@ in hasPassword = true; randomizeMac = true; } + { + ssid = "R802"; + randomizeMac = true; + } { ssid = "_SNCF_WIFI_INOUI"; } { ssid = "_WIFI_LYRIA"; } @@ -89,6 +93,7 @@ in { ssid = "AOT Airport Free Wi-Fi by NT"; } { ssid = "NewTaipei"; } { ssid = "Fami-WiFi"; } + { ssid = "THSR_freeWIFI_ALL"; } { ssid = "iPhone de Léana 江"; From 83081607ea33bec7c0209b794afdc63aa744d88b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Wed, 12 Nov 2025 19:01:22 +0800 Subject: [PATCH 072/178] network: update network list --- nix/networks/list.nix | 4 ++++ nix/networks/wpa_supplicant-compat.nix | 16 ++++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/nix/networks/list.nix b/nix/networks/list.nix index 87ed22f5..8095998f 100644 --- a/nix/networks/list.nix +++ b/nix/networks/list.nix @@ -85,6 +85,10 @@ in ssid = "R802"; randomizeMac = true; } + { + ssid = "R1108"; + randomizeMac = true; + } { ssid = "_SNCF_WIFI_INOUI"; } { ssid = "_WIFI_LYRIA"; } diff --git a/nix/networks/wpa_supplicant-compat.nix b/nix/networks/wpa_supplicant-compat.nix index 02c2c26c..a4db89a7 100644 --- a/nix/networks/wpa_supplicant-compat.nix +++ b/nix/networks/wpa_supplicant-compat.nix @@ -15,6 +15,8 @@ let hasPassword ? false, scanOnLowSignal ? false, randomizeMac ? false, + # TODO: adapt to the 25.11 interface + bssid ? null, ... }: { @@ -24,20 +26,18 @@ let "hasPassword" "scanOnLowSignal" "randomizeMac" + "bssid" ]) (lib.optionalAttrs hasPassword { pskRaw = "ext:${escapePwdKey ssid}"; }) - (lib.optionalAttrs scanOnLowSignal { + { extraConfig = '' - bgscan="simple:30:-70:3600" + ${lib.optionalString scanOnLowSignal "bgscan=\"simple:30:-70:3600\""} + ${lib.optionalString randomizeMac "mac_addr=1"} + ${lib.optionalString (bssid != null) "bssid=\"${bssid}\""} ''; - }) - (lib.optionalAttrs randomizeMac { - extraConfig = '' - mac_addr=1 - ''; - }) + } ]; }; in From 90e1880e754882cb00309f6dab6527746c3fa379 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Thu, 13 Nov 2025 17:59:35 +0800 Subject: [PATCH 073/178] vanadium/xmobar: update events --- nix/configurations/vanadium/home/xmobar/xmobar.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nix/configurations/vanadium/home/xmobar/xmobar.hs b/nix/configurations/vanadium/home/xmobar/xmobar.hs index 1117d7cd..29a159fc 100644 --- a/nix/configurations/vanadium/home/xmobar/xmobar.hs +++ b/nix/configurations/vanadium/home/xmobar/xmobar.hs @@ -76,8 +76,10 @@ config = , "--target", "2025-09-16=snip snip" , "--target", "2025-10-13=no teef" , "--target", "2025-10-31=dragon book" + , "--target", "2025-11-21=scalpel" + , "--target", "2025-11-21=baguette" , "--target", "2025-11-29=à deux" - , "--target", "2025-12-16=dragon book²" + , "--target", "2025-12-16=dragon book" , "--target", "2025-12-30=seule" ] "" From cf2cf553e0894354e23548816fb9b9e01dec901b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Thu, 13 Nov 2025 18:14:11 +0800 Subject: [PATCH 074/178] home/gpg: update trusted keys --- nix/homeModules/common/gpg.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nix/homeModules/common/gpg.nix b/nix/homeModules/common/gpg.nix index 1ef69531..916db466 100644 --- a/nix/homeModules/common/gpg.nix +++ b/nix/homeModules/common/gpg.nix @@ -44,6 +44,10 @@ user = "confusedkernel"; hash = "sha256-9DdtDAcv+2Z0jJMSLAXbp5ne8uHYj5V/lNGi0kKSdv4="; } + { + user = "gautaz"; + hash = "sha256-j0I9l8uKfzKNrc2qveFi5mkRppxL36+BUEqvFPs6vqA="; + } ] ++ map fromUrl [ { From 77dc32f91c05414691343f2be0e71a2bc0368b2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sat, 15 Nov 2025 13:12:36 +0800 Subject: [PATCH 075/178] hetzner_benchmark: install terminfo --- nix/configurations/hetzner_benchmark.nix | 1 + nix/configurations/hetzner_benchmark/nixos/programs.nix | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 nix/configurations/hetzner_benchmark/nixos/programs.nix diff --git a/nix/configurations/hetzner_benchmark.nix b/nix/configurations/hetzner_benchmark.nix index 6664da7d..f14a3cf9 100644 --- a/nix/configurations/hetzner_benchmark.nix +++ b/nix/configurations/hetzner_benchmark.nix @@ -52,6 +52,7 @@ in ./hetzner_benchmark/nixos/hardware-configuration.nix ./hetzner_benchmark/nixos/misc.nix + ./hetzner_benchmark/nixos/programs.nix ../nixosModules/common/fish.nix ../nixosModules/common/disable-command-not-found.nix diff --git a/nix/configurations/hetzner_benchmark/nixos/programs.nix b/nix/configurations/hetzner_benchmark/nixos/programs.nix new file mode 100644 index 00000000..58d07dc1 --- /dev/null +++ b/nix/configurations/hetzner_benchmark/nixos/programs.nix @@ -0,0 +1,4 @@ +{ + # Helps with kitty when ssh from remote + environment.enableAllTerminfo = true; +} From 34619bec867281e9b65c478d6e017dcc5bd71349 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sat, 15 Nov 2025 22:49:59 +0800 Subject: [PATCH 076/178] vanadium/disko: try compressing /home --- nix/disko/vanadium/btrfs.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nix/disko/vanadium/btrfs.nix b/nix/disko/vanadium/btrfs.nix index 84b9efb0..11ae7b66 100644 --- a/nix/disko/vanadium/btrfs.nix +++ b/nix/disko/vanadium/btrfs.nix @@ -75,7 +75,10 @@ }; "/home" = { - mountOptions = [ "noatime" ]; + mountOptions = [ + "compress=zstd" + "noatime" + ]; mountpoint = "/home"; }; From 89e9803ed79d183796ceccbd0853bc352ea52e3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sun, 16 Nov 2025 22:33:01 +0800 Subject: [PATCH 077/178] home/firefox: always open link in new window --- nix/homeModules/common/firefox.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nix/homeModules/common/firefox.nix b/nix/homeModules/common/firefox.nix index 157c0a94..556a528d 100644 --- a/nix/homeModules/common/firefox.nix +++ b/nix/homeModules/common/firefox.nix @@ -56,6 +56,10 @@ in "browser.ctrlTab.sortByRecentlyUsed" = false; "layout.css.devPixelsPerPx" = 1.1; + # open links in new window + # this works a lot better with xmonad where I have a bunch of windows + "browser.link.open_newwindow" = 2; + # Sponsored crap # Yes "browser.newtabpage.activity-stream.showSearch" = true; From 0d468192be425e59acec80321ce2e12728385a17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sun, 16 Nov 2025 22:34:45 +0800 Subject: [PATCH 078/178] vanadium/xmonad: smarter window focusing We spawn discord on certain window, and ignore its activation request --- .../vanadium/home/xmonad/xmonad.hs | 80 ++++++++++++++----- 1 file changed, 59 insertions(+), 21 deletions(-) diff --git a/nix/configurations/vanadium/home/xmonad/xmonad.hs b/nix/configurations/vanadium/home/xmonad/xmonad.hs index 27a744ad..3c3ad491 100644 --- a/nix/configurations/vanadium/home/xmonad/xmonad.hs +++ b/nix/configurations/vanadium/home/xmonad/xmonad.hs @@ -24,12 +24,11 @@ import XMonad.Util.NamedScratchpad import XMonad.Util.SpawnOnce import XMonad.Layout.Magnifier +import Data.Char.Greek import qualified Data.Map.Strict as M import System.Posix import Graphics.X11.ExtraTypes.XF86 -import Data.Char.Greek - main :: IO () main = xmonad @@ -37,6 +36,7 @@ main = -- https://wiki.archlinux.org/title/java#Gray_window,_applications_not_resizing_with_WM,_menus_immediately_closing . javaHack . withSB xmobarConfig . docks + . setEwmhActivateHook myActivateHook . ewmhFullscreen . ewmh $ def { modMask = superMask @@ -66,31 +66,66 @@ myLayout = in avoidStruts . smartBorders $ mag tallr ||| Full -isOneOf :: Eq a => Query a -> [a] -> Query Bool -isOneOf q = fmap or . traverse (q =?) +isSioyek :: Query Bool +isSioyek = className =? "sioyek" + +isDiscord :: Query Bool +isDiscord = + let electronDiscord = className =? "discord" + firefoxDiscord = isFirefox <&&> title ~? "Discord" + in electronDiscord <||> firefoxDiscord + +isEvolution :: Query Bool +isEvolution = className ~? "gnome.Evolution" + +isFirefox :: Query Bool +isFirefox = className =? "firefox" + +isFirefoxPip :: Query Bool +isFirefoxPip = isFirefox <&&> title =? "Picture-in-Picture" + +isFeh :: Query Bool +isFeh = className =? "feh" + +isNautilus :: Query Bool +isNautilus = className ~? "Nautilus" + +isNautilusPreviewer :: Query Bool +isNautilusPreviewer = className ~? "NautilusPreviewer" + +isMinder :: Query Bool +isMinder = className =? "Minder" <&&> (not <$> title ~? "Pick a Color") + +isKitty :: Query Bool +isKitty = className =? "kitty" + +myActivateHook :: ManageHook +myActivateHook = + -- Ignore activate request + composeOne + [ isDiscord -?> mempty + , isEvolution -?> mempty + , isSioyek -?> mempty + , isFeh -?> mempty + , return True -?> doFocus + ] myManageHook :: ManageHook myManageHook = composeAll - [ className ~? "NautilusPreviewer" --> customFloating centeredFloat - , className =? "feh" --> customFloating buttomRightFloat - , className =? "Minder" - <&&> not <$> title ~? "Pick a Color" -- ignore the color picker - --> customFloating centeredFloat - , className =? "firefox" - <&&> title =? "Picture-in-Picture" - --> doFloat - , namedScratchpadManageHook myScratchpads + [ isNautilusPreviewer --> customFloating centeredFloat + , isFeh --> customFloating buttomRightFloat + , isMinder --> customFloating centeredFloat + , isFirefoxPip --> doFloat + , isDiscord --> (doF $ W.shift chatWS) + , isEvolution --> (doF $ W.shift chatWS) ] <> composeOne - [ className =? "firefox" -?> insertPosition Master Newer - , className =? "kitty" -?> insertPosition Below Newer - , className `isOneOf` - [ "sioyek" - , "Nautilus" - ] - -?> insertPosition End Older + [ isFirefox -?> insertPosition Master Newer + , isKitty -?> insertPosition Below Newer + , isNautilus <||> isSioyek -?> insertPosition End Older ] + <> namedScratchpadManageHook myScratchpads myStartupHook :: X () myStartupHook = do @@ -223,9 +258,12 @@ superMask, altMask :: KeyMask superMask = mod4Mask altMask = mod1Mask -myWorkspaces :: [String] +myWorkspaces :: [WorkspaceId] myWorkspaces = map (:[]) $ take 8 greekLower +chatWS :: WorkspaceId +chatWS = myWorkspaces !! 3 + centeredFloat, smallFloat, fullFloat, buttomRightFloat :: W.RationalRect centeredFloat = W.RationalRect (1/9) (1/9) (7/9) (7/9) smallFloat = W.RationalRect (3/5) (3/5) (2/7) (2/7) From 5f1cea7f2544da57c5e7cae886f6a064e1c2beab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Mon, 17 Nov 2025 08:31:01 +0800 Subject: [PATCH 079/178] vanadium/xmonad: shift windows based on dynamic title property --- .../vanadium/home/xmonad/xmonad.hs | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/nix/configurations/vanadium/home/xmonad/xmonad.hs b/nix/configurations/vanadium/home/xmonad/xmonad.hs index 3c3ad491..898245aa 100644 --- a/nix/configurations/vanadium/home/xmonad/xmonad.hs +++ b/nix/configurations/vanadium/home/xmonad/xmonad.hs @@ -8,6 +8,7 @@ import XMonad.Hooks.EwmhDesktops import XMonad.Hooks.InsertPosition import XMonad.Hooks.ManageDocks import XMonad.Hooks.ManageHelpers +import XMonad.Hooks.OnPropertyChange import XMonad.Hooks.RefocusLast import XMonad.Hooks.StatusBar import XMonad.Layout.NoBorders @@ -25,6 +26,7 @@ import XMonad.Util.SpawnOnce import XMonad.Layout.Magnifier import Data.Char.Greek +import Data.Semigroup import qualified Data.Map.Strict as M import System.Posix import Graphics.X11.ExtraTypes.XF86 @@ -50,6 +52,7 @@ main = , startupHook = myStartupHook , layoutHook = myLayout , manageHook = myManageHook + , handleEventHook = myEventHandleHook } -- Only remove mappings that needs pass through @@ -81,6 +84,9 @@ isEvolution = className ~? "gnome.Evolution" isFirefox :: Query Bool isFirefox = className =? "firefox" +isSpotify :: Query Bool +isSpotify = isFirefox <&&> title ~? "Spotify" + isFirefoxPip :: Query Bool isFirefoxPip = isFirefox <&&> title =? "Picture-in-Picture" @@ -127,6 +133,25 @@ myManageHook = ] <> namedScratchpadManageHook myScratchpads +myEventHandleHook :: Event -> X All +myEventHandleHook = + -- TODO: is there a way to always open certain sites in new windows in firefox? + onTitleChange $ composeAll + [ isSpotify --> doShiftAndViewIfMoved multimediaWS + , isDiscord --> doShiftAndViewIfMoved chatWS + ] + +-- If the title changes in the background, we don't want to greedy view that workspace. +-- Imagine Spotify playing in the background, a track change would focus that workspace. +-- We prevent this by checking if the window is already there. +doShiftAndViewIfMoved :: WorkspaceId -> Query (Endo WindowSet) +doShiftAndViewIfMoved n = doF . shiftAndViewIfMoved n =<< ask + +shiftAndViewIfMoved :: WorkspaceId -> Window -> WindowSet -> WindowSet +shiftAndViewIfMoved n w s = case W.findTag w s of + Just from | n `W.tagMember` s && n /= from -> W.greedyView n $ W.shiftWin n w s + _ -> s + myStartupHook :: X () myStartupHook = do spawnOnce "fcitx5 &" -- Input method @@ -261,6 +286,9 @@ altMask = mod1Mask myWorkspaces :: [WorkspaceId] myWorkspaces = map (:[]) $ take 8 greekLower +multimediaWS :: WorkspaceId +multimediaWS = myWorkspaces !! 6 + chatWS :: WorkspaceId chatWS = myWorkspaces !! 3 From c8dee130a63e72ff590cd89c18b52b3cd159390d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Mon, 17 Nov 2025 09:24:26 +0800 Subject: [PATCH 080/178] vanadium/xmonad: add more shift rules --- .../vanadium/home/xmonad/xmonad.hs | 25 ++++++++++++++++--- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/nix/configurations/vanadium/home/xmonad/xmonad.hs b/nix/configurations/vanadium/home/xmonad/xmonad.hs index 898245aa..24195a86 100644 --- a/nix/configurations/vanadium/home/xmonad/xmonad.hs +++ b/nix/configurations/vanadium/home/xmonad/xmonad.hs @@ -87,6 +87,18 @@ isFirefox = className =? "firefox" isSpotify :: Query Bool isSpotify = isFirefox <&&> title ~? "Spotify" +isYouTube :: Query Bool +isYouTube = isFirefox <&&> title ~? "YouTube" + +isWhatsApp :: Query Bool +isWhatsApp = isFirefox <&&> title ~? "WhatsApp" + +isSignal :: Query Bool +isSignal = className =? "Signal" + +isElement :: Query Bool +isElement = isFirefox <&&> title ~? "Element" + isFirefoxPip :: Query Bool isFirefoxPip = isFirefox <&&> title =? "Picture-in-Picture" @@ -111,6 +123,7 @@ myActivateHook = composeOne [ isDiscord -?> mempty , isEvolution -?> mempty + , isSignal -?> mempty , isSioyek -?> mempty , isFeh -?> mempty , return True -?> doFocus @@ -123,8 +136,9 @@ myManageHook = , isFeh --> customFloating buttomRightFloat , isMinder --> customFloating centeredFloat , isFirefoxPip --> doFloat - , isDiscord --> (doF $ W.shift chatWS) - , isEvolution --> (doF $ W.shift chatWS) + , isDiscord --> doShift chatWS + , isEvolution --> doShift chatWS + , isSignal --> doShift chatWS ] <> composeOne [ isFirefox -?> insertPosition Master Newer @@ -137,8 +151,11 @@ myEventHandleHook :: Event -> X All myEventHandleHook = -- TODO: is there a way to always open certain sites in new windows in firefox? onTitleChange $ composeAll - [ isSpotify --> doShiftAndViewIfMoved multimediaWS - , isDiscord --> doShiftAndViewIfMoved chatWS + [ isSpotify --> doShiftAndViewIfMoved multimediaWS + , isYouTube --> doShiftAndViewIfMoved multimediaWS + , isDiscord --> doShiftAndViewIfMoved chatWS + , isWhatsApp --> doShiftAndViewIfMoved chatWS + , isElement --> doShiftAndViewIfMoved chatWS ] -- If the title changes in the background, we don't want to greedy view that workspace. From a27f5ffefe61700dbe7235c8ff33f174f9ee7952 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Mon, 17 Nov 2025 15:35:17 +0800 Subject: [PATCH 081/178] vanadium/xmonad: copy float helper windows everywhere --- nix/configurations/vanadium/home/xmonad/xmonad.hs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/nix/configurations/vanadium/home/xmonad/xmonad.hs b/nix/configurations/vanadium/home/xmonad/xmonad.hs index 24195a86..722046fc 100644 --- a/nix/configurations/vanadium/home/xmonad/xmonad.hs +++ b/nix/configurations/vanadium/home/xmonad/xmonad.hs @@ -1,6 +1,7 @@ {-# LANGUAGE NegativeLiterals #-} import XMonad +import XMonad.Actions.CopyWindow import XMonad.Actions.Submap import XMonad.Actions.SwapWorkspaces import XMonad.Hooks.DynamicLog @@ -99,8 +100,9 @@ isSignal = className =? "Signal" isElement :: Query Bool isElement = isFirefox <&&> title ~? "Element" +-- This changes depending on the locale of the browser :/ isFirefoxPip :: Query Bool -isFirefoxPip = isFirefox <&&> title =? "Picture-in-Picture" +isFirefoxPip = isFirefox <&&> title =? "Incrustation vidéo" isFeh :: Query Bool isFeh = className =? "feh" @@ -133,9 +135,9 @@ myManageHook :: ManageHook myManageHook = composeAll [ isNautilusPreviewer --> customFloating centeredFloat - , isFeh --> customFloating buttomRightFloat + , isFeh --> doF copyToAll <> customFloating buttomRightFloat , isMinder --> customFloating centeredFloat - , isFirefoxPip --> doFloat + , isFirefoxPip --> doF copyToAll <> customFloating buttomRightFloat , isDiscord --> doShift chatWS , isEvolution --> doShift chatWS , isSignal --> doShift chatWS From 1409a5e064e2e52f2bb4d069c74ec9eb3dbeaee4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Mon, 17 Nov 2025 16:29:47 +0800 Subject: [PATCH 082/178] vanadium/xmonad: use composeOne for non overlapping rules --- .../vanadium/home/xmonad/xmonad.hs | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/nix/configurations/vanadium/home/xmonad/xmonad.hs b/nix/configurations/vanadium/home/xmonad/xmonad.hs index 722046fc..7f5cf5f7 100644 --- a/nix/configurations/vanadium/home/xmonad/xmonad.hs +++ b/nix/configurations/vanadium/home/xmonad/xmonad.hs @@ -133,17 +133,15 @@ myActivateHook = myManageHook :: ManageHook myManageHook = - composeAll - [ isNautilusPreviewer --> customFloating centeredFloat - , isFeh --> doF copyToAll <> customFloating buttomRightFloat - , isMinder --> customFloating centeredFloat - , isFirefoxPip --> doF copyToAll <> customFloating buttomRightFloat - , isDiscord --> doShift chatWS - , isEvolution --> doShift chatWS - , isSignal --> doShift chatWS - ] - <> composeOne - [ isFirefox -?> insertPosition Master Newer + composeOne + [ isNautilusPreviewer -?> customFloating centeredFloat + , isFeh -?> doF copyToAll <> customFloating buttomRightFloat + , isMinder -?> customFloating centeredFloat + , isFirefoxPip -?> doF copyToAll <> customFloating buttomRightFloat + , isDiscord -?> doShift chatWS + , isEvolution -?> doShift chatWS + , isSignal -?> doShift chatWS + , isFirefox -?> insertPosition Master Newer , isKitty -?> insertPosition Below Newer , isNautilus <||> isSioyek -?> insertPosition End Older ] From 06c9fe9f1e1c600f3a5a8fa1d92dee67d5953145 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Mon, 17 Nov 2025 16:38:06 +0800 Subject: [PATCH 083/178] vanadium/xmonad: run hlint --- .../lib/XMonad/Layout/ResizableTile/FixDescription.hs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/nix/configurations/vanadium/home/xmonad/lib/XMonad/Layout/ResizableTile/FixDescription.hs b/nix/configurations/vanadium/home/xmonad/lib/XMonad/Layout/ResizableTile/FixDescription.hs index 18a813cd..19153c17 100644 --- a/nix/configurations/vanadium/home/xmonad/lib/XMonad/Layout/ResizableTile/FixDescription.hs +++ b/nix/configurations/vanadium/home/xmonad/lib/XMonad/Layout/ResizableTile/FixDescription.hs @@ -1,4 +1,3 @@ -{-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-} module XMonad.Layout.ResizableTile.FixDescription @@ -15,12 +14,10 @@ newtype RTFixDescription a = RTFixDescription { unwrapRT :: ResizableTall a } instance LayoutClass RTFixDescription a where runLayout (W.Workspace t l s) = let ws' = W.Workspace t (unwrapRT l) s - in fmap (fmap (fmap RTFixDescription)) - . runLayout ws' + in (fmap . fmap . fmap) RTFixDescription . runLayout ws' - handleMessage (RTFixDescription l) m = - fmap (fmap RTFixDescription) - $ handleMessage l m + handleMessage (RTFixDescription l) = + (fmap . fmap) RTFixDescription . handleMessage l description (RTFixDescription l) = description l <> " " <> show (_nmaster l) From 51352a91d0ee3c063307d21948d469aec3ebf94e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Mon, 17 Nov 2025 21:14:21 +0800 Subject: [PATCH 084/178] vanadium/dev: add ghc cachix substituter --- nix/configurations/vanadium/home/dev.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nix/configurations/vanadium/home/dev.nix b/nix/configurations/vanadium/home/dev.nix index 9420274e..a55be211 100644 --- a/nix/configurations/vanadium/home/dev.nix +++ b/nix/configurations/vanadium/home/dev.nix @@ -64,13 +64,15 @@ nix = { settings = { extra-substituters = [ - "https://ghc-nix.cachix.org" + "https://ghc-nix.cachix.org" # ghc nix-shell + "https://ghc.cachix.org" # ghcs "https://haskell-language-server.cachix.org" "https://helix.cachix.org" "https://cache.iog.io" ]; extra-trusted-public-keys = [ "ghc-nix.cachix.org-1:ziC/I4BPqeA4VbtOFpFpu6D1t6ymFvRWke/lc2+qjcg=" + "ghc.cachix.org-1:a751hwq9ydeP3Nr6h84iA9zSjxg9Z3uznqi4YBGjsiw=" "haskell-language-server.cachix.org-1:juFfHrwkOxqIOZShtC4YC1uT1bBcq2RSvC7OMKx0Nz8=" "helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs=" "hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" From 9b52493e5fb243ec9c70f52061b53c75d63a0a05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Mon, 17 Nov 2025 21:20:17 +0800 Subject: [PATCH 085/178] git-identities: remove hooks config for cabal It's actually pretty annoying to run the linter all the time --- nix/git-identities/list.nix | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/nix/git-identities/list.nix b/nix/git-identities/list.nix index b318462b..245ac78c 100644 --- a/nix/git-identities/list.nix +++ b/nix/git-identities/list.nix @@ -19,8 +19,6 @@ let blameIgnore = { blame.ignoreRevsFile = ".git-blame-ignore-revs"; }; - - hooks = scriptsPath: { core.hooksPath = scriptsPath; }; in [ # Univ stuff @@ -54,9 +52,6 @@ in { url = "github.com"; path = "haskell/cabal.git"; - contents = lib.mkMerge [ - blameIgnore - (hooks "${./hooks/cabal}") - ]; + contents = blameIgnore; } ] From 9f080c070752092b366eb6ba25901d554c0ef062 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Mon, 17 Nov 2025 21:38:38 +0800 Subject: [PATCH 086/178] vanadium/xmonad: use sift instead of swap --- nix/configurations/vanadium/home/xmonad/xmonad.hs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nix/configurations/vanadium/home/xmonad/xmonad.hs b/nix/configurations/vanadium/home/xmonad/xmonad.hs index 7f5cf5f7..39e5fa80 100644 --- a/nix/configurations/vanadium/home/xmonad/xmonad.hs +++ b/nix/configurations/vanadium/home/xmonad/xmonad.hs @@ -2,6 +2,7 @@ import XMonad import XMonad.Actions.CopyWindow +import XMonad.Actions.Sift import XMonad.Actions.Submap import XMonad.Actions.SwapWorkspaces import XMonad.Hooks.DynamicLog @@ -227,6 +228,10 @@ keybinds = -- Toggle fullscreen , ((superMask, xK_Escape), sendMessage NextLayout) + -- Sift instead of swap + , ((superMask .|. shiftMask, xK_j), windows siftDown) + , ((superMask .|. shiftMask, xK_k), windows siftUp ) + -- Resize windows , ((superMask, xK_equal ), sendMessage $ IncMasterN 1) , ((superMask, xK_minus ), sendMessage $ IncMasterN -1) From 09d5f8e0c820c976dffcac0134fd823f3a353693 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Mon, 17 Nov 2025 21:56:04 +0800 Subject: [PATCH 087/178] npins: update sources --- npins/sources.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/npins/sources.json b/npins/sources.json index edba230d..ae589196 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -187,9 +187,9 @@ }, "branch": "master", "submodules": false, - "revision": "52113c4f5cfd1e823001310e56d9c8d0699a6226", - "url": "https://github.com/NixOS/nixos-hardware/archive/52113c4f5cfd1e823001310e56d9c8d0699a6226.tar.gz", - "hash": "10gxzv78vk2sy4qwxc9ijbp3pssfnf4iwixvb7kkcggrk0dndzc6" + "revision": "899dc449bc6428b9ee6b3b8f771ca2b0ef945ab9", + "url": "https://github.com/NixOS/nixos-hardware/archive/899dc449bc6428b9ee6b3b8f771ca2b0ef945ab9.tar.gz", + "hash": "1dbf11zjspg68wiryp2y24w587izg954nbv517q57mpl8i8sfr85" }, "nixpkgs": { "type": "Git", @@ -200,9 +200,9 @@ }, "branch": "nixos-25.05-small", "submodules": false, - "revision": "8660acf86a1f5a14dacf049f9a5b8aff143e9111", - "url": "https://github.com/NixOS/nixpkgs/archive/8660acf86a1f5a14dacf049f9a5b8aff143e9111.tar.gz", - "hash": "0y3l82414w0h1bvh63630irqxj139al479j49r6z4d1p86ygjkzm" + "revision": "cec38dec00df26a901eb8b424d53bbb3bcc72eec", + "url": "https://github.com/NixOS/nixpkgs/archive/cec38dec00df26a901eb8b424d53bbb3bcc72eec.tar.gz", + "hash": "006pn4a3f4wnr60bbw7cw181p6gzgyyz5lchp3i8q5v7bjjvalmg" }, "nur": { "type": "Git", @@ -213,9 +213,9 @@ }, "branch": "main", "submodules": false, - "revision": "e7b4921cad8b7492ab9c441bda269be625bd2acc", - "url": "https://github.com/nix-community/nur/archive/e7b4921cad8b7492ab9c441bda269be625bd2acc.tar.gz", - "hash": "1yya5jag6gvcxrajc24hz9zisxygabfjr2r86jgadyjykv0dm3s8" + "revision": "263f45afd86d9c3cb8f61fb7af44c465d4493b88", + "url": "https://github.com/nix-community/nur/archive/263f45afd86d9c3cb8f61fb7af44c465d4493b88.tar.gz", + "hash": "0lv1gkqqb5bkkmwvgl8kaipqxg6ddqw09wb8jcc0wql95vbyzyca" }, "pin-emacs28": { "type": "Git", From 587b4a4e204cdfa86e4630ec87991e415f031d73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Tue, 18 Nov 2025 19:48:04 +0800 Subject: [PATCH 088/178] vanadium/xmonad: check if current before move --- .../vanadium/home/xmonad/xmonad.hs | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/nix/configurations/vanadium/home/xmonad/xmonad.hs b/nix/configurations/vanadium/home/xmonad/xmonad.hs index 39e5fa80..701e8fcb 100644 --- a/nix/configurations/vanadium/home/xmonad/xmonad.hs +++ b/nix/configurations/vanadium/home/xmonad/xmonad.hs @@ -151,24 +151,24 @@ myManageHook = myEventHandleHook :: Event -> X All myEventHandleHook = -- TODO: is there a way to always open certain sites in new windows in firefox? + -- TODO: stop full screen when move happens onTitleChange $ composeAll - [ isSpotify --> doShiftAndViewIfMoved multimediaWS - , isYouTube --> doShiftAndViewIfMoved multimediaWS - , isDiscord --> doShiftAndViewIfMoved chatWS - , isWhatsApp --> doShiftAndViewIfMoved chatWS - , isElement --> doShiftAndViewIfMoved chatWS + [ isSpotify --> doShiftAndViewIfCurrent multimediaWS + , isYouTube --> doShiftAndViewIfCurrent multimediaWS + , isDiscord --> doShiftAndViewIfCurrent chatWS + , isWhatsApp --> doShiftAndViewIfCurrent chatWS + , isElement --> doShiftAndViewIfCurrent chatWS ] --- If the title changes in the background, we don't want to greedy view that workspace. +-- | If the title changes in the background, we don't want to greedy view that workspace. -- Imagine Spotify playing in the background, a track change would focus that workspace. --- We prevent this by checking if the window is already there. -doShiftAndViewIfMoved :: WorkspaceId -> Query (Endo WindowSet) -doShiftAndViewIfMoved n = doF . shiftAndViewIfMoved n =<< ask - -shiftAndViewIfMoved :: WorkspaceId -> Window -> WindowSet -> WindowSet -shiftAndViewIfMoved n w s = case W.findTag w s of - Just from | n `W.tagMember` s && n /= from -> W.greedyView n $ W.shiftWin n w s - _ -> s +-- We prevent this by checking if the window is in the current workspace +doShiftAndViewIfCurrent :: WorkspaceId -> Query (Endo WindowSet) +doShiftAndViewIfCurrent n = doF . go =<< ask + where go :: Window -> WindowSet -> WindowSet + go w s = case W.findTag w s of + Just from | from == W.currentTag s -> W.greedyView n $ W.shiftWin n w s + _ -> s myStartupHook :: X () myStartupHook = do From 9b1399e0e607b3f33e27816626b33124766e8763 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Tue, 18 Nov 2025 20:18:16 +0800 Subject: [PATCH 089/178] vanadium/xmonad: rewrite dynamic hooks for composability --- .../vanadium/home/xmonad/xmonad.hs | 40 +++++++++++-------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/nix/configurations/vanadium/home/xmonad/xmonad.hs b/nix/configurations/vanadium/home/xmonad/xmonad.hs index 701e8fcb..a9b6cd0e 100644 --- a/nix/configurations/vanadium/home/xmonad/xmonad.hs +++ b/nix/configurations/vanadium/home/xmonad/xmonad.hs @@ -148,27 +148,35 @@ myManageHook = ] <> namedScratchpadManageHook myScratchpads +-- TODO: is there a way to always open certain sites in new windows in firefox? +-- TODO: stop full screen when move happens myEventHandleHook :: Event -> X All myEventHandleHook = - -- TODO: is there a way to always open certain sites in new windows in firefox? - -- TODO: stop full screen when move happens - onTitleChange $ composeAll - [ isSpotify --> doShiftAndViewIfCurrent multimediaWS - , isYouTube --> doShiftAndViewIfCurrent multimediaWS - , isDiscord --> doShiftAndViewIfCurrent chatWS - , isWhatsApp --> doShiftAndViewIfCurrent chatWS - , isElement --> doShiftAndViewIfCurrent chatWS + -- If the title changes in the background, we don't want to greedy view that workspace. + -- Imagine Spotify playing in the background, a track change would focus that workspace. + -- We prevent this by checking if the window is in the current workspace + onTitleChange + $ (windowIsInCurrentWorkspace -->) + $ composeAll + [ isSpotify --> doShiftAndGreedyView multimediaWS + , isYouTube --> doShiftAndGreedyView multimediaWS + , isDiscord --> doShiftAndGreedyView chatWS + , isWhatsApp --> doShiftAndGreedyView chatWS + , isElement --> doShiftAndGreedyView chatWS ] --- | If the title changes in the background, we don't want to greedy view that workspace. --- Imagine Spotify playing in the background, a track change would focus that workspace. --- We prevent this by checking if the window is in the current workspace -doShiftAndViewIfCurrent :: WorkspaceId -> Query (Endo WindowSet) -doShiftAndViewIfCurrent n = doF . go =<< ask +doShiftAndGreedyView :: WorkspaceId -> Query (Endo WindowSet) +doShiftAndGreedyView n = doF . go =<< ask where go :: Window -> WindowSet -> WindowSet - go w s = case W.findTag w s of - Just from | from == W.currentTag s -> W.greedyView n $ W.shiftWin n w s - _ -> s + go w s = W.greedyView n $ W.shiftWin n w s + +hasProp :: (Window -> WindowSet -> Bool) -> Query Bool +hasProp f = f <$> ask <*> (liftX $ gets windowset) + +windowIsInCurrentWorkspace :: Query Bool +windowIsInCurrentWorkspace = hasProp $ \w s -> case W.findTag w s of + Just from | from == W.currentTag s -> True + _ -> False myStartupHook :: X () myStartupHook = do From 33aa3065c3eb56bdb6596aa595c153cbe92f7312 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Wed, 19 Nov 2025 00:05:38 +0800 Subject: [PATCH 090/178] vanadium/xmonad: don't lose focus when hovering over float --- nix/configurations/vanadium/home/xmonad/xmonad.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nix/configurations/vanadium/home/xmonad/xmonad.hs b/nix/configurations/vanadium/home/xmonad/xmonad.hs index a9b6cd0e..56fd2712 100644 --- a/nix/configurations/vanadium/home/xmonad/xmonad.hs +++ b/nix/configurations/vanadium/home/xmonad/xmonad.hs @@ -13,6 +13,7 @@ import XMonad.Hooks.ManageHelpers import XMonad.Hooks.OnPropertyChange import XMonad.Hooks.RefocusLast import XMonad.Hooks.StatusBar +import XMonad.Layout.FocusTracking import XMonad.Layout.NoBorders import XMonad.Layout.Reflect import XMonad.Layout.Reflect.Message @@ -69,7 +70,7 @@ myLayout = $ ResizableTall 1 (1/10) (3/7) [] mag = magnifyxy 1.05 1.3 (NoMaster 3) False in avoidStruts . smartBorders $ - mag tallr ||| Full + mag tallr ||| focusTracking Full isSioyek :: Query Bool isSioyek = className =? "sioyek" From 3e603eb1e0e8bc5a014f5591c7bdb6da74d80c6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Wed, 19 Nov 2025 17:22:00 +0800 Subject: [PATCH 091/178] vanadium/xmonad: make more money --- nix/configurations/vanadium/home/xmonad/xmonad.hs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/nix/configurations/vanadium/home/xmonad/xmonad.hs b/nix/configurations/vanadium/home/xmonad/xmonad.hs index 56fd2712..d9859cd7 100644 --- a/nix/configurations/vanadium/home/xmonad/xmonad.hs +++ b/nix/configurations/vanadium/home/xmonad/xmonad.hs @@ -39,10 +39,10 @@ main = xmonad -- Fix all java things that don't scale with XMonad -- https://wiki.archlinux.org/title/java#Gray_window,_applications_not_resizing_with_WM,_menus_immediately_closing - . javaHack - . withSB xmobarConfig . docks - . setEwmhActivateHook myActivateHook - . ewmhFullscreen . ewmh + $ javaHack + $ withSB xmobarConfig . docks + $ setEwmhActivateHook myActivateHook + $ ewmhFullscreen . ewmh $ def { modMask = superMask , borderWidth = 5 @@ -69,8 +69,9 @@ myLayout = $ RTFixDescription $ ResizableTall 1 (1/10) (3/7) [] mag = magnifyxy 1.05 1.3 (NoMaster 3) False - in avoidStruts . smartBorders $ - mag tallr ||| focusTracking Full + in avoidStruts + $ smartBorders + $ mag tallr ||| focusTracking Full isSioyek :: Query Bool isSioyek = className =? "sioyek" From e7c50da45fd5e6b455b0ef5cd779bea7ce54ba4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Wed, 19 Nov 2025 20:37:50 +0800 Subject: [PATCH 092/178] vanadium/xmonad: I like ratio --- nix/configurations/vanadium/home/xmonad/xmonad.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nix/configurations/vanadium/home/xmonad/xmonad.hs b/nix/configurations/vanadium/home/xmonad/xmonad.hs index d9859cd7..b56b81a9 100644 --- a/nix/configurations/vanadium/home/xmonad/xmonad.hs +++ b/nix/configurations/vanadium/home/xmonad/xmonad.hs @@ -29,6 +29,7 @@ import XMonad.Util.SpawnOnce import XMonad.Layout.Magnifier import Data.Char.Greek +import Data.Ratio import Data.Semigroup import qualified Data.Map.Strict as M import System.Posix @@ -325,10 +326,10 @@ chatWS :: WorkspaceId chatWS = myWorkspaces !! 3 centeredFloat, smallFloat, fullFloat, buttomRightFloat :: W.RationalRect -centeredFloat = W.RationalRect (1/9) (1/9) (7/9) (7/9) -smallFloat = W.RationalRect (3/5) (3/5) (2/7) (2/7) +centeredFloat = W.RationalRect (1%9) (1%9) (7%9) (7%9) +smallFloat = W.RationalRect (3%5) (3%5) (2%7) (2%7) fullFloat = W.RationalRect 0 0 1 1 -buttomRightFloat = W.RationalRect (1/2) (1/2) (1/2) (1/2) +buttomRightFloat = W.RationalRect (1%2) (1%2) (1%2) (1%2) xmobarConfig :: StatusBarConfig xmobarConfig = statusBarProp "xmobar -x 0" (pure myPrettyPrinter) From 58e39ea0a640fed64179e7acf4a7fd053f06eb46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Wed, 19 Nov 2025 20:47:55 +0800 Subject: [PATCH 093/178] vanadium/xmobar: remove a few clocks --- nix/configurations/vanadium/home/xmobar/xmobar.hs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/nix/configurations/vanadium/home/xmobar/xmobar.hs b/nix/configurations/vanadium/home/xmobar/xmobar.hs index 29a159fc..2d5d5fa8 100644 --- a/nix/configurations/vanadium/home/xmobar/xmobar.hs +++ b/nix/configurations/vanadium/home/xmobar/xmobar.hs @@ -62,10 +62,8 @@ config = , commands = [ Run $ DateZone "%a %d %H:%M:%S" "" "" "hereClock" (1 &second) - , Run $ DateZone "%H:%M" "" "America/Aruba" "arubaClock" (10 &second) , Run $ DateZone "%H:%M" "" "Europe/Dublin" "dublinClock" (10 &second) - , Run $ DateZone "%H:%M" "" "America/New_York" "newYorkClock" (10 &second) - , Run $ DateZone "%H:%M" "" "Europe/Paris" "cetClock" (10 &second) + , Run $ DateZone "%H:%M" "" "Europe/Paris" "parisClock" (10 &second) , Run $ DateZone "%H:%M" "" "Asia/Taipei" "tstClock" (10 &second) , Run $ Com @@ -125,10 +123,8 @@ config = <> alignSep config <> intercalate "|" [ (unwords . map greyFg) - [ "[AUA: %arubaClock%]" - , "[DUB: %dublinClock%]" - , "[JFK: %newYorkClock%]" - , "[CDG: %cetClock%]" + [ "[DUB: %dublinClock%]" + , "[CDG: %parisClock%]" , "[TPE: %tstClock%]" ] <> " " From 112439418c2918663079e16fe8f92c2fc9bc2609 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Wed, 19 Nov 2025 21:09:14 +0800 Subject: [PATCH 094/178] vanadium/xmobar: fix some events --- nix/configurations/vanadium/home/xmobar/xmobar.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nix/configurations/vanadium/home/xmobar/xmobar.hs b/nix/configurations/vanadium/home/xmobar/xmobar.hs index 2d5d5fa8..a4958817 100644 --- a/nix/configurations/vanadium/home/xmobar/xmobar.hs +++ b/nix/configurations/vanadium/home/xmobar/xmobar.hs @@ -74,8 +74,7 @@ config = , "--target", "2025-09-16=snip snip" , "--target", "2025-10-13=no teef" , "--target", "2025-10-31=dragon book" - , "--target", "2025-11-21=scalpel" - , "--target", "2025-11-21=baguette" + , "--target", "2025-11-19=scalpel" , "--target", "2025-11-29=à deux" , "--target", "2025-12-16=dragon book" , "--target", "2025-12-30=seule" From d3489e573079138ff2bfb297772ef58c6f789d60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Wed, 19 Nov 2025 21:38:44 +0800 Subject: [PATCH 095/178] vanadium: use asFlake attribute --- nix/configurations/vanadium.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nix/configurations/vanadium.nix b/nix/configurations/vanadium.nix index 725c460f..80919604 100644 --- a/nix/configurations/vanadium.nix +++ b/nix/configurations/vanadium.nix @@ -125,7 +125,7 @@ in (sources.agenix + "/modules/age.nix") - (import sources.url-eater).nixosModules.default + sources.url-eater.asFlake.nixosModules.default (sources.nixos-hardware + "/framework/13-inch/7040-amd") @@ -190,7 +190,7 @@ in # Extern modules # (sources.agenix + "/modules/age-home.nix") - (import sources.wired-notify).homeManagerModules.default + sources.wired-notify.asFlake.homeManagerModules.default ]; } From 60bfd4f5c9124cd6f2da6c7101d18f695e2b5889 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Thu, 20 Nov 2025 09:16:43 +0800 Subject: [PATCH 096/178] vanadium/xmonad: show current window count in pp --- .../vanadium/home/xmonad/leanamonad.cabal | 1 - .../Layout/ResizableTile/FixDescription.hs | 23 ---------------- .../vanadium/home/xmonad/xmonad.hs | 26 +++++++++++-------- 3 files changed, 15 insertions(+), 35 deletions(-) delete mode 100644 nix/configurations/vanadium/home/xmonad/lib/XMonad/Layout/ResizableTile/FixDescription.hs diff --git a/nix/configurations/vanadium/home/xmonad/leanamonad.cabal b/nix/configurations/vanadium/home/xmonad/leanamonad.cabal index 250a2d53..bfe56163 100644 --- a/nix/configurations/vanadium/home/xmonad/leanamonad.cabal +++ b/nix/configurations/vanadium/home/xmonad/leanamonad.cabal @@ -25,7 +25,6 @@ library hs-source-dirs: lib exposed-modules: XMonad.Layout.Reflect.Message - XMonad.Layout.ResizableTile.FixDescription Data.Char.Greek executable leanamonad diff --git a/nix/configurations/vanadium/home/xmonad/lib/XMonad/Layout/ResizableTile/FixDescription.hs b/nix/configurations/vanadium/home/xmonad/lib/XMonad/Layout/ResizableTile/FixDescription.hs deleted file mode 100644 index 19153c17..00000000 --- a/nix/configurations/vanadium/home/xmonad/lib/XMonad/Layout/ResizableTile/FixDescription.hs +++ /dev/null @@ -1,23 +0,0 @@ -{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-} - -module XMonad.Layout.ResizableTile.FixDescription - ( RTFixDescription(..) - ) where - -import XMonad -import qualified XMonad.StackSet as W -import XMonad.Layout.ResizableTile - -newtype RTFixDescription a = RTFixDescription { unwrapRT :: ResizableTall a } - deriving (Read, Show) - -instance LayoutClass RTFixDescription a where - runLayout (W.Workspace t l s) = - let ws' = W.Workspace t (unwrapRT l) s - in (fmap . fmap . fmap) RTFixDescription . runLayout ws' - - handleMessage (RTFixDescription l) = - (fmap . fmap) RTFixDescription . handleMessage l - - description (RTFixDescription l) = - description l <> " " <> show (_nmaster l) diff --git a/nix/configurations/vanadium/home/xmonad/xmonad.hs b/nix/configurations/vanadium/home/xmonad/xmonad.hs index b56b81a9..76fe99af 100644 --- a/nix/configurations/vanadium/home/xmonad/xmonad.hs +++ b/nix/configurations/vanadium/home/xmonad/xmonad.hs @@ -19,7 +19,6 @@ import XMonad.Layout.Reflect import XMonad.Layout.Reflect.Message import XMonad.Layout.Renamed import XMonad.Layout.ResizableTile -import XMonad.Layout.ResizableTile.FixDescription import XMonad.Layout.Spacing import qualified XMonad.StackSet as W import XMonad.Util.EZConfig @@ -64,10 +63,9 @@ main = `additionalKeys` keybinds myLayout = - let tallr = renamed [ KeepWordsRight 2 ] {- keep "ResizableTall n" -} + let tallr = renamed [ Replace "Tall" ] $ smartSpacingWithEdge 5 $ reflectMsg . reflectHoriz - $ RTFixDescription $ ResizableTall 1 (1/10) (3/7) [] mag = magnifyxy 1.05 1.3 (NoMaster 3) False in avoidStruts @@ -332,15 +330,21 @@ fullFloat = W.RationalRect 0 0 1 1 buttomRightFloat = W.RationalRect (1%2) (1%2) (1%2) (1%2) xmobarConfig :: StatusBarConfig -xmobarConfig = statusBarProp "xmobar -x 0" (pure myPrettyPrinter) +xmobarConfig = statusBarProp "xmobar -x 0" myPrettyPrinter where - myPrettyPrinter = - filterOutWsPP [scratchpadWorkspaceTag] - $ def - { ppCurrent = xmobarColor "#000000" "#ffffff" . wrap " " " " . fmap toUpper - , ppHiddenNoWindows = xmobarColor "#9c9c9c" "" . const "⋅" - , ppSep = " | " - } + windowCount :: X Int + windowCount = gets $ length . W.integrate' . W.stack . W.workspace . W.current . windowset + + myPrettyPrinter :: X PP + myPrettyPrinter = do + wCount <- windowCount + pure + $ filterOutWsPP [scratchpadWorkspaceTag] + $ def + { ppCurrent = xmobarColor "#000000" "#ffffff" . wrap " " " " . ( <> ":" <> show wCount) + , ppHiddenNoWindows = xmobarColor "#9c9c9c" "" . const "⋅" + , ppSep = " | " + } myScratchpads :: [NamedScratchpad] myScratchpads = From b8f78260b3743f7636f082021959d60015944fa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Thu, 20 Nov 2025 10:36:39 +0800 Subject: [PATCH 097/178] vanadium/xmonad: show current window count in pp --- .../vanadium/home/xmonad/xmonad.hs | 23 +++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/nix/configurations/vanadium/home/xmonad/xmonad.hs b/nix/configurations/vanadium/home/xmonad/xmonad.hs index 76fe99af..8a0e721c 100644 --- a/nix/configurations/vanadium/home/xmonad/xmonad.hs +++ b/nix/configurations/vanadium/home/xmonad/xmonad.hs @@ -27,6 +27,7 @@ import XMonad.Util.NamedScratchpad import XMonad.Util.SpawnOnce import XMonad.Layout.Magnifier +import Data.Function import Data.Char.Greek import Data.Ratio import Data.Semigroup @@ -332,17 +333,31 @@ buttomRightFloat = W.RationalRect (1%2) (1%2) (1%2) (1%2) xmobarConfig :: StatusBarConfig xmobarConfig = statusBarProp "xmobar -x 0" myPrettyPrinter where - windowCount :: X Int - windowCount = gets $ length . W.integrate' . W.stack . W.workspace . W.current . windowset + mkPpCurrent :: X (String -> String) + mkPpCurrent = do + windowCount <- gets $ length . W.integrate' . W.stack . W.workspace . W.current . windowset + pure $ \wid -> + wid <> (if windowCount > 1 then ":" <> show windowCount else mempty) + & xmobarColor "#000000" "#ffffff" . wrap " " " " + + mkPpHidden :: X (String -> String) + mkPpHidden = do + m <- gets $ M.fromList . map (\x -> (W.tag x, length . W.integrate' . W.stack $ x)) . W.hidden . windowset + pure $ \wid -> + let windowCount = m M.! wid + in wid <> (if windowCount > 1 then ":" <> show windowCount else mempty) + & xmobarColor "#ffffff" "" myPrettyPrinter :: X PP myPrettyPrinter = do - wCount <- windowCount + myPpCurrent <- mkPpCurrent + myPpHidden <- mkPpHidden pure $ filterOutWsPP [scratchpadWorkspaceTag] $ def - { ppCurrent = xmobarColor "#000000" "#ffffff" . wrap " " " " . ( <> ":" <> show wCount) + { ppCurrent = myPpCurrent , ppHiddenNoWindows = xmobarColor "#9c9c9c" "" . const "⋅" + , ppHidden = myPpHidden , ppSep = " | " } From 8f89b732d588e65946cd18826bb8f45fddfa70df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Thu, 20 Nov 2025 21:40:25 +0800 Subject: [PATCH 098/178] vanadium/kernel-overlay: disable unused drivers --- nix/configurations/vanadium/kernel-overlay.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nix/configurations/vanadium/kernel-overlay.nix b/nix/configurations/vanadium/kernel-overlay.nix index d2ceda7b..795a480a 100644 --- a/nix/configurations/vanadium/kernel-overlay.nix +++ b/nix/configurations/vanadium/kernel-overlay.nix @@ -96,6 +96,10 @@ in XEN_PVHVM = lib.mkForce unset; XEN_SAVE_RESTORE = lib.mkForce unset; XEN_SYS_HYPERVISOR = lib.mkForce unset; + + # Device Driver + MACINTOSH_DRIVERS = no; # hmm + SURFACE_PLATFORMS = no; # ew }; } ); From 812d50160e8d0e180dbcea51c919ea4ef0df27e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Fri, 21 Nov 2025 10:07:50 +0800 Subject: [PATCH 099/178] vanadium: update networks --- nix/networks/list.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nix/networks/list.nix b/nix/networks/list.nix index 8095998f..3dca7a25 100644 --- a/nix/networks/list.nix +++ b/nix/networks/list.nix @@ -89,6 +89,10 @@ in ssid = "R1108"; randomizeMac = true; } + { + ssid = "NTUH_guest"; + randomizeMac = true; + } { ssid = "_SNCF_WIFI_INOUI"; } { ssid = "_WIFI_LYRIA"; } From 7decf821d7383f64727cac544ad1632823a1d638 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Fri, 21 Nov 2025 21:36:36 +0800 Subject: [PATCH 100/178] age: update iambconfig --- nix/secrets/iambconfig.age | Bin 1054 -> 1017 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/nix/secrets/iambconfig.age b/nix/secrets/iambconfig.age index 707377f3cd7fcbb756c8b4ad92f88701d30481ba..00f559cde4a2c18479dcb480d65606039cf8a92c 100644 GIT binary patch delta 975 zcmV;=12Fua2>Az)C0;jgcWZS~AX7qgVo_B$XIW89Wl4H;FK~BnGJ1DSW>{fYQZQ#p zQZ#E*d2nkrYH?{<3Qt#KFJe+rNM}cAa%5{(R9a#-NJBy~Ok{6mQa5WtRWU?1WGhcH zPDFHTlV1TBe{m~FGgf$5K{ji1b7DwBd38@#bVyW5Qe;+dLThSlcsVgyLv(doGcPe` z3TG>5F=k6MaWiUkO=(X@Y*%=4RBT}@HfS?6D|2#US9dTtH#SXkI7x9h3N1b$b8~1d zWn?lnH8D9LFicD{P*EUAHY;pdIYvxzFmNS~4(YS5*pZYiLDTcWZS~Gf6dAHArenHB~iOWn@HfZ!bZ1Z%QjtODk1W zaW^t_Pj3n>J|IUeXL4m>b7de`OgT>=eq?t>AWnBEDhg?BPEkQMcT8kgVp>jUGD}ZO zY-UMWaAspRaAPn^Qb#p3RVz$HYcL8eEiE8Se`9x9Xmv6$buu(gZ+REasA#24)rvNf>{B(bqYe zg88b=coQmJ@AuwfYR&2{@HhlP$kTFVhUYU{{S4kA3>dkqx_{8GMfM+HSDX|5Azbtj ze>xzmxXg+%j_~o8IZ>=_aS{jf;B-afIpE~4mpu5U)mc(&v*UXodJ}=SK`>K=bX1Jv zJbmPb8*U@Mh7P0NdY)?%^d)udEhAeXq&)sE6SH*!l8!&dER1p(;bD<>z82g!;dUXU z*_VjX(`g7Mz&a>@%i{p$Qvs|4Hhzt^f1#aLLH+t5STD|Rz0_O2ZRapS&_0-!Ikc5- zOPRAm&8x|+ofX{kHmwAsg${NyKE`G2h80@cZ4{>IDU%5u(GK)y3-Q5I?G_V}pR(s8 zBZN^Zwv51`MS3@82@4IdFL3eu@_46^$GS$5vksm?J&SlDp}Q>-bXnVD8;rmzWm+cF zAWv`EAAH)vZq&fONUK8-+7557nb86!O}_pomh@dbTkOMN&=|8@Hv5+O{a!=C$bDTtdR7Ktm|ih%<6J zLog!g%K*=Zq<$ZaAdnhR#k1iw4LA~X+^TGaH9Bi5t7Yt5zK)ae0p0>S)Pa~S7I(6y ztdXVN%3xTOj;mYh?DY@@Ta*#Khm`rCNGoNM$6~C`>W{Z#F|{Lv1!>N#_&+BE5yXQ5 z2uUO(GBROxs9XjaoR(St4WhK)ED(N@@lbLkpJ1JYwiTlpk<+9FISG&Y18kNT6qGk( z%gCa5y}&yltwfDGgiz3}3}rHn*niv$&79RM4JQ3=-VcbM1F|##vu=HiRmTA{9Zgm< zB0h-NU<$&R2BiR}+v@ys3i3Nm4p1AyRPsO&WQ=(sl*Ub34F!i$oxzTuN7m)ZnSAgUoZ*HpIy_qzG+!tPh42i^0zN@kH&Ug-*9B;w6t)3Q+{Ub z&hMU*)jL|ybH`@8h^6v;f?VN0V4gp>&Ro@ZcYdW|q@!q;NVb5F>l{;6-z94c&8L%B z!P)g!6t8hRNAGDSS2hoR(*5_RtFF^)?c%b@rEKqxqcx`v_cWz_YoLiRkxP}Ui-&>s zlHcxk?=i2@Er0bBy07%2ZgF|r;KK(+7ryS(?0@!cyyo8UjOVc=pCc!>4vdTbs+^XQ z#92!q}_Wq!oAxIu8Pv`we~XjmrExm;8tXJ=YiniL*<1n)2Awg zxurR4XZnZRWA2T|yT0I}$8!BwYYXukRa=gXt=sm-4NLFlDM7qG(q?*bx&Mid4fk(G e{=_Rsd)^wXE!#UcURpg6`1}v!sMUAtseb? Date: Fri, 21 Nov 2025 22:30:27 +0800 Subject: [PATCH 101/178] vanadium/xmonad: center float dialog and email composer --- .../vanadium/home/xmonad/xmonad.hs | 28 +++++++++++-------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/nix/configurations/vanadium/home/xmonad/xmonad.hs b/nix/configurations/vanadium/home/xmonad/xmonad.hs index 8a0e721c..2936b526 100644 --- a/nix/configurations/vanadium/home/xmonad/xmonad.hs +++ b/nix/configurations/vanadium/home/xmonad/xmonad.hs @@ -85,6 +85,9 @@ isDiscord = isEvolution :: Query Bool isEvolution = className ~? "gnome.Evolution" +isEvolutionComposer :: Query Bool +isEvolutionComposer = isEvolution <&&> title =? "Compose Message" + isFirefox :: Query Bool isFirefox = className =? "firefox" @@ -136,17 +139,20 @@ myActivateHook = myManageHook :: ManageHook myManageHook = - composeOne - [ isNautilusPreviewer -?> customFloating centeredFloat - , isFeh -?> doF copyToAll <> customFloating buttomRightFloat - , isMinder -?> customFloating centeredFloat - , isFirefoxPip -?> doF copyToAll <> customFloating buttomRightFloat - , isDiscord -?> doShift chatWS - , isEvolution -?> doShift chatWS - , isSignal -?> doShift chatWS - , isFirefox -?> insertPosition Master Newer - , isKitty -?> insertPosition Below Newer - , isNautilus <||> isSioyek -?> insertPosition End Older + composeAll + [ isNautilusPreviewer --> customFloating centeredFloat + , isFeh --> doF copyToAll <> customFloating buttomRightFloat + , isMinder --> customFloating centeredFloat + , isFirefoxPip --> doF copyToAll <> customFloating buttomRightFloat + , isDiscord --> doShift chatWS + , isEvolution --> doShift chatWS + , isSignal --> doShift chatWS + , isFirefox --> insertPosition Master Newer + , isKitty --> insertPosition Below Newer + , isNautilus <||> isSioyek --> insertPosition End Older + + , isDialog --> doF copyToAll <> customFloating centeredFloat + , isEvolutionComposer --> customFloating centeredFloat ] <> namedScratchpadManageHook myScratchpads From 6bebe18fcb01af0d59b5c05b9cf07d5d4e64ae50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Fri, 21 Nov 2025 22:56:07 +0800 Subject: [PATCH 102/178] vanadium/xmobar: update events --- nix/configurations/vanadium/home/xmobar/xmobar.hs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nix/configurations/vanadium/home/xmobar/xmobar.hs b/nix/configurations/vanadium/home/xmobar/xmobar.hs index a4958817..058bf24e 100644 --- a/nix/configurations/vanadium/home/xmobar/xmobar.hs +++ b/nix/configurations/vanadium/home/xmobar/xmobar.hs @@ -78,6 +78,8 @@ config = , "--target", "2025-11-29=à deux" , "--target", "2025-12-16=dragon book" , "--target", "2025-12-30=seule" + , "--target", "2025-12-15=campus baguette" + , "--target", "2026-02-22=dernier appel" ] "" (60 &minute) From ae721808c046ae976f0246d19e688dcbb1222595 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Fri, 21 Nov 2025 22:56:57 +0800 Subject: [PATCH 103/178] vanadium/xmonad: ignore digikam pop ups --- nix/configurations/vanadium/home/xmonad/xmonad.hs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nix/configurations/vanadium/home/xmonad/xmonad.hs b/nix/configurations/vanadium/home/xmonad/xmonad.hs index 2936b526..b6ee4e7b 100644 --- a/nix/configurations/vanadium/home/xmonad/xmonad.hs +++ b/nix/configurations/vanadium/home/xmonad/xmonad.hs @@ -125,6 +125,11 @@ isMinder = className =? "Minder" <&&> (not <$> title ~? "Pick a Color") isKitty :: Query Bool isKitty = className =? "kitty" +isUtility :: Query Bool +isUtility = + -- Useful to ignore stuff like digikam pop ups + isInProperty "_NET_WM_WINDOW_TYPE" "_NET_WM_WINDOW_TYPE_UTILITY" + myActivateHook :: ManageHook myActivateHook = -- Ignore activate request @@ -151,6 +156,7 @@ myManageHook = , isKitty --> insertPosition Below Newer , isNautilus <||> isSioyek --> insertPosition End Older + , isUtility --> doIgnore , isDialog --> doF copyToAll <> customFloating centeredFloat , isEvolutionComposer --> customFloating centeredFloat ] From 4bb8909218054a559051b9a5ec157267d32f4eb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Fri, 21 Nov 2025 23:44:17 +0800 Subject: [PATCH 104/178] vanadium/xmonad: make evolution handling smarter How many window title are there :sob: --- nix/configurations/vanadium/home/xmonad/xmonad.hs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/nix/configurations/vanadium/home/xmonad/xmonad.hs b/nix/configurations/vanadium/home/xmonad/xmonad.hs index b6ee4e7b..438071bd 100644 --- a/nix/configurations/vanadium/home/xmonad/xmonad.hs +++ b/nix/configurations/vanadium/home/xmonad/xmonad.hs @@ -86,7 +86,14 @@ isEvolution :: Query Bool isEvolution = className ~? "gnome.Evolution" isEvolutionComposer :: Query Bool -isEvolutionComposer = isEvolution <&&> title =? "Compose Message" +isEvolutionComposer = + isEvolution <&&> + (fmap or . sequence) + [ title =? "Compose Message" + , title ^? "Re: " -- reply message composer + , title ^? "Appointment" -- calendar event editor + , title ^? "Meeting" -- calendar event editor + ] isFirefox :: Query Bool isFirefox = className =? "firefox" From 8e6ce9e5df649bd926f8a8f9ba4a93d8b797998a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sat, 22 Nov 2025 10:13:02 +0800 Subject: [PATCH 105/178] vanadium/xmonad: useless refactor Why not, it's Saturday. --- nix/configurations/vanadium/home/xmonad/xmonad.hs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/nix/configurations/vanadium/home/xmonad/xmonad.hs b/nix/configurations/vanadium/home/xmonad/xmonad.hs index 438071bd..50724ef3 100644 --- a/nix/configurations/vanadium/home/xmonad/xmonad.hs +++ b/nix/configurations/vanadium/home/xmonad/xmonad.hs @@ -191,13 +191,16 @@ doShiftAndGreedyView n = doF . go =<< ask where go :: Window -> WindowSet -> WindowSet go w s = W.greedyView n $ W.shiftWin n w s -hasProp :: (Window -> WindowSet -> Bool) -> Query Bool -hasProp f = f <$> ask <*> (liftX $ gets windowset) +queryWindowSet :: Query WindowSet +queryWindowSet = liftX $ gets windowset windowIsInCurrentWorkspace :: Query Bool -windowIsInCurrentWorkspace = hasProp $ \w s -> case W.findTag w s of - Just from | from == W.currentTag s -> True - _ -> False +windowIsInCurrentWorkspace = do + w <- ask + s <- queryWindowSet + pure $ case W.findTag w s of + Just from | from == W.currentTag s -> True + _ -> False myStartupHook :: X () myStartupHook = do From 36af1392540e4da307333073c3c54d55eea7b030 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sat, 22 Nov 2025 13:53:04 +0800 Subject: [PATCH 106/178] packages/ruler: update --- nix/packages/by-name/ruler/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nix/packages/by-name/ruler/package.nix b/nix/packages/by-name/ruler/package.nix index 1a7da098..535d9cba 100644 --- a/nix/packages/by-name/ruler/package.nix +++ b/nix/packages/by-name/ruler/package.nix @@ -11,8 +11,8 @@ let domain = "git.confusedcompiler.org"; owner = "leana8959"; repo = "ruler"; - rev = "00b6c4f1b5d764b049028ba4207ca1dc8ad74f2b"; - hash = "sha256-CI9jKcNoFqv4AgQIFFkqafcg2ybs2MN+RaEnuv72Mbc="; + rev = "0cad6d87e2e607b39fe72fc292924c069e661293"; + hash = "sha256-AIjGG2FxMiojO1E8jJxBXs9ZaRy3OEAtEp5CwicllRE="; }) { }; cabalOverrides = o: { From f2ab0ac3a3fe483e4352a93db2b09a238d31bbb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sat, 22 Nov 2025 14:26:09 +0800 Subject: [PATCH 107/178] vanadium/xmonad: float pavucontrol --- nix/configurations/vanadium/home/xmonad/xmonad.hs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nix/configurations/vanadium/home/xmonad/xmonad.hs b/nix/configurations/vanadium/home/xmonad/xmonad.hs index 50724ef3..e2867807 100644 --- a/nix/configurations/vanadium/home/xmonad/xmonad.hs +++ b/nix/configurations/vanadium/home/xmonad/xmonad.hs @@ -117,6 +117,9 @@ isElement = isFirefox <&&> title ~? "Element" isFirefoxPip :: Query Bool isFirefoxPip = isFirefox <&&> title =? "Incrustation vidéo" +isPavucontrol :: Query Bool +isPavucontrol = className =? "pavucontrol" + isFeh :: Query Bool isFeh = className =? "feh" @@ -153,6 +156,7 @@ myManageHook :: ManageHook myManageHook = composeAll [ isNautilusPreviewer --> customFloating centeredFloat + , isPavucontrol --> customFloating centeredFloat , isFeh --> doF copyToAll <> customFloating buttomRightFloat , isMinder --> customFloating centeredFloat , isFirefoxPip --> doF copyToAll <> customFloating buttomRightFloat From 70e7b708753b3dacf2931dcedc804cf750f0cdd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sat, 22 Nov 2025 20:22:49 +0800 Subject: [PATCH 108/178] packages/ruler: update --- nix/packages/by-name/ruler/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nix/packages/by-name/ruler/package.nix b/nix/packages/by-name/ruler/package.nix index 535d9cba..5854849f 100644 --- a/nix/packages/by-name/ruler/package.nix +++ b/nix/packages/by-name/ruler/package.nix @@ -11,8 +11,8 @@ let domain = "git.confusedcompiler.org"; owner = "leana8959"; repo = "ruler"; - rev = "0cad6d87e2e607b39fe72fc292924c069e661293"; - hash = "sha256-AIjGG2FxMiojO1E8jJxBXs9ZaRy3OEAtEp5CwicllRE="; + rev = "adb153af8aab6e0350e396de1f26316d97df3add"; + hash = "sha256-8+at3h5udcLXqbsaPcQ5HMGZMd6brZ21d/VW3kSyMFw="; }) { }; cabalOverrides = o: { From 8e7cfef3f2ca5017a6ad1385925e721a2afc0141 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sat, 22 Nov 2025 21:36:15 +0800 Subject: [PATCH 109/178] packages/hrt-time: init --- nix/packages/by-name/hrt-time/my-day.patch | 11 ++++++++ nix/packages/by-name/hrt-time/package.nix | 30 ++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 nix/packages/by-name/hrt-time/my-day.patch create mode 100644 nix/packages/by-name/hrt-time/package.nix diff --git a/nix/packages/by-name/hrt-time/my-day.patch b/nix/packages/by-name/hrt-time/my-day.patch new file mode 100644 index 00000000..0b951de0 --- /dev/null +++ b/nix/packages/by-name/hrt-time/my-day.patch @@ -0,0 +1,11 @@ +diff --git a/hrt-time.sh b/hrt-time.sh +index d9811dd..f37aa6f 100755 +--- a/hrt-time.sh ++++ b/hrt-time.sh +@@ -1,7 +1,7 @@ + #!/bin/bash + + secondsNow=$(date +%s) +-secondsThen=$(date -d "october 17 2024 19:00" +%s) ++secondsThen=$(date -d "november 12 2021" +%s) + seconds=$((secondsNow - secondsThen)) diff --git a/nix/packages/by-name/hrt-time/package.nix b/nix/packages/by-name/hrt-time/package.nix new file mode 100644 index 00000000..713bb8f1 --- /dev/null +++ b/nix/packages/by-name/hrt-time/package.nix @@ -0,0 +1,30 @@ +{ + fetchFromGitHub, + stdenvNoCC, + lib, +}: +let + rev = "b344ab770e4c08d0bb13c38ea61979b282e24db7"; +in +stdenvNoCC.mkDerivation { + pname = "hrt-time"; + version = "unstable-" + lib.substring 0 8 rev; + + src = fetchFromGitHub { + owner = "ariannelafraise"; + repo = "hrt-time"; + inherit rev; + hash = "sha256-+AhLkcCETVnF6S+ov1oKxhs3M9F6ghyyERoLN3aMMxw="; + }; + + installPhase = '' + mkdir -p $out/bin + cp hrt-time.sh $out/bin/hrt-time + ''; + + patches = [ + ./my-day.patch + ]; + + meta.mainProgram = "hrt-time"; +} From 530977a139a30440b62cd422d0f73d5f66f1f282 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sat, 22 Nov 2025 21:46:40 +0800 Subject: [PATCH 110/178] vanadium/xmobar: hrt-time --- nix/configurations/vanadium/home/xmobar.nix | 1 + .../vanadium/home/xmobar/xmobar.hs | 16 ++++------------ 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/nix/configurations/vanadium/home/xmobar.nix b/nix/configurations/vanadium/home/xmobar.nix index 7dc65e8f..0da89245 100644 --- a/nix/configurations/vanadium/home/xmobar.nix +++ b/nix/configurations/vanadium/home/xmobar.nix @@ -18,6 +18,7 @@ lib.makeBinPath [ ghc pkgs.libnotify + pkgs.hrt-time ] }" ''; diff --git a/nix/configurations/vanadium/home/xmobar/xmobar.hs b/nix/configurations/vanadium/home/xmobar/xmobar.hs index 058bf24e..1b1bd923 100644 --- a/nix/configurations/vanadium/home/xmobar/xmobar.hs +++ b/nix/configurations/vanadium/home/xmobar/xmobar.hs @@ -61,10 +61,7 @@ config = , textOffset = 2 , commands = - [ Run $ DateZone "%a %d %H:%M:%S" "" "" "hereClock" (1 &second) - , Run $ DateZone "%H:%M" "" "Europe/Dublin" "dublinClock" (10 &second) - , Run $ DateZone "%H:%M" "" "Europe/Paris" "parisClock" (10 &second) - , Run $ DateZone "%H:%M" "" "Asia/Taipei" "tstClock" (10 &second) + [ Run $ DateZone "%a %d %H:%M:%S" "" "" "hereClock" (1 &second) , Run $ Com "tomorrow" @@ -103,6 +100,7 @@ config = ] (6 &second) , Run $ Com "powerprofilesctl" ["get"] "" (6 &second) + , Run $ Com "hrt-time" ["days"] "" (60 &minute) , Run XMonadLog , Run $ Weather @@ -123,15 +121,9 @@ config = " %XMonadLog% " <> alignSep config <> intercalate "|" - [ (unwords . map greyFg) - [ "[DUB: %dublinClock%]" - , "[CDG: %parisClock%]" - , "[TPE: %tstClock%]" - ] - <> " " - , " %RCSS% " + [ " %RCSS% " , " %battery%, %powerprofilesctl%) " - , " %hereClock% (%tomorrow%) " + , " %hereClock% (%tomorrow%, %hrt-time%) " ] } From b0813c1e9699dc7f2d2311b0a2b8d1bd159be388 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sat, 22 Nov 2025 22:27:21 +0800 Subject: [PATCH 111/178] vanadium/connectivity: block linkedin --- nix/configurations/vanadium/nixos/connectivity.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nix/configurations/vanadium/nixos/connectivity.nix b/nix/configurations/vanadium/nixos/connectivity.nix index e2bf050a..c484540f 100644 --- a/nix/configurations/vanadium/nixos/connectivity.nix +++ b/nix/configurations/vanadium/nixos/connectivity.nix @@ -61,11 +61,15 @@ # # This is the fascist one, just block it because I can't tell - nixos.wiki + 0.0.0.0 nixos.wiki # Gotta purify my smoos brain for a while 0.0.0.0 instagram.com 0.0.0.0 www.instagram.com + + # The "people who you viewed can see you" thing is weird af + 0.0.0.0 linkedin.com + 0.0.0.0 www.linkedin.com ''; }; From d74245aff7dbb5e3114d155c29df3358ecba1553 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sun, 23 Nov 2025 10:51:44 +0800 Subject: [PATCH 112/178] vanadium/zen-browser: init --- nix/configurations/vanadium.nix | 5 + .../vanadium/home/zen-browser.nix | 165 +++++++++++++++++ nix/homeModules/common/firefox.nix | 22 +-- nix/homeModules/common/zen-browser.nix | 169 ++++++++++++++++++ nix/overlays/zen-browser.nix | 15 ++ npins/sources.json | 13 ++ 6 files changed, 378 insertions(+), 11 deletions(-) create mode 100644 nix/configurations/vanadium/home/zen-browser.nix create mode 100644 nix/homeModules/common/zen-browser.nix create mode 100644 nix/overlays/zen-browser.nix diff --git a/nix/configurations/vanadium.nix b/nix/configurations/vanadium.nix index 80919604..7234fbdf 100644 --- a/nix/configurations/vanadium.nix +++ b/nix/configurations/vanadium.nix @@ -56,6 +56,7 @@ in ../overlays/eepy.nix ../overlays/calibre-no-mime.nix ../overlays/fcitx5-table-extra-taiwanese.nix + ../overlays/zen-browser.nix ../overlays/iosevka.nix ../packages/overlay.nix @@ -152,6 +153,7 @@ in ./vanadium/home/programs.nix ./vanadium/home/misc.nix + ./vanadium/home/zen-browser.nix ./vanadium/home/firefox.nix ./vanadium/home/xmobar.nix @@ -170,6 +172,7 @@ in ../homeModules/common/atuin.nix ../homeModules/common/direnv.nix ../homeModules/common/feh.nix + ../homeModules/common/zen-browser.nix ../homeModules/common/firefox.nix ../homeModules/common/fzf.nix ../homeModules/common/git.nix @@ -191,6 +194,8 @@ in # (sources.agenix + "/modules/age-home.nix") sources.wired-notify.asFlake.homeManagerModules.default + + sources.zen-browser.asFlake.homeModules.twilight ]; } diff --git a/nix/configurations/vanadium/home/zen-browser.nix b/nix/configurations/vanadium/home/zen-browser.nix new file mode 100644 index 00000000..beee8d6a --- /dev/null +++ b/nix/configurations/vanadium/home/zen-browser.nix @@ -0,0 +1,165 @@ +{ + pkgs, + config, + ... +}: +let + inherit (pkgs) nur; +in +{ + programs.zen-browser = { + enable = true; + + policies.SearchEngines.Add = [ + # Forges + { + Name = "GitHub"; + Alias = "@gh"; + IconURL = "https://github.com/favicon.ico"; + Description = "Your code yum yum"; + URLTemplate = "https://github.com/search?q={searchTerms}&type=repositories"; + } + { + Name = "GitHub (Code Search)"; + Alias = "@ghc"; + IconURL = "https://github.com/favicon.ico"; + Description = "Your code yum yum"; + URLTemplate = "https://github.com/search?q={searchTerms}&type=code"; + } + { + Name = "Codeberg"; + Alias = "@cb"; + IconURL = "https://codeberg.org/favicon.ico"; + Description = "Software development, but free!"; + URLTemplate = "https://codeberg.org/explore/repos?q={searchTerms}"; + } + { + Name = "?C"; + Alias = "@cc"; + IconURL = "https://git.confusedcompiler.org/favicon.ico"; + URLTemplate = "https://git.confusedcompiler.org/explore/repos?q={searchTerms}"; + } + + # Nix{,OS,pkgs} + { + Name = "NixOS Search (Package)"; + Alias = "@np"; + IconURL = "https://nixos.org/favicon.ico"; + Description = "Search in nixpkgs"; + URLTemplate = "https://search.nixos.org/packages?query={searchTerms}"; + } + { + Name = "NixOS Search (Options)"; + Alias = "@no"; + IconURL = "https://nixos.org/favicon.ico"; + Description = "Search in NixOS options"; + URLTemplate = "https://search.nixos.org/options?query={searchTerms}"; + } + + # Haskell + { + Name = "Flora"; + Alias = "@hs"; + IconURL = "https://flora.pm/static/icons/favicon-32x32.png"; + URLTemplate = "https://flora.pm/search?q={searchTerms}"; + } + + # Discourse + { + Name = "NixOS Discourse"; + Alias = "@nd"; + IconURL = "https://nixos.org/favicon.ico"; + URLTemplate = "https://discourse.nixos.org/search?q={searchTerms}"; + } + { + Name = "Framework Discourse"; + Alias = "@fd"; + IconURL = "https://frame.work/favicon.ico"; + URLTemplate = "https://community.frame.work/search?q={searchTerms}"; + } + + # Misc + { + Name = "YouTube"; + Alias = "@yt"; + IconURL = "https://youtube.com/favicon.ico"; + SuggestURLTemplate = "http://suggestqueries.google.com/complete/search?q={searchTerms}&ds=yt"; + URLTemplate = "https://www.youtube.com/results?search_query={searchTerms}"; + } + { + Name = "Genius"; + Alias = "@geni"; + IconURL = "https://genius.com/favicon.ico"; + URLTemplate = "https://genius.com/search?q={searchTerms}"; + } + ]; + + profiles = { + default = { + settings = { + # "full-screen-api.ignore-widgets" = true; # limit fullscreen mode to window + }; + userChrome = '' + /* monofont tweak */ + #statuspanel-label { + font-family: monospace; + } + .urlbar-input-box { + font-family: monospace; + } + ''; + extensions.packages = + let + addons = nur.repos.rycee.firefox-addons; + in + [ + addons.sponsorblock + addons.return-youtube-dislikes + addons.consent-o-matic + ]; + }; + + junk = { + id = 1; + inherit (config.programs.zen-browser.profiles.default) + settings + userChrome + ; + + extensions.packages = + let + addons = nur.repos.rycee.firefox-addons; + in + [ addons.multi-account-containers ]; + + containers = { + raisin = { + color = "purple"; + icon = "fruit"; + id = 1; + }; + pomme = { + color = "red"; + icon = "fruit"; + id = 2; + }; + }; + }; + + # Isolate it because it's proprietary + tampermonkey = { + id = 2; + inherit (config.programs.zen-browser.profiles.default) + settings + userChrome + ; + + extensions.packages = + let + addons = nur.repos.rycee.firefox-addons; + in + [ addons.tampermonkey ]; + }; + }; + }; +} diff --git a/nix/homeModules/common/firefox.nix b/nix/homeModules/common/firefox.nix index 556a528d..c5a1b96b 100644 --- a/nix/homeModules/common/firefox.nix +++ b/nix/homeModules/common/firefox.nix @@ -129,15 +129,15 @@ in }; }; - xdg.mimeApps = lib.mkIf cfg.enable { - enable = true; - # source: https://unix.stackexchange.com/a/684582 - defaultApplications = { - "text/html" = "firefox.desktop"; - "x-scheme-handler/http" = "firefox.desktop"; - "x-scheme-handler/https" = "firefox.desktop"; - "x-scheme-handler/about" = "firefox.desktop"; - "x-scheme-handler/unknown" = "firefox.desktop"; - }; - }; + # xdg.mimeApps = lib.mkIf cfg.enable { + # enable = true; + # # source: https://unix.stackexchange.com/a/684582 + # defaultApplications = { + # "text/html" = "firefox.desktop"; + # "x-scheme-handler/http" = "firefox.desktop"; + # "x-scheme-handler/https" = "firefox.desktop"; + # "x-scheme-handler/about" = "firefox.desktop"; + # "x-scheme-handler/unknown" = "firefox.desktop"; + # }; + # }; } diff --git a/nix/homeModules/common/zen-browser.nix b/nix/homeModules/common/zen-browser.nix new file mode 100644 index 00000000..2f9e47cf --- /dev/null +++ b/nix/homeModules/common/zen-browser.nix @@ -0,0 +1,169 @@ +{ + pkgs, + config, + lib, + ... +}: +let + inherit (pkgs) nur; + + cfg = config.programs.zen-browser; +in +{ + programs.zen-browser = { + # TODO: upstream default is broken? They default to zen-twilight + package = pkgs.twilight; + + # https://mozilla.github.io/policy-templates + # The following have more complex logic, keep them as policies and not profiles + policies = { + RequestedLocales = [ + "fr-FR" # for fuck sake stop showing me translated version of French gov sites + "zh-TW" + "en-US" + ]; + + SearchEngines = { + Remove = [ + "Google" + "Bing" + "DuckDuckGo" + "Qwant" + "eBay" + "Perplexity" + ]; + Default = "Brave"; + Add = [ + { + Name = "Brave"; + Alias = "@br"; + URLTemplate = "https://search.brave.com/search?q={searchTerms}&source=web"; + SuggestURLTemplate = "https://suggestqueries.google.com/complete/search?q={searchTerms}"; + } + ]; + }; + NoDefaultBookmarks = true; + DisplayMenuBar = "never"; + DisplayBookmarksToolbar = "never"; + DNSOverHTTPS = { + Enabled = false; + }; + }; + + # https://searchfox.org/mozilla-central/source/browser/components/enterprisepolicies/Policies.sys.mjs + # Some policies can be rewritten to profiles configuration + # + # TODO: try out the "locked" semantic from zen + # https://github.com/0xc000022070/zen-browser-flake/tree/main#preferences + profiles.default = { + settings = { + "toolkit.legacyUserProfileCustomizations.stylesheets" = true; + "browser.tabs.loadInBackground" = true; + "browser.ctrlTab.sortByRecentlyUsed" = false; + "layout.css.devPixelsPerPx" = 1.1; + + # open links in new window + # this works a lot better with xmonad where I have a bunch of windows + "browser.link.open_newwindow" = 2; + + # Sponsored crap + # Yes + "browser.newtabpage.activity-stream.showSearch" = true; + "browser.newtabpage.activity-stream.feeds.topsites" = true; + # No + "browser.newtabpage.activity-stream.showSponsoredTopSites" = false; + "browser.newtabpage.activity-stream.feeds.section.highlights" = false; + "browser.newtabpage.activity-stream.feeds.system.topstories" = false; + "browser.newtabpage.activity-stream.feeds.section.topstories" = false; + "browser.newtabpage.activity-stream.showSponsored" = false; + + # URL + # Yes + "browser.urlbar.suggest.quicksuggest.nonsponsored" = true; + # No + "browser.urlbar.suggest.quicksuggest.sponsored" = false; + + # Pasword manager + "signon.rememberSignons" = false; + "services.passwordSavingEnabled" = false; + "pref.privacy.disable_button.view_passwords" = false; + + # Hardware acceleration + "layers.acceleration.disabled" = false; + + # Screenshot + "screenshots.browser.component.enabled" = true; + + # Recommendations + "browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons" = false; + "browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features" = false; + "extensions.htmlaboutaddons.recommendations.enabled" = false; # Addons + + # Onboarding + "browser.aboutwelcome.enabled" = false; + + # AI crap + "browser.ml.chat.enabled" = false; + "browser.ml.chat.page" = false; + "browser.ml.chat.shortcuts" = false; + "browser.ml.chat.sidebar" = false; + + # Prevent WebRTC leak + # https://mullvad.net/en/help/webrtc + "media.peerconnection.enabled" = false; + }; + + extensions.packages = + let + addons = nur.repos.rycee.firefox-addons; + in + [ + addons.ublock-origin + addons.privacy-badger + addons.user-agent-string-switcher + + /* + Here's to you who want to remove news feed eradicator because you find it annoying: + It is here to annoy you so it is less likely for you to be on the agency inversion path. + DO NOT REMOVE IT. I repeat, DO NOT REMOVE IT. + + If you think it's annoying, go do some jump rope, sing, live. + */ + addons.news-feed-eradicator # did you read the comment above? + addons.multi-account-containers + ]; + }; + }; + + xdg.mimeApps = + let + associations = builtins.listToAttrs ( + map + (name: { + inherit name; + value = cfg.package.meta.desktopFileName; + }) + [ + "application/x-extension-shtml" + "application/x-extension-xhtml" + "application/x-extension-html" + "application/x-extension-xht" + "application/x-extension-htm" + "x-scheme-handler/unknown" + "x-scheme-handler/mailto" + "x-scheme-handler/chrome" + "x-scheme-handler/about" + "x-scheme-handler/https" + "x-scheme-handler/http" + "application/xhtml+xml" + "application/json" + "text/plain" + "text/html" + ] + ); + in + lib.mkIf cfg.enable { + associations.added = associations; + defaultApplications = associations; + }; +} diff --git a/nix/overlays/zen-browser.nix b/nix/overlays/zen-browser.nix new file mode 100644 index 00000000..1afc5307 --- /dev/null +++ b/nix/overlays/zen-browser.nix @@ -0,0 +1,15 @@ +let + sources = import ../../npins; +in +final: _: { + inherit (sources.zen-browser.asFlake.packages.${final.system}) + beta-unwrapped + twilight-unwrapped + twilight-official-unwrapped + + beta # default + + twilight + twilight-official + ; +} diff --git a/npins/sources.json b/npins/sources.json index ae589196..5ea34392 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -368,6 +368,19 @@ "revision": "6a96aa2066d8ad945f2323b63dc217081ef51168", "url": "https://github.com/Toqozz/wired-notify/archive/6a96aa2066d8ad945f2323b63dc217081ef51168.tar.gz", "hash": "02b8pva12rzcciq5lavwk824xaym28igfsva4kikvd7mxs06ccwx" + }, + "zen-browser": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "0xc000022070", + "repo": "zen-browser-flake" + }, + "branch": "main", + "submodules": false, + "revision": "ef951ed2d976bcd1f57a09f358fdda9fa9425018", + "url": "https://github.com/0xc000022070/zen-browser-flake/archive/ef951ed2d976bcd1f57a09f358fdda9fa9425018.tar.gz", + "hash": "1s85cxiwhzwqgbazcgv12xqdlk1nkfynv23r9zj8gip4j6pznr4z" } }, "version": 5 From 7549b797302101de38b18df929a3bb98876313d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sun, 23 Nov 2025 10:57:12 +0800 Subject: [PATCH 113/178] zen-browser: move package name oddity to overlay --- nix/homeModules/common/zen-browser.nix | 3 --- nix/overlays/zen-browser.nix | 22 +++++++++++++--------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/nix/homeModules/common/zen-browser.nix b/nix/homeModules/common/zen-browser.nix index 2f9e47cf..b490d95b 100644 --- a/nix/homeModules/common/zen-browser.nix +++ b/nix/homeModules/common/zen-browser.nix @@ -11,9 +11,6 @@ let in { programs.zen-browser = { - # TODO: upstream default is broken? They default to zen-twilight - package = pkgs.twilight; - # https://mozilla.github.io/policy-templates # The following have more complex logic, keep them as policies and not profiles policies = { diff --git a/nix/overlays/zen-browser.nix b/nix/overlays/zen-browser.nix index 1afc5307..f4ffa489 100644 --- a/nix/overlays/zen-browser.nix +++ b/nix/overlays/zen-browser.nix @@ -1,15 +1,19 @@ let sources = import ../../npins; in -final: _: { - inherit (sources.zen-browser.asFlake.packages.${final.system}) - beta-unwrapped - twilight-unwrapped - twilight-official-unwrapped +final: _: +let + zenpkgs = sources.zen-browser.asFlake.packages.${final.system}; +in +{ + # TODO: upstream default is broken? They default to zen-twilight + "zen-beta-unwrapped" = zenpkgs."beta-unwrapped"; + "zen-twilight-unwrapped" = zenpkgs."twilight-unwrapped"; + "zen-twilight-official-unwrapped" = zenpkgs."twilight-official-unwrapped"; - beta # default + # default + "zen-beta" = zenpkgs."beta"; - twilight - twilight-official - ; + "zen-twilight" = zenpkgs."twilight"; + "zen-twilight-official" = zenpkgs."twilight-official"; } From c2c655981af0fc900cf73fc5b4dcc8561e6fd836 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sun, 23 Nov 2025 11:05:57 +0800 Subject: [PATCH 114/178] Revert "vanadium/zen-browser: init" This reverts commit 87524f3b3d1a10f18797286af04ea700b6ea16a2. --- nix/configurations/vanadium.nix | 5 - .../vanadium/home/zen-browser.nix | 165 ----------------- nix/homeModules/common/firefox.nix | 22 +-- nix/homeModules/common/zen-browser.nix | 166 ------------------ nix/overlays/zen-browser.nix | 19 -- npins/sources.json | 13 -- 6 files changed, 11 insertions(+), 379 deletions(-) delete mode 100644 nix/configurations/vanadium/home/zen-browser.nix delete mode 100644 nix/homeModules/common/zen-browser.nix delete mode 100644 nix/overlays/zen-browser.nix diff --git a/nix/configurations/vanadium.nix b/nix/configurations/vanadium.nix index 7234fbdf..80919604 100644 --- a/nix/configurations/vanadium.nix +++ b/nix/configurations/vanadium.nix @@ -56,7 +56,6 @@ in ../overlays/eepy.nix ../overlays/calibre-no-mime.nix ../overlays/fcitx5-table-extra-taiwanese.nix - ../overlays/zen-browser.nix ../overlays/iosevka.nix ../packages/overlay.nix @@ -153,7 +152,6 @@ in ./vanadium/home/programs.nix ./vanadium/home/misc.nix - ./vanadium/home/zen-browser.nix ./vanadium/home/firefox.nix ./vanadium/home/xmobar.nix @@ -172,7 +170,6 @@ in ../homeModules/common/atuin.nix ../homeModules/common/direnv.nix ../homeModules/common/feh.nix - ../homeModules/common/zen-browser.nix ../homeModules/common/firefox.nix ../homeModules/common/fzf.nix ../homeModules/common/git.nix @@ -194,8 +191,6 @@ in # (sources.agenix + "/modules/age-home.nix") sources.wired-notify.asFlake.homeManagerModules.default - - sources.zen-browser.asFlake.homeModules.twilight ]; } diff --git a/nix/configurations/vanadium/home/zen-browser.nix b/nix/configurations/vanadium/home/zen-browser.nix deleted file mode 100644 index beee8d6a..00000000 --- a/nix/configurations/vanadium/home/zen-browser.nix +++ /dev/null @@ -1,165 +0,0 @@ -{ - pkgs, - config, - ... -}: -let - inherit (pkgs) nur; -in -{ - programs.zen-browser = { - enable = true; - - policies.SearchEngines.Add = [ - # Forges - { - Name = "GitHub"; - Alias = "@gh"; - IconURL = "https://github.com/favicon.ico"; - Description = "Your code yum yum"; - URLTemplate = "https://github.com/search?q={searchTerms}&type=repositories"; - } - { - Name = "GitHub (Code Search)"; - Alias = "@ghc"; - IconURL = "https://github.com/favicon.ico"; - Description = "Your code yum yum"; - URLTemplate = "https://github.com/search?q={searchTerms}&type=code"; - } - { - Name = "Codeberg"; - Alias = "@cb"; - IconURL = "https://codeberg.org/favicon.ico"; - Description = "Software development, but free!"; - URLTemplate = "https://codeberg.org/explore/repos?q={searchTerms}"; - } - { - Name = "?C"; - Alias = "@cc"; - IconURL = "https://git.confusedcompiler.org/favicon.ico"; - URLTemplate = "https://git.confusedcompiler.org/explore/repos?q={searchTerms}"; - } - - # Nix{,OS,pkgs} - { - Name = "NixOS Search (Package)"; - Alias = "@np"; - IconURL = "https://nixos.org/favicon.ico"; - Description = "Search in nixpkgs"; - URLTemplate = "https://search.nixos.org/packages?query={searchTerms}"; - } - { - Name = "NixOS Search (Options)"; - Alias = "@no"; - IconURL = "https://nixos.org/favicon.ico"; - Description = "Search in NixOS options"; - URLTemplate = "https://search.nixos.org/options?query={searchTerms}"; - } - - # Haskell - { - Name = "Flora"; - Alias = "@hs"; - IconURL = "https://flora.pm/static/icons/favicon-32x32.png"; - URLTemplate = "https://flora.pm/search?q={searchTerms}"; - } - - # Discourse - { - Name = "NixOS Discourse"; - Alias = "@nd"; - IconURL = "https://nixos.org/favicon.ico"; - URLTemplate = "https://discourse.nixos.org/search?q={searchTerms}"; - } - { - Name = "Framework Discourse"; - Alias = "@fd"; - IconURL = "https://frame.work/favicon.ico"; - URLTemplate = "https://community.frame.work/search?q={searchTerms}"; - } - - # Misc - { - Name = "YouTube"; - Alias = "@yt"; - IconURL = "https://youtube.com/favicon.ico"; - SuggestURLTemplate = "http://suggestqueries.google.com/complete/search?q={searchTerms}&ds=yt"; - URLTemplate = "https://www.youtube.com/results?search_query={searchTerms}"; - } - { - Name = "Genius"; - Alias = "@geni"; - IconURL = "https://genius.com/favicon.ico"; - URLTemplate = "https://genius.com/search?q={searchTerms}"; - } - ]; - - profiles = { - default = { - settings = { - # "full-screen-api.ignore-widgets" = true; # limit fullscreen mode to window - }; - userChrome = '' - /* monofont tweak */ - #statuspanel-label { - font-family: monospace; - } - .urlbar-input-box { - font-family: monospace; - } - ''; - extensions.packages = - let - addons = nur.repos.rycee.firefox-addons; - in - [ - addons.sponsorblock - addons.return-youtube-dislikes - addons.consent-o-matic - ]; - }; - - junk = { - id = 1; - inherit (config.programs.zen-browser.profiles.default) - settings - userChrome - ; - - extensions.packages = - let - addons = nur.repos.rycee.firefox-addons; - in - [ addons.multi-account-containers ]; - - containers = { - raisin = { - color = "purple"; - icon = "fruit"; - id = 1; - }; - pomme = { - color = "red"; - icon = "fruit"; - id = 2; - }; - }; - }; - - # Isolate it because it's proprietary - tampermonkey = { - id = 2; - inherit (config.programs.zen-browser.profiles.default) - settings - userChrome - ; - - extensions.packages = - let - addons = nur.repos.rycee.firefox-addons; - in - [ addons.tampermonkey ]; - }; - }; - }; -} diff --git a/nix/homeModules/common/firefox.nix b/nix/homeModules/common/firefox.nix index c5a1b96b..556a528d 100644 --- a/nix/homeModules/common/firefox.nix +++ b/nix/homeModules/common/firefox.nix @@ -129,15 +129,15 @@ in }; }; - # xdg.mimeApps = lib.mkIf cfg.enable { - # enable = true; - # # source: https://unix.stackexchange.com/a/684582 - # defaultApplications = { - # "text/html" = "firefox.desktop"; - # "x-scheme-handler/http" = "firefox.desktop"; - # "x-scheme-handler/https" = "firefox.desktop"; - # "x-scheme-handler/about" = "firefox.desktop"; - # "x-scheme-handler/unknown" = "firefox.desktop"; - # }; - # }; + xdg.mimeApps = lib.mkIf cfg.enable { + enable = true; + # source: https://unix.stackexchange.com/a/684582 + defaultApplications = { + "text/html" = "firefox.desktop"; + "x-scheme-handler/http" = "firefox.desktop"; + "x-scheme-handler/https" = "firefox.desktop"; + "x-scheme-handler/about" = "firefox.desktop"; + "x-scheme-handler/unknown" = "firefox.desktop"; + }; + }; } diff --git a/nix/homeModules/common/zen-browser.nix b/nix/homeModules/common/zen-browser.nix deleted file mode 100644 index b490d95b..00000000 --- a/nix/homeModules/common/zen-browser.nix +++ /dev/null @@ -1,166 +0,0 @@ -{ - pkgs, - config, - lib, - ... -}: -let - inherit (pkgs) nur; - - cfg = config.programs.zen-browser; -in -{ - programs.zen-browser = { - # https://mozilla.github.io/policy-templates - # The following have more complex logic, keep them as policies and not profiles - policies = { - RequestedLocales = [ - "fr-FR" # for fuck sake stop showing me translated version of French gov sites - "zh-TW" - "en-US" - ]; - - SearchEngines = { - Remove = [ - "Google" - "Bing" - "DuckDuckGo" - "Qwant" - "eBay" - "Perplexity" - ]; - Default = "Brave"; - Add = [ - { - Name = "Brave"; - Alias = "@br"; - URLTemplate = "https://search.brave.com/search?q={searchTerms}&source=web"; - SuggestURLTemplate = "https://suggestqueries.google.com/complete/search?q={searchTerms}"; - } - ]; - }; - NoDefaultBookmarks = true; - DisplayMenuBar = "never"; - DisplayBookmarksToolbar = "never"; - DNSOverHTTPS = { - Enabled = false; - }; - }; - - # https://searchfox.org/mozilla-central/source/browser/components/enterprisepolicies/Policies.sys.mjs - # Some policies can be rewritten to profiles configuration - # - # TODO: try out the "locked" semantic from zen - # https://github.com/0xc000022070/zen-browser-flake/tree/main#preferences - profiles.default = { - settings = { - "toolkit.legacyUserProfileCustomizations.stylesheets" = true; - "browser.tabs.loadInBackground" = true; - "browser.ctrlTab.sortByRecentlyUsed" = false; - "layout.css.devPixelsPerPx" = 1.1; - - # open links in new window - # this works a lot better with xmonad where I have a bunch of windows - "browser.link.open_newwindow" = 2; - - # Sponsored crap - # Yes - "browser.newtabpage.activity-stream.showSearch" = true; - "browser.newtabpage.activity-stream.feeds.topsites" = true; - # No - "browser.newtabpage.activity-stream.showSponsoredTopSites" = false; - "browser.newtabpage.activity-stream.feeds.section.highlights" = false; - "browser.newtabpage.activity-stream.feeds.system.topstories" = false; - "browser.newtabpage.activity-stream.feeds.section.topstories" = false; - "browser.newtabpage.activity-stream.showSponsored" = false; - - # URL - # Yes - "browser.urlbar.suggest.quicksuggest.nonsponsored" = true; - # No - "browser.urlbar.suggest.quicksuggest.sponsored" = false; - - # Pasword manager - "signon.rememberSignons" = false; - "services.passwordSavingEnabled" = false; - "pref.privacy.disable_button.view_passwords" = false; - - # Hardware acceleration - "layers.acceleration.disabled" = false; - - # Screenshot - "screenshots.browser.component.enabled" = true; - - # Recommendations - "browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons" = false; - "browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features" = false; - "extensions.htmlaboutaddons.recommendations.enabled" = false; # Addons - - # Onboarding - "browser.aboutwelcome.enabled" = false; - - # AI crap - "browser.ml.chat.enabled" = false; - "browser.ml.chat.page" = false; - "browser.ml.chat.shortcuts" = false; - "browser.ml.chat.sidebar" = false; - - # Prevent WebRTC leak - # https://mullvad.net/en/help/webrtc - "media.peerconnection.enabled" = false; - }; - - extensions.packages = - let - addons = nur.repos.rycee.firefox-addons; - in - [ - addons.ublock-origin - addons.privacy-badger - addons.user-agent-string-switcher - - /* - Here's to you who want to remove news feed eradicator because you find it annoying: - It is here to annoy you so it is less likely for you to be on the agency inversion path. - DO NOT REMOVE IT. I repeat, DO NOT REMOVE IT. - - If you think it's annoying, go do some jump rope, sing, live. - */ - addons.news-feed-eradicator # did you read the comment above? - addons.multi-account-containers - ]; - }; - }; - - xdg.mimeApps = - let - associations = builtins.listToAttrs ( - map - (name: { - inherit name; - value = cfg.package.meta.desktopFileName; - }) - [ - "application/x-extension-shtml" - "application/x-extension-xhtml" - "application/x-extension-html" - "application/x-extension-xht" - "application/x-extension-htm" - "x-scheme-handler/unknown" - "x-scheme-handler/mailto" - "x-scheme-handler/chrome" - "x-scheme-handler/about" - "x-scheme-handler/https" - "x-scheme-handler/http" - "application/xhtml+xml" - "application/json" - "text/plain" - "text/html" - ] - ); - in - lib.mkIf cfg.enable { - associations.added = associations; - defaultApplications = associations; - }; -} diff --git a/nix/overlays/zen-browser.nix b/nix/overlays/zen-browser.nix deleted file mode 100644 index f4ffa489..00000000 --- a/nix/overlays/zen-browser.nix +++ /dev/null @@ -1,19 +0,0 @@ -let - sources = import ../../npins; -in -final: _: -let - zenpkgs = sources.zen-browser.asFlake.packages.${final.system}; -in -{ - # TODO: upstream default is broken? They default to zen-twilight - "zen-beta-unwrapped" = zenpkgs."beta-unwrapped"; - "zen-twilight-unwrapped" = zenpkgs."twilight-unwrapped"; - "zen-twilight-official-unwrapped" = zenpkgs."twilight-official-unwrapped"; - - # default - "zen-beta" = zenpkgs."beta"; - - "zen-twilight" = zenpkgs."twilight"; - "zen-twilight-official" = zenpkgs."twilight-official"; -} diff --git a/npins/sources.json b/npins/sources.json index 5ea34392..ae589196 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -368,19 +368,6 @@ "revision": "6a96aa2066d8ad945f2323b63dc217081ef51168", "url": "https://github.com/Toqozz/wired-notify/archive/6a96aa2066d8ad945f2323b63dc217081ef51168.tar.gz", "hash": "02b8pva12rzcciq5lavwk824xaym28igfsva4kikvd7mxs06ccwx" - }, - "zen-browser": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "0xc000022070", - "repo": "zen-browser-flake" - }, - "branch": "main", - "submodules": false, - "revision": "ef951ed2d976bcd1f57a09f358fdda9fa9425018", - "url": "https://github.com/0xc000022070/zen-browser-flake/archive/ef951ed2d976bcd1f57a09f358fdda9fa9425018.tar.gz", - "hash": "1s85cxiwhzwqgbazcgv12xqdlk1nkfynv23r9zj8gip4j6pznr4z" } }, "version": 5 From 2cada3b44e735c1c53e50e4c776065feaad593e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sun, 23 Nov 2025 18:58:17 +0800 Subject: [PATCH 115/178] home/firefox: improve xdg mimeApps configuration --- nix/homeModules/common/firefox.nix | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/nix/homeModules/common/firefox.nix b/nix/homeModules/common/firefox.nix index 556a528d..d479571b 100644 --- a/nix/homeModules/common/firefox.nix +++ b/nix/homeModules/common/firefox.nix @@ -129,15 +129,20 @@ in }; }; - xdg.mimeApps = lib.mkIf cfg.enable { - enable = true; - # source: https://unix.stackexchange.com/a/684582 - defaultApplications = { - "text/html" = "firefox.desktop"; - "x-scheme-handler/http" = "firefox.desktop"; - "x-scheme-handler/https" = "firefox.desktop"; - "x-scheme-handler/about" = "firefox.desktop"; - "x-scheme-handler/unknown" = "firefox.desktop"; + xdg.mimeApps = + let + # source: https://unix.stackexchange.com/a/684582 + associations = { + "text/html" = "firefox.desktop"; + "x-scheme-handler/http" = "firefox.desktop"; + "x-scheme-handler/https" = "firefox.desktop"; + "x-scheme-handler/about" = "firefox.desktop"; + "x-scheme-handler/unknown" = "firefox.desktop"; + }; + in + lib.mkIf cfg.enable { + enable = true; + associations.added = associations; + defaultApplications = associations; }; - }; } From 05e980d72a9fbe57c1aea1f45087c1dff0b2b101 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sun, 23 Nov 2025 19:00:00 +0800 Subject: [PATCH 116/178] home/sioyek: improve xdg mimeApps configuration --- nix/homeModules/common/sioyek.nix | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/nix/homeModules/common/sioyek.nix b/nix/homeModules/common/sioyek.nix index 6547d74d..93ee594d 100644 --- a/nix/homeModules/common/sioyek.nix +++ b/nix/homeModules/common/sioyek.nix @@ -3,6 +3,9 @@ lib, ... }: +let + cfg = config.programs.sioyek; +in { programs.sioyek = { bindings = { @@ -28,10 +31,15 @@ config.should_launch_new_window = "1"; }; - xdg.mimeApps = lib.mkIf config.programs.sioyek.enable { - enable = true; - defaultApplications = { - "application/pdf" = [ "sioyek.desktop" ]; + xdg.mimeApps = + let + associations = { + "application/pdf" = [ "sioyek.desktop" ]; + }; + in + lib.mkIf cfg.enable { + enable = true; + associations.added = associations; + defaultApplications = associations; }; - }; } From 5bad4db389e6a828936fb37b4d8c3816449c47dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sun, 23 Nov 2025 19:01:14 +0800 Subject: [PATCH 117/178] vanadium: improve xdg mimeApps configuration --- nix/configurations/vanadium/home/misc.nix | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/nix/configurations/vanadium/home/misc.nix b/nix/configurations/vanadium/home/misc.nix index 33210803..7fc0c785 100644 --- a/nix/configurations/vanadium/home/misc.nix +++ b/nix/configurations/vanadium/home/misc.nix @@ -55,10 +55,15 @@ type = "fcitx5"; }; - xdg.mimeApps = { - enable = true; - defaultApplications = { - "x-scheme-handler/mailto" = [ "org.gnome.Evolution.desktop" ]; + xdg.mimeApps = + let + associations = { + "x-scheme-handler/mailto" = [ "org.gnome.Evolution.desktop" ]; + }; + in + { + enable = true; + associations.added = associations; + defaultApplications = associations; }; - }; } From 9b02b9e1da0c644b2b0ac1e72ae621b6c406c92f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Mon, 24 Nov 2025 07:15:16 +0800 Subject: [PATCH 118/178] vanadium: +mkvtoolnix --- nix/configurations/vanadium/home/programs.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nix/configurations/vanadium/home/programs.nix b/nix/configurations/vanadium/home/programs.nix index f7030c31..a05cb216 100644 --- a/nix/configurations/vanadium/home/programs.nix +++ b/nix/configurations/vanadium/home/programs.nix @@ -102,6 +102,7 @@ pkgs.mousai pkgs.localsend # file share with iOS pkgs.minder # mindmap tool + pkgs.mkvtoolnix # social pkgs.iamb From caadc265e49618d7d05109d589d9dc9081982a09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Mon, 24 Nov 2025 05:00:45 +0100 Subject: [PATCH 119/178] Remove lvm under btrfs (#24) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-on: https://codeberg.org/leana8959/.files/pulls/24 Co-authored-by: Léana 江 Co-committed-by: Léana 江 --- nix/configurations/vanadium/nixos/battery.nix | 8 +- nix/disko/vanadium/btrfs.nix | 94 ++++++------------ nix/homeModules/common/btop/btop.conf | 3 +- nix/identities.nix | 2 +- nix/overlays/nil.nix | 2 +- nix/secrets/four_pwd.age | Bin 714 -> 662 bytes nix/secrets/hoot_token.age | Bin 749 -> 693 bytes nix/secrets/iambconfig.age | Bin 1017 -> 1058 bytes nix/secrets/parrot_token.age | Bin 813 -> 745 bytes nix/secrets/restic_backblaze_env.age | Bin 695 -> 678 bytes nix/secrets/restic_backblaze_pwd.age | Bin 683 -> 704 bytes nix/secrets/restic_backblaze_repo.age | 26 ++--- nix/secrets/restic_four_pwd.age | 26 ++--- nix/secrets/restic_sgbk_pwd.age | 26 ++--- nix/secrets/sgbk_pwd.age | 26 ++--- nix/secrets/sshconfig.age | Bin 923 -> 1018 bytes nix/secrets/two_pwd.age | 27 ++--- nix/secrets/typst-bot_token.age | Bin 776 -> 692 bytes nix/secrets/wpa_password.age | Bin 867 -> 894 bytes 19 files changed, 104 insertions(+), 136 deletions(-) diff --git a/nix/configurations/vanadium/nixos/battery.nix b/nix/configurations/vanadium/nixos/battery.nix index 57ca236a..95eda6f8 100644 --- a/nix/configurations/vanadium/nixos/battery.nix +++ b/nix/configurations/vanadium/nixos/battery.nix @@ -1,11 +1,7 @@ { - systemd.sleep.extraConfig = '' - HibernateDelaySec=1d - ''; - services.logind = { - powerKey = "hibernate"; - lidSwitch = "suspend-then-hibernate"; + # Note: vanadium's btrfs disk layout has been changed and the swap has been reduced. It will not work with hibernate anymore. + lidSwitch = "suspend"; lidSwitchDocked = "ignore"; }; } diff --git a/nix/disko/vanadium/btrfs.nix b/nix/disko/vanadium/btrfs.nix index 11ae7b66..439c16a8 100644 --- a/nix/disko/vanadium/btrfs.nix +++ b/nix/disko/vanadium/btrfs.nix @@ -8,7 +8,7 @@ type = "gpt"; partitions = { ESP = { - size = "500M"; + size = "512M"; type = "EF00"; content = { type = "filesystem"; @@ -27,67 +27,37 @@ extraOpenArgs = [ ]; settings.allowDiscards = true; content = { - type = "lvm_pv"; - vg = "pool"; - }; - }; - }; - }; - }; - }; - }; - - # Use LVM to create a partition for swap - lvm_vg = { - pool = { - type = "lvm_vg"; - lvs = { - # Set swap device as resume device - swap = { - size = "48G"; # > 32G for hibernation - content = { - type = "swap"; - discardPolicy = "both"; - resumeDevice = true; - }; - }; - - # Use btrfs over ext4 for: - # - compression - # nix store can be shrinked using this feature - # - more transparent partitions (subvolumes) - # no more "I need more space here and not there" - btrfs = { - size = "100%"; - content = { - type = "btrfs"; - - mountpoint = "/btrfs-root"; - - # # DANGER: - # # Override existing partition at partition creation - # extraArgs = ["-f"]; - - subvolumes = { - "/root" = { - mountOptions = [ "noatime" ]; - mountpoint = "/"; - }; - - "/home" = { - mountOptions = [ - "compress=zstd" - "noatime" - ]; - mountpoint = "/home"; - }; - - "/nix" = { - mountOptions = [ - "compress=zstd" - "noatime" - ]; - mountpoint = "/nix"; + type = "btrfs"; + # # DANGER: + # # Override existing partition at partition creation + # extraArgs = ["-f"]; + subvolumes = { + "/root" = { + mountOptions = [ + "compress=zstd" + "noatime" + ]; + mountpoint = "/"; + }; + "/home" = { + mountOptions = [ + "compress=zstd" + "noatime" + ]; + mountpoint = "/home"; + }; + "/nix" = { + mountOptions = [ + "compress=zstd" + "noatime" + ]; + mountpoint = "/nix"; + }; + "/swap" = { + mountpoint = "/.swapvol"; + swap.swapfile.size = "1G"; + }; + }; }; }; }; diff --git a/nix/homeModules/common/btop/btop.conf b/nix/homeModules/common/btop/btop.conf index 26e23814..c1973464 100644 --- a/nix/homeModules/common/btop/btop.conf +++ b/nix/homeModules/common/btop/btop.conf @@ -145,9 +145,10 @@ background_update = True #* Custom cpu model name, empty string to disable. custom_cpu_name = "" +# TODO: maybe move this to vanadium because it's host based #* Optional filter for shown disks, should be full path of a mountpoint, separate multiple values with whitespace " ". #* Begin line with "exclude=" to change to exclude filter, otherwise defaults to "most include" filter. Example: disks_filter="exclude=/boot /home/user". -disks_filter = "exclude=/btrfs-root /nix /home /boot" +disks_filter = "exclude=/nix /home /boot /.swapvol" #* Show graphs instead of meters for memory values. mem_graphs = True diff --git a/nix/identities.nix b/nix/identities.nix index 8d491a18..1859f241 100644 --- a/nix/identities.nix +++ b/nix/identities.nix @@ -1,6 +1,6 @@ [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGPq2o9pbmLRGrOpAP76eYCAscmfakDC7wPm9fmsCCQM leana@vanadium" - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDc55vENX+13c4s2w7zjTb8T/AnBnTi96yRC5+fy7Z2A root@vanadium" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIF5OgvihLpGaenFmZpbflF+UFsyYTZDwBZqTmSYdquC3 root@vanadium" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEXzNdCA0zZ+WmeKZnhQSQtUcxnQhhDl59E3BPQfLj7Q leana@hydrogen" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIMVDmEt/12u9U4QGDZBx/Sx8itzqfQ4zWJvcC3pRZqP root@hydrogen" diff --git a/nix/overlays/nil.nix b/nix/overlays/nil.nix index 4ada807b..c409f3c7 100644 --- a/nix/overlays/nil.nix +++ b/nix/overlays/nil.nix @@ -12,7 +12,7 @@ final: _: { (final.fetchpatch { name = "fix-handling-inherit-and-patfield-in-inline-assist"; url = "https://github.com/oxalica/nil/pull/178.patch"; - hash = "sha256-4f7DeWJtt63IyOjqlwzz0f05rv1NBYZO4JWEkFeDimk="; + hash = "sha256-YeVshmMadgYnFWA8S+nA+MwWKjVrzn71fqhfn6oL8Uk="; }) ]; }); diff --git a/nix/secrets/four_pwd.age b/nix/secrets/four_pwd.age index cb33568c5d89d9189bae2eefb8d374b4ebc176b8..f1a634e66a44f8fad34fde5a0e980d00c562c557 100644 GIT binary patch literal 662 zcmZY2J&%)M007`yj0uBrbt5^K3-$^vA8n$ir9cbiqm(aUxj;+bwzQ@2mKHF%xSg7K zgSlMdXyRgY@)zjlqJxvmB__I@o6a{lxSh`*czh66!sRe6R_kfJ+>cXG-4ICS0EKW; z2}d=GBAO@@Z=*~{8=eA1igwrDShIcEbyzzu=G(Elm|81KYLhkB2Ms!C&RfXVuqQzR z3Rsk4&S723PsCnT#g!hJP1+PThhk|KBa_s{t6K!|2ydZThe`n*1lGJyGQ@xdLQRx{ zve$k%_QItQ1q3&zQ!q2Q7NR?(-wAzMini2fSPEh|%Icl2Dm44igaH0TQn1Wl5Ih-Q z-Edj1_jR;h>fA6Au$5tH-b@Vj89(rN6;6d&6xEgzt1+(ZHz}@cAbq>ATNEY3BBpgE zujRyQHBP4v&3AA-bBcisg-P9#L#OfIHj-!spxmt8PVnK{rlnaiRD8BC!UYDMjj6c? zsik6L=>xAJ7~KZqvlaurKwN{eCrv>j^+n3lRkk#rKUU?`+gsi0n0 z^|H~Rx-n&?8W;_507)?_WH>vGeKAt<%TxwP6G<-+aA){ADM6b@6QTa{GWgx!X$54te$6 Ox7{a4r^m#j>wf|5SK>kd literal 714 zcmZY3JB!l*003Z|#E5^uDTkm)={1igX&jWaP15GkB+cWRz#SybqeIqF=Zm)I zA{YjfAS4K=tbnOiN_yBNOc&}&avT+QE?6r^u>=*H7E`V=in)+#9#SiS6bOf*5NMt5 z(1+0_vP1@MZYH8`sVjeh*4Cbb#tKOnr-&xbW1B?wF|(g5?ABGV#Ee+#@XJ~ z(tW9sjny3Scnr^qexMI~OTJ~(|7zO+!yF1EL$90lL(Z=8$gFrYp6z5$!hF)ljP9CT&iZGHB#&+s4Cl` zJaJ66P?JVeo4HI!dS7FyA|^To5s( zDy76jQ6EM}VYoJ=5!+DJpRh+HYv983_g5bi&n}+0zmClhZ=c*?kAhF;$61UO>~ayiJ~SFbTgB-vtD2~^=irX>PywI)$}nFtKtfk&aqIw z%9>2Wpwt+!L%*lky)H&^?ScZBQnKu{8YC8R5mPb;wXK`u0|#W_l#C!QR+DKj)FTF& z28t>VXu?J~J&S}r3Ghfn(X6OC5tN-MX+e_hCvEzIF`bsK6+kXzYpOQHBic@ao{{HioP{)=@vI?M zl8qdXAO+hJl*zc;Z|lJ2hcwnVaGsyWBb*hr|29*k@-`ecg)r6=q!f3{YHZ~QjEKc# zn)Hjn=LXY3DN*B^*<`1tMNq1OVQfYLQj@3)m5G`TSfKkA3S+Z{sXrc$BvVS6l}2p% z|F-i)(N|D=WHo#X1`xreziRtj|?5eAEHsoOT7W4|6M{Ldrs^S$4%3_guNu5X-~ZBEI# z+3kx5it8KSG8dk$?ZLl(xOwvWu+AWb()<8Zxi&|pG%(~ zy_};&)_iRp)e`sk-B0@uc0Jy)o#s}5Y+E^e_qRX4(32P5tHGfcGw;hC^x*vR=DR05 HH#PNLvrmv`N}DX_};MnjYrC z9Rxkd4l)E`c+ugUAm|Q?ZU@gkKxGOl?BYa46cIcO@jAah@HI?5ruUkD)E{)*-YM5N z;SmbN&VWJCj_Iv9j-wQa@O+{mgGAs#Y?9JZs7pvj0C|3DVpJ1#Kc|W|#uI8{5Mr3h zIvE#WEpF72Ej5{8@G%uJt{S%d09EbMSnCOGA@6yiO!p@VM)+@Q<&%O53R>tRsrbnB zjVw$Tl3mq>39Re4Ne{_WiX#`9E*OpV3IJ7 zghtTi5^U5gV!JoO4ZA}bL@b)mky){vX=0F2VF}8$yDTRvj_rA5u99{wSdefOvoWAc zbkLfSPS#Y!MmRC)OO)34(j~}BWKxVt^wCH~YxJ;~LUwPFiQ^g#mYI@Rn;oG6G?`WE zSxu`4?W%5Ss8@tSqo;d$%OUC&%62%QL5jS^O=h`_Xi&*UB-QiH{LmVPG}`I00qsl- zz9C0^E(rf^N5e2?`g$YKL3kP{4Ifk@ol(10D%r3wfgBSqI!qdF);tc88O0g3 zsCKPwmU3B=aGLt49l3l}j>10B$f4Od+|pSHgIe(d+o|$Wo)ZL;24b-osNrONR%qa` zizfyHvj&Tbj82+LiNibaL>} I>E6=nU)He-6951J diff --git a/nix/secrets/iambconfig.age b/nix/secrets/iambconfig.age index 00f559cde4a2c18479dcb480d65606039cf8a92c..b5bd034c5ad3079dd912648f09959983523e30a7 100644 GIT binary patch delta 989 zcmV<310wwS2cig&EPriTYHN0CNiQ`wQCDVAQgL=_RcdTRFEvVGVs>j*R%>=jZfr_5 zR8U4kNeWm(WjR81V|Gh0WJp+VMKDBXK|*#;L3(#lMm9w+VK8JzIZJIrWpZ{%FbXX` zAaiqQEoEdfH8n9gAZv3lYcN3|HE>~SN^EyZL^CsFNNiDLOh#-kb5KlhIbkwMS!qQ} zQ%yHRO-E96QB!F}3RrkjFEu!3GiX9iWI{!Bcq?vGPDD;?NiR4#O=&YXYA;PzHFah; zYIZMgk?|K+Mru$@RW?UAS$SkIL``99K}SJqN?})RPghn=IBsfVP)u`UVKz81HAHU; zS!Y2^T6S`7b2Kt5bxu<-XHqL_bu>9wNoY)TH&${b7de>EqQn#OeZl^ zd>|?@MLsBRAaX!ER(=X{P&0o>QA1F4OjmA3Zgo^^R8@B}ZZTs~R&-fdFH%}KSyMSk za(8xma$;t2XK+?waAIg#Q&U1kGBistZf#Ob3U);~b1zUq3N0-yAWU_3V_|Vqc6D}F zFELC_M09v`Zc9pfMo~v^L1cAsZACUSVkJ`HG`hHD)2&J z=s^p8RFLRB+1NM7CZ@$;qeOSKS-Nl$LjZPoDfY8E&d^w$J8j2YV!eQYwg&Pj7Gg;^ zpWGu7BMY1?t1c+BsVrl>Y*AbMi3wxGmhgR49a|7E!GcQz8eQ}c9i7IbdsU_;A;2hh z8_6r&ti?YmcdcM?%8GwKR53u_qN|gsm&tiO;uOk(QS=B9s^wYK;$LKQY<&5m!{M4O z*>oJg?kbi4;*OZ8shTA2JjO6V?=c|huW7IYuY5u|^f_%E`;joN#(6^)?xtO`g8kz- zwn7^%!H=!60OZuD#<9^NdzjtBLmnKkrzRFRi@Gt-DXy&~YpJ@XvCG&tKGPu7+CfRT++hFzFb7Mt3h_ z`XX>V1_>AN?_ByqzS43q4oVTDx3(Vhu`dFMFZtG=;BM# zU!VZ~F6DnHNEI=G@85!xroUOb1vwyFYC?7Qxt?nla;*Kl!@Ku!9k=ee7j)F~WOBId L4?*AnF`SDc?B9`4 delta 948 zcmV;l155m(2>Az)EPqo%bYf9eH)mN5F=k6MaWiUkO=(X@Y*%=4RBT}@HfS?6D|2#US9dTtH#SXk zI7x9hk?|K+NH!~MSvf{baWHT+QAc5KFn3cnFj;LlY%oJ|IUeXL4m>b7de`OgT>=eq?t> zAWnBEDhg?BPEkQMcT8kgVp@MrXfjJrOKfIIS#V}!HgIDwN>WEPG*v51L~Ae#EiEk| zOk;OhXmv6$buu(gZ+REasA#24)rvNf>{B(bqYeg88b=coQmJ@AuwfYR&2{@Hl@2LCDi`WrpW7 zTKx>(Aq*I~tGa*CuSNDBU{{=_aS{jf;B-afIpE~4 zmpu5U)mc(&v*UXodJ}=SK`>K=bX1JvJbmPb8*U@Mh7P0NdY)?%^d)udEhAeXq&)sE z6SH*!l8!&dER1p(;bDJ~cD@$eH{o_6q}i8<(bH)NCcruHy12%q*wxOL? zLH+t5STD|Rz0_O2ZRapS&_0-!Ikc5-OPRAm&8x|+ofX{kHmwAsg${NyKE`G2h80@c zZ4{>IDU%5u(GK)y3-Q5I?G_V}pR(s8BZN^Zwv51`MS3@82@8J>urF}&`|^0FkjJ`4 zk+Tk-K|PCjA)&i15_DPHV;hXXDq1GfAWv`EAAH)vZq&fONU}U!dxN=DI6VnE0TW~X< zHe-+*w`rlM;sn(d5r<%95UT*bTqp#@APGwpmXYNInGfJ>@UUhAzv&Nq6un!P(Qbz| zggStop3qG7!!jKzC91lVRbk9Vqbf^g<1q^&OB`ipaXi*G4MrTmveD^85^|wsmy~)m zj7HdSC0}84u*o0R{2Yf08ILdDrC>%cu$1IvZLvX$OtDHQ$!fS-#K=DH_MH|dyST2! zAhPd^1Vn${PFCZpP)_F@#a7coi1KB7m>bJ98hj^$YIsHh|7q1E!Ph+{!XBipZa|=? zTN${YLwK5{<$NVi_f58pmn0YE71yc8bU&1Ay2+efisd-OV0mJYg9m@3SS@Y@&0s-_ zcBBLv?<)hh%>2`43f_80Rew;zxrWhX?9}m<;UIIW0mFBFXq{|&HaOgx9Qo_b1{!yu&CgGceQB@l9T{#;Y@FE|M~55R#`ni7Q^(`a zmx`ybcMB&T-Zot0bnM$dWAEM5l=cTRH3?4u literal 813 zcmZY2&8yo4008iVo0GiT2Ad#A4}OewwMm*!#y--dX_BT*(xk~trm(d6Z1dHmOJBX$ZAz1nWJ4K{T_OM59042p4bh~jXo$in zHS!dyq-;|zCz%+|a5h&5+Y5_kSVZOvV`l=Obgt)$6Hwz(NUt;0^J9er(P9cOz`DJu znO+pe7zU9@`s9YE)nctQhNJ$pQ?s5eG*it4_0iV3gPF5=Z)MIAuJ&OGS1J!m=i4i9x@rx>}s5f z*O^pBlmE8UFK)>5EkAed!foUy)w6!!KmaQb7E?`h(Zx>96dk9h4{Ty6;3=^}Bmrsr z5|~snib_JHqfj!Ice27E4Z{ia5)3dBz~|PeOS2^HcX2pa%d9nSqo7vKRuV79{aEu7 zz69f};MutuAqto0*ix?7oC363t%feZ_`0HdmTH(PNhTa5@u4{y_~dw*Kub+YhBT#X z(-P|e&tr$k{nvu;Z~XYuIqT5VTYtas-3MFmB>Jr*KkwezfBg}Cb=-My_~7c^Uy1hV zXYjF0-$uvx&YaNSKeM@Z@zEU4JG=LA_{5EGe!oAuJFp_=hwE4PKX!jPb@cE*&uxAA-g)uf1^v%U Q2dCeDqujf8lzI2=zuXZT1^@s6 diff --git a/nix/secrets/restic_backblaze_env.age b/nix/secrets/restic_backblaze_env.age index a456d90b45b27e31b44cf7a15553f06db5e229a2..fd2de4943e4d1a366299f26ae7d29e2a4f6168db 100644 GIT binary patch literal 678 zcmZY2%WKnc003ZxAuKR(2b~8GIf#yR*^(x0TDPf9nx#p*rCHi0iwAAf^p`YQ+C1A7 zd?3CM1-*!#+&s<8P%j<^UPPGS<1{CD60Z&~BJLvMRlk4Ws{z7tV#M5 zFKd#(^|-zkGXHL9sf3qB7?Vpb0S4*8w4p8$abHjOwKOm5MTt#z7t3m;h|@UgEn=-OXvadTS0g~)6CFcI5q{&XKBC*3ucHjc+3FEa&x$DH7m-JS9d5~jTTw~TS3_s(M?fSOn90o z2rFS%kHOz%I;j&zrG64o_v(S%_EZem^5}E@`?Df*>%#nL?aPGKSvveHSdU zL9+!k%9ySLnG*#iSZ>>9BEF>e`vz%@4-D zpXYC1*nYqF`}NEh=F#(Y=T3BX>&c6cH^w$5zCJ+T-rSjMYt+k=lZm544?iJq=8g@G zotVA2hi(m@KKO0KzVc)0(C*y+!I+P&ukLQP?3uflho5>AquXodwegK-mp-5SW&Z(n COzrmo literal 695 zcmZY4J8RSc003a2Tc8vX7ZC|qy4mm)*dCCnx}| zfMIAtx|YImlmrou!vqoR3~*Oa3qvh!qH!Ug!|6t`Y0R@XnWQ#oK<#5ljvc{bL$bY*+lkpW(;g1S6^_O7?NwiHn8b{= z6s{)zuMzIl9*ZDMWVCFaWnitBkqcP4=2D#z)+Hx((sqc3k0DcsLFtt z!falnQ=HA~OxsH6tOMKQTyCJV!jP0J{Zdgmaf=KbS17P=i4; zM|Qc=$^?BP+ssOy9aItDbOA=F+jRn$@Q80u>qUpq&8Rh?Co&38G#OV4)zA}hj4s*k zzgu%%zZAoe5$N4e2L%L7`kl!V10>9HTMe{{~xBM;n`1H=v-k&oU7pP}Hv_tFoe183X_QT?fqu}!P*8Ll^d3j-5h$(pE$*Bjg H@6P=NgxmDk diff --git a/nix/secrets/restic_backblaze_pwd.age b/nix/secrets/restic_backblaze_pwd.age index d3a3ee257feda8efb20cc464230d0df2b2c31f05..6f4ca51821fb5dd69d82d1989c7be38dd3376e93 100644 GIT binary patch literal 704 zcmZY5yNlCs003YIxgo2QFUTHh9!;8N5q?SAq2k!U+zJj;?}__52Gy_`E3S1e^J;&5AhPTuFBkTH#RVDxBwwPT&(1 zg)=an)=8#A##ir^TO#FpK7IF81Ybx1O88VoeA;2d_0;VIOU#=~}qqakio z6W3Z)3U75&Gt6mnHAGM*!NP<>QX%B>(^`^a2?pSzo^yISLI`@}w9Irc$nZ$h`$cL@ zLEcocGODd?+X8*6&$5VgQzt$zlOS zZ0&^e1VDTaT#T?s1=xiL{a(alsWT}6kE%wXv22kj98jqp>DI|V4P4J>YSW2!ftLsH zN`chP7SK$Zn*CKJXU{$OeRSV9U+%s0_rQx+e*n<&?U?`o literal 683 zcmZY2J&%)M007`wHfIw<)Z}7F4=AP3L36-cXeqQn+v|sk5z2c&p?p&caWQdm)x^O` zCl~z*8qIAwI5-#+CljYjTy!uo-Wk{P`2&yXzy=IgX%**Q6z)fF9yVJ%JnkDj)X|U0+|b} z%Gu5wisY+RtRA%nZF}aqE4g)OQ53;eG56nQ%Wc&`%^B1^W>tyHvg@p5t0noysMwTo zZW14>(m1e!ihGn9Z;U%Du<>m4%LUOu{+Xytl|`W3lqjv=FGCAsJy9aUcx|o zT@bsmHCj&*Ovm~hsQD#N_h_vY0ku9{jxtTQODpq+MBd(Jbe@QGPye@(4JU`QMF9KhU zIS$wP>AHz8I!1qiY@s(gV)4YQc>`%Q8fY4C`f$i<$%N31jaT_~3G2KDetkHM$&CQ> zWKGWGAxu@o{rL9TkM*DQ?Bwym<>>hH>$7Vo-}W9oJUIPz|LXTor|+Izpk7>*PWGpJ b#H-^s*xlbBUcL{%o<4YLKL2^|(ii+MG+gYi diff --git a/nix/secrets/restic_backblaze_repo.age b/nix/secrets/restic_backblaze_repo.age index 3c0928ff..853c30c1 100644 --- a/nix/secrets/restic_backblaze_repo.age +++ b/nix/secrets/restic_backblaze_repo.age @@ -1,14 +1,14 @@ age-encryption.org/v1 --> ssh-ed25519 0LL3PQ T/cXi55d6piVdR6JLJSwDkRZZUosRmp+aqVwAoVfPFA -9qrb9A37THHtfuC8auJZvAxLJ2BNRjlSsR/I37fU8yw --> ssh-ed25519 0dJ6Mg gJKha4ebtaBDlKGARtTg/P3DHZ71DrCg3HeEeNpkEQc -gFKI6brdafHh2j0dJ8TGOLjC1h40+9Aie9DH8mH7Vj8 --> ssh-ed25519 7owkuQ U+Gja1vezscwMJcLU4EVxuKI3Gl+ipIFYCjG33VifX8 -xxmwm/4zFbiZQkvruSZX7FLQ+3vQXA4tTccWgUODu8Y --> ssh-ed25519 yg55bA AGlvhXKS9pazSsJ/U3VZ8bM5PMR/u3g9FOLpgSAljkg -kdOMWIgbFtpmYJWBvoL/0gwpRm0bfkyf/ITz/BsgXwY --> gZmc-grease Cr hyPB5 |D/ Ahl -dpHaveRNwJwPxTGDEmN371ODXoaZ1yfi+x659RLEfIotEaJT/CmJZ8caF32DLF2n -pkA ---- m19Tq1Ptb7ranZor+pcrHGRuCKv/+NHGJISyhrOiESU -(Vq]C@tKTˊJַiwaD3> JV uOQj;UzI-_P&ZjWe ٽ HJJ( \ No newline at end of file +-> ssh-ed25519 7owkuQ 3a4ufOMdSHVuqRHEYqgfRZBFVVk7Sa1aM5uBSjJj91Q +zfH8jCsa6qrn7YIT5wocNybHZgtGUm2vBAL9zLqp3KU +-> ssh-ed25519 ks0k0A 1ktnG6ZrzqAL3C++RZDWqHYGdruYrdeh/SiUj7uj7VA +hN+pYXzEfdvcV2lDwxB4Mzgib3eQaXngnskuzk9kesw +-> ssh-ed25519 0LL3PQ 5EWAWySpok+BKqop6EEsVX3XIB1QiBVFe8Mroawxxng +ePBwfGTzZWuc5vgrzhoUNd38pXuSmMfGoBT9h8tD6S4 +-> ssh-ed25519 0dJ6Mg UmH2+XRr1i9Ym65HORvq9eQsHnCM0hVNv8XsXedTpmw +nf8zNboj4UG8UjDc/vt0rR2NkiJwaIv5qmvi5VnuZjA +-> fA-grease w l:8 / +klKs99O8ZOJo9SFgWKPNdXru2kKsqbU9n2BbzddOO8s1dDoqBDNmyY4lOMPccj49 +qnIYEbjiMRLwSCfqdE2u7XEGWsDj796jcL6TBfZd +--- QT8M6U7wAPhQOUV7upjeWJrcJXO//G3C8DdqWAjS4E8 +%(!{8,sN's3 ig{nHhY fqN:FpiC"0M2qsa??g;V{Y1:? \ No newline at end of file diff --git a/nix/secrets/restic_four_pwd.age b/nix/secrets/restic_four_pwd.age index b67cc300..1a6bc73b 100644 --- a/nix/secrets/restic_four_pwd.age +++ b/nix/secrets/restic_four_pwd.age @@ -1,14 +1,14 @@ age-encryption.org/v1 --> ssh-ed25519 0LL3PQ xLhj3/Y4owHlZ9wSvSUO6J5QRDbAwbaMO2MNAIW/S34 -T86CtE8vACVDH34OnmUVokUY4NctvHcaVunoCvGUxEo --> ssh-ed25519 0dJ6Mg 0sZCeLLGHhQ/ZppSTuyeZBOKdypMBNaJrI84Sdya6C0 -3koAeP0eIaSj/TQEGHYJ0GSUx9T35WQiALzLj8cykM8 --> ssh-ed25519 7owkuQ fOjqhSibMqCebX44ODbi5B6T1KGBVjgAl78XcQbGnUs -LqRR+NxqMGi0gW3DLubo0k00mkW5onuhKWw4Oaq4o2g --> ssh-ed25519 yg55bA xl59uoVVAsDwAik1iN+aMxAvmX2yBW6Tgngt6nrAy38 -NnAGx9qDQScgbA8eMd6JmOWV14Kp3enpuzMeTpVLSQM --> *-grease 8-(+ vYaB m6U -8gdvu5Df7a7QJC+s3/x4OMEp3nGRQo+v6GKMo957cTIofYQrX1zPIscugjB+Ua/R -mqSUmYM ---- IYRDnT9/tIxleM47lmOA5wp3e5TrJGqn/faxfMTq7po -Q&]cӵҷrJիϘzaBd $Y['s8pZ \ No newline at end of file +-> ssh-ed25519 7owkuQ llLFRhDH+x5Igkw1CcsjKwKgmXh67zVuLXjCKpD+bks +QqR+Iqlqip3t0oRs+RUyJWHK19zGSLEx1jXSrYCW6nw +-> ssh-ed25519 ks0k0A sZY5SVZt8p+W8lC1q+P57JSUGDgZJZ1OsCe4nvgw1hw +5iKTgCzIqKEUgKtVS8wNoy0TfPxQsvM5Nk+ErppL/tY +-> ssh-ed25519 0LL3PQ rKU2Mk4CQIv6QUK0Y40AwLG8WR4iutQ5S0mBt1zcXR8 +aSkny0uNkb4s4YeCo3Gkp7CtZXepeEDEPLJl2ONIK8g +-> ssh-ed25519 0dJ6Mg Pw6bWIyyLTkGJJoYmy2BrijbLI0rLDFrT5OhIsZfl10 +594tiWAh7VsGXainw2VYMVRmYdymgcVERAAOHnagxxE +-> g ssh-ed25519 0LL3PQ KHSf9ndwbU+gp/EjEqb6BizoDld2P0IUE+NyNq41qRU -nnjQ6RxRj/oVI4lrmGx3YA9xru2wIkV6tyYnF/Qj4gA --> ssh-ed25519 0dJ6Mg FoLEamzgj2WZxiEGjWEacLtP+YvwPK4S961Mz4QVo0Q -LRV7YndQRyZxFWgxjZ8+KhnHY3NmQjtBx9D9SkEfdBk --> ssh-ed25519 7owkuQ +ERZ/SyjyHNDMUcZftWjPPg/+Y4vNNhY9qcXYJTocEo -WvRkkgWh+t1O2574vvIRYkDav6XJaZe1H8+bMk6Rt2U --> ssh-ed25519 yg55bA T1koZe8t1aK3Z8t102m9Q3sTFo68ml8hjbm5oTDxqXg -OuVwNZFJokgz3ZubnQJbhdmgfYnpKSyt+2f0pfJ0zMM --> 1I-grease SAO!z + 1 -dor0+AdeMZtvH6XIh/8UOwtKIeqTckMwS64fXpQC15sQN4s01iZ0E2fmfxlOd7sF -CEjwIjD/c76eWsm4HXnFKPMn ---- PtcipNj2Ol00OQXMJnvGfBPLxAkxB5/JrqUNXWKRqEE -p3ו!3`S^' To[F"WQF5H$ \ No newline at end of file +-> ssh-ed25519 7owkuQ hyi5QyY0Nb/tRA5YHqvLGCk57rWJOclsYTSA+M58cXY +QlI51+l50n5AZoqekc2oVJlGuoWMT521m3/X8lWtJks +-> ssh-ed25519 ks0k0A jHfzQrfnTCHUnQN5kchnRNcC5jDrH5ZLtmojgwesClI +nTtQ4pSwVk+shVoSISQXnLuc0eQ4Sn93XcSw56jErzo +-> ssh-ed25519 0LL3PQ NaZ+jpzvUM5d5FturtNv8T9yq5/AXVAD7jWmdrUK20M +45SEaLV70W/R5WmRt+cHUk6lC3uBPllwY/djK9VUFww +-> ssh-ed25519 0dJ6Mg 4AFLZqFmCnRcwgiGLY0WnLonRMGbQxH41u6Qg00zX3c +2Tz7qnUOFIXNPrMMWdOS7jjcmAcZLe+Zptz5UOLYWx4 +-> }?-grease Rs] +/IzXx/FD8S/6X6hMWHwFvHLFFiouDjdAIAAb8ZkyRDoqUO4RbqTJ95zk2riKoFF+ +VEk +--- /YEZAkDcEUTff6GSoh6MfDYZzI6eCsy1apPcQS/mGVQ +YHgj3^Ђaƴ]-HTuk!N%%5Bw`f \ No newline at end of file diff --git a/nix/secrets/sgbk_pwd.age b/nix/secrets/sgbk_pwd.age index ddc824b7..ca2082b2 100644 --- a/nix/secrets/sgbk_pwd.age +++ b/nix/secrets/sgbk_pwd.age @@ -1,14 +1,14 @@ age-encryption.org/v1 --> ssh-ed25519 0LL3PQ EaH3FSFURTrKNRQgBzRJHwScLs+0++zx8L5xtiv2Thg -zb9BAe2Mh3Dnq7xQTsV3FKSLfti6qk1fMuVU3jnkvSE --> ssh-ed25519 0dJ6Mg wOmgGAMbqQD3agi6iH7ncke5yIuWwI3JK2+Z4Z6LAGQ -aPyfZ96NlrP7/XIMpKJkgvONfzdgjrm18CFGpE8rWjo --> ssh-ed25519 7owkuQ Siq/BgJuW1G34eBHL5rUTaR/D1R8AKxo3oWNfKkjNjg -8/qCD7Z8Pnnpz2fwzcZuRKi/NqU4sOUdEn97JT5sy7U --> ssh-ed25519 yg55bA JHUJBdwb6/vcw3g2JCZVSs/dm96PE7dhOW1gEi5Nokc -NiT7i0XArZPVz4UqN4IR+Dc47tjU1jVe8SFUbM17fBo --> %-grease R -5njLYJJMaDrRkP6qA1AUGy375lHVqP2WzUlhYX8HLtBL95VysXoW+PTzIEc+PQNs -UMxNTezEFXnww4E06+rPE5JN/VN+lOtb1uaEFdc ---- TKX4YuCK4DPsLEB0A1XSywqEt2gysGHbYtL59hudEkQ -|oKw5tU|Gg(f\@9â0_j \ No newline at end of file +-> ssh-ed25519 7owkuQ l4cFFHAGF9B6eJUBCReUSeMptRCOvmMbjKGqYjSkVAc +u3LTp1N/nke8Z45MqfsXFKea/HlGbBIbDOVGrP4c6cM +-> ssh-ed25519 ks0k0A ZtpZOThwG73Mza6EdPOSfiWbaurdFup0b4UFaLbSk30 +4Io9rkANNH4Auu562OY1idS2yZpy8gwbnVNnecvwoAQ +-> ssh-ed25519 0LL3PQ La8Eho6itkMJFBE9h1eh5dBDO6xX5W1SXoPEsClK/SM +tRWc436jOvH5lnLlSSd9DcDAQWj98edZ1WT24EwQ0rg +-> ssh-ed25519 0dJ6Mg dIQDEi2rsms/r1tO/BT4JMrr5IO48CY+I09vA82kiQg +Ur6P3I9Kq9iJKHys2T7rHPlek/yypPnrAWQe46NrGfE +-> pkM5Nxe|-grease AZ 0> 0}5TA &9TD +J5694/wXDMfpyEVV3jxia/ZTKKJ1rcWWF+PKxid4rg0zh/+fJv7qrEHEbc9LCTzR +jZWL5knDhzWK +--- e7fyHg0amnzuMqw7fDntjIMwwiAmg5DU081kFt/Fnz0 +etTsm2u=ϼc qaoQ^MMeAON0) \ No newline at end of file diff --git a/nix/secrets/sshconfig.age b/nix/secrets/sshconfig.age index a243b8b1b5a451ded90e4f909572017245aa616a..24c12882eaa3fd0dc8ee4ddec414bc5321a55e5b 100644 GIT binary patch delta 948 zcmV;l155my2l@w)EPq3KazlAjYA1*EWi&}{c11%ncsXiULvn3RNK8dE zIc!llS1WT*FlKpY3RFx|W>GmsMN>9#cQ`^;P+CuLS~hQ3a&Y;1SyNhSNo6rhHF{w&cx5p{c}rz6XL?LIL2C+X zZ%=eVFLrB9Wmi;AFHBHHQAsasPi$jCIc#uDOgB|!HexkVRC7c@a+6*G7=LbvHRyd3QxHRSH2lQchG)ZCPeFZCEu_ zS!YFJYjbioYjIOzFF9gqF;rr6QAANgIA~f;NeV4KAZ2n;V>&&3U@d2IWnpt=AXG*m zeJU+HDj;-pWFSF&3T1FZGk+^XR82u|c29FKMQLMJY*1QMHd9$?T1!MVIB0lGHhFqR zGC@OAPg+lGH*ZB#bxJFBMtONpc2q)8Z$k=fYHMyWO-oTtQdc)QNpet7MKd=|F<4PB za6)-`S!yz9RBAXyLS=L~IY~HkbVFiEWiSdYEiE8LbTd>jSafJqWPdR>RWxroPjpj4 zOJQ+oXfbY1cS}KTYffo(K{ruBQdf5h2Gqd`1*O6{ZQu4!gFWim!Lm6&9zP}@&LU1< z_5(ykx3Ml$7qH}X07zEebR8c63RcRY!TP`kl*OB0f#Q-`6M}JF&k7!jn<4uFP7Sc~ zcrHEp-FgkTe`ueWJ%7ik^G!z=)hJ)8N6mQ(ms(|%hliG3$H-9OKM)UE>Yd5{v!4x= z&;I)UMU$r9DeHaY7m9o$TYqK-O0W&r&UGs>qrG~r z>7G{d{eE3{OJ{G%Ki>+WG|L_33d#4>Kmsb9xYPAZ5<&UXfFu@NAnpUf;xvZRvTqpN zGHrAt3Cnp~zV3145TQ8&q#K&z-4^8+9;z!neb!FY_j>NByBdP^JxXXZv!VSK6^SPM Wt9A{0w)RTg!U>`csDsbV!&yXgoOPK1 delta 852 zcmV-a1FQV{2b%|wEPpn3SXE{;RCY&Zb#6E^bx%`SP+CfAMM`Q`N?3VyQDk>gLoZY} zK~rW|GzvyzdSZERG+{YvXGw5JYDRK)X*YFrcxXvNX=-OmD?(CFYio8(QbtNo1SR7H44acgHaS!Om@YE)S(dU9||b~#T^S4de!Raiku zP&smu@EBG?FltOPWqLGBSTlHZV`)Qha4$4&Vpe%WH91anNiR%PY&0=uFEw&-QZx#2 zG-_loFHJaCaxYFoMNo2PMs7JUb1QB*H)%<3ZDCDJQE+Brab-eSZIfOB7=LPHOE@ca zc1d%0YB(@jWmYg*M0G?#YF2VWc2aD0ZB|rKWH@h5PC zS5RW)@*G&W>ZNkdg?OhYzdFLHKAFbXX`AU7>oQb8v{EoX9NVRL05dn|A; zF?1+0AWk%6S$#-qb0BL9RDX9iXHQpdS~6o~R8ezoRAXlfEiEk|c5iDpF*q`8M{sa7 zH!yfYWNTDvWH(S^c{yw_WjJXoT6%0`Y)(!xW->(zvfreebIRqNBHvh&vRjLc7CC{Y zn*QgU#y{W1pii#`;Hf=FBWrJdqMva&i1Wa!GJzOf=Yz)3+AJZ*l3eYZZ z>eVihZuTPsKuZMGg06Y$qx}g306qkL@G%=_1e+{L8E7-UbB)w4oOtEk>-&$cCG11B zauY0dt{MyG9p5VDRkVj(aP;P~l@8i;DkUV%qF@4TQw-(A|0!HC=r(C@{#Ycx2{G7i eu~biN1j{-4Qg46=lHXpql(j$?Snw=f76(x8EKm0U diff --git a/nix/secrets/two_pwd.age b/nix/secrets/two_pwd.age index 857b8c72..ac20a22b 100644 --- a/nix/secrets/two_pwd.age +++ b/nix/secrets/two_pwd.age @@ -1,14 +1,15 @@ age-encryption.org/v1 --> ssh-ed25519 0LL3PQ bOMlgebRdu00Y6AMCMzfMDHz20hmxFZKXZXTV0GxrXI -h8g+yA6VbtKmSpJQd7jRXbI3XZ4t9onF9HAAFZqGfjo --> ssh-ed25519 0dJ6Mg re3MAlJT/+Cv3JuX32+DDsCpX2fyjmbf6lHWEPo2cS4 -eoGwzNSWZsz7MraRl+WszHPtV/Js5miEpyPW80qE2Rk --> ssh-ed25519 7owkuQ jVPzIG/BaqhF0pDsQGyTszSYk9uqxgT+gkI3isFfXjw -KNYecxPhASdkrX9HksZvd3PklumBxhT56cwuAvrjrCI --> ssh-ed25519 yg55bA RQqNeR7/CnTikL1PmjuB8wbrbB/ePXDL5Vc68nwglms -XSdnfZRny11PwqNz2RQXZTJkebgpcIlLPH41anP+bE0 --> Fwm.uTZQ-grease 0 l*:+ KkJHBhG -+GHIrzesQEN5gofR9foQBAispJYm7Q+ZpcaGA5c ---- BeBZdmPhZssR+92iYgQ/62hlCIiY6SUQaggAZkXTw8I -|.hv"՟i -|pw4ni؟WB?l`[2(ᨿ_i' \ No newline at end of file +-> ssh-ed25519 7owkuQ ICj2WyiOMlAaoQ80r4rJvXam8JaVBtrpBhG6+FrsaTw +oAhVMZ/u1ZdVlQqyGzwOUhXHXq7nT4xWNTBEoHwMIko +-> ssh-ed25519 ks0k0A iVHtaqoMzsof7Gj4sFoL6/twZxeAKaHOycVd45fGfnk +1XrtZ4nsGTqnqfXX75xT8pfpn2rZxZcMhv5ZKIxeNY0 +-> ssh-ed25519 0LL3PQ pUhnIplLUPX9uSatlr9mocn+iz9SYlNNZZMESi51SUQ +udOD6vY0B0XmNXIU3Pslmttww8o4dB4n3nE5AZfWRhQ +-> ssh-ed25519 0dJ6Mg d21p0eOmBQl8XeG7h5x4GQG/QjEDwAoiLYvmr8H0lS4 +SsUWCtuCYS7P1JbunEDXnFdb1LDZMvdfTFMLmwfNtxE +-> 8V~yC-grease +WMtDLWBx1Ed/qXRIw8U5ZBek3GtGTi9+2U5is073cLARPsAk8Qgc5H9F68u5QLhK +FFlie0WlBwYHsCx2McB8kUg0vLEoqBTDYWcD2RImmdXsmddndFVi +--- JM1EDOAtO8Fztqpteu70vsuOs1o0zmit5Hl9GGPBcVE +R}Nn, +.Si0uf PnyK9{ǭL3v嗥Ef \ No newline at end of file diff --git a/nix/secrets/typst-bot_token.age b/nix/secrets/typst-bot_token.age index 82ff09f70d27f78294142c915949f7611700b4b8..e18955785cd31f9c91d367aaea925e63beb63d85 100644 GIT binary patch literal 692 zcmZY2%WKnc007_(!9zrEikCqUJh(1vlQc;KGD+Gs@3v{v*94(?EU%ihNz?pVrr^zk zu#?EZiwyKIJP3O5BI5Ai4k}F09aPkV7ri)`APmIo{QiNjXIqFB7|~=fa>HOTjO^?f zg^(pUjvd4@F@iv8m^JSo_5GoYBVC$gerKrKhp zFsdy1BgdnvLjW9&i$H$>NWPGUZpQAq1xbjfvKarjnIfs!FaTHkGTy)=F7-xYm+?cV z7dI0-9QBPF6*R)ORH)%4f%Iai1gZvWx`Yk5pg3@v%(7c@yZN!c;`fJ1Q4=ckfRVbZ zDG>f`S7h4GGbmz5Rxh?-y#*sJu5c}c93e2cJ~c5qAdXT3csLPjCaHQu6sOyXOQsNl zAaEIHDL+`j>KR=xq=M7IvwX3u>NJ`wflj?&Q);-7F7rIgK)t2#-7ltn>(wE=aJusR z^ZA3zZ)WTdhbMnOJ)WOyd@E14j=kL4;2zwaneMm1eeB%!ZTI5io!Q-Wuol}JpX7s| z`zLO055|{%%CzvMTdflh&mK>?hq00B{~%J!9$mbE*+w4{RKaMx@}dhg%Oo&i4!dL2ayeBFi<@R z#__CbnFx-<6jXVYEv6 z<#K2fCTV!agq68G3=3AWS#O~#G+<~6gTrM@#WKtnAw;n1<|s>oJXJ`|so@h;rEFbX zGt$2_BFN{d1bVE=Qp;dopfxH$U6v1$hCf4>1~zXXZb%q$TaxltpOY~FtH4GpUrpmw z4N2IFgvJaRq#0g^5 z#LBFv&czG>s?{n;MHI7^5JF^f0zdBy9aTVRGZZ*I#RfChCp{Q)?2#UmL*US>=CfN5 z_V3=KeWebJwqN{loIEREp$|X4vn4K<*T9!Bx7pftDG9w}{&11R14&O}0?x6vTh}&3x!c;YN4Iv}+HHjy*0tByu6uOd zOC^euNW5r#oCf)Ygda4@ONB@zBnL+fK|M8^cm|`vMTpx$FcJ-c+^N6fU+~E{-=eB` z6suJ4R2zE5+FGfr-X;uqo&s%K^C&WcqA&qsm6qwGK)p02#R7a0r!yAcsN|q@i3(_j zBvd$^)kC}^I7yK*GbL>jK&84?m3V_Ns|i~-8MDC
+1BPH7op*~GApd_zKIt<;b znKooXlb}^3Wim~ZJDOgmrsz4Aj+B(5h5P;aDV%5%Udq5^lI~bp3LsK7U!V%t?M5OQ zR?Rl$%~C;;b3$q+*NjE-VKTEkRNM&NZ~I77oSDh})?)n+dB`bwgIZjKt&NYNTbOR9DpkjR^mL zO^yW;Dkvco97m^v({Kjw#?zvdOHE1sGKH&c&9CGmBwcAUqHVX}79iMo*GY02RSv^4 zrE~r$3fFi?!?SIQ2vb;ykW)_F$l0CLe{EBFi>-Oox>B?iaDsHVOi+(Tz(ODm?$(9q zPM|}jleEcovOJ_Pg5;0}Y!sbIuOOiRuJCw389@-6b9j^BMJT}}GGeDDsz}K!VN%%i zHhBiY*aqh7`lA3iceg*jIO+5*-v5H`Y#Bej`BD}?_?PR;qrzaYOZaSE`P-kCf!TI{ zeqq~JmF;(*E3EHn&&gxP7fj?r8FMaV$A;cn~eTQyd zpBs}NylPzd`MEt4CtUW*%$ik8Kcx09jxWE3Y~S+B@DVpV#~bf#{(Sw)qr@rf+O3@< z8$UTMtl#D`euWZ`6)tSruzF!A{qiG7<>tF9=h?qM#-0$j&K}-Zcx3>N{Ae$TOS7PL zJDuO~(1LW_M;|!kJ3k*kaIkwemGbs3{{E_YGCml(y{T~Q^7s9_JH d^w5pV#+BHM)Sa&U@OyIa^$(dh-cAlf{{Xk2RRI71 delta 824 zcmeyz_LyygYMgs6qcD`$Yn`fX`ah0pHTS>0L zum8UsJ#G;FLlalXCBJqrxCV zvrt#AGUHNzx6m-Za&vE&l89m_i!5WqjC_LNAvLfNY`?7>nhVt zO_LlI{6m96JkmW2l1)9*LOh)<0$s{;4Kpgrjl*2Zy_182qb%wjy-dQqT>^uAxh%X) z{Hp>DEzB*73Jdasi&Jt^b38J$yfVX5QxmnFEdoM=!t;DQLcA)$*6Eg%Xonl?rWd6q z7N>G$W@kqDl|+^J=H-?6BxSl}mFVk#U#j1!hMTdPNmE zW@H4G2bO!+dxRR9Yg-uRcx0G_a@B7%dRbx0w5~W@eaj&RGv1YUPKBR#?^}D0{lQY%S; z!1R+W?wP3-2OX#FTUhDZ`kLWeufKP3gO2~tO?Q|!i2RGYZ=|( Date: Mon, 24 Nov 2025 12:25:23 +0800 Subject: [PATCH 120/178] vanadium/xmonad: don't copy dialog to all --- nix/configurations/vanadium/home/xmonad/xmonad.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nix/configurations/vanadium/home/xmonad/xmonad.hs b/nix/configurations/vanadium/home/xmonad/xmonad.hs index e2867807..cbce62bb 100644 --- a/nix/configurations/vanadium/home/xmonad/xmonad.hs +++ b/nix/configurations/vanadium/home/xmonad/xmonad.hs @@ -168,7 +168,7 @@ myManageHook = , isNautilus <||> isSioyek --> insertPosition End Older , isUtility --> doIgnore - , isDialog --> doF copyToAll <> customFloating centeredFloat + , isDialog --> customFloating centeredFloat , isEvolutionComposer --> customFloating centeredFloat ] <> namedScratchpadManageHook myScratchpads From 20bd1bc6fedf210d20e32c6b69eb3c272d0b5b1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Mon, 24 Nov 2025 12:47:12 +0800 Subject: [PATCH 121/178] npins/fcitx5-table-extra: fix pin Related: https://discourse.nixos.org/t/nixos-rebuild-and-nix-flake-check-fails-error-program-git-failed-with-exit-code-128/64775/6 I don't know why this happened so I just updated the pin. --- npins/sources.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/npins/sources.json b/npins/sources.json index ae589196..a1bb31dc 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -71,9 +71,9 @@ }, "branch": "taiwanese", "submodules": true, - "revision": "48a7a51516302e070479156b54d2911ba9fbfce8", + "revision": "cba16e03fd43b1ee8a15d20e14ecf0fb1c6762fa", "url": null, - "hash": "07d2mzjnggbxlpqarcj65xdndkqxcab38lkbbqh65cyfqzqahdg0", + "hash": "0ryb3cng4py2zrm95p5ial9w13p7w4ws0bl0lddrij1sq42kzg8l", "frozen": true }, "flake-compat": { From 412480f14ccfb57c7884ed5343be3962d196f7a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Mon, 24 Nov 2025 12:50:54 +0800 Subject: [PATCH 122/178] vanadium: enable earlyoom --- nix/configurations/vanadium/nixos/programs.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nix/configurations/vanadium/nixos/programs.nix b/nix/configurations/vanadium/nixos/programs.nix index 0fbaf33c..74d4be3e 100644 --- a/nix/configurations/vanadium/nixos/programs.nix +++ b/nix/configurations/vanadium/nixos/programs.nix @@ -49,6 +49,9 @@ services.gnome.gnome-keyring.enable = true; services = { + # Since we don't have a lot of swap, we make sure we kill the processes and not halt the machine + earlyoom.enable = true; + postgresql = { enable = true; authentication = lib.mkOverride 10 '' From c72ef76b20fadb07ab178a99a3e39abf5a93b8a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Mon, 24 Nov 2025 13:40:01 +0800 Subject: [PATCH 123/178] vanadium/xmonad: fix overlapping manage hooks --- nix/configurations/vanadium/home/xmonad/xmonad.hs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/nix/configurations/vanadium/home/xmonad/xmonad.hs b/nix/configurations/vanadium/home/xmonad/xmonad.hs index cbce62bb..8a378a9a 100644 --- a/nix/configurations/vanadium/home/xmonad/xmonad.hs +++ b/nix/configurations/vanadium/home/xmonad/xmonad.hs @@ -159,19 +159,22 @@ myManageHook = , isPavucontrol --> customFloating centeredFloat , isFeh --> doF copyToAll <> customFloating buttomRightFloat , isMinder --> customFloating centeredFloat - , isFirefoxPip --> doF copyToAll <> customFloating buttomRightFloat , isDiscord --> doShift chatWS , isEvolution --> doShift chatWS , isSignal --> doShift chatWS , isFirefox --> insertPosition Master Newer , isKitty --> insertPosition Below Newer , isNautilus <||> isSioyek --> insertPosition End Older - - , isUtility --> doIgnore - , isDialog --> customFloating centeredFloat - , isEvolutionComposer --> customFloating centeredFloat ] - <> namedScratchpadManageHook myScratchpads + -- Note: some rules here are overlapping, the first one will take the precedence (composeOne) + -- e.g. firefoxpip is a utility window + <> composeOne + [ isFirefoxPip -?> doF copyToAll <> customFloating buttomRightFloat + , isUtility -?> doIgnore + , isDialog -?> customFloating centeredFloat + , isEvolutionComposer -?> customFloating centeredFloat + ] + <> namedScratchpadManageHook myScratchpads -- TODO: is there a way to always open certain sites in new windows in firefox? -- TODO: stop full screen when move happens From cc13b4d51ede50f003c9bac8138604131b318ade Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Mon, 24 Nov 2025 13:40:47 +0800 Subject: [PATCH 124/178] Revert "vanadium/xmonad: use sift instead of swap" This reverts commit 9f080c070752092b366eb6ba25901d554c0ef062. --- nix/configurations/vanadium/home/xmonad/xmonad.hs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/nix/configurations/vanadium/home/xmonad/xmonad.hs b/nix/configurations/vanadium/home/xmonad/xmonad.hs index 8a378a9a..a41e765d 100644 --- a/nix/configurations/vanadium/home/xmonad/xmonad.hs +++ b/nix/configurations/vanadium/home/xmonad/xmonad.hs @@ -2,7 +2,6 @@ import XMonad import XMonad.Actions.CopyWindow -import XMonad.Actions.Sift import XMonad.Actions.Submap import XMonad.Actions.SwapWorkspaces import XMonad.Hooks.DynamicLog @@ -267,10 +266,6 @@ keybinds = -- Toggle fullscreen , ((superMask, xK_Escape), sendMessage NextLayout) - -- Sift instead of swap - , ((superMask .|. shiftMask, xK_j), windows siftDown) - , ((superMask .|. shiftMask, xK_k), windows siftUp ) - -- Resize windows , ((superMask, xK_equal ), sendMessage $ IncMasterN 1) , ((superMask, xK_minus ), sendMessage $ IncMasterN -1) From a57af732e94580f7f0e7f25f11a45b85631e0869 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Mon, 24 Nov 2025 17:14:22 +0800 Subject: [PATCH 125/178] doc: update readme --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e89685ac..949f6b2f 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,10 @@ This repo is managed with Nix + GNU stow nixos-generate-config --no-filesystems --root /mnt --dir . # disko will take care of the file system configuration # put the generated config in the right path and import it - nixos-install --flake .dotfiles# + # We do -j 1 because otherwise the kernel or the fonts might use too much + # memory at the same time and the system will kaput + nixos-install --flake .dotfiles# -j 1 + # profit ``` From b3c6744da5d18d742d31462b25ef9b463e677fe6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Mon, 24 Nov 2025 17:15:51 +0800 Subject: [PATCH 126/178] installer: enable earlyoom --- nix/configurations/installer.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nix/configurations/installer.nix b/nix/configurations/installer.nix index c821744a..e77b99ad 100644 --- a/nix/configurations/installer.nix +++ b/nix/configurations/installer.nix @@ -70,4 +70,8 @@ boot.extraModprobeConfig = '' options cfg80211 ieee80211_regdom="US" ''; + + # If we run out of memory during building, the machine would hang, and that sucks. + # Nothing worse than restarting the installation from scratch + services.earlyoom.enable = true; } From fe7f4b9049b683f283ef4715a763a53c77846c71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Mon, 24 Nov 2025 17:43:43 +0800 Subject: [PATCH 127/178] vanadium/xmobar: update events --- nix/configurations/vanadium/home/xmobar/xmobar.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/nix/configurations/vanadium/home/xmobar/xmobar.hs b/nix/configurations/vanadium/home/xmobar/xmobar.hs index 1b1bd923..314f4d50 100644 --- a/nix/configurations/vanadium/home/xmobar/xmobar.hs +++ b/nix/configurations/vanadium/home/xmobar/xmobar.hs @@ -76,6 +76,7 @@ config = , "--target", "2025-12-16=dragon book" , "--target", "2025-12-30=seule" , "--target", "2025-12-15=campus baguette" + , "--target", "2026-02-02=monmaster" , "--target", "2026-02-22=dernier appel" ] "" From a72b91e25b60b360dded3553157b37f1db7e6cd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Mon, 24 Nov 2025 18:28:54 +0800 Subject: [PATCH 128/178] home/starship: show ghc_version --- nix/homeModules/common/starship/starship.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nix/homeModules/common/starship/starship.toml b/nix/homeModules/common/starship/starship.toml index c3f257f9..88a7587d 100644 --- a/nix/homeModules/common/starship/starship.toml +++ b/nix/homeModules/common/starship/starship.toml @@ -97,7 +97,7 @@ style = "bold #239dad" # style = 'bold #b07219' [haskell] -format = '[ $version]($style)' +format = '[ $ghc_version]($style)' style = "bold #5e5086" #################### Language modules #################### From 8f0bc83348161c6ce6275579b730bcfd68d35154 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Tue, 25 Nov 2025 15:27:11 +0800 Subject: [PATCH 129/178] vanadium/iamb: update config --- nix/secrets/iambconfig.age | Bin 1058 -> 1148 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/nix/secrets/iambconfig.age b/nix/secrets/iambconfig.age index b5bd034c5ad3079dd912648f09959983523e30a7..f26a387dae4782febd75640f81dbc98ff93cd5c6 100644 GIT binary patch delta 1081 zcmV-91jhTK2>b|;EPqOEM^#B!Wn*hjX;dpzD`<09V`wm9LN7~aRaACPdO1;YIZjek zI80$gX9{_7GB!nZR4-OkPHuWMSXyIMM_E@mGev7lRdz5#IZjnGHA_h~O>$0hSqd#a zAaiqQEoEdfH8n9gAZv3lYcN3|T5M7{P&8+CPgqYvT466|aYklLN?J}*yX3N~d}ZB9X9YgI{AcTY2HVq<1`H!w;~RYNsyYI;IxZ*MkKIdo%D zQdVg=k?|K-c5-S^S!hXFN@7A%b5le&NJ~L>c4IZ|p-F-K=FIap9|S3-AlG*fSHM@m9NZC7kJF+^*VUjY|?OlD!NNjL(cujMEY;1QmP)==WY)fKpH*ITfK{9c0L`Y#*Gcz?rVsA2V zS#@z_H919QLpV!#M>$JOGD>(fFF{E&GYU~*Y)x5bZEJKiST%BOVp1}0D?>6z0B(OKo$ zfkPH!0J$aMLo@#P@XI8BP#<4E)+~}KG(BZ%6N?;50)O{R)UsVrmFCfGq|Et!R0oaK z#C6vxGhw^;YPJjm)tVVT(61CYMya4ESsPNYx{?C8%;{<8Jy=2ZgtQ3>fJO-uF0bZ; zK;KQsH^%8&0^;Y zmPFyLG*O)S6Ha92VE~8IG}P2$fwvgiELBi{qILo72Q_mHwwMaB{BbCY#u#!@o{p@R delta 990 zcmV<410nqU2%-p(EPriTYHN0CNiQ`wQCDVAQgL=_RcdTRFEvVGVs>j*R%>=jZfr_5 zR8U4kNeWm(WjR81V|Gh0WJp+VMKDBXK|*#;L3(#lMm9w+VK8JzIZJIrWpZ{%FbXX` zAaiqQEoEdfH8n9gAZv3lYcN3|HE>~SN^EyZL^CsFNNiDLOh#-kb5KlhIbkwMS!qQ} zQ%yHRO-E96QB!F}3RrkjFEu!3GiX9iWI{!Bcq?vGPDD;?NiR4#O=&YXYA;PzHFah; zYIZMgk?|K-Mru$@RW?UAS$SkIL``99K}SJqN?})RPghn=IBsfVP)u`UVKz81HAHU; zS!Y2^T6S`7b2Kt5bxu<-XHqL_bu>9wNoY)TH&${$eN>R>J=xed$0nx5V53BLv{|}v5kmlWcq#U?I?m8oojYyETw=X|fwl(nC>CN# zH=o=i5+e(oEUPXkv#Bg&ylhch{D}!;#Fp@VR2^FoFu{UL0~%fQ4;`JxqkC1RCLzEm zb{okn+^oevDR-@4amtE+KU6V5-lD6Msh7!lJ>nF~fl>4b5US-_)Z$-cb8LM1qQl{u zE!lJ&zwRoP|Kg6AsHvJH?mWgYLGLjj>91+91Fw8SIrKSg9s7|muEu#o7Vf59vV#5N zIJQC?Ey0hiu>j=MsK&9;B76m>;;m0&2F&F6(bIxl$AC|9H7ILipyu-WqaUHkrxfgWQ^JH?k M><>ZU05P14B2Xxit^fc4 From 765fe566fce5a3dfc5cef4a3a8fc2cb999823ebc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Wed, 26 Nov 2025 09:06:36 +0800 Subject: [PATCH 130/178] neovim/luasnip: snippet system -> stdenv.hostPlatform.system --- .config/nvim/plugin/luasnip.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.config/nvim/plugin/luasnip.lua b/.config/nvim/plugin/luasnip.lua index bd6ab457..65fe4532 100644 --- a/.config/nvim/plugin/luasnip.lua +++ b/.config/nvim/plugin/luasnip.lua @@ -5,8 +5,8 @@ local cr = function() return t { "", "" } end local i = luasnip.insert_node local f = luasnip.function_node -local function datetime() return os.date('%Y-%m-%d %H:%M:%S') end -local function date() return os.date('%Y-%m-%d') end +local function datetime() return os.date("%Y-%m-%d %H:%M:%S") end +local function date() return os.date("%Y-%m-%d") end local function quoted(s) return '"' .. s .. '"' end luasnip.add_snippets("typst", { @@ -57,5 +57,9 @@ luasnip.add_snippets("ruler", { }), }) +luasnip.add_snippets("nix", { + s("system", { t("stdenv.hostPlatform.system") }), +}) + local haskell_snippets = require("haskell-snippets").all luasnip.add_snippets("haskell", haskell_snippets, { key = "haskell" }) From bc2a414ef520f7931acd37a4e9e1200ebb6ca6ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Wed, 26 Nov 2025 14:37:33 +0800 Subject: [PATCH 131/178] Reapply "vanadium/zen-browser: init" This reverts commit c2c655981af0fc900cf73fc5b4dcc8561e6fd836. --- nix/configurations/vanadium.nix | 5 + .../vanadium/home/zen-browser.nix | 165 +++++++++++++++++ nix/homeModules/common/zen-browser.nix | 166 ++++++++++++++++++ nix/overlays/zen-browser.nix | 19 ++ npins/sources.json | 13 ++ 5 files changed, 368 insertions(+) create mode 100644 nix/configurations/vanadium/home/zen-browser.nix create mode 100644 nix/homeModules/common/zen-browser.nix create mode 100644 nix/overlays/zen-browser.nix diff --git a/nix/configurations/vanadium.nix b/nix/configurations/vanadium.nix index 80919604..7234fbdf 100644 --- a/nix/configurations/vanadium.nix +++ b/nix/configurations/vanadium.nix @@ -56,6 +56,7 @@ in ../overlays/eepy.nix ../overlays/calibre-no-mime.nix ../overlays/fcitx5-table-extra-taiwanese.nix + ../overlays/zen-browser.nix ../overlays/iosevka.nix ../packages/overlay.nix @@ -152,6 +153,7 @@ in ./vanadium/home/programs.nix ./vanadium/home/misc.nix + ./vanadium/home/zen-browser.nix ./vanadium/home/firefox.nix ./vanadium/home/xmobar.nix @@ -170,6 +172,7 @@ in ../homeModules/common/atuin.nix ../homeModules/common/direnv.nix ../homeModules/common/feh.nix + ../homeModules/common/zen-browser.nix ../homeModules/common/firefox.nix ../homeModules/common/fzf.nix ../homeModules/common/git.nix @@ -191,6 +194,8 @@ in # (sources.agenix + "/modules/age-home.nix") sources.wired-notify.asFlake.homeManagerModules.default + + sources.zen-browser.asFlake.homeModules.twilight ]; } diff --git a/nix/configurations/vanadium/home/zen-browser.nix b/nix/configurations/vanadium/home/zen-browser.nix new file mode 100644 index 00000000..beee8d6a --- /dev/null +++ b/nix/configurations/vanadium/home/zen-browser.nix @@ -0,0 +1,165 @@ +{ + pkgs, + config, + ... +}: +let + inherit (pkgs) nur; +in +{ + programs.zen-browser = { + enable = true; + + policies.SearchEngines.Add = [ + # Forges + { + Name = "GitHub"; + Alias = "@gh"; + IconURL = "https://github.com/favicon.ico"; + Description = "Your code yum yum"; + URLTemplate = "https://github.com/search?q={searchTerms}&type=repositories"; + } + { + Name = "GitHub (Code Search)"; + Alias = "@ghc"; + IconURL = "https://github.com/favicon.ico"; + Description = "Your code yum yum"; + URLTemplate = "https://github.com/search?q={searchTerms}&type=code"; + } + { + Name = "Codeberg"; + Alias = "@cb"; + IconURL = "https://codeberg.org/favicon.ico"; + Description = "Software development, but free!"; + URLTemplate = "https://codeberg.org/explore/repos?q={searchTerms}"; + } + { + Name = "?C"; + Alias = "@cc"; + IconURL = "https://git.confusedcompiler.org/favicon.ico"; + URLTemplate = "https://git.confusedcompiler.org/explore/repos?q={searchTerms}"; + } + + # Nix{,OS,pkgs} + { + Name = "NixOS Search (Package)"; + Alias = "@np"; + IconURL = "https://nixos.org/favicon.ico"; + Description = "Search in nixpkgs"; + URLTemplate = "https://search.nixos.org/packages?query={searchTerms}"; + } + { + Name = "NixOS Search (Options)"; + Alias = "@no"; + IconURL = "https://nixos.org/favicon.ico"; + Description = "Search in NixOS options"; + URLTemplate = "https://search.nixos.org/options?query={searchTerms}"; + } + + # Haskell + { + Name = "Flora"; + Alias = "@hs"; + IconURL = "https://flora.pm/static/icons/favicon-32x32.png"; + URLTemplate = "https://flora.pm/search?q={searchTerms}"; + } + + # Discourse + { + Name = "NixOS Discourse"; + Alias = "@nd"; + IconURL = "https://nixos.org/favicon.ico"; + URLTemplate = "https://discourse.nixos.org/search?q={searchTerms}"; + } + { + Name = "Framework Discourse"; + Alias = "@fd"; + IconURL = "https://frame.work/favicon.ico"; + URLTemplate = "https://community.frame.work/search?q={searchTerms}"; + } + + # Misc + { + Name = "YouTube"; + Alias = "@yt"; + IconURL = "https://youtube.com/favicon.ico"; + SuggestURLTemplate = "http://suggestqueries.google.com/complete/search?q={searchTerms}&ds=yt"; + URLTemplate = "https://www.youtube.com/results?search_query={searchTerms}"; + } + { + Name = "Genius"; + Alias = "@geni"; + IconURL = "https://genius.com/favicon.ico"; + URLTemplate = "https://genius.com/search?q={searchTerms}"; + } + ]; + + profiles = { + default = { + settings = { + # "full-screen-api.ignore-widgets" = true; # limit fullscreen mode to window + }; + userChrome = '' + /* monofont tweak */ + #statuspanel-label { + font-family: monospace; + } + .urlbar-input-box { + font-family: monospace; + } + ''; + extensions.packages = + let + addons = nur.repos.rycee.firefox-addons; + in + [ + addons.sponsorblock + addons.return-youtube-dislikes + addons.consent-o-matic + ]; + }; + + junk = { + id = 1; + inherit (config.programs.zen-browser.profiles.default) + settings + userChrome + ; + + extensions.packages = + let + addons = nur.repos.rycee.firefox-addons; + in + [ addons.multi-account-containers ]; + + containers = { + raisin = { + color = "purple"; + icon = "fruit"; + id = 1; + }; + pomme = { + color = "red"; + icon = "fruit"; + id = 2; + }; + }; + }; + + # Isolate it because it's proprietary + tampermonkey = { + id = 2; + inherit (config.programs.zen-browser.profiles.default) + settings + userChrome + ; + + extensions.packages = + let + addons = nur.repos.rycee.firefox-addons; + in + [ addons.tampermonkey ]; + }; + }; + }; +} diff --git a/nix/homeModules/common/zen-browser.nix b/nix/homeModules/common/zen-browser.nix new file mode 100644 index 00000000..b490d95b --- /dev/null +++ b/nix/homeModules/common/zen-browser.nix @@ -0,0 +1,166 @@ +{ + pkgs, + config, + lib, + ... +}: +let + inherit (pkgs) nur; + + cfg = config.programs.zen-browser; +in +{ + programs.zen-browser = { + # https://mozilla.github.io/policy-templates + # The following have more complex logic, keep them as policies and not profiles + policies = { + RequestedLocales = [ + "fr-FR" # for fuck sake stop showing me translated version of French gov sites + "zh-TW" + "en-US" + ]; + + SearchEngines = { + Remove = [ + "Google" + "Bing" + "DuckDuckGo" + "Qwant" + "eBay" + "Perplexity" + ]; + Default = "Brave"; + Add = [ + { + Name = "Brave"; + Alias = "@br"; + URLTemplate = "https://search.brave.com/search?q={searchTerms}&source=web"; + SuggestURLTemplate = "https://suggestqueries.google.com/complete/search?q={searchTerms}"; + } + ]; + }; + NoDefaultBookmarks = true; + DisplayMenuBar = "never"; + DisplayBookmarksToolbar = "never"; + DNSOverHTTPS = { + Enabled = false; + }; + }; + + # https://searchfox.org/mozilla-central/source/browser/components/enterprisepolicies/Policies.sys.mjs + # Some policies can be rewritten to profiles configuration + # + # TODO: try out the "locked" semantic from zen + # https://github.com/0xc000022070/zen-browser-flake/tree/main#preferences + profiles.default = { + settings = { + "toolkit.legacyUserProfileCustomizations.stylesheets" = true; + "browser.tabs.loadInBackground" = true; + "browser.ctrlTab.sortByRecentlyUsed" = false; + "layout.css.devPixelsPerPx" = 1.1; + + # open links in new window + # this works a lot better with xmonad where I have a bunch of windows + "browser.link.open_newwindow" = 2; + + # Sponsored crap + # Yes + "browser.newtabpage.activity-stream.showSearch" = true; + "browser.newtabpage.activity-stream.feeds.topsites" = true; + # No + "browser.newtabpage.activity-stream.showSponsoredTopSites" = false; + "browser.newtabpage.activity-stream.feeds.section.highlights" = false; + "browser.newtabpage.activity-stream.feeds.system.topstories" = false; + "browser.newtabpage.activity-stream.feeds.section.topstories" = false; + "browser.newtabpage.activity-stream.showSponsored" = false; + + # URL + # Yes + "browser.urlbar.suggest.quicksuggest.nonsponsored" = true; + # No + "browser.urlbar.suggest.quicksuggest.sponsored" = false; + + # Pasword manager + "signon.rememberSignons" = false; + "services.passwordSavingEnabled" = false; + "pref.privacy.disable_button.view_passwords" = false; + + # Hardware acceleration + "layers.acceleration.disabled" = false; + + # Screenshot + "screenshots.browser.component.enabled" = true; + + # Recommendations + "browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons" = false; + "browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features" = false; + "extensions.htmlaboutaddons.recommendations.enabled" = false; # Addons + + # Onboarding + "browser.aboutwelcome.enabled" = false; + + # AI crap + "browser.ml.chat.enabled" = false; + "browser.ml.chat.page" = false; + "browser.ml.chat.shortcuts" = false; + "browser.ml.chat.sidebar" = false; + + # Prevent WebRTC leak + # https://mullvad.net/en/help/webrtc + "media.peerconnection.enabled" = false; + }; + + extensions.packages = + let + addons = nur.repos.rycee.firefox-addons; + in + [ + addons.ublock-origin + addons.privacy-badger + addons.user-agent-string-switcher + + /* + Here's to you who want to remove news feed eradicator because you find it annoying: + It is here to annoy you so it is less likely for you to be on the agency inversion path. + DO NOT REMOVE IT. I repeat, DO NOT REMOVE IT. + + If you think it's annoying, go do some jump rope, sing, live. + */ + addons.news-feed-eradicator # did you read the comment above? + addons.multi-account-containers + ]; + }; + }; + + xdg.mimeApps = + let + associations = builtins.listToAttrs ( + map + (name: { + inherit name; + value = cfg.package.meta.desktopFileName; + }) + [ + "application/x-extension-shtml" + "application/x-extension-xhtml" + "application/x-extension-html" + "application/x-extension-xht" + "application/x-extension-htm" + "x-scheme-handler/unknown" + "x-scheme-handler/mailto" + "x-scheme-handler/chrome" + "x-scheme-handler/about" + "x-scheme-handler/https" + "x-scheme-handler/http" + "application/xhtml+xml" + "application/json" + "text/plain" + "text/html" + ] + ); + in + lib.mkIf cfg.enable { + associations.added = associations; + defaultApplications = associations; + }; +} diff --git a/nix/overlays/zen-browser.nix b/nix/overlays/zen-browser.nix new file mode 100644 index 00000000..f4ffa489 --- /dev/null +++ b/nix/overlays/zen-browser.nix @@ -0,0 +1,19 @@ +let + sources = import ../../npins; +in +final: _: +let + zenpkgs = sources.zen-browser.asFlake.packages.${final.system}; +in +{ + # TODO: upstream default is broken? They default to zen-twilight + "zen-beta-unwrapped" = zenpkgs."beta-unwrapped"; + "zen-twilight-unwrapped" = zenpkgs."twilight-unwrapped"; + "zen-twilight-official-unwrapped" = zenpkgs."twilight-official-unwrapped"; + + # default + "zen-beta" = zenpkgs."beta"; + + "zen-twilight" = zenpkgs."twilight"; + "zen-twilight-official" = zenpkgs."twilight-official"; +} diff --git a/npins/sources.json b/npins/sources.json index a1bb31dc..d7c39ceb 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -368,6 +368,19 @@ "revision": "6a96aa2066d8ad945f2323b63dc217081ef51168", "url": "https://github.com/Toqozz/wired-notify/archive/6a96aa2066d8ad945f2323b63dc217081ef51168.tar.gz", "hash": "02b8pva12rzcciq5lavwk824xaym28igfsva4kikvd7mxs06ccwx" + }, + "zen-browser": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "0xc000022070", + "repo": "zen-browser-flake" + }, + "branch": "main", + "submodules": false, + "revision": "ef951ed2d976bcd1f57a09f358fdda9fa9425018", + "url": "https://github.com/0xc000022070/zen-browser-flake/archive/ef951ed2d976bcd1f57a09f358fdda9fa9425018.tar.gz", + "hash": "1s85cxiwhzwqgbazcgv12xqdlk1nkfynv23r9zj8gip4j6pznr4z" } }, "version": 5 From 4c4ed165b36d58d47b0173ac42ad78372ff6cd5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Wed, 26 Nov 2025 14:58:25 +0800 Subject: [PATCH 132/178] vanadium/xmonad: handle zen and launch it instead of firefox --- nix/configurations/vanadium/home/xmonad/xmonad.hs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/nix/configurations/vanadium/home/xmonad/xmonad.hs b/nix/configurations/vanadium/home/xmonad/xmonad.hs index a41e765d..76182ee5 100644 --- a/nix/configurations/vanadium/home/xmonad/xmonad.hs +++ b/nix/configurations/vanadium/home/xmonad/xmonad.hs @@ -95,7 +95,7 @@ isEvolutionComposer = ] isFirefox :: Query Bool -isFirefox = className =? "firefox" +isFirefox = className =? "firefox" <||> className ^? "zen" isSpotify :: Query Bool isSpotify = isFirefox <&&> title ~? "Spotify" @@ -112,9 +112,11 @@ isSignal = className =? "Signal" isElement :: Query Bool isElement = isFirefox <&&> title ~? "Element" --- This changes depending on the locale of the browser :/ isFirefoxPip :: Query Bool -isFirefoxPip = isFirefox <&&> title =? "Incrustation vidéo" +isFirefoxPip = + isFirefox + -- This changes depending on the locale of the browser :/ + <&&> (title =? "Incrustation vidéo" <||> title =? "Picture-in-Picture") isPavucontrol :: Query Bool isPavucontrol = className =? "pavucontrol" @@ -223,7 +225,9 @@ myStartupHook = do -- - setting `home.sessionVariable` (home-manager) would only effect shells, probably due to the order of launched processes blah blah -- - setting `environment.sessionVariables` (NixOS) would make my set up less portable putEnv "GLFW_IM_MODULE=ibus" -- Make sure kitty knows how to talk to fcitx - putEnv "MOZ_USE_XINPUT2=1" -- Force touchpad for firefox + + -- TODO: doesn't work for firefox nor for zen since 145.0 + -- putEnv "MOZ_USE_XINPUT2=1" -- Force touchpad for firefox removedKeybinds :: [(KeyMask, KeySym)] removedKeybinds = @@ -309,7 +313,7 @@ keybinds = ) -- Launcher - ++ (let launchFirefox = "if type firefox; then firefox; else firefox-esr; fi" + ++ (let launchFirefox = "zen" launchDmenu = "dmenu_run -i -fn \"Iosevka-14\" -nb \"#36363a\" -nf \"#e2e2e4\" -sb \"#f7f7f8\" -sf \"#36363a\" -l 10" lock = "xscreensaver-command -lock" in [ ((controlMask .|. altMask, xK_m), namedScratchpadAction myScratchpads "cmus" ) From 1bec3a93a0dba88174f46b9e5919e6f9e345a69c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Wed, 26 Nov 2025 15:12:24 +0800 Subject: [PATCH 133/178] vanadium: improve browser xdg configuration --- nix/homeModules/common/firefox.nix | 2 +- nix/homeModules/common/zen-browser.nix | 41 +++++++++++--------------- 2 files changed, 18 insertions(+), 25 deletions(-) diff --git a/nix/homeModules/common/firefox.nix b/nix/homeModules/common/firefox.nix index d479571b..853888c9 100644 --- a/nix/homeModules/common/firefox.nix +++ b/nix/homeModules/common/firefox.nix @@ -140,7 +140,7 @@ in "x-scheme-handler/unknown" = "firefox.desktop"; }; in - lib.mkIf cfg.enable { + lib.mkIf (cfg.enable && !config.programs.zen-browser.enable) { enable = true; associations.added = associations; defaultApplications = associations; diff --git a/nix/homeModules/common/zen-browser.nix b/nix/homeModules/common/zen-browser.nix index b490d95b..c6681318 100644 --- a/nix/homeModules/common/zen-browser.nix +++ b/nix/homeModules/common/zen-browser.nix @@ -134,30 +134,23 @@ in xdg.mimeApps = let - associations = builtins.listToAttrs ( - map - (name: { - inherit name; - value = cfg.package.meta.desktopFileName; - }) - [ - "application/x-extension-shtml" - "application/x-extension-xhtml" - "application/x-extension-html" - "application/x-extension-xht" - "application/x-extension-htm" - "x-scheme-handler/unknown" - "x-scheme-handler/mailto" - "x-scheme-handler/chrome" - "x-scheme-handler/about" - "x-scheme-handler/https" - "x-scheme-handler/http" - "application/xhtml+xml" - "application/json" - "text/plain" - "text/html" - ] - ); + associations = lib.genAttrs [ + "application/x-extension-shtml" + "application/x-extension-xhtml" + "application/x-extension-html" + "application/x-extension-xht" + "application/x-extension-htm" + # "x-scheme-handler/unknown" + # "x-scheme-handler/mailto" + "x-scheme-handler/chrome" + "x-scheme-handler/about" + "x-scheme-handler/https" + "x-scheme-handler/http" + "application/xhtml+xml" + # "application/json" + # "text/plain" + "text/html" + ] (_: cfg.package.meta.desktopFileName); in lib.mkIf cfg.enable { associations.added = associations; From 02f4b51d105d914f0213033e0f770f1f5c3e86ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Wed, 26 Nov 2025 17:37:42 +0800 Subject: [PATCH 134/178] home/zen: don't resume session --- nix/homeModules/common/zen-browser.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/nix/homeModules/common/zen-browser.nix b/nix/homeModules/common/zen-browser.nix index c6681318..4b8227ea 100644 --- a/nix/homeModules/common/zen-browser.nix +++ b/nix/homeModules/common/zen-browser.nix @@ -52,12 +52,20 @@ in # # TODO: try out the "locked" semantic from zen # https://github.com/0xc000022070/zen-browser-flake/tree/main#preferences + # + # To check which option is mapped to which about:config + # - back preference file + # cp .zen/default/prefs.js{,.bk} + # - click the buttons + # - diff it + # diff .zen/default/prefs.js{.bk,} profiles.default = { settings = { "toolkit.legacyUserProfileCustomizations.stylesheets" = true; "browser.tabs.loadInBackground" = true; "browser.ctrlTab.sortByRecentlyUsed" = false; "layout.css.devPixelsPerPx" = 1.1; + "browser.startup.page" = 1; # open links in new window # this works a lot better with xmonad where I have a bunch of windows From c7cb48a6ec3535737fed7bf45d1a159eac4d3931 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Wed, 26 Nov 2025 19:25:13 +0800 Subject: [PATCH 135/178] vanadium/firefox: disable, use zen --- nix/configurations/vanadium/home/firefox.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nix/configurations/vanadium/home/firefox.nix b/nix/configurations/vanadium/home/firefox.nix index aab6da3f..6edc85cb 100644 --- a/nix/configurations/vanadium/home/firefox.nix +++ b/nix/configurations/vanadium/home/firefox.nix @@ -8,7 +8,7 @@ let in { programs.firefox = { - enable = true; + enable = false; policies.SearchEngines.Add = [ # Forges From 1ede0b2961d57979aeac7a090ed0bfb177b4c301 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Wed, 26 Nov 2025 20:35:20 +0800 Subject: [PATCH 136/178] vanadium/zen-browser: never propose translation --- nix/homeModules/common/zen-browser.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nix/homeModules/common/zen-browser.nix b/nix/homeModules/common/zen-browser.nix index 4b8227ea..f441838d 100644 --- a/nix/homeModules/common/zen-browser.nix +++ b/nix/homeModules/common/zen-browser.nix @@ -66,6 +66,7 @@ in "browser.ctrlTab.sortByRecentlyUsed" = false; "layout.css.devPixelsPerPx" = 1.1; "browser.startup.page" = 1; + "browser.translations.automaticallyPopup" = false; # open links in new window # this works a lot better with xmonad where I have a bunch of windows From 0387c3fcb076f583f2bb4e687cecfc3551ea6a3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Thu, 27 Nov 2025 11:35:45 +0800 Subject: [PATCH 137/178] overlays/zen-browser: drop --- nix/configurations/vanadium.nix | 1 - nix/overlays/zen-browser.nix | 19 ------------------- 2 files changed, 20 deletions(-) delete mode 100644 nix/overlays/zen-browser.nix diff --git a/nix/configurations/vanadium.nix b/nix/configurations/vanadium.nix index 7234fbdf..ab470dbd 100644 --- a/nix/configurations/vanadium.nix +++ b/nix/configurations/vanadium.nix @@ -56,7 +56,6 @@ in ../overlays/eepy.nix ../overlays/calibre-no-mime.nix ../overlays/fcitx5-table-extra-taiwanese.nix - ../overlays/zen-browser.nix ../overlays/iosevka.nix ../packages/overlay.nix diff --git a/nix/overlays/zen-browser.nix b/nix/overlays/zen-browser.nix deleted file mode 100644 index f4ffa489..00000000 --- a/nix/overlays/zen-browser.nix +++ /dev/null @@ -1,19 +0,0 @@ -let - sources = import ../../npins; -in -final: _: -let - zenpkgs = sources.zen-browser.asFlake.packages.${final.system}; -in -{ - # TODO: upstream default is broken? They default to zen-twilight - "zen-beta-unwrapped" = zenpkgs."beta-unwrapped"; - "zen-twilight-unwrapped" = zenpkgs."twilight-unwrapped"; - "zen-twilight-official-unwrapped" = zenpkgs."twilight-official-unwrapped"; - - # default - "zen-beta" = zenpkgs."beta"; - - "zen-twilight" = zenpkgs."twilight"; - "zen-twilight-official" = zenpkgs."twilight-official"; -} From d252914f55b1b5824a290aa6aede355ddf72f886 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Thu, 27 Nov 2025 12:52:12 +0800 Subject: [PATCH 138/178] home/zen-browser: close window with last tab --- nix/homeModules/common/zen-browser.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nix/homeModules/common/zen-browser.nix b/nix/homeModules/common/zen-browser.nix index f441838d..bfc4470b 100644 --- a/nix/homeModules/common/zen-browser.nix +++ b/nix/homeModules/common/zen-browser.nix @@ -67,6 +67,7 @@ in "layout.css.devPixelsPerPx" = 1.1; "browser.startup.page" = 1; "browser.translations.automaticallyPopup" = false; + "browser.tabs.closeWindowWithLastTab" = true; # open links in new window # this works a lot better with xmonad where I have a bunch of windows From a89146bc5b5c7ffd791edc29aabd95daaf2e1362 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Thu, 27 Nov 2025 12:58:54 +0800 Subject: [PATCH 139/178] home/zen-browser: document locked user preference (and it is not working) --- nix/homeModules/common/zen-browser.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nix/homeModules/common/zen-browser.nix b/nix/homeModules/common/zen-browser.nix index bfc4470b..993b1175 100644 --- a/nix/homeModules/common/zen-browser.nix +++ b/nix/homeModules/common/zen-browser.nix @@ -50,7 +50,7 @@ in # https://searchfox.org/mozilla-central/source/browser/components/enterprisepolicies/Policies.sys.mjs # Some policies can be rewritten to profiles configuration # - # TODO: try out the "locked" semantic from zen + # "locked" semantic from zen (doesn't seem to be doing anything, attempted for zen-twilight 1.18t) # https://github.com/0xc000022070/zen-browser-flake/tree/main#preferences # # To check which option is mapped to which about:config From 44576984e50e21f03389465d161744cfa8566137 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Thu, 27 Nov 2025 14:15:49 +0800 Subject: [PATCH 140/178] networks: update --- nix/networks/list.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nix/networks/list.nix b/nix/networks/list.nix index 3dca7a25..75127935 100644 --- a/nix/networks/list.nix +++ b/nix/networks/list.nix @@ -93,6 +93,10 @@ in ssid = "NTUH_guest"; randomizeMac = true; } + { + ssid = "i_Tzuchi_WiFi"; + randomizeMac = true; + } { ssid = "_SNCF_WIFI_INOUI"; } { ssid = "_WIFI_LYRIA"; } From b7b2083c747072f03fbb1f007cd9e9f029d16f23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Thu, 27 Nov 2025 23:05:43 +0800 Subject: [PATCH 141/178] vanadium: +telegram-desktop --- nix/configurations/vanadium/home/programs.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nix/configurations/vanadium/home/programs.nix b/nix/configurations/vanadium/home/programs.nix index a05cb216..97170ad6 100644 --- a/nix/configurations/vanadium/home/programs.nix +++ b/nix/configurations/vanadium/home/programs.nix @@ -110,6 +110,7 @@ pkgs.signal-desktop pkgs.tuba # mastodon GUI client pkgs.emoji-picker-rs + pkgs.telegram-desktop # for archlinux china # wm utilities pkgs.xbrightness From b50954a4efdb5db30e938ac8efabae97967f767f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Fri, 28 Nov 2025 04:30:58 +0100 Subject: [PATCH 142/178] Upgrade to 25.11 (#25) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-on: https://codeberg.org/leana8959/.files/pulls/25 Co-authored-by: Léana 江 Co-committed-by: Léana 江 --- Justfile | 2 +- .../hetzner_benchmark/home/programs.nix | 2 +- nix/configurations/hydrogen/home/programs.nix | 2 +- nix/configurations/vanadium.nix | 1 + nix/configurations/vanadium/home/gtk.nix | 38 +++++++++++++++++++ nix/configurations/vanadium/home/misc.nix | 10 ++--- nix/configurations/vanadium/home/programs.nix | 13 +++++-- nix/configurations/vanadium/nixos/battery.nix | 6 +-- nix/configurations/vanadium/nixos/gui.nix | 24 ++++++++++-- nix/configurations/vanadium/overlay.nix | 28 ++++---------- .../disable-chttrans.patch | 13 +++---- .../disable-fullwidth.patch | 7 ++-- .../patches/fcitx5/disable-clipboard.patch | 17 ++++++--- .../patches/fcitx5/disable-quickphrase.patch | 5 +-- .../patches/fcitx5/disable-unicode.patch | 10 ++--- nix/homeModules/common/fcitx5/default.nix | 2 +- nix/homeModules/common/git.nix | 21 +++------- nix/overlays/agenix.nix | 2 +- nix/overlays/disko.nix | 2 +- nix/overlays/dix.nix | 2 +- nix/overlays/eepy.nix | 2 +- nix/overlays/nil.nix | 2 +- nix/overlays/nix-monitored.nix | 2 +- nix/overlays/nix-tree.nix | 2 +- nix/packages/by-name/easyscan/package.nix | 4 +- nix/packages/by-name/ruler/package.nix | 4 +- npins/sources.json | 18 ++++----- 27 files changed, 141 insertions(+), 100 deletions(-) create mode 100644 nix/configurations/vanadium/home/gtk.nix diff --git a/Justfile b/Justfile index 2696c757..3c0318de 100644 --- a/Justfile +++ b/Justfile @@ -9,7 +9,7 @@ os host action: nixos-rebuild {{ action }} \ -I nixpkgs=${nixpkgs} \ -I nixos-config=./nix/configurations/{{ host }}.nix \ - --fast \ + --no-reexec \ --file ./default.nix \ --attr "nixosConfigurations.{{ host }}" diff --git a/nix/configurations/hetzner_benchmark/home/programs.nix b/nix/configurations/hetzner_benchmark/home/programs.nix index edd900cd..be1cbfc1 100644 --- a/nix/configurations/hetzner_benchmark/home/programs.nix +++ b/nix/configurations/hetzner_benchmark/home/programs.nix @@ -25,7 +25,7 @@ pkgs.hutils # pretty tui tools - pkgs.du-dust + pkgs.dust pkgs.tokei pkgs.hyperfine pkgs.watchexec diff --git a/nix/configurations/hydrogen/home/programs.nix b/nix/configurations/hydrogen/home/programs.nix index 67651b85..df6c010b 100644 --- a/nix/configurations/hydrogen/home/programs.nix +++ b/nix/configurations/hydrogen/home/programs.nix @@ -27,7 +27,7 @@ pkgs.nix-which # # pretty tui tools - # pkgs.du-dust + # pkgs.dust # pkgs.tokei # pkgs.hyperfine # pkgs.watchexec diff --git a/nix/configurations/vanadium.nix b/nix/configurations/vanadium.nix index ab470dbd..9332268b 100644 --- a/nix/configurations/vanadium.nix +++ b/nix/configurations/vanadium.nix @@ -151,6 +151,7 @@ in # ./vanadium/home/programs.nix ./vanadium/home/misc.nix + ./vanadium/home/gtk.nix ./vanadium/home/zen-browser.nix ./vanadium/home/firefox.nix diff --git a/nix/configurations/vanadium/home/gtk.nix b/nix/configurations/vanadium/home/gtk.nix new file mode 100644 index 00000000..f059868e --- /dev/null +++ b/nix/configurations/vanadium/home/gtk.nix @@ -0,0 +1,38 @@ +{ pkgs, ... }: +{ + home.packages = [ + pkgs.pantheon.elementary-sound-theme + ]; + + # Note: this would automatically recurse into gtk{2,3,4} settings + # In version prior to 25.11 it doesn't do this. + gtk.enable = true; + gtk = { + font = { + name = "Ubuntu"; + package = pkgs.ubuntu-classic; + }; + iconTheme = { + name = "Adwaita"; + package = pkgs.gnome-themes-extra; + }; + theme = { + name = "Adwaita"; + package = pkgs.gnome-themes-extra; + }; + + # TODO: open an issue, why are the types inconsistent? ew. + gtk2.extraConfig = '' + gtk-sound-theme-name = "elementary" + ''; + gtk3.extraConfig = { + gtk-sound-theme-name = "elementary"; + }; + gtk4.extraConfig = { + gtk-sound-theme-name = "elementary"; + }; + }; + dconf.settings = { + "org/gnome/desktop/sound".theme-name = "elementary"; + }; +} diff --git a/nix/configurations/vanadium/home/misc.nix b/nix/configurations/vanadium/home/misc.nix index 7fc0c785..23eea664 100644 --- a/nix/configurations/vanadium/home/misc.nix +++ b/nix/configurations/vanadium/home/misc.nix @@ -1,7 +1,6 @@ { pkgs, lib, - nixosConfig ? { }, ... }: { @@ -42,12 +41,9 @@ home.pointerCursor = { x11.enable = true; gtk.enable = true; - - inherit (nixosConfig.services.xserver.displayManager.lightdm.greeters.gtk.cursorTheme) - name - package - size - ; + name = "Posy_Cursor_Black"; + package = pkgs.posy-cursors; + size = 72; }; xresources.properties."Xft.dpi" = 150; i18n.inputMethod = { diff --git a/nix/configurations/vanadium/home/programs.nix b/nix/configurations/vanadium/home/programs.nix index 97170ad6..a2b44af7 100644 --- a/nix/configurations/vanadium/home/programs.nix +++ b/nix/configurations/vanadium/home/programs.nix @@ -50,7 +50,7 @@ pkgs.zbar # pdf - pkgs.poppler_utils # pdfseparate, pdfunite + pkgs.poppler-utils # pdfseparate, pdfunite pkgs.easyscan # fun @@ -62,7 +62,7 @@ # pkgs.necrolib # pretty tui tools - pkgs.du-dust + pkgs.dust pkgs.tokei pkgs.hyperfine pkgs.watchexec @@ -123,6 +123,8 @@ # audio utilities pkgs.helvum pkgs.pavucontrol + pkgs.pulseaudio # pactl value control + pkgs.pantheon.elementary-sound-theme ]; programs = { @@ -162,7 +164,12 @@ kitty = { enable = true; font.size = 12; # sweet spot for framework 13 - settings.shell = lib.getExe config.programs.fish.package; + settings = { + shell = lib.getExe config.programs.fish.package; + # https://github.com/kovidgoyal/kitty/issues/1866 + # https://sw.kovidgoyal.net/kitty/conf/#terminal-bell + linux_bell_theme = "elementary"; + }; }; chromium.enable = true; diff --git a/nix/configurations/vanadium/nixos/battery.nix b/nix/configurations/vanadium/nixos/battery.nix index 95eda6f8..8ac3479a 100644 --- a/nix/configurations/vanadium/nixos/battery.nix +++ b/nix/configurations/vanadium/nixos/battery.nix @@ -1,7 +1,7 @@ { - services.logind = { + services.logind.settings = { # Note: vanadium's btrfs disk layout has been changed and the swap has been reduced. It will not work with hibernate anymore. - lidSwitch = "suspend"; - lidSwitchDocked = "ignore"; + Login.HandleLidSwitch = "suspend"; + Login.HandleLidSwitchDocked = "ignore"; }; } diff --git a/nix/configurations/vanadium/nixos/gui.nix b/nix/configurations/vanadium/nixos/gui.nix index 836883ad..b9b1f6b4 100644 --- a/nix/configurations/vanadium/nixos/gui.nix +++ b/nix/configurations/vanadium/nixos/gui.nix @@ -15,13 +15,29 @@ autoRepeatInterval = 40; }; + environment.systemPackages = [ + pkgs.pantheon.elementary-sound-theme + ]; services.xserver.displayManager.lightdm = { enable = true; background = "#000000"; - greeters.gtk.cursorTheme = { - name = "Posy_Cursor_Black"; - package = pkgs.posy-cursors; - size = 72; + greeters.gtk = { + iconTheme = { + name = "Adwaita"; + package = pkgs.gnome-themes-extra; + }; + theme = { + name = "Adwaita"; + package = pkgs.gnome-themes-extra; + }; + cursorTheme = { + name = "Posy_Cursor_Black"; + package = pkgs.posy-cursors; + size = 72; + }; + extraConfig = '' + gtk-sound-theme-name = elementary + ''; }; }; diff --git a/nix/configurations/vanadium/overlay.nix b/nix/configurations/vanadium/overlay.nix index f7ee7a78..8414c6e9 100644 --- a/nix/configurations/vanadium/overlay.nix +++ b/nix/configurations/vanadium/overlay.nix @@ -53,31 +53,19 @@ infuse { ./patches/fcitx5/disable-quickphrase.patch ./patches/fcitx5/disable-unicode.patch ]; - fcitx5-chinese-addons.__output.cmakeFlags.__append = [ + qt6Packages.fcitx5-chinese-addons.__output.cmakeFlags.__append = [ (lib.cmakeFeature "ENABLE_BROWSER" "Off") - (lib.cmakeFeature "ENABLE_CLOUDPINYIN" "Off") + (lib.cmakeFeature "ENABLE_CLOUDPINYIN" "Off") # c.f. patch below (lib.cmakeFeature "ENABLE_DATA" "Off") ]; - fcitx5-chinese-addons.__output.patches.__append = [ + qt6Packages.fcitx5-chinese-addons.__output.patches.__append = [ ./patches/fcitx5-chinese-addons/disable-chttrans.patch ./patches/fcitx5-chinese-addons/disable-fullwidth.patch + (final.fetchpatch { + name = "cloudpinyin-disable-build"; # without this the option would fail + url = "https://github.com/fcitx/fcitx5-chinese-addons/commit/92ffd494273a5573347c1fe2667fb8d67a5303db.patch"; + hash = "sha256-Mo5l8tsn1JQxTFHxOZfQRmbCeWZHLyxfn2Qwv/gQXGA="; + }) # Note: disabling pinyin helper breaks canjie ]; - - # Security, Xorg vuln - # Backport has failed in upstream currently , - # might as well patch it while people are blogging about it - # Upstream talks about it here https://lists.x.org/archives/xorg-announce/2025-October/003635.html - xorg.xorgserver.__output.version = - oldVersion: - let - version = "21.1.20"; - in - if oldVersion == version then throw "This patch has been merged upstream" else version; - xorg.xorgserver.__output.src = - _: - final.fetchurl { - url = "mirror://xorg/individual/xserver/xorg-server-21.1.20.tar.xz"; - sha256 = "sha256-dpW8YYJLOoG2utL3iwVADKAVAD3kAtGzIhFxBbcC6Tc="; - }; } diff --git a/nix/configurations/vanadium/patches/fcitx5-chinese-addons/disable-chttrans.patch b/nix/configurations/vanadium/patches/fcitx5-chinese-addons/disable-chttrans.patch index f18c0d76..ea5ce501 100644 --- a/nix/configurations/vanadium/patches/fcitx5-chinese-addons/disable-chttrans.patch +++ b/nix/configurations/vanadium/patches/fcitx5-chinese-addons/disable-chttrans.patch @@ -1,5 +1,5 @@ diff --git a/modules/chttrans/CMakeLists.txt b/modules/chttrans/CMakeLists.txt -index 6c73ea8..8ed5660 100644 +index e2f5f43..61c6590 100644 --- a/modules/chttrans/CMakeLists.txt +++ b/modules/chttrans/CMakeLists.txt @@ -1,20 +1,20 @@ @@ -10,7 +10,7 @@ index 6c73ea8..8ed5660 100644 - set(CHTTRANS_SOURCES ${CHTTRANS_SOURCES} chttrans-opencc.cpp) -endif() -add_fcitx5_addon(chttrans ${CHTTRANS_SOURCES}) --target_link_libraries(chttrans Fcitx5::Core Fcitx5::Config Fcitx5::Module::Notifications Boost::iostreams ${FMT_TARGET}) +-target_link_libraries(chttrans Fcitx5::Core Fcitx5::Config Fcitx5::Module::Notifications) -if (ENABLE_OPENCC) - target_link_libraries(chttrans OpenCC::OpenCC) - if (TARGET Boost::json) @@ -25,7 +25,7 @@ index 6c73ea8..8ed5660 100644 +# set(CHTTRANS_SOURCES ${CHTTRANS_SOURCES} chttrans-opencc.cpp) +# endif() +# add_fcitx5_addon(chttrans ${CHTTRANS_SOURCES}) -+# target_link_libraries(chttrans Fcitx5::Core Fcitx5::Config Fcitx5::Module::Notifications Boost::iostreams ${FMT_TARGET}) ++# target_link_libraries(chttrans Fcitx5::Core Fcitx5::Config Fcitx5::Module::Notifications) +# if (ENABLE_OPENCC) +# target_link_libraries(chttrans OpenCC::OpenCC) +# if (TARGET Boost::json) @@ -42,7 +42,7 @@ index 6c73ea8..8ed5660 100644 +# COMPONENT config) +# install(FILES gbks2t.tab DESTINATION "${CMAKE_INSTALL_DATADIR}/fcitx5/chttrans" COMPONENT config) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt -index 994a4d1..9322834 100644 +index 5a8c94c..2feccd0 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -23,10 +23,10 @@ add_dependencies(testfullwidth fullwidth fullwidth.conf.in-fmt) @@ -50,14 +50,13 @@ index 994a4d1..9322834 100644 add_subdirectory(inputmethod) -add_executable(testchttrans testchttrans.cpp) --target_link_libraries(testchttrans Fcitx5::Core Fcitx5::Module::TestFrontend Fcitx5::Module::TestIM Pthread::Pthread) +-target_link_libraries(testchttrans Fcitx5::Core Fcitx5::Module::TestFrontend Fcitx5::Module::TestIM) -add_dependencies(testchttrans chttrans chttrans.conf.in-fmt copy-addon copy-testim) -add_test(NAME testchttrans COMMAND testchttrans) +# add_executable(testchttrans testchttrans.cpp) -+# target_link_libraries(testchttrans Fcitx5::Core Fcitx5::Module::TestFrontend Fcitx5::Module::TestIM Pthread::Pthread) ++# target_link_libraries(testchttrans Fcitx5::Core Fcitx5::Module::TestFrontend Fcitx5::Module::TestIM) +# add_dependencies(testchttrans chttrans chttrans.conf.in-fmt copy-addon copy-testim) +# add_test(NAME testchttrans COMMAND testchttrans) add_subdirectory(addon) add_executable(testpinyin testpinyin.cpp) - diff --git a/nix/configurations/vanadium/patches/fcitx5-chinese-addons/disable-fullwidth.patch b/nix/configurations/vanadium/patches/fcitx5-chinese-addons/disable-fullwidth.patch index 16626dc4..b079fafe 100644 --- a/nix/configurations/vanadium/patches/fcitx5-chinese-addons/disable-fullwidth.patch +++ b/nix/configurations/vanadium/patches/fcitx5-chinese-addons/disable-fullwidth.patch @@ -22,7 +22,7 @@ index 6e275bd..2dabd86 100644 +# install(FILES "${CMAKE_CURRENT_BINARY_DIR}/fullwidth.conf" DESTINATION "${FCITX_INSTALL_PKGDATADIR}/addon" +# COMPONENT config) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt -index 994a4d1..f354bfd 100644 +index 5a8c94c..0f0b130 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -17,10 +17,10 @@ target_link_libraries(testpinyinhelper Fcitx5::Core Fcitx5::Module::PinyinHelper @@ -30,14 +30,13 @@ index 994a4d1..f354bfd 100644 add_test(NAME testpinyinhelper COMMAND testpinyinhelper) -add_executable(testfullwidth testfullwidth.cpp) --target_link_libraries(testfullwidth Fcitx5::Core Fcitx5::Module::TestFrontend Fcitx5::Module::TestIM Pthread::Pthread) +-target_link_libraries(testfullwidth Fcitx5::Core Fcitx5::Module::TestFrontend Fcitx5::Module::TestIM) -add_dependencies(testfullwidth fullwidth fullwidth.conf.in-fmt) -add_test(NAME testfullwidth COMMAND testfullwidth) +# add_executable(testfullwidth testfullwidth.cpp) -+# target_link_libraries(testfullwidth Fcitx5::Core Fcitx5::Module::TestFrontend Fcitx5::Module::TestIM Pthread::Pthread) ++# target_link_libraries(testfullwidth Fcitx5::Core Fcitx5::Module::TestFrontend Fcitx5::Module::TestIM) +# add_dependencies(testfullwidth fullwidth fullwidth.conf.in-fmt) +# add_test(NAME testfullwidth COMMAND testfullwidth) add_subdirectory(inputmethod) add_executable(testchttrans testchttrans.cpp) - diff --git a/nix/configurations/vanadium/patches/fcitx5/disable-clipboard.patch b/nix/configurations/vanadium/patches/fcitx5/disable-clipboard.patch index 4ad25570..fa526161 100644 --- a/nix/configurations/vanadium/patches/fcitx5/disable-clipboard.patch +++ b/nix/configurations/vanadium/patches/fcitx5/disable-clipboard.patch @@ -1,8 +1,8 @@ diff --git a/src/modules/clipboard/CMakeLists.txt b/src/modules/clipboard/CMakeLists.txt -index 997c4e3e..4163cada 100644 +index afeaa6d3..ad4e77e0 100644 --- a/src/modules/clipboard/CMakeLists.txt +++ b/src/modules/clipboard/CMakeLists.txt -@@ -1,21 +1,21 @@ +@@ -1,25 +1,25 @@ -add_fcitx5_addon(clipboard) - -target_sources(clipboard PRIVATE clipboard.cpp) @@ -15,7 +15,11 @@ index 997c4e3e..4163cada 100644 - -if (WAYLAND_FOUND) - target_sources(clipboard PRIVATE waylandclipboard.cpp) -- target_link_libraries(clipboard Fcitx5::Module::Wayland Fcitx5::Wayland::WLRDataControl Pthread::Pthread) +- target_link_libraries(clipboard +- Fcitx5::Module::Wayland +- Fcitx5::Wayland::WLRDataControl +- Fcitx5::Wayland::ExtDataControl +- Pthread::Pthread) -endif() - -install(TARGETS clipboard DESTINATION "${FCITX_INSTALL_ADDONDIR}") @@ -33,7 +37,11 @@ index 997c4e3e..4163cada 100644 +# +# if (WAYLAND_FOUND) +# target_sources(clipboard PRIVATE waylandclipboard.cpp) -+# target_link_libraries(clipboard Fcitx5::Module::Wayland Fcitx5::Wayland::WLRDataControl Pthread::Pthread) ++# target_link_libraries(clipboard ++# Fcitx5::Module::Wayland ++# Fcitx5::Wayland::WLRDataControl ++# Fcitx5::Wayland::ExtDataControl ++# Pthread::Pthread) +# endif() +# +# install(TARGETS clipboard DESTINATION "${FCITX_INSTALL_ADDONDIR}") @@ -42,4 +50,3 @@ index 997c4e3e..4163cada 100644 configure_file(clipboard.conf.in.in clipboard.conf.in @ONLY) fcitx5_translate_desktop_file(${CMAKE_CURRENT_BINARY_DIR}/clipboard.conf.in clipboard.conf) fcitx5_export_module(Clipboard TARGET clipboard BUILD_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}" HEADERS clipboard_public.h INSTALL) - diff --git a/nix/configurations/vanadium/patches/fcitx5/disable-quickphrase.patch b/nix/configurations/vanadium/patches/fcitx5/disable-quickphrase.patch index 37afa2fd..41df9ece 100644 --- a/nix/configurations/vanadium/patches/fcitx5/disable-quickphrase.patch +++ b/nix/configurations/vanadium/patches/fcitx5/disable-quickphrase.patch @@ -25,10 +25,10 @@ index b5bc37ac..04f4da59 100644 +# FILES_MATCHING PATTERN "*.mb") diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt -index 97eed1f3..53e09977 100644 +index 643d96f4..0916c732 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt -@@ -147,10 +147,10 @@ if (ENABLE_KEYBOARD) +@@ -162,10 +162,10 @@ if (ENABLE_KEYBOARD) add_test(NAME testspell COMMAND testspell) endif() @@ -43,4 +43,3 @@ index 97eed1f3..53e09977 100644 if (ENABLE_X11) add_executable(testxim testxim.cpp) - diff --git a/nix/configurations/vanadium/patches/fcitx5/disable-unicode.patch b/nix/configurations/vanadium/patches/fcitx5/disable-unicode.patch index 8b49d39e..7de1dedd 100644 --- a/nix/configurations/vanadium/patches/fcitx5/disable-unicode.patch +++ b/nix/configurations/vanadium/patches/fcitx5/disable-unicode.patch @@ -1,13 +1,13 @@ diff --git a/src/modules/unicode/CMakeLists.txt b/src/modules/unicode/CMakeLists.txt -index 73f7e064..afddabee 100644 +index 11512ecf..9efde8ac 100644 --- a/src/modules/unicode/CMakeLists.txt +++ b/src/modules/unicode/CMakeLists.txt @@ -1,11 +1,11 @@ -add_fcitx5_addon(unicode unicode.cpp charselectdata.cpp) --target_link_libraries(unicode Fcitx5::Core Fcitx5::Module::Clipboard ${FMT_TARGET}) +-target_link_libraries(unicode Fcitx5::Core Fcitx5::Module::Clipboard) -install(TARGETS unicode DESTINATION "${FCITX_INSTALL_ADDONDIR}") +# add_fcitx5_addon(unicode unicode.cpp charselectdata.cpp) -+# target_link_libraries(unicode Fcitx5::Core Fcitx5::Module::Clipboard ${FMT_TARGET}) ++# target_link_libraries(unicode Fcitx5::Core Fcitx5::Module::Clipboard) +# install(TARGETS unicode DESTINATION "${FCITX_INSTALL_ADDONDIR}") configure_file(unicode.conf.in.in unicode.conf.in @ONLY) fcitx5_translate_desktop_file(${CMAKE_CURRENT_BINARY_DIR}/unicode.conf.in unicode.conf) @@ -21,10 +21,10 @@ index 73f7e064..afddabee 100644 +# install(FILES charselectdata DESTINATION "${FCITX_INSTALL_PKGDATADIR}/unicode" COMPONENT config) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt -index 97eed1f3..ff902c88 100644 +index 643d96f4..d008183a 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt -@@ -134,10 +134,10 @@ add_dependencies(testemoji emoji emoji.conf.in-fmt) +@@ -149,10 +149,10 @@ add_dependencies(testemoji emoji emoji.conf.in-fmt) add_test(NAME testemoji COMMAND testemoji) endif() diff --git a/nix/homeModules/common/fcitx5/default.nix b/nix/homeModules/common/fcitx5/default.nix index 4e1cc178..40fadff1 100644 --- a/nix/homeModules/common/fcitx5/default.nix +++ b/nix/homeModules/common/fcitx5/default.nix @@ -10,7 +10,7 @@ in { i18n.inputMethod = { fcitx5.addons = [ - pkgs.fcitx5-chinese-addons + pkgs.qt6Packages.fcitx5-chinese-addons pkgs.fcitx5-table-extra ]; }; diff --git a/nix/homeModules/common/git.nix b/nix/homeModules/common/git.nix index c3a19f91..99aef957 100644 --- a/nix/homeModules/common/git.nix +++ b/nix/homeModules/common/git.nix @@ -1,28 +1,19 @@ { lib, config, - pkgs, ... }: { # git plugins programs.git = { lfs.enable = true; - patdiff.enable = lib.mkMerge [ - # known to fail on aarch64-linux - (lib.mkIf (pkgs.system == "aarch64-linux") ( - # TODO: investigate this - lib.warn "patdiff has been forcibly disabled because it has previously failed to build" lib.mkForce - false - )) - (lib.mkDefault true) - ]; }; + programs.patdiff.enable = lib.mkDefault true; # 懶惰鬼賴皮 programs.lazygit = let - patdiffCfg = config.programs.git.patdiff; + patdiffCfg = config.programs.patdiff; in lib.mkIf patdiffCfg.enable { settings = { @@ -32,7 +23,7 @@ # git itself programs.git = { - extraConfig = { + settings = { init.defaultBranch = "trunk"; # I like trees push.autoSetupRemote = true; pull.ff = "only"; @@ -60,9 +51,9 @@ }; # identity - programs.git = { - userEmail = "leana.jiang+git@icloud.com"; - userName = "Léana 江"; + programs.git.settings = { + user.email = "leana.jiang+git@icloud.com"; + user.name = "Léana 江"; signing = { key = "0x4E887A4CA9714ADA"; signByDefault = lib.mkDefault false; diff --git a/nix/overlays/agenix.nix b/nix/overlays/agenix.nix index 33db93ab..262d465a 100644 --- a/nix/overlays/agenix.nix +++ b/nix/overlays/agenix.nix @@ -3,5 +3,5 @@ let in final: _: { # Use flake so the package inputs is pinned - agenix = sources.agenix.asFlake.packages.${final.system}.default; + agenix = sources.agenix.asFlake.packages.${final.stdenv.hostPlatform.system}.default; } diff --git a/nix/overlays/disko.nix b/nix/overlays/disko.nix index cb013aad..c0243b78 100644 --- a/nix/overlays/disko.nix +++ b/nix/overlays/disko.nix @@ -2,5 +2,5 @@ let sources = import ../../npins; in final: _: { - disko = sources.disko.asFlake.packages.${final.system}.default; + disko = sources.disko.asFlake.packages.${final.stdenv.hostPlatform.system}.default; } diff --git a/nix/overlays/dix.nix b/nix/overlays/dix.nix index 60717e01..ad644e49 100644 --- a/nix/overlays/dix.nix +++ b/nix/overlays/dix.nix @@ -2,5 +2,5 @@ let sources = import ../../npins; in final: _: { - dix = sources.dix.asFlake.packages.${final.system}.default; + dix = sources.dix.asFlake.packages.${final.stdenv.hostPlatform.system}.default; } diff --git a/nix/overlays/eepy.nix b/nix/overlays/eepy.nix index 70f4f78a..38bc8053 100644 --- a/nix/overlays/eepy.nix +++ b/nix/overlays/eepy.nix @@ -2,5 +2,5 @@ let sources = import ../../npins; in final: _: { - eepy = sources.eepy.asFlake.packages.${final.system}.default; + eepy = sources.eepy.asFlake.packages.${final.stdenv.hostPlatform.system}.default; } diff --git a/nix/overlays/nil.nix b/nix/overlays/nil.nix index c409f3c7..9ba6b75b 100644 --- a/nix/overlays/nil.nix +++ b/nix/overlays/nil.nix @@ -5,7 +5,7 @@ in final: _: { nil = let - pkg = sources.nil.asFlake.packages.${final.system}.default; + pkg = sources.nil.asFlake.packages.${final.stdenv.hostPlatform.system}.default; in pkg.overrideAttrs (oldAttrs: { patches = oldAttrs.patches or [ ] ++ [ diff --git a/nix/overlays/nix-monitored.nix b/nix/overlays/nix-monitored.nix index ee3b06ac..28f696bb 100644 --- a/nix/overlays/nix-monitored.nix +++ b/nix/overlays/nix-monitored.nix @@ -3,7 +3,7 @@ let in # The final nix is lix in this case final: prev: { - nix-monitored = sources.nix-monitored.asFlake.packages.${final.system}.default.override { + nix-monitored = sources.nix-monitored.asFlake.packages.${final.stdenv.hostPlatform.system}.default.override { inherit (final) nix; withNotify = false; # noisy, spams "command completed" even for nix shells }; diff --git a/nix/overlays/nix-tree.nix b/nix/overlays/nix-tree.nix index 2fcc6cbf..ec23e3c2 100644 --- a/nix/overlays/nix-tree.nix +++ b/nix/overlays/nix-tree.nix @@ -4,5 +4,5 @@ let sources = import ../../npins; in final: _: { - nix-tree = (import sources.nix-tree).packages.${final.system}.default; + nix-tree = (import sources.nix-tree).packages.${final.stdenv.hostPlatform.system}.default; } diff --git a/nix/packages/by-name/easyscan/package.nix b/nix/packages/by-name/easyscan/package.nix index 258e7fd3..3cd88e89 100644 --- a/nix/packages/by-name/easyscan/package.nix +++ b/nix/packages/by-name/easyscan/package.nix @@ -1,7 +1,7 @@ { writeShellApplication, sane-backends, - poppler_utils, + poppler-utils, fzf, ghostscript, }: @@ -10,7 +10,7 @@ writeShellApplication { runtimeInputs = [ sane-backends - poppler_utils + poppler-utils fzf ghostscript ]; diff --git a/nix/packages/by-name/ruler/package.nix b/nix/packages/by-name/ruler/package.nix index 5854849f..0bf791a4 100644 --- a/nix/packages/by-name/ruler/package.nix +++ b/nix/packages/by-name/ruler/package.nix @@ -11,8 +11,8 @@ let domain = "git.confusedcompiler.org"; owner = "leana8959"; repo = "ruler"; - rev = "adb153af8aab6e0350e396de1f26316d97df3add"; - hash = "sha256-8+at3h5udcLXqbsaPcQ5HMGZMd6brZ21d/VW3kSyMFw="; + rev = "6cdadb92b8cff6d57bc1d15061923bfbf40ede71"; + hash = "sha256-TwUXpgdmGBUgyxyN/nRReu3VniYdLkAVp1Q72r9ouBI="; }) { }; cabalOverrides = o: { diff --git a/npins/sources.json b/npins/sources.json index d7c39ceb..31edf218 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -112,11 +112,11 @@ "owner": "nix-community", "repo": "home-manager" }, - "branch": "release-25.05", + "branch": "master", "submodules": false, - "revision": "3b955f5f0a942f9f60cdc9cacb7844335d0f21c3", - "url": "https://github.com/nix-community/home-manager/archive/3b955f5f0a942f9f60cdc9cacb7844335d0f21c3.tar.gz", - "hash": "0q3lv288xlzxczh6lc5lcw0zj9qskvjw3pzsrgvdh8rl8ibyq75s" + "revision": "295d90e22d557ccc3049dc92460b82f372cd3892", + "url": "https://github.com/nix-community/home-manager/archive/295d90e22d557ccc3049dc92460b82f372cd3892.tar.gz", + "hash": "1bg6p94gn7rzs43asb1njvhl242kd09ka2dbq3jyzhs140f0i099" }, "infuse": { "type": "GitRelease", @@ -195,14 +195,14 @@ "type": "Git", "repository": { "type": "GitHub", - "owner": "NixOS", + "owner": "nixos", "repo": "nixpkgs" }, - "branch": "nixos-25.05-small", + "branch": "nixos-25.11-small", "submodules": false, - "revision": "cec38dec00df26a901eb8b424d53bbb3bcc72eec", - "url": "https://github.com/NixOS/nixpkgs/archive/cec38dec00df26a901eb8b424d53bbb3bcc72eec.tar.gz", - "hash": "006pn4a3f4wnr60bbw7cw181p6gzgyyz5lchp3i8q5v7bjjvalmg" + "revision": "a320ce8e6e2cc6b4397eef214d202a50a4583829", + "url": "https://github.com/nixos/nixpkgs/archive/a320ce8e6e2cc6b4397eef214d202a50a4583829.tar.gz", + "hash": "1q779dz718s7k00zmfzksl6j8alpixp4rdazsvsfk7rn7g05sdzb" }, "nur": { "type": "Git", From fd60c6c7265aa118e1840d59fd716b9f275ddc75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Fri, 28 Nov 2025 11:35:22 +0800 Subject: [PATCH 143/178] npins: pin home-manager to 25.11 --- npins/sources.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/npins/sources.json b/npins/sources.json index 31edf218..8deaa305 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -112,11 +112,11 @@ "owner": "nix-community", "repo": "home-manager" }, - "branch": "master", + "branch": "release-25.11", "submodules": false, - "revision": "295d90e22d557ccc3049dc92460b82f372cd3892", - "url": "https://github.com/nix-community/home-manager/archive/295d90e22d557ccc3049dc92460b82f372cd3892.tar.gz", - "hash": "1bg6p94gn7rzs43asb1njvhl242kd09ka2dbq3jyzhs140f0i099" + "revision": "2217780c39169a9c77915200137550c2ef0fa974", + "url": "https://github.com/nix-community/home-manager/archive/2217780c39169a9c77915200137550c2ef0fa974.tar.gz", + "hash": "1p4j622rkpymnjggmqxwsngss4fpw21pf6khdzdfbiann5lzc5bn" }, "infuse": { "type": "GitRelease", From 9174bda378bcf5c366543de2baf44f9add35722b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Fri, 28 Nov 2025 18:42:17 +0800 Subject: [PATCH 144/178] home/{firefox,zen-browser}: turn of AI search in brave --- nix/homeModules/common/firefox.nix | 2 +- nix/homeModules/common/zen-browser.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nix/homeModules/common/firefox.nix b/nix/homeModules/common/firefox.nix index 853888c9..1b0faa95 100644 --- a/nix/homeModules/common/firefox.nix +++ b/nix/homeModules/common/firefox.nix @@ -34,7 +34,7 @@ in { Name = "Brave"; Alias = "@br"; - URLTemplate = "https://search.brave.com/search?q={searchTerms}&source=web"; + URLTemplate = "https://search.brave.com/search?&summary=0&q={searchTerms}&source=web"; SuggestURLTemplate = "https://suggestqueries.google.com/complete/search?q={searchTerms}"; } ]; diff --git a/nix/homeModules/common/zen-browser.nix b/nix/homeModules/common/zen-browser.nix index 993b1175..9d7ea3ac 100644 --- a/nix/homeModules/common/zen-browser.nix +++ b/nix/homeModules/common/zen-browser.nix @@ -34,7 +34,7 @@ in { Name = "Brave"; Alias = "@br"; - URLTemplate = "https://search.brave.com/search?q={searchTerms}&source=web"; + URLTemplate = "https://search.brave.com/search?&summary=0&q={searchTerms}&source=web"; SuggestURLTemplate = "https://suggestqueries.google.com/complete/search?q={searchTerms}"; } ]; From c96b65bea71e871ebc102b7cc940c60ad11092f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Fri, 28 Nov 2025 19:14:28 +0800 Subject: [PATCH 145/178] home/fcitx5: use only one ime group https://github.com/fcitx/fcitx5/issues/1459 --- nix/homeModules/common/fcitx5/fcitx/config | 7 +------ nix/homeModules/common/fcitx5/fcitx/profile | 17 +++++------------ .../common/fcitx5/fcitx/table/cangjie3.conf | 2 +- 3 files changed, 7 insertions(+), 19 deletions(-) diff --git a/nix/homeModules/common/fcitx5/fcitx/config b/nix/homeModules/common/fcitx5/fcitx/config index 3c6a8023..53fcbc42 100644 --- a/nix/homeModules/common/fcitx5/fcitx/config +++ b/nix/homeModules/common/fcitx5/fcitx/config @@ -27,12 +27,6 @@ EnumerateWithTriggerKeys=true [Hotkey/AltTriggerKeys] 0=Shift_L -[Hotkey/EnumerateGroupBackwardKeys] -0=Control+Shift+space - -[Hotkey/EnumerateGroupForwardKeys] -0=Control+space - [Hotkey/NextCandidate] 0=Tab @@ -46,3 +40,4 @@ EnumerateWithTriggerKeys=true 0=Up [Hotkey/TriggerKeys] +0=Control+space diff --git a/nix/homeModules/common/fcitx5/fcitx/profile b/nix/homeModules/common/fcitx5/fcitx/profile index 9f258564..cbb6da73 100644 --- a/nix/homeModules/common/fcitx5/fcitx/profile +++ b/nix/homeModules/common/fcitx5/fcitx/profile @@ -1,23 +1,16 @@ # vim:ft=ini - [GroupOrder] -0=gDvorak -1=gCangjie +0="Group 1" [Groups/0] +Name="Group 1" Default Layout=us-dvorak DefaultIM=keyboard-us-dvorak -Name=gDvorak [Groups/0/Items/0] -Layout= Name=keyboard-us-dvorak +Layout=us-dvorak -[Groups/1] -Default Layout=us -DefaultIM=cangjie3 -Name=gCangjie - -[Groups/1/Items/0] -Layout= +[Groups/0/Items/1] Name=cangjie3 +Layout=us diff --git a/nix/homeModules/common/fcitx5/fcitx/table/cangjie3.conf b/nix/homeModules/common/fcitx5/fcitx/table/cangjie3.conf index 072933e0..75639c18 100644 --- a/nix/homeModules/common/fcitx5/fcitx/table/cangjie3.conf +++ b/nix/homeModules/common/fcitx5/fcitx/table/cangjie3.conf @@ -3,7 +3,7 @@ SecondCandidate= # Select Third Candidate ThirdCandidate= -# Page size +# Candidates Per Page PageSize=10 # Commit after auto select candidates CommitAfterSelect=True From c6d39532a66a5275745423ab1b822a69337208b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Fri, 28 Nov 2025 19:15:55 +0800 Subject: [PATCH 146/178] home/git: enable patdiff integration for git by default --- nix/homeModules/common/git.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nix/homeModules/common/git.nix b/nix/homeModules/common/git.nix index 99aef957..9b694bb4 100644 --- a/nix/homeModules/common/git.nix +++ b/nix/homeModules/common/git.nix @@ -8,7 +8,10 @@ programs.git = { lfs.enable = true; }; - programs.patdiff.enable = lib.mkDefault true; + programs.patdiff = { + enable = lib.mkDefault true; + enableGitIntegration = lib.mkDefault true; + }; # 懶惰鬼賴皮 programs.lazygit = From fdc88e415f2ec3a5b592be26a945d197d68fc15c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Fri, 28 Nov 2025 19:56:44 +0800 Subject: [PATCH 147/178] home/git: disable git-lfs --- nix/homeModules/common/git.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/nix/homeModules/common/git.nix b/nix/homeModules/common/git.nix index 9b694bb4..9074ce48 100644 --- a/nix/homeModules/common/git.nix +++ b/nix/homeModules/common/git.nix @@ -5,9 +5,6 @@ }: { # git plugins - programs.git = { - lfs.enable = true; - }; programs.patdiff = { enable = lib.mkDefault true; enableGitIntegration = lib.mkDefault true; From 4adfe435df6094799e8286227cdc4d66194e6052 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Fri, 28 Nov 2025 20:01:32 +0800 Subject: [PATCH 148/178] vanadium/xmonad: export MOZ_USE_XINPUT2=1 --- nix/configurations/vanadium/home/xmonad/xmonad.hs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/nix/configurations/vanadium/home/xmonad/xmonad.hs b/nix/configurations/vanadium/home/xmonad/xmonad.hs index 76182ee5..dcb62ea6 100644 --- a/nix/configurations/vanadium/home/xmonad/xmonad.hs +++ b/nix/configurations/vanadium/home/xmonad/xmonad.hs @@ -225,9 +225,7 @@ myStartupHook = do -- - setting `home.sessionVariable` (home-manager) would only effect shells, probably due to the order of launched processes blah blah -- - setting `environment.sessionVariables` (NixOS) would make my set up less portable putEnv "GLFW_IM_MODULE=ibus" -- Make sure kitty knows how to talk to fcitx - - -- TODO: doesn't work for firefox nor for zen since 145.0 - -- putEnv "MOZ_USE_XINPUT2=1" -- Force touchpad for firefox + putEnv "MOZ_USE_XINPUT2=1" -- Force touchpad for firefox removedKeybinds :: [(KeyMask, KeySym)] removedKeybinds = From 434ce5437c4492eff3c8d950121f95f658680b31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Fri, 28 Nov 2025 20:08:11 +0800 Subject: [PATCH 149/178] home/zen-browrser: disable smooth scrolling --- nix/homeModules/common/zen-browser.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nix/homeModules/common/zen-browser.nix b/nix/homeModules/common/zen-browser.nix index 9d7ea3ac..ff8d6702 100644 --- a/nix/homeModules/common/zen-browser.nix +++ b/nix/homeModules/common/zen-browser.nix @@ -68,6 +68,7 @@ in "browser.startup.page" = 1; "browser.translations.automaticallyPopup" = false; "browser.tabs.closeWindowWithLastTab" = true; + "general.smoothScroll" = false; # open links in new window # this works a lot better with xmonad where I have a bunch of windows From b293776da0fcdf017d4385453e8077828a641106 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sat, 29 Nov 2025 18:51:25 +0800 Subject: [PATCH 150/178] vanadium/xmonad: improve matching on Nautilus className --- nix/configurations/vanadium/home/xmonad/xmonad.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nix/configurations/vanadium/home/xmonad/xmonad.hs b/nix/configurations/vanadium/home/xmonad/xmonad.hs index dcb62ea6..73d13b92 100644 --- a/nix/configurations/vanadium/home/xmonad/xmonad.hs +++ b/nix/configurations/vanadium/home/xmonad/xmonad.hs @@ -125,10 +125,10 @@ isFeh :: Query Bool isFeh = className =? "feh" isNautilus :: Query Bool -isNautilus = className ~? "Nautilus" +isNautilus = className $? "Nautilus" isNautilusPreviewer :: Query Bool -isNautilusPreviewer = className ~? "NautilusPreviewer" +isNautilusPreviewer = className $? "NautilusPreviewer" isMinder :: Query Bool isMinder = className =? "Minder" <&&> (not <$> title ~? "Pick a Color") From 018a8b66c7578b96eeee6abb6f34d6d9584d65d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sat, 29 Nov 2025 20:42:44 +0800 Subject: [PATCH 151/178] vanadium: -last-resort https://news.ycombinator.com/item?id=24726008 > Not all systems will work with this, as the idea of font fallback is > not universal. The built-in terminal emulators in the FreeBSD kernel and > in Linux only load one font at any given time. (I've written a > user-space terminal emulator with the goal of providing a user-space > workalike for those terminal emulators, which does have font fallback > mechanisms, but kernel built-in terminal emulators forego the ability to > have multiple fonts and a lot of other things for obvious reasons.) --- nix/configurations/vanadium/home/misc.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/nix/configurations/vanadium/home/misc.nix b/nix/configurations/vanadium/home/misc.nix index 23eea664..8337a00b 100644 --- a/nix/configurations/vanadium/home/misc.nix +++ b/nix/configurations/vanadium/home/misc.nix @@ -1,6 +1,5 @@ { pkgs, - lib, ... }: { @@ -9,7 +8,7 @@ # fonts.fontconfig = { enable = true; - defaultFonts = lib.mapAttrsRecursive (_: v: v ++ [ "Last Resort" ]) { + defaultFonts = { sansSerif = [ "Ubuntu" "Noto Sans CJK TC" @@ -28,7 +27,6 @@ pkgs.noto-fonts-emoji-blob-bin pkgs.ubuntu-classic pkgs.iosevka - pkgs.last-resort ]; home.file = { From a4c43068f4be275eca50da0c833953c4b9ced735 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sat, 29 Nov 2025 22:58:14 +0800 Subject: [PATCH 152/178] npins: update zen-browser --- npins/sources.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/npins/sources.json b/npins/sources.json index 8deaa305..28aacc24 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -378,9 +378,9 @@ }, "branch": "main", "submodules": false, - "revision": "ef951ed2d976bcd1f57a09f358fdda9fa9425018", - "url": "https://github.com/0xc000022070/zen-browser-flake/archive/ef951ed2d976bcd1f57a09f358fdda9fa9425018.tar.gz", - "hash": "1s85cxiwhzwqgbazcgv12xqdlk1nkfynv23r9zj8gip4j6pznr4z" + "revision": "10d2aa53ada9b14f6df2f9877d6a057f0a2b262f", + "url": "https://github.com/0xc000022070/zen-browser-flake/archive/10d2aa53ada9b14f6df2f9877d6a057f0a2b262f.tar.gz", + "hash": "0mj9pl9vkh8w8s9a68x1hixc0axil0l5jz50i2mcqk4kk7cad7d5" } }, "version": 5 From 7f233194e28aa6d4ce4c6ab0317e83af96f57f4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sun, 30 Nov 2025 08:54:44 +0800 Subject: [PATCH 153/178] home/vlc: define mimetypes --- nix/configurations/vanadium.nix | 1 + nix/homeModules/common/vlc.nix | 142 ++++++++++++++++++++++++++++++++ 2 files changed, 143 insertions(+) create mode 100644 nix/homeModules/common/vlc.nix diff --git a/nix/configurations/vanadium.nix b/nix/configurations/vanadium.nix index 9332268b..019b2f4f 100644 --- a/nix/configurations/vanadium.nix +++ b/nix/configurations/vanadium.nix @@ -169,6 +169,7 @@ in ../homeModules/common/tmux ../homeModules/common/vim ../homeModules/common/wired + ../homeModules/common/vlc.nix ../homeModules/common/atuin.nix ../homeModules/common/direnv.nix ../homeModules/common/feh.nix diff --git a/nix/homeModules/common/vlc.nix b/nix/homeModules/common/vlc.nix new file mode 100644 index 00000000..3d324ca4 --- /dev/null +++ b/nix/homeModules/common/vlc.nix @@ -0,0 +1,142 @@ +{ lib, config, ... }: +let + # Kinda slow but there's no option defined and I'm lazy + vlcInstalled = lib.any (x: lib.getName x == "vlc") config.home.packages; +in +{ + xdg = lib.mkIf vlcInstalled { + enable = true; + mimeApps = + let + associations = lib.genAttrs vlcTypes (_: "vlc.desktop"); + # credit: https://github.com/tiredofit/home + vlcTypes = [ + "application/mxf" + "application/ogg" + "application/sdp" + "application/smil" + "application/streamingmedia" + "application/vnd.apple.mpegurl" + "application/vnd.ms-asf" + "application/vnd.rn-realmedia" + "application/vnd.rn-realmedia-vbr" + "application/x-cue" + "application/x-extension-m4a" + "application/x-extension-mp4" + "application/x-matroska" + "application/x-mpegurl" + "application/x-ogg" + "application/x-ogm" + "application/x-ogm-audio" + "application/x-ogm-video" + "application/x-shorten" + "application/x-smil" + "application/x-streamingmedia" + "audio/3gpp" + "audio/3gpp2" + "audio/AMR" + "audio/aac" + "audio/ac3" + "audio/aiff" + "audio/amr-wb" + "audio/dv" + "audio/eac3" + "audio/flac" + "audio/m3u" + "audio/m4a" + "audio/mp1" + "audio/mp2" + "audio/mp3" + "audio/mp4" + "audio/mpeg" + "audio/mpeg2" + "audio/mpeg3" + "audio/mpegurl" + "audio/mpg" + "audio/musepack" + "audio/ogg" + "audio/opus" + "audio/rn-mpeg" + "audio/scpls" + "audio/vnd.dolby.heaac.1" + "audio/vnd.dolby.heaac.2" + "audio/vnd.dts" + "audio/vnd.dts.hd" + "audio/vnd.rn-realaudio" + "audio/vorbis" + "audio/wav" + "audio/webm" + "audio/x-aac" + "audio/x-adpcm" + "audio/x-aiff" + "audio/x-ape" + "audio/x-m4a" + "audio/x-matroska" + "audio/x-mp1" + "audio/x-mp2" + "audio/x-mp3" + "audio/x-mpegurl" + "audio/x-mpg" + "audio/x-ms-asf" + "audio/x-ms-wma" + "audio/x-musepack" + "audio/x-pls" + "audio/x-pn-au" + "audio/x-pn-realaudio" + "audio/x-pn-wav" + "audio/x-pn-windows-pcm" + "audio/x-realaudio" + "audio/x-scpls" + "audio/x-shorten" + "audio/x-tta" + "audio/x-vorbis" + "audio/x-vorbis+ogg" + "audio/x-wav" + "audio/x-wavpack" + "video/3gp" + "video/3gpp" + "video/3gpp2" + "video/avi" + "video/divx" + "video/dv" + "video/fli" + "video/flv" + "video/mkv" + "video/mp2t" + "video/mp4" + "video/mp4v-es" + "video/mpeg" + "video/msvideo" + "video/ogg" + "video/quicktime" + "video/vnd.divx" + "video/vnd.mpegurl" + "video/vnd.rn-realvideo" + "video/webm" + "video/x-avi" + "video/x-flc" + "video/x-flic" + "video/x-flv" + "video/x-m4v" + "video/x-matroska" + "video/x-mpeg2" + "video/x-mpeg3" + "video/x-ms-afs" + "video/x-ms-asf" + "video/x-ms-wmv" + "video/x-ms-wmx" + "video/x-ms-wvxvideo" + "video/x-msvideo" + "video/x-ogm" + "video/x-ogm+ogg" + "video/x-theora" + "video/x-theora+ogg" + ]; + in + { + enable = true; + associations.added = associations; + defaultApplications = associations; + }; + }; +} From 90def3c7051f8d2187b4fb2ec1cedf600ecb4b1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sun, 30 Nov 2025 09:16:31 +0800 Subject: [PATCH 154/178] vanadium: update wallpaper --- nix/configurations/vanadium/home/misc.nix | 2 +- npins/sources.json | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/nix/configurations/vanadium/home/misc.nix b/nix/configurations/vanadium/home/misc.nix index 8337a00b..ae41030e 100644 --- a/nix/configurations/vanadium/home/misc.nix +++ b/nix/configurations/vanadium/home/misc.nix @@ -31,7 +31,7 @@ home.file = { ".xscreensaver".source = "${./xscreensaver/.xscreensaver}"; - ".wallpaper".source = "${pkgs.wallpapers.packages.knights_of_guinevere.fixing_gwen}"; + ".wallpaper".source = "${pkgs.wallpapers.packages.serial_experiments_lain.lain_red_bg}"; }; xdg.configFile = { "xmonad".source = "${./xmonad}"; diff --git a/npins/sources.json b/npins/sources.json index 28aacc24..c32335cf 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -352,9 +352,9 @@ }, "branch": "mistress", "submodules": false, - "revision": "0eec270ac5fcbc939f475c7954504cfcbde8f7d9", - "url": "https://git.confusedcompiler.org/leana8959/wallpapers/archive/0eec270ac5fcbc939f475c7954504cfcbde8f7d9.tar.gz", - "hash": "1y5r6gm7b781s70x89ya24sqj9rfza83as0749hkd77b8zncvkkl" + "revision": "377fc66de1961687bf81bd0182c5d385c1dfadb2", + "url": "https://git.confusedcompiler.org/leana8959/wallpapers/archive/377fc66de1961687bf81bd0182c5d385c1dfadb2.tar.gz", + "hash": "1j6mnb1n0wjlm69dfngi4jjrr76zf3kfmqm0wkbgjvm93cbg1p7j" }, "wired-notify": { "type": "Git", From b02ab4df08da0075c37e05128b8913ba54ffa7cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sun, 30 Nov 2025 12:29:05 +0800 Subject: [PATCH 155/178] packages/ruler: update --- nix/packages/by-name/ruler/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nix/packages/by-name/ruler/package.nix b/nix/packages/by-name/ruler/package.nix index 0bf791a4..e873a2b6 100644 --- a/nix/packages/by-name/ruler/package.nix +++ b/nix/packages/by-name/ruler/package.nix @@ -11,8 +11,8 @@ let domain = "git.confusedcompiler.org"; owner = "leana8959"; repo = "ruler"; - rev = "6cdadb92b8cff6d57bc1d15061923bfbf40ede71"; - hash = "sha256-TwUXpgdmGBUgyxyN/nRReu3VniYdLkAVp1Q72r9ouBI="; + rev = "0b4e3ea1e477d4a817da8730fab7fb22ba25fa61"; + hash = "sha256-CoGJ3uOVEd6K+zFeBkZKVYVm5697Qu9aLYzmlfqGej0="; }) { }; cabalOverrides = o: { From 70e063d8df909309609af37844207a49f5110770 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Mon, 1 Dec 2025 11:41:18 +0800 Subject: [PATCH 156/178] npins: update sources 25.11 is out of beta --- npins/sources.json | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/npins/sources.json b/npins/sources.json index c32335cf..cee4d919 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -114,9 +114,9 @@ }, "branch": "release-25.11", "submodules": false, - "revision": "2217780c39169a9c77915200137550c2ef0fa974", - "url": "https://github.com/nix-community/home-manager/archive/2217780c39169a9c77915200137550c2ef0fa974.tar.gz", - "hash": "1p4j622rkpymnjggmqxwsngss4fpw21pf6khdzdfbiann5lzc5bn" + "revision": "3fdd076e08049a9c7a83149b270440d9787d2df5", + "url": "https://github.com/nix-community/home-manager/archive/3fdd076e08049a9c7a83149b270440d9787d2df5.tar.gz", + "hash": "07k47xnkzha7ilcyak57wrh2ngka2j4f0d95zyyxn8jz8195q2q6" }, "infuse": { "type": "GitRelease", @@ -187,9 +187,9 @@ }, "branch": "master", "submodules": false, - "revision": "899dc449bc6428b9ee6b3b8f771ca2b0ef945ab9", - "url": "https://github.com/NixOS/nixos-hardware/archive/899dc449bc6428b9ee6b3b8f771ca2b0ef945ab9.tar.gz", - "hash": "1dbf11zjspg68wiryp2y24w587izg954nbv517q57mpl8i8sfr85" + "revision": "9154f4569b6cdfd3c595851a6ba51bfaa472d9f3", + "url": "https://github.com/NixOS/nixos-hardware/archive/9154f4569b6cdfd3c595851a6ba51bfaa472d9f3.tar.gz", + "hash": "1vmlcda7864ya2byxivnpzkqf41cavj9ms5hjh6i0h8anls56lk6" }, "nixpkgs": { "type": "Git", @@ -200,9 +200,9 @@ }, "branch": "nixos-25.11-small", "submodules": false, - "revision": "a320ce8e6e2cc6b4397eef214d202a50a4583829", - "url": "https://github.com/nixos/nixpkgs/archive/a320ce8e6e2cc6b4397eef214d202a50a4583829.tar.gz", - "hash": "1q779dz718s7k00zmfzksl6j8alpixp4rdazsvsfk7rn7g05sdzb" + "revision": "e9f8538978f954bed00f6535b764e7932dbc3eea", + "url": "https://github.com/nixos/nixpkgs/archive/e9f8538978f954bed00f6535b764e7932dbc3eea.tar.gz", + "hash": "07wdninn693v06jz537pn1d257idi7p3dqh1mvygsb2zf6y4hypm" }, "nur": { "type": "Git", @@ -213,9 +213,9 @@ }, "branch": "main", "submodules": false, - "revision": "263f45afd86d9c3cb8f61fb7af44c465d4493b88", - "url": "https://github.com/nix-community/nur/archive/263f45afd86d9c3cb8f61fb7af44c465d4493b88.tar.gz", - "hash": "0lv1gkqqb5bkkmwvgl8kaipqxg6ddqw09wb8jcc0wql95vbyzyca" + "revision": "cdeb308c4faaa430f951e81db2360cebb54feb58", + "url": "https://github.com/nix-community/nur/archive/cdeb308c4faaa430f951e81db2360cebb54feb58.tar.gz", + "hash": "1jjsgmg3maqkrncwc3fn7iqcsi88fjvfzkpchcc1iwih65kr91il" }, "pin-emacs28": { "type": "Git", @@ -378,9 +378,9 @@ }, "branch": "main", "submodules": false, - "revision": "10d2aa53ada9b14f6df2f9877d6a057f0a2b262f", - "url": "https://github.com/0xc000022070/zen-browser-flake/archive/10d2aa53ada9b14f6df2f9877d6a057f0a2b262f.tar.gz", - "hash": "0mj9pl9vkh8w8s9a68x1hixc0axil0l5jz50i2mcqk4kk7cad7d5" + "revision": "fb066e133e614c024a470608ff56585c4f707b44", + "url": "https://github.com/0xc000022070/zen-browser-flake/archive/fb066e133e614c024a470608ff56585c4f707b44.tar.gz", + "hash": "04icaki7ygwrq7h4m4bkh5k08rpdr4qagz0z1mbbk4927ljqn30x" } }, "version": 5 From 54f685e90c30e4834c4ef709ded65bc47df8259e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Tue, 2 Dec 2025 14:37:05 +0800 Subject: [PATCH 157/178] networks: update --- nix/networks/list.nix | 5 +++++ nix/secrets/wpa_password.age | Bin 894 -> 920 bytes 2 files changed, 5 insertions(+) diff --git a/nix/networks/list.nix b/nix/networks/list.nix index 75127935..4ec25b95 100644 --- a/nix/networks/list.nix +++ b/nix/networks/list.nix @@ -14,6 +14,11 @@ in priority = privatePriority; hasPassword = true; } + { + ssid ="Kuo"; + priority = privatePriority; + hasPassword = true; + } { ssid = "girlypop-net"; priority = privatePriority; diff --git a/nix/secrets/wpa_password.age b/nix/secrets/wpa_password.age index 47b97605b0e33842c19d9ae2094ef6906f4fc349..17fe933a12c35c3483098c7731b9a81331bf2474 100644 GIT binary patch delta 851 zcmV-Z1FZc12ABtsEPqsFLq}#uMOrsFb7o66X*6wBL1aR2V>w!4FEw*lY&U6bN?Arn zR6#gLcM5n(OK3}CN-J1KL`iElR8MbZXI6M?H%B&bM`tiHR#Y%oL2hz-L2qX-O$seO zAaiqQEoEdfH8n9gAZv3lYcN3|IYm-+Phx0UMrm|0F?MWeMMhL{IBaroby;&TL1RU6 zGE_lwFjh4yPE%}m3OH6~Z+0>?cy?xUF-L7kOKDR$IBi8RG&5ytO?hQ@XirTrZBsLI zacFmQk?|K-QCdb-dNX5DT1r}1QBN;yD{WRuW^qVUZAC9xH)%Imcvo#SY;svwc}PhL zXGUdGZFzb#Y-4CgZhA*gWkqB(XfktfZFVq0Nj5iHNHI=rQBPWSGfh#GUjY|?T6b1d zGi+u;HE>#XPFHPWFHcTJQ#N-&G)yybXHhh4cXxPtMPp`XFL!SWMPo~HZ*)RyOG7z1 zN?JB|NHCYNR zEiE8eHBeAEX=h?;GEZ|eYItU6L{2hzGG$|0bYXLGPI6{KS~5Z~R4+(HMMVmqOV`L= zVuRVI&!-WO`{Jp2EC+**jo{(HV?{P-YGPJzQfW|WLsfNFbxvAE zYgA)sK?*fua%ga3RcbkFa7}Y*Yfo!*PdRB=bv8msV{>yuH8W^pYA{Y!XJTnFFbXX` zAaiqQEoEdfH8n9gAZv3lYcN3|Zec`ZL{m&eM|Lkyab;;(P)1BhV`X7(I5ad_W;i)` zIWI+OH)KRid2Uxl3OP}6Gd6HBa&vS|PDW>IcttN)MM7Fqbwg)VSawQoH*7*;HCb^_ zD_C+xk?|K-csN>aNLoo`dQNC=IBi-)QZ;vMMp{rYR&R1*L`HErNiTE^D==d2w22GGl9FH)2L>FLqT=GB;3kH#2%PNeUpq{OTdtL3QKE z1c7OFDIvHh%2zm>_72RgR_p6rR=O5!(cJzDm3ZpI&O6O-Km2@BjIZT?f?nA4MdQG` zXix%2!|UqdLUWI9bp{i21@THM?8|#yLr^k9g`n{5z#3u?=4!;=eSSc&4s-vE2?Ffb zQG(bZ{**F5Dc=jMD^S2yYL_U+8~-9XwKwPVTMQnvxKvj|H4rBvNtSRE|sHygVm!%LZ)dc9Fm zFXPDRj%&0_>jU{CU9Q{I>J4BP4YkiV?z^b!Jr2Q)!+HDjv`^DH3Zn}XWWl%X41g1` zen1IgXsWR|=I0v98f#3@4upvwiIcA505AS+1Mb^u;Yx!=`+8&y8K-39k*iOVmQD*W DonJ#I From 42b32be4a5efbbeaec4da9e625c734e538054b95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Wed, 3 Dec 2025 23:09:43 +0800 Subject: [PATCH 158/178] npins: update zen-browser --- npins/sources.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/npins/sources.json b/npins/sources.json index cee4d919..faf7de90 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -378,9 +378,9 @@ }, "branch": "main", "submodules": false, - "revision": "fb066e133e614c024a470608ff56585c4f707b44", - "url": "https://github.com/0xc000022070/zen-browser-flake/archive/fb066e133e614c024a470608ff56585c4f707b44.tar.gz", - "hash": "04icaki7ygwrq7h4m4bkh5k08rpdr4qagz0z1mbbk4927ljqn30x" + "revision": "df63ce4f706567e6efa083ba63d5e7792bf70ffa", + "url": "https://github.com/0xc000022070/zen-browser-flake/archive/df63ce4f706567e6efa083ba63d5e7792bf70ffa.tar.gz", + "hash": "0aqkcms4a5n4pib06zxm6ljqxssz4lcda73ry76qq7wahpz261q9" } }, "version": 5 From 88af6454b72fd50a88fe68d36a0037e917cd2d93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Wed, 3 Dec 2025 23:11:01 +0800 Subject: [PATCH 159/178] networks: update wpa_supplicant-compat shim --- nix/networks/wpa_supplicant-compat.nix | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/nix/networks/wpa_supplicant-compat.nix b/nix/networks/wpa_supplicant-compat.nix index a4db89a7..65f130a0 100644 --- a/nix/networks/wpa_supplicant-compat.nix +++ b/nix/networks/wpa_supplicant-compat.nix @@ -1,6 +1,8 @@ # # This loads the list of networks as a NixOS wpa_supplicant compatible attrset # +# View the example config +# less $(nix-build --no-out-link -E '(import {}).wpa_supplicant')/share/doc/wpa_supplicant/wpa_supplicant.conf.example let sources = import ../../npins; lib = import (sources.nixpkgs + "/lib"); @@ -15,18 +17,16 @@ let hasPassword ? false, scanOnLowSignal ? false, randomizeMac ? false, - # TODO: adapt to the 25.11 interface - bssid ? null, ... }: { ${ssid} = lib.mkMerge [ (builtins.removeAttrs networkArgs [ - "ssid" + # We keep ssid, because it overrides the attrset name ssid + # "ssid" "hasPassword" "scanOnLowSignal" "randomizeMac" - "bssid" ]) (lib.optionalAttrs hasPassword { pskRaw = "ext:${escapePwdKey ssid}"; @@ -35,7 +35,6 @@ let extraConfig = '' ${lib.optionalString scanOnLowSignal "bgscan=\"simple:30:-70:3600\""} ${lib.optionalString randomizeMac "mac_addr=1"} - ${lib.optionalString (bssid != null) "bssid=\"${bssid}\""} ''; } ]; From d74a8071223f744cf7ab54287b201353950c0831 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Thu, 4 Dec 2025 01:10:10 +0800 Subject: [PATCH 160/178] packages/ruler: update --- nix/packages/by-name/ruler/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nix/packages/by-name/ruler/package.nix b/nix/packages/by-name/ruler/package.nix index e873a2b6..3c36cef9 100644 --- a/nix/packages/by-name/ruler/package.nix +++ b/nix/packages/by-name/ruler/package.nix @@ -11,8 +11,8 @@ let domain = "git.confusedcompiler.org"; owner = "leana8959"; repo = "ruler"; - rev = "0b4e3ea1e477d4a817da8730fab7fb22ba25fa61"; - hash = "sha256-CoGJ3uOVEd6K+zFeBkZKVYVm5697Qu9aLYzmlfqGej0="; + rev = "89e63d4055cbeca840b6ecaab12683b19e8e2fdd"; + hash = "sha256-KPbb1JcFNTF5A6ImfGYc1iSxo3K6poCCRGFNqIHwzrM="; }) { }; cabalOverrides = o: { From ee55696b3a86d6720df957ec78e650f67df28bcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Thu, 4 Dec 2025 16:53:23 +0800 Subject: [PATCH 161/178] packages/ruler: update --- nix/packages/by-name/ruler/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nix/packages/by-name/ruler/package.nix b/nix/packages/by-name/ruler/package.nix index 3c36cef9..3a59c317 100644 --- a/nix/packages/by-name/ruler/package.nix +++ b/nix/packages/by-name/ruler/package.nix @@ -11,8 +11,8 @@ let domain = "git.confusedcompiler.org"; owner = "leana8959"; repo = "ruler"; - rev = "89e63d4055cbeca840b6ecaab12683b19e8e2fdd"; - hash = "sha256-KPbb1JcFNTF5A6ImfGYc1iSxo3K6poCCRGFNqIHwzrM="; + rev = "454c1b21db4ece0745c6513bf0292b958005c0d5"; + hash = "sha256-zOUx55fEoRNyuhLSFAdLPGNFl+nYA9/2tileeofW0e8="; }) { }; cabalOverrides = o: { From 536fa705b79893c44d7227e1e2c22416b3f6bdfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Thu, 4 Dec 2025 20:59:24 +0800 Subject: [PATCH 162/178] nvim/ruler: add import keyword --- .config/nvim/syntax/ruler.vim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.config/nvim/syntax/ruler.vim b/.config/nvim/syntax/ruler.vim index 73a21fab..386b7e16 100644 --- a/.config/nvim/syntax/ruler.vim +++ b/.config/nvim/syntax/ruler.vim @@ -10,6 +10,7 @@ syn match rulerLineComment "--.*$" syn match rulerTripleDot "\.\.\." syn match rulerDate "\d\d\d\d\D\d\d\D\d\d \d\d\D\d\d\D\(\d\d\|__\)" syn match rulerTag "\s\+[a-zA-Z]\+:[^\n]*" +syn match rulerImport "import" syn region rulerBlockComment start="{-" end="-}" @@ -17,6 +18,7 @@ hi def link rulerLineComment Comment hi def link rulerBlockComment Comment hi def link rulerTripleDot Comment hi def link rulerDate Macro +hi def link rulerImport Keyword hi def link rulerTag @property let b:current_syntax = "ruler" From 23f3fb783c3872e8bf9cd821aec97f9d5cff3e17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Thu, 4 Dec 2025 21:00:45 +0800 Subject: [PATCH 163/178] packages/ruler: update --- nix/packages/by-name/ruler/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nix/packages/by-name/ruler/package.nix b/nix/packages/by-name/ruler/package.nix index 3a59c317..8fba0215 100644 --- a/nix/packages/by-name/ruler/package.nix +++ b/nix/packages/by-name/ruler/package.nix @@ -11,8 +11,8 @@ let domain = "git.confusedcompiler.org"; owner = "leana8959"; repo = "ruler"; - rev = "454c1b21db4ece0745c6513bf0292b958005c0d5"; - hash = "sha256-zOUx55fEoRNyuhLSFAdLPGNFl+nYA9/2tileeofW0e8="; + rev = "52d8b95245aec702ec4105bcb040ea44771a77bc"; + hash = "sha256-UIpt8NPEyVM2BR0WAhAv66XvpVj124odzzAC6tpTZVU="; }) { }; cabalOverrides = o: { From 2a3142634e6b4c018b8577baac11c57c5423b40d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Fri, 5 Dec 2025 12:02:01 +0800 Subject: [PATCH 164/178] npins: update zen-browser --- npins/sources.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/npins/sources.json b/npins/sources.json index faf7de90..d84bc0d3 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -378,9 +378,9 @@ }, "branch": "main", "submodules": false, - "revision": "df63ce4f706567e6efa083ba63d5e7792bf70ffa", - "url": "https://github.com/0xc000022070/zen-browser-flake/archive/df63ce4f706567e6efa083ba63d5e7792bf70ffa.tar.gz", - "hash": "0aqkcms4a5n4pib06zxm6ljqxssz4lcda73ry76qq7wahpz261q9" + "revision": "8c9284cc227a5c7cd8f1e1fa7a6882b0907187c8", + "url": "https://github.com/0xc000022070/zen-browser-flake/archive/8c9284cc227a5c7cd8f1e1fa7a6882b0907187c8.tar.gz", + "hash": "1k0bxn3c9bsm5543wsijv6r73jb8c1a4pzcwqh7rjpn67n988hj2" } }, "version": 5 From f73281da80398cd591703473adbd953d186f7b97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Fri, 5 Dec 2025 14:12:44 +0800 Subject: [PATCH 165/178] treewide: set system.nixos.revision --- nix/configurations/hetzner_benchmark.nix | 9 ++++++++- nix/configurations/hydrogen.nix | 9 ++++++++- nix/configurations/installer.nix | 12 ++++++++++++ nix/configurations/vanadium.nix | 9 ++++++++- 4 files changed, 36 insertions(+), 3 deletions(-) diff --git a/nix/configurations/hetzner_benchmark.nix b/nix/configurations/hetzner_benchmark.nix index f14a3cf9..2fddb026 100644 --- a/nix/configurations/hetzner_benchmark.nix +++ b/nix/configurations/hetzner_benchmark.nix @@ -47,7 +47,14 @@ in nix.package = pkgs.nix-monitored; - system.nixos.version = lib.substring 0 8 sources.nixpkgs.revision; + system.nixos = + let + rev = lib.substring 0 8 sources.nixpkgs.revision; + in + { + versionSuffix = "-git:${rev}"; + revision = rev; + }; } ./hetzner_benchmark/nixos/hardware-configuration.nix diff --git a/nix/configurations/hydrogen.nix b/nix/configurations/hydrogen.nix index f26705ea..c751ef0a 100644 --- a/nix/configurations/hydrogen.nix +++ b/nix/configurations/hydrogen.nix @@ -53,7 +53,14 @@ in nix.package = pkgs.nix-monitored; - system.nixos.version = lib.substring 0 8 sources.nixpkgs.revision; + system.nixos = + let + rev = lib.substring 0 8 sources.nixpkgs.revision; + in + { + versionSuffix = "-git:${rev}"; + revision = rev; + }; } ./hydrogen/nixos/misc.nix diff --git a/nix/configurations/installer.nix b/nix/configurations/installer.nix index e77b99ad..972409e9 100644 --- a/nix/configurations/installer.nix +++ b/nix/configurations/installer.nix @@ -4,6 +4,9 @@ # figured out an elegant (enough) way to do it while keeping my secrets # encrypted. # +let + sources = import ../../npins; +in { pkgs, lib, @@ -41,6 +44,15 @@ ]; }; + system.nixos = + let + rev = lib.substring 0 8 sources.nixpkgs.revision; + in + { + versionSuffix = "-git:${rev}"; + revision = rev; + }; + isoImage.squashfsCompression = "zstd -Xcompression-level 3"; environment.systemPackages = [ diff --git a/nix/configurations/vanadium.nix b/nix/configurations/vanadium.nix index 019b2f4f..2fba0b2a 100644 --- a/nix/configurations/vanadium.nix +++ b/nix/configurations/vanadium.nix @@ -78,7 +78,14 @@ in nix.package = pkgs.nix-monitored; - system.nixos.version = lib.substring 0 8 sources.nixpkgs.revision; + system.nixos = + let + rev = lib.substring 0 8 sources.nixpkgs.revision; + in + { + versionSuffix = "-git:${rev}"; + revision = rev; + }; } # From 72ae42c1a04d7c0d9396829426fabde6018faf4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Fri, 5 Dec 2025 17:42:55 +0800 Subject: [PATCH 166/178] packages/ruler: update --- nix/packages/by-name/ruler/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nix/packages/by-name/ruler/package.nix b/nix/packages/by-name/ruler/package.nix index 8fba0215..0e7d8aa9 100644 --- a/nix/packages/by-name/ruler/package.nix +++ b/nix/packages/by-name/ruler/package.nix @@ -11,8 +11,8 @@ let domain = "git.confusedcompiler.org"; owner = "leana8959"; repo = "ruler"; - rev = "52d8b95245aec702ec4105bcb040ea44771a77bc"; - hash = "sha256-UIpt8NPEyVM2BR0WAhAv66XvpVj124odzzAC6tpTZVU="; + rev = "2556b4985065d093b1db3a14a2c5c37115871c78"; + hash = "sha256-OvNhDpyAbZp+d0rSXLE55BvM5jT3OI8q79D6aVaA2FI="; }) { }; cabalOverrides = o: { From c2a37b5f7203deef28f1c203497c62313b5df7b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Fri, 5 Dec 2025 20:44:51 +0800 Subject: [PATCH 167/178] shell: remove hls --- shell.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/shell.nix b/shell.nix index d11a2fa5..1fc63cf4 100644 --- a/shell.nix +++ b/shell.nix @@ -26,7 +26,6 @@ pkgs.mkShell { self.xmonad-extras self.xmobar ])) - haskell-language-server cabal-install ]; } From 5a39fe89c5a3f8df9ae80f5c1605f0cbea894cb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Fri, 5 Dec 2025 20:48:25 +0800 Subject: [PATCH 168/178] xmonad: remove count in PP for xmobar --- .../vanadium/home/xmonad/xmonad.hs | 39 +++++-------------- 1 file changed, 10 insertions(+), 29 deletions(-) diff --git a/nix/configurations/vanadium/home/xmonad/xmonad.hs b/nix/configurations/vanadium/home/xmonad/xmonad.hs index 73d13b92..bd224647 100644 --- a/nix/configurations/vanadium/home/xmonad/xmonad.hs +++ b/nix/configurations/vanadium/home/xmonad/xmonad.hs @@ -26,7 +26,6 @@ import XMonad.Util.NamedScratchpad import XMonad.Util.SpawnOnce import XMonad.Layout.Magnifier -import Data.Function import Data.Char.Greek import Data.Ratio import Data.Semigroup @@ -357,35 +356,17 @@ fullFloat = W.RationalRect 0 0 1 1 buttomRightFloat = W.RationalRect (1%2) (1%2) (1%2) (1%2) xmobarConfig :: StatusBarConfig -xmobarConfig = statusBarProp "xmobar -x 0" myPrettyPrinter +xmobarConfig = statusBarProp "xmobar -x 0" (pure myPrettyPrinter) where - mkPpCurrent :: X (String -> String) - mkPpCurrent = do - windowCount <- gets $ length . W.integrate' . W.stack . W.workspace . W.current . windowset - pure $ \wid -> - wid <> (if windowCount > 1 then ":" <> show windowCount else mempty) - & xmobarColor "#000000" "#ffffff" . wrap " " " " - - mkPpHidden :: X (String -> String) - mkPpHidden = do - m <- gets $ M.fromList . map (\x -> (W.tag x, length . W.integrate' . W.stack $ x)) . W.hidden . windowset - pure $ \wid -> - let windowCount = m M.! wid - in wid <> (if windowCount > 1 then ":" <> show windowCount else mempty) - & xmobarColor "#ffffff" "" - - myPrettyPrinter :: X PP - myPrettyPrinter = do - myPpCurrent <- mkPpCurrent - myPpHidden <- mkPpHidden - pure - $ filterOutWsPP [scratchpadWorkspaceTag] - $ def - { ppCurrent = myPpCurrent - , ppHiddenNoWindows = xmobarColor "#9c9c9c" "" . const "⋅" - , ppHidden = myPpHidden - , ppSep = " | " - } + myPrettyPrinter :: PP + myPrettyPrinter = + filterOutWsPP [scratchpadWorkspaceTag] + $ def + { ppCurrent = xmobarColor "#000000" "#ffffff" . wrap " " " " + , ppHiddenNoWindows = xmobarColor "#9c9c9c" "" . const "⋅" + , ppHidden = xmobarColor "#ffffff" "" + , ppSep = " | " + } myScratchpads :: [NamedScratchpad] myScratchpads = From 9fd52db5bbe0660ffc0cec22100b96cd2990c267 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sat, 6 Dec 2025 00:28:13 +0800 Subject: [PATCH 169/178] {firefox,zen-browser}: use ddg-lite --- nix/homeModules/common/firefox.nix | 8 +++----- nix/homeModules/common/zen-browser.nix | 8 +++----- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/nix/homeModules/common/firefox.nix b/nix/homeModules/common/firefox.nix index 1b0faa95..194206bf 100644 --- a/nix/homeModules/common/firefox.nix +++ b/nix/homeModules/common/firefox.nix @@ -29,13 +29,11 @@ in "eBay" "Perplexity" ]; - Default = "Brave"; + Default = "DuckDuckGo Lite"; Add = [ { - Name = "Brave"; - Alias = "@br"; - URLTemplate = "https://search.brave.com/search?&summary=0&q={searchTerms}&source=web"; - SuggestURLTemplate = "https://suggestqueries.google.com/complete/search?q={searchTerms}"; + Name = "DuckDuckGo Lite"; + URLTemplate = "https://lite.duckduckgo.com/lite/search?q={searchTerms}"; } ]; }; diff --git a/nix/homeModules/common/zen-browser.nix b/nix/homeModules/common/zen-browser.nix index ff8d6702..be5ded5b 100644 --- a/nix/homeModules/common/zen-browser.nix +++ b/nix/homeModules/common/zen-browser.nix @@ -29,13 +29,11 @@ in "eBay" "Perplexity" ]; - Default = "Brave"; + Default = "DuckDuckGo Lite"; Add = [ { - Name = "Brave"; - Alias = "@br"; - URLTemplate = "https://search.brave.com/search?&summary=0&q={searchTerms}&source=web"; - SuggestURLTemplate = "https://suggestqueries.google.com/complete/search?q={searchTerms}"; + Name = "DuckDuckGo Lite"; + URLTemplate = "https://lite.duckduckgo.com/lite/search?q={searchTerms}"; } ]; }; From b66c63601f2356f72fbe0f1f78a0dd8866615851 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sun, 7 Dec 2025 10:59:27 +0800 Subject: [PATCH 170/178] nvim/ruler: make type a ruler keyword --- .config/nvim/syntax/ruler.vim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.config/nvim/syntax/ruler.vim b/.config/nvim/syntax/ruler.vim index 386b7e16..c82ba8d6 100644 --- a/.config/nvim/syntax/ruler.vim +++ b/.config/nvim/syntax/ruler.vim @@ -11,6 +11,7 @@ syn match rulerTripleDot "\.\.\." syn match rulerDate "\d\d\d\d\D\d\d\D\d\d \d\d\D\d\d\D\(\d\d\|__\)" syn match rulerTag "\s\+[a-zA-Z]\+:[^\n]*" syn match rulerImport "import" +syn match rulerType "type" syn region rulerBlockComment start="{-" end="-}" @@ -19,6 +20,7 @@ hi def link rulerBlockComment Comment hi def link rulerTripleDot Comment hi def link rulerDate Macro hi def link rulerImport Keyword +hi def link rulerType Keyword hi def link rulerTag @property let b:current_syntax = "ruler" From 076a4448e78a0224026e835c2782e7187dbb1df6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sun, 7 Dec 2025 16:01:51 +0800 Subject: [PATCH 171/178] networks: implement bssid support --- nix/networks/list.nix | 1 + nix/networks/wpa_supplicant-compat.nix | 40 ++++++++++++++----------- nix/secrets/wpa_password.age | Bin 920 -> 971 bytes 3 files changed, 23 insertions(+), 18 deletions(-) diff --git a/nix/networks/list.nix b/nix/networks/list.nix index 4ec25b95..aaeb1560 100644 --- a/nix/networks/list.nix +++ b/nix/networks/list.nix @@ -6,6 +6,7 @@ in [ { ssid = "~"; + bssid = "de:ad:de:ad:d0:d0"; # dead dead dodo priority = preferredPriority; hasPassword = true; } diff --git a/nix/networks/wpa_supplicant-compat.nix b/nix/networks/wpa_supplicant-compat.nix index 65f130a0..84f59504 100644 --- a/nix/networks/wpa_supplicant-compat.nix +++ b/nix/networks/wpa_supplicant-compat.nix @@ -13,31 +13,35 @@ let go = networkArgs@{ ssid, + bssid ? null, # Custom fields wrapping nixpkgs module options hasPassword ? false, scanOnLowSignal ? false, randomizeMac ? false, ... }: + let + uniqueKey = "${ssid}${lib.optionalString (bssid != null) bssid}"; + in { - ${ssid} = lib.mkMerge [ - (builtins.removeAttrs networkArgs [ - # We keep ssid, because it overrides the attrset name ssid - # "ssid" - "hasPassword" - "scanOnLowSignal" - "randomizeMac" - ]) - (lib.optionalAttrs hasPassword { - pskRaw = "ext:${escapePwdKey ssid}"; - }) - { - extraConfig = '' - ${lib.optionalString scanOnLowSignal "bgscan=\"simple:30:-70:3600\""} - ${lib.optionalString randomizeMac "mac_addr=1"} - ''; - } - ]; + ${uniqueKey} # we use a unique key here to make sure no "same ssid different bssid" networks collide in key. + = + lib.mkMerge [ + (builtins.removeAttrs networkArgs [ + "hasPassword" + "scanOnLowSignal" + "randomizeMac" + ]) + (lib.optionalAttrs hasPassword { + pskRaw = "ext:${escapePwdKey uniqueKey}"; # this implies changing the external password key if you set a bssid! + }) + { + extraConfig = '' + ${lib.optionalString scanOnLowSignal "bgscan=\"simple:30:-70:3600\""} + ${lib.optionalString randomizeMac "mac_addr=1"} + ''; + } + ]; }; in ns: lib.mkMerge (map go ns) diff --git a/nix/secrets/wpa_password.age b/nix/secrets/wpa_password.age index 17fe933a12c35c3483098c7731b9a81331bf2474..511c4742e7fc5182ddffe1887b03fe3ede23b115 100644 GIT binary patch delta 902 zcmV;119|+I2g?VLEPr=eO;|WWM^a)a|%;8R8w+Ed2v)hOnP)~a#CYLWLJ1KNKH>LXG1S|csN9ND_2r^acyF5V+t)k zAaiqQEoEdfH8n9gAZv3lYcN3|PGWaLq|0=Flb0gO-4a7L~n65Yhq7Rc2!C^ zWieH8bVY1+V@GOp3Q0?IYA<6^S8`EOcSUwIM=Mq@WlKhSLN`(~cu-9-Zfj6jab+|{ zSvY8Kk?|K-YF02aIW{?UHA`1ybxb!=WO7DiGgoqOW^HqKYDrNyM>9@UV>V+kWHLz# zIB-N)IZ+vaRdiEmVQoz^Rx(9HHBxj)D{N6%Gi*hZUjY|?FK}{G zGd4;yOK@XRQ+6*aK~ritFg7bsbWuu6cWF>iQfhKkcv5I=FfmmMY&kb%d1X;gP7YFhf&QT1#g!MR871Ry9INb7^R4D|JRtWmaPfEj}PRVlr%IEoX9NVRL05I$lOH zAU0!qb0RV}WeR#`b7fOXM@VUZLP2a!Z(49kY)^AIQ%i3~ZF+DqRA)_OQ8-I!I9Ebx zYBXecPH0(AQ*n4TOD}OkNqBT=T5&fDIAd@%N^43h3N0-yAZ2DUR%bJCVmMKGV>vQ- zaaUALH8)meF;04KL~vwpWh+N(LQ64qHc@163V&`lo0Dgo=lI{_xDoDu`#B(H>x4M; z%1Wo9&4V7jCM;6vq(j}Nyd}%l2IJ>~&|YIH@iQ?tm31ttydvpuoXG}!*NGB-NjWfW zl^*cV0vad7*rNIiTt4kFQpY>DT=q;Jl!l$&F)en4pkLi?eBDHqFa1Z6KMJNUdt{A; zAPoi;xm^VPL?QfCzIIf9;(Nz#6gzb`me|j5R+Rmoh&-zcbQuy>Ok`sl1*w@r3i zr6W;W6&+IMvBIqX*q1_7R|yJ$#M7Fk`Lg9tk|8Ef{0BA_QPCr8zFbk;vdk>YjAv^y zLvHYP9it*hIViwu_CL5SbefJxVljfxE}t}3FmbbheUveyeRz7%Dud5gCIA2c delta 851 zcmV-Z1FZbZ2bc$tEPqsFLq}#uMOrsFb7o66X*6wBL1aR2V>w!4FEw*lY&U6bN?Arn zR6#gLcM5n(OK3}CN-J1KL`iElR8MbZXI6M?H%B&bM`tiHR#Y%oL2hz-L2qX-O$seO zAaiqQEoEdfH8n9gAZv3lYcN3|IYm-+Phx0UMrm|0F?MWeMMhL{IBaroby;&TL1RU6 zGE_lwFjh4yPE%}m3OH6~Z+0>?cy?xUF-L7kOKDR$IBi8RG&5ytO?hQ@XirTrZBsLI zacFmQk?|K-QCdb-dNX5DT1r}1QBN;yD{WRuW^qVUZAC9xH)%Imcvo#SY;svwc}PhL zXGUdGZFzb#Y-4CgZhA*gWkqB(XfktfZFVq0Nj5iHNHI=rQBPWSGfh#GUjY|?T6b1d zGi+u;HE>#XPFHPWFHcTJQ#N-&G)yybXHhh4cXxPtMPp`XFL!SWMPo~HZ*)RyOG7z1 zN?JB|NHCYNR zEiE8eHBeAEX=h?;GEZ|eYItU6L{2hzGG$|0bYXLGPI6{KS~5Z~R4+(HMMVmqOV`L= zVuRVI&!-WO`{Jp2EC+**jo{(H Date: Mon, 8 Dec 2025 20:17:38 +0800 Subject: [PATCH 172/178] tree-wide: set nixpkgs in NIX_PATH without flake This prevents double fetch --- nix/configurations/hetzner_benchmark.nix | 7 +++---- nix/configurations/hydrogen.nix | 7 +++---- nix/configurations/vanadium.nix | 7 +++---- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/nix/configurations/hetzner_benchmark.nix b/nix/configurations/hetzner_benchmark.nix index 2fddb026..6201e6f1 100644 --- a/nix/configurations/hetzner_benchmark.nix +++ b/nix/configurations/hetzner_benchmark.nix @@ -31,6 +31,9 @@ in # nixpkgs # { + # don't use `nixpkgs.flake.source`, it uses flake so it double fetches + nix.nixPath = [ "nixpkgs=${sources.nixpkgs}" ]; + nixpkgs = { overlays = map import [ ../packages/overlay.nix @@ -39,10 +42,6 @@ in ../overlays/lix.nix ../overlays/nix-monitored.nix ]; - - # Set NIX_PATH and flake registry at the same time - # https://github.com/NixOS/nixpkgs/pull/254405 - flake.source = sources.nixpkgs; }; nix.package = pkgs.nix-monitored; diff --git a/nix/configurations/hydrogen.nix b/nix/configurations/hydrogen.nix index c751ef0a..5a303423 100644 --- a/nix/configurations/hydrogen.nix +++ b/nix/configurations/hydrogen.nix @@ -34,6 +34,9 @@ in # nixpkgs # { + # don't use `nixpkgs.flake.source`, it uses flake so it double fetches + nix.nixPath = [ "nixpkgs=${sources.nixpkgs}" ]; + nixpkgs = { overlays = map import [ ../overlays/agenix.nix @@ -45,10 +48,6 @@ in ../overlays/lix.nix ../overlays/nix-monitored.nix ]; - - # Set NIX_PATH and flake registry at the same time - # https://github.com/NixOS/nixpkgs/pull/254405 - flake.source = sources.nixpkgs; }; nix.package = pkgs.nix-monitored; diff --git a/nix/configurations/vanadium.nix b/nix/configurations/vanadium.nix index 2fba0b2a..f881d389 100644 --- a/nix/configurations/vanadium.nix +++ b/nix/configurations/vanadium.nix @@ -35,6 +35,9 @@ in nix = { distributedBuilds = true; settings.builders-use-substitutes = true; + + # don't use `nixpkgs.flake.source`, it uses flake so it double fetches + nixPath = [ "nixpkgs=${sources.nixpkgs}" ]; }; nixpkgs = { @@ -70,10 +73,6 @@ in ../overlays/lix.nix ../overlays/nix-monitored.nix ]; - - # Set NIX_PATH and flake registry at the same time - # https://github.com/NixOS/nixpkgs/pull/254405 - flake.source = sources.nixpkgs; }; nix.package = pkgs.nix-monitored; From 1e63c7bb53d8ea4fea22badb11995c6f426f0ca0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Mon, 8 Dec 2025 22:31:49 +0800 Subject: [PATCH 173/178] vanadium/xmonad: revamp layout algorithm - Use threecol everywhere except - chat and multimedia: use grid / accordion --- .../vanadium/home/xmonad/xmonad.hs | 62 +++++++++++++------ 1 file changed, 43 insertions(+), 19 deletions(-) diff --git a/nix/configurations/vanadium/home/xmonad/xmonad.hs b/nix/configurations/vanadium/home/xmonad/xmonad.hs index bd224647..dd1c6ffc 100644 --- a/nix/configurations/vanadium/home/xmonad/xmonad.hs +++ b/nix/configurations/vanadium/home/xmonad/xmonad.hs @@ -1,7 +1,9 @@ {-# LANGUAGE NegativeLiterals #-} +{-# OPTIONS_GHC -Wno-missing-signatures #-} -- my layout is getting crazy import XMonad import XMonad.Actions.CopyWindow +import XMonad.Actions.PerWorkspaceKeys import XMonad.Actions.Submap import XMonad.Actions.SwapWorkspaces import XMonad.Hooks.DynamicLog @@ -12,19 +14,23 @@ import XMonad.Hooks.ManageHelpers import XMonad.Hooks.OnPropertyChange import XMonad.Hooks.RefocusLast import XMonad.Hooks.StatusBar -import XMonad.Layout.FocusTracking +import XMonad.Layout.Accordion +import XMonad.Layout.Grid +import XMonad.Layout.IfMax +import XMonad.Layout.LimitWindows +import XMonad.Layout.Maximize import XMonad.Layout.NoBorders -import XMonad.Layout.Reflect -import XMonad.Layout.Reflect.Message +import XMonad.Layout.PerWorkspace import XMonad.Layout.Renamed import XMonad.Layout.ResizableTile import XMonad.Layout.Spacing +import XMonad.Layout.ThreeColumns +import XMonad.Layout.ToggleLayouts import qualified XMonad.StackSet as W import XMonad.Util.EZConfig import XMonad.Util.Hacks import XMonad.Util.NamedScratchpad import XMonad.Util.SpawnOnce -import XMonad.Layout.Magnifier import Data.Char.Greek import Data.Ratio @@ -62,14 +68,31 @@ main = `additionalKeys` keybinds myLayout = - let tallr = renamed [ Replace "Tall" ] - $ smartSpacingWithEdge 5 - $ reflectMsg . reflectHoriz - $ ResizableTall 1 (1/10) (3/7) [] - mag = magnifyxy 1.05 1.3 (NoMaster 3) False - in avoidStruts - $ smartBorders - $ mag tallr ||| focusTracking Full + avoidStruts + $ smartBorders + $ onWorkspace chatWS (ifMaxToggle 2 grid accordion) + $ onWorkspace multimediaWS (ifMaxToggle 2 grid accordion) + -- Magifier doesn't work well with threecol's slaves + -- Full has the property of "only maximizing the focused one" + -- Maximize can have a window maximized but not focused, might be useful when programming + $ maximizeWithPadding 0 threecol + where + ifMaxToggle n tog l = ifMax n l (toggleLayouts tog l) + threecol = + renamed [ Replace "3Col" ] + $ smartSpacingWithEdge 5 + $ ThreeColMid 1 (3/100) (1/2) + + grid = + renamed [ Replace "Grid" ] + $ smartSpacingWithEdge 5 + $ Grid + + accordion = + renamed [ Replace "Accordion" ] + $ smartSpacingWithEdge 5 + $ limitSlice 3 + $ Accordion isSioyek :: Query Bool isSioyek = className =? "sioyek" @@ -264,9 +287,6 @@ keybinds = , ((0, xF86XK_AudioPlay), spawn "playerctl play-pause") , ((0, xF86XK_AudioNext), spawn "playerctl next" ) - -- Toggle fullscreen - , ((superMask, xK_Escape), sendMessage NextLayout) - -- Resize windows , ((superMask, xK_equal ), sendMessage $ IncMasterN 1) , ((superMask, xK_minus ), sendMessage $ IncMasterN -1) @@ -274,7 +294,11 @@ keybinds = , ((superMask, xK_period ), sendMessage Expand ) , ((superMask .|. shiftMask, xK_comma ), sendMessage MirrorShrink ) , ((superMask .|. shiftMask, xK_period), sendMessage MirrorExpand ) - , ((superMask , xK_apostrophe), sendMessage Toggle ) + , ((superMask , xK_space ), chooseAction $ \ws -> + if ws == chatWS then sendMessage ToggleLayout + else if ws == multimediaWS then sendMessage ToggleLayout + else withFocused (sendMessage . maximizeRestore) + ) -- [D]o sink and lift , ( (superMask, xK_d) @@ -343,12 +367,12 @@ altMask = mod1Mask myWorkspaces :: [WorkspaceId] myWorkspaces = map (:[]) $ take 8 greekLower -multimediaWS :: WorkspaceId -multimediaWS = myWorkspaces !! 6 - chatWS :: WorkspaceId chatWS = myWorkspaces !! 3 +multimediaWS :: WorkspaceId +multimediaWS = myWorkspaces !! 6 + centeredFloat, smallFloat, fullFloat, buttomRightFloat :: W.RationalRect centeredFloat = W.RationalRect (1%9) (1%9) (7%9) (7%9) smallFloat = W.RationalRect (3%5) (3%5) (2%7) (2%7) From 99b1dda7ba413fce7f7df2ebe1915ada8dafb58b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Thu, 23 Oct 2025 10:46:05 +0800 Subject: [PATCH 174/178] iron: init add installer for macbook-pro-2009 repurpose tungsten disko config for iron installer-macbook-pro-2009: enable b43 driver README: document how to wipe filesystem iron: generate hardware-configuration iron: discard unused modules iron: include macbook specific modules iron: remove custom fs configurations --- README.md | 3 +- default.nix | 15 ++ nix/configurations/iron.nix | 163 ++++++++++++++++++ nix/configurations/iron/home/programs.nix | 75 ++++++++ nix/configurations/iron/nixos/battery.nix | 11 ++ .../iron/nixos/connectivity.nix | 70 ++++++++ .../iron/nixos/connectivity/networks.nix | 97 +++++++++++ .../connectivity/universite_de_rennes.pem | 97 +++++++++++ nix/configurations/iron/nixos/display.nix | 4 + nix/configurations/iron/nixos/fs.nix | 23 +++ .../iron/nixos/hardware-configuration.nix | 30 ++++ nix/configurations/iron/nixos/input.nix | 11 ++ nix/configurations/iron/nixos/locale.nix | 52 ++++++ nix/configurations/iron/nixos/misc.nix | 11 ++ nix/configurations/iron/nixos/programs.nix | 16 ++ nix/configurations/iron/nixos/secure_dns.nix | 80 +++++++++ nix/disko/{tungsten => iron}/btrfs.nix | 0 nix/disko/{tungsten => iron}/default.nix | 0 .../extra/macbook-broacom-b43.nix | 4 + 19 files changed, 761 insertions(+), 1 deletion(-) create mode 100644 nix/configurations/iron.nix create mode 100644 nix/configurations/iron/home/programs.nix create mode 100644 nix/configurations/iron/nixos/battery.nix create mode 100644 nix/configurations/iron/nixos/connectivity.nix create mode 100644 nix/configurations/iron/nixos/connectivity/networks.nix create mode 100644 nix/configurations/iron/nixos/connectivity/universite_de_rennes.pem create mode 100644 nix/configurations/iron/nixos/display.nix create mode 100644 nix/configurations/iron/nixos/fs.nix create mode 100644 nix/configurations/iron/nixos/hardware-configuration.nix create mode 100644 nix/configurations/iron/nixos/input.nix create mode 100644 nix/configurations/iron/nixos/locale.nix create mode 100644 nix/configurations/iron/nixos/misc.nix create mode 100644 nix/configurations/iron/nixos/programs.nix create mode 100644 nix/configurations/iron/nixos/secure_dns.nix rename nix/disko/{tungsten => iron}/btrfs.nix (100%) rename nix/disko/{tungsten => iron}/default.nix (100%) create mode 100644 nix/nixosModules/extra/macbook-broacom-b43.nix diff --git a/README.md b/README.md index 949f6b2f..97076825 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ This repo is managed with Nix + GNU stow - Generate image & boot We do this because the default one doesn't have all the utilities we want (e.g. disko). - generate image `nom-build --attr nixosConfigurations.installer.config.system.build.isoImage` + - wipe the disk's fs with `wipefs` - `dd` the image to a flash drive (remember to `sync`) - boot off that flash drive @@ -29,7 +30,7 @@ This repo is managed with Nix + GNU stow disko -m disko ./disko.nix # format the drive # optional for unknown hard ware - nixos-generate-config --no-filesystems --root /mnt --dir . # disko will take care of the file system configuration + nixos-generate-config --no-filesystems --dir . # disko will take care of the file system configuration # put the generated config in the right path and import it # We do -j 1 because otherwise the kernel or the fonts might use too much diff --git a/default.nix b/default.nix index 729c5d87..54690d9e 100644 --- a/default.nix +++ b/default.nix @@ -17,10 +17,25 @@ system = "aarch64-linux"; modules = [ ./nix/configurations/hydrogen.nix ]; }; + iron = { + system = "x86_64-linux"; + modules = [ ./nix/configurations/iron.nix ]; + }; installer = { system = "x86_64-linux"; modules = [ ./nix/configurations/installer.nix ]; }; + # Specialized with patches for the GPU + installer-macbook-pro-2009 = { + system = "x86_64-linux"; + modules = [ + ./nix/configurations/installer.nix + ./nix/nixosModules/extra/macbook-pro-radeon.nix + ./nix/nixosModules/extra/macbook-swap-cmd-opt.nix + ./nix/nixosModules/extra/macbook-swap-fn-ctrl.nix + ./nix/nixosModules/extra/macbook-broacom-b43.nix + ]; + }; # Not mine, rented on hetzner hetzner_benchmark = { diff --git a/nix/configurations/iron.nix b/nix/configurations/iron.nix new file mode 100644 index 00000000..a1e8e97e --- /dev/null +++ b/nix/configurations/iron.nix @@ -0,0 +1,163 @@ +# Entry point to cherry pick modules +let + sources = import ../../npins; + + hostname = "iron"; + username = "leana"; +in + { + config, + lib, + pkgs, + ... + }: let + inherit (lib.modules) mkAliasOptionModule; + in { + imports = [ + # + # Shorthands + # + (mkAliasOptionModule ["me"] ["users" "users" username]) + (mkAliasOptionModule ["hm"] ["home-manager" "users" username]) + + # + # hostname + # + {_module.args = {inherit hostname;};} + + # + # nixpkgs + # + { + # affect the generated nix.conf, doesn't need to be turned off during nixos-install + nix = { + distributedBuilds = true; + settings.builders-use-substitutes = true; + }; + + nixpkgs = { + overlays = + map import + [ + ../overlays/agenix.nix + ../overlays/disko.nix + ../overlays/nur.nix + ../overlays/nix-tree.nix + ../overlays/nil.nix + ../overlays/dix.nix + + ../packages/overlay.nix + ] + # use lix everywhere and wrap it with nom + ++ [ + (import (sources.lix-module + "/overlay.nix") {inherit (sources) lix;}) + (import ../overlays/nix-monitored.nix) + ]; + + # Set NIX_PATH and flake registry at the same time + # https://github.com/NixOS/nixpkgs/pull/254405 + flake.source = sources.nixpkgs; + }; + + nix.package = pkgs.nix-monitored; + + system.nixos.version = lib.substring 0 8 sources.nixpkgs.revision; + } + + # + # NixOS modules + # + ./iron/nixos/hardware-configuration.nix # generated + ./iron/nixos/fs.nix + + ./iron/nixos/battery.nix + + ./iron/nixos/connectivity.nix + ./iron/nixos/secure_dns.nix + ./iron/nixos/input.nix + + ./iron/nixos/misc.nix + + ./iron/nixos/display.nix + + ./iron/nixos/locale.nix + ./iron/nixos/programs.nix + + ../nixosModules/common/disable-command-not-found.nix + ../nixosModules/common/network.nix + ../nixosModules/common/sudo-conf.nix + ../nixosModules/common/system-nixconf.nix + + ../nixosModules/extra/leana.nix + + # + # Extern modules + # + (sources.disko + "/module.nix") + ../disko/iron/btrfs.nix + + (sources.agenix + "/modules/age.nix") + + ../nixosModules/extra/macbook-pro-radeon.nix + ../nixosModules/extra/macbook-swap-cmd-opt.nix + ../nixosModules/extra/macbook-swap-fn-ctrl.nix + ../nixosModules/extra/macbook-broacom-b43.nix + + # + # home-manager + # + (sources.home-manager + "/nixos") + { + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + sharedModules = [{home.stateVersion = lib.mkDefault config.system.stateVersion;}]; + }; + + hm.imports = [ + # + # hostname + # + {_module.args = {inherit hostname;};} + + # + # home modules + # + ./iron/home/programs.nix + + ../homeModules/common/btop + ../homeModules/common/fish + ../homeModules/common/starship + ../homeModules/common/tmux + ../homeModules/common/vim + ../homeModules/common/direnv.nix + ../homeModules/common/fzf.nix + ../homeModules/common/git.nix + ../homeModules/common/gpg.nix + ../homeModules/common/leana.nix + ../homeModules/common/locale.nix + ../homeModules/common/lazygit.nix + ../homeModules/common/packages.nix + ../homeModules/common/password-store.nix + ../homeModules/common/tealdeer.nix + ../homeModules/common/user-nixconf.nix + + ../homeModules/extra/tmux-fish-integration.nix + + # + # Extern modules + # + (sources.agenix + "/modules/age-home.nix") + ]; + } + + # + # Secrets + # + { + age.secrets = { + wpa_password.file = "${../secrets/wpa_password.age}"; + }; + } + ]; + } diff --git a/nix/configurations/iron/home/programs.nix b/nix/configurations/iron/home/programs.nix new file mode 100644 index 00000000..925fb616 --- /dev/null +++ b/nix/configurations/iron/home/programs.nix @@ -0,0 +1,75 @@ +{ + pkgs, + lib, + config, + ... +}: { + home.sessionPath = [ + "${config.home.homeDirectory}/.local/bin" + ]; + + home.sessionVariables = let + fishCfg = config.programs.fish; + in { + "SHELL" = lib.mkIf fishCfg.enable (lib.getExe fishCfg.package); + }; + + home.packages = [ + pkgs.nmap + pkgs.stow + pkgs.zip + pkgs.unzip + pkgs.gnutar + pkgs.p7zip + pkgs.bc + pkgs.dig + pkgs.hutils + pkgs.miniserve + pkgs.agenix + pkgs.nix-which + + # pretty tui tools + pkgs.du-dust + pkgs.tokei + pkgs.hyperfine + pkgs.watchexec + pkgs.onefetch + pkgs.just + + # nix tools + pkgs.alejandra + pkgs.nurl + pkgs.dix + pkgs.niv + pkgs.npins + pkgs.nix-tree + pkgs.nh + ]; + + programs = { + neovim = { + enable = true; + defaultEditor = true; + }; + lazygit.enable = true; + fish = { + enable = true; + shellAbbrs = { + "fdoc" = "find ~/Documents -name"; + }; + }; + starship.enable = true; + tmux.enable = true; + direnv.enable = true; + ripgrep.enable = true; + password-store.enable = true; + tealdeer.enable = true; + + btop.enable = true; + cmus.enable = true; + }; + + services = { + gpg-agent.enable = true; + }; +} diff --git a/nix/configurations/iron/nixos/battery.nix b/nix/configurations/iron/nixos/battery.nix new file mode 100644 index 00000000..bf6ca78a --- /dev/null +++ b/nix/configurations/iron/nixos/battery.nix @@ -0,0 +1,11 @@ +{ + systemd.sleep.extraConfig = '' + HibernateDelaySec=1d + ''; + + services.logind = { + powerKey = "hibernate"; + lidSwitch = "suspend-then-hibernate"; # won't happen there's no battery anyway + lidSwitchDocked = "ignore"; + }; +} diff --git a/nix/configurations/iron/nixos/connectivity.nix b/nix/configurations/iron/nixos/connectivity.nix new file mode 100644 index 00000000..403cab13 --- /dev/null +++ b/nix/configurations/iron/nixos/connectivity.nix @@ -0,0 +1,70 @@ +{ + config, + lib, + ... +}: { + users.users.root.openssh.authorizedKeys.keys = let + # TODO: put iron keys in identities + ids = import ../../../identities.nix; + in + builtins.concatMap builtins.attrValues (builtins.attrValues ids); + + networking = { + networkmanager.enable = lib.mkForce false; + + firewall.allowedTCPPorts = [ + 8080 + + # For 'localsend' + # https://github.com/localsend/localsend?tab=readme-ov-file#setup + 53317 + ]; + + # To enable roaming https://wiki.archlinux.org/title/Wpa_supplicant#Roaming + wireless = { + enable = true; + userControlled.enable = true; + secretsFile = config.age.secrets.wpa_password.path; + scanOnLowSignal = false; + networks = let + # wpa_supplicant uses `strchr` to seek to the first `=`, so the only forbidden character is `=`. + escapePwdKey = lib.replaceStrings ["="] ["_"]; + + fromList = ns: let + go = networkArgs @ { + ssid, + # Custom fields wrapping nixpkgs module options + hasPassword ? false, + scanOnLowSignal ? false, + randomizeMac ? false, + ... + }: { + ${ssid} = lib.mkMerge [ + (builtins.removeAttrs networkArgs ["ssid" "hasPassword" "scanOnLowSignal" "randomizeMac"]) + (lib.optionalAttrs hasPassword { + pskRaw = "ext:${escapePwdKey ssid}"; + }) + (lib.optionalAttrs scanOnLowSignal { + extraConfig = '' + bgscan="simple:30:-70:3600" + ''; + }) + (lib.optionalAttrs randomizeMac { + extraConfig = '' + mac_addr=1 + ''; + }) + ]; + }; + in + lib.mkMerge (map go ns); + in + # TODO: move this upward like identities + fromList (import ./connectivity/networks.nix); + }; + }; + + services.mullvad-vpn.enable = true; + + hardware.bluetooth.enable = true; +} diff --git a/nix/configurations/iron/nixos/connectivity/networks.nix b/nix/configurations/iron/nixos/connectivity/networks.nix new file mode 100644 index 00000000..e603f0e2 --- /dev/null +++ b/nix/configurations/iron/nixos/connectivity/networks.nix @@ -0,0 +1,97 @@ +let + privatePriority = 10; + limitedPriority = -10; +in [ + { + ssid = "~"; + priority = privatePriority; + hasPassword = true; + } + { + ssid = "Pei’s Wifi"; + priority = privatePriority; + hasPassword = true; + } + { + ssid = "girlypop-net"; + priority = privatePriority; + hasPassword = true; + } + + { + ssid = "annapurna"; + priority = privatePriority; + hasPassword = true; + scanOnLowSignal = true; + } + { + ssid = "5526-1"; # TODO: set bssid preference ? + priority = privatePriority; + hasPassword = true; + scanOnLowSignal = true; + } + + { + ssid = "eduroam"; + priority = privatePriority; + scanOnLowSignal = true; + + authProtocols = ["WPA-EAP"]; + auth = '' + pairwise=CCMP + group=CCMP TKIP + eap=PEAP + ca_cert="${./universite_de_rennes.pem}" + identity="ychiang@etudiant.univ-rennes.fr" + altsubject_match="DNS:radius.univ-rennes1.fr;DNS:radius1.univ-rennes1.fr;DNS:radius2.univ-rennes1.fr;DNS:vmradius-psf1.univ-rennes1.fr;DNS:vmradius-psf2.univ-rennes1.fr" + phase2="auth=MSCHAPV2" + password=ext:EDUROAM + anonymous_identity="anonymous@univ-rennes.fr" + ''; + } + + { + ssid = "A-WAY"; + priority = privatePriority; + hasPassword = true; + randomizeMac = true; + } + { + ssid = "CAT.jpgcafe"; + priority = privatePriority; + hasPassword = true; + randomizeMac = true; + } + { + ssid = "LOUISA"; # 區公所 + priority = privatePriority; + hasPassword = true; + randomizeMac = true; + } + { + ssid = "LouisaCoffee"; # 七張 + priority = privatePriority; + hasPassword = true; + randomizeMac = true; + } + { + ssid = "MetroTaipei x Louisa"; # 大安 + priority = privatePriority; + hasPassword = true; + randomizeMac = true; + } + + {ssid = "_SNCF_WIFI_INOUI";} + {ssid = "_WIFI_LYRIA";} + {ssid = "EurostarTrainsWiFi";} + {ssid = "SBB-FREE";} + {ssid = "AOT Airport Free Wi-Fi by NT";} + {ssid = "NewTaipei";} + {ssid = "Fami-WiFi";} + + { + ssid = "iPhone de Léana 江"; + priority = limitedPriority; + hasPassword = true; + } +] diff --git a/nix/configurations/iron/nixos/connectivity/universite_de_rennes.pem b/nix/configurations/iron/nixos/connectivity/universite_de_rennes.pem new file mode 100644 index 00000000..ac4d2e1f --- /dev/null +++ b/nix/configurations/iron/nixos/connectivity/universite_de_rennes.pem @@ -0,0 +1,97 @@ +-----BEGIN CERTIFICATE----- +MIIEMjCCAxqgAwIBAgIBATANBgkqhkiG9w0BAQUFADB7MQswCQYDVQQGEwJHQjEb +MBkGA1UECAwSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRow +GAYDVQQKDBFDb21vZG8gQ0EgTGltaXRlZDEhMB8GA1UEAwwYQUFBIENlcnRpZmlj +YXRlIFNlcnZpY2VzMB4XDTA0MDEwMTAwMDAwMFoXDTI4MTIzMTIzNTk1OVowezEL +MAkGA1UEBhMCR0IxGzAZBgNVBAgMEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UE +BwwHU2FsZm9yZDEaMBgGA1UECgwRQ29tb2RvIENBIExpbWl0ZWQxITAfBgNVBAMM +GEFBQSBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczCCASIwDQYJKoZIhvcNAQEBBQADggEP +ADCCAQoCggEBAL5AnfRu4ep2hxxNRUSOvkbIgwadwSr+GB+O5AL686tdUIoWMQua +BtDFcCLNSS1UY8y2bmhGC1Pqy0wkwLxyTurxFa70VJoSCsN6sjNg4tqJVfMiWPPe +3M/vg4aijJRPn2jymJBGhCfHdr/jzDUsi14HZGWCwEiwqJH5YZ92IFCokcdmtet4 +YgNW8IoaE+oxox6gmf049vYnMlhvB/VruPsUK6+3qszWY19zjNoFmag4qMsXeDZR +rOme9Hg6jc8P2ULimAyrL58OAd7vn5lJ8S3frHRNG5i1R8XlKdH5kBjHYpy+g8cm +ez6KJcfA3Z3mNWgQIJ2P2N7Sw4ScDV7oL8kCAwEAAaOBwDCBvTAdBgNVHQ4EFgQU +oBEKIz6W8Qfs4q8p74Klf9AwpLQwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQF +MAMBAf8wewYDVR0fBHQwcjA4oDagNIYyaHR0cDovL2NybC5jb21vZG9jYS5jb20v +QUFBQ2VydGlmaWNhdGVTZXJ2aWNlcy5jcmwwNqA0oDKGMGh0dHA6Ly9jcmwuY29t +b2RvLm5ldC9BQUFDZXJ0aWZpY2F0ZVNlcnZpY2VzLmNybDANBgkqhkiG9w0BAQUF +AAOCAQEACFb8AvCb6P+k+tZ7xkSAzk/ExfYAWMymtrwUSWgEdujm7l3sAg9g1o1Q +GE8mTgHj5rCl7r+8dFRBv/38ErjHT1r0iWAFf2C3BUrz9vHCv8S5dIa2LX1rzNLz +Rt0vxuBqw8M0Ayx9lt1awg6nCpnBBYurDC/zXDrPbDdVCYfeU0BsWO/8tqtlbgT2 +G9w84FoVxp7Z8VlIMCFlA2zs6SFz7JsDoeA3raAVGI/6ugLOpyypEBMs1OUIJqsi +l2D4kF501KKaU73yqWjgom7C12yxow+ev+to51byrvLjKzg6CYG1a4XXvi3tPxq3 +smPi9WIsgtRqAEFQ8TmDn5XpNpaYbg== +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIIFgTCCBGmgAwIBAgIQOXJEOvkit1HX02wQ3TE1lTANBgkqhkiG9w0BAQwFADB7 +MQswCQYDVQQGEwJHQjEbMBkGA1UECAwSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYD +VQQHDAdTYWxmb3JkMRowGAYDVQQKDBFDb21vZG8gQ0EgTGltaXRlZDEhMB8GA1UE +AwwYQUFBIENlcnRpZmljYXRlIFNlcnZpY2VzMB4XDTE5MDMxMjAwMDAwMFoXDTI4 +MTIzMTIzNTk1OVowgYgxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpOZXcgSmVyc2V5 +MRQwEgYDVQQHEwtKZXJzZXkgQ2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBO +ZXR3b3JrMS4wLAYDVQQDEyVVU0VSVHJ1c3QgUlNBIENlcnRpZmljYXRpb24gQXV0 +aG9yaXR5MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAgBJlFzYOw9sI +s9CsVw127c0n00ytUINh4qogTQktZAnczomfzD2p7PbPwdzx07HWezcoEStH2jnG +vDoZtF+mvX2do2NCtnbyqTsrkfjib9DsFiCQCT7i6HTJGLSR1GJk23+jBvGIGGqQ +Ijy8/hPwhxR79uQfjtTkUcYRZ0YIUcuGFFQ/vDP+fmyc/xadGL1RjjWmp2bIcmfb +IWax1Jt4A8BQOujM8Ny8nkz+rwWWNR9XWrf/zvk9tyy29lTdyOcSOk2uTIq3XJq0 +tyA9yn8iNK5+O2hmAUTnAU5GU5szYPeUvlM3kHND8zLDU+/bqv50TmnHa4xgk97E +xwzf4TKuzJM7UXiVZ4vuPVb+DNBpDxsP8yUmazNt925H+nND5X4OpWaxKXwyhGNV +icQNwZNUMBkTrNN9N6frXTpsNVzbQdcS2qlJC9/YgIoJk2KOtWbPJYjNhLixP6Q5 +D9kCnusSTJV882sFqV4Wg8y4Z+LoE53MW4LTTLPtW//e5XOsIzstAL81VXQJSdhJ +WBp/kjbmUZIO8yZ9HE0XvMnsQybQv0FfQKlERPSZ51eHnlAfV1SoPv10Yy+xUGUJ +5lhCLkMaTLTwJUdZ+gQek9QmRkpQgbLevni3/GcV4clXhB4PY9bpYrrWX1Uu6lzG +KAgEJTm4Diup8kyXHAc/DVL17e8vgg8CAwEAAaOB8jCB7zAfBgNVHSMEGDAWgBSg +EQojPpbxB+zirynvgqV/0DCktDAdBgNVHQ4EFgQUU3m/WqorSs9UgOHYm8Cd8rID +ZsswDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQFMAMBAf8wEQYDVR0gBAowCDAG +BgRVHSAAMEMGA1UdHwQ8MDowOKA2oDSGMmh0dHA6Ly9jcmwuY29tb2RvY2EuY29t +L0FBQUNlcnRpZmljYXRlU2VydmljZXMuY3JsMDQGCCsGAQUFBwEBBCgwJjAkBggr +BgEFBQcwAYYYaHR0cDovL29jc3AuY29tb2RvY2EuY29tMA0GCSqGSIb3DQEBDAUA +A4IBAQAYh1HcdCE9nIrgJ7cz0C7M7PDmy14R3iJvm3WOnnL+5Nb+qh+cli3vA0p+ +rvSNb3I8QzvAP+u431yqqcau8vzY7qN7Q/aGNnwU4M309z/+3ri0ivCRlv79Q2R+ +/czSAaF9ffgZGclCKxO/WIu6pKJmBHaIkU4MiRTOok3JMrO66BQavHHxW/BBC5gA +CiIDEOUMsfnNkjcZ7Tvx5Dq2+UUTJnWvu6rvP3t3O9LEApE9GQDTF1w52z97GA1F +zZOFli9d31kWTz9RvdVFGD/tSo7oBmF0Ixa1DVBzJ0RHfxBdiSprhTEUxOipakyA +vGp4z7h/jnZymQyd/teRCBaho1+V +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIIG5TCCBM2gAwIBAgIRANpDvROb0li7TdYcrMTz2+AwDQYJKoZIhvcNAQEMBQAw +gYgxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpOZXcgSmVyc2V5MRQwEgYDVQQHEwtK +ZXJzZXkgQ2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMS4wLAYD +VQQDEyVVU0VSVHJ1c3QgUlNBIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTIw +MDIxODAwMDAwMFoXDTMzMDUwMTIzNTk1OVowRDELMAkGA1UEBhMCTkwxGTAXBgNV +BAoTEEdFQU5UIFZlcmVuaWdpbmcxGjAYBgNVBAMTEUdFQU5UIE9WIFJTQSBDQSA0 +MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEApYhi1aEiPsg9ZKRMAw9Q +r8Mthsr6R20VSfFeh7TgwtLQi6RSRLOh4or4EMG/1th8lijv7xnBMVZkTysFiPmT +PiLOfvz+QwO1NwjvgY+Jrs7fSoVA/TQkXzcxu4Tl3WHi+qJmKLJVu/JOuHud6mOp +LWkIbhODSzOxANJ24IGPx9h4OXDyy6/342eE6UPXCtJ8AzeumTG6Dfv5KVx24lCF +TGUzHUB+j+g0lSKg/Sf1OzgCajJV9enmZ/84ydh48wPp6vbWf1H0O3Rd3LhpMSVn +TqFTLKZSbQeLcx/l9DOKZfBCC9ghWxsgTqW9gQ7v3T3aIfSaVC9rnwVxO0VjmDdP +FNbdoxnh0zYwf45nV1QQgpRwZJ93yWedhp4ch1a6Ajwqs+wv4mZzmBSjovtV0mKw +d+CQbSToalEUP4QeJq4Udz5WNmNMI4OYP6cgrnlJ50aa0DZPlJqrKQPGL69KQQz1 +2WgxvhCuVU70y6ZWAPopBa1ykbsttpLxADZre5cH573lIuLHdjx7NjpYIXRx2+QJ +URnX2qx37eZIxYXz8ggM+wXH6RDbU3V2o5DP67hXPHSAbA+p0orjAocpk2osxHKo +NSE3LCjNx8WVdxnXvuQ28tKdaK69knfm3bB7xpdfsNNTPH9ElcjscWZxpeZ5Iij8 +lyrCG1z0vSWtSBsgSnUyG/sCAwEAAaOCAYswggGHMB8GA1UdIwQYMBaAFFN5v1qq +K0rPVIDh2JvAnfKyA2bLMB0GA1UdDgQWBBRvHTVJEGwy+lmgnryK6B+VvnF6DDAO +BgNVHQ8BAf8EBAMCAYYwEgYDVR0TAQH/BAgwBgEB/wIBADAdBgNVHSUEFjAUBggr +BgEFBQcDAQYIKwYBBQUHAwIwOAYDVR0gBDEwLzAtBgRVHSAAMCUwIwYIKwYBBQUH +AgEWF2h0dHBzOi8vc2VjdGlnby5jb20vQ1BTMFAGA1UdHwRJMEcwRaBDoEGGP2h0 +dHA6Ly9jcmwudXNlcnRydXN0LmNvbS9VU0VSVHJ1c3RSU0FDZXJ0aWZpY2F0aW9u +QXV0aG9yaXR5LmNybDB2BggrBgEFBQcBAQRqMGgwPwYIKwYBBQUHMAKGM2h0dHA6 +Ly9jcnQudXNlcnRydXN0LmNvbS9VU0VSVHJ1c3RSU0FBZGRUcnVzdENBLmNydDAl +BggrBgEFBQcwAYYZaHR0cDovL29jc3AudXNlcnRydXN0LmNvbTANBgkqhkiG9w0B +AQwFAAOCAgEAUtlC3e0xj/1BMfPhdQhUXeLjb0xp8UE28kzWE5xDzGKbfGgnrT2R +lw5gLIx+/cNVrad//+MrpTppMlxq59AsXYZW3xRasrvkjGfNR3vt/1RAl8iI31lG +hIg6dfIX5N4esLkrQeN8HiyHKH6khm4966IkVVtnxz5CgUPqEYn4eQ+4eeESrWBh +AqXaiv7HRvpsdwLYekAhnrlGpioZ/CJIT2PTTxf+GHM6cuUnNqdUzfvrQgA8kt1/ +ASXx2od/M+c8nlJqrGz29lrJveJOSEMX0c/ts02WhsfMhkYa6XujUZLmvR1Eq08r +48/EZ4l+t5L4wt0DV8VaPbsEBF1EOFpz/YS2H6mSwcFaNJbnYqqJHIvm3PLJHkFm +EoLXRVrQXdCT+3wgBfgU6heCV5CYBz/YkrdWES7tiiT8sVUDqXmVlTsbiRNiyLs2 +bmEWWFUl76jViIJog5fongEqN3jLIGTG/mXrJT1UyymIcobnIGrbwwRVz/mpFQo0 +vBYIi1k2ThVh0Dx88BbF9YiP84dd8Fkn5wbE6FxXYJ287qfRTgmhePecPc73Yrzt +apdRcsKVGkOpaTIJP/l+lAHRLZxk/dUtyN95G++bOSQqnOCpVPabUGl2E/OEyFrp +Ipwgu2L/WJclvd6g+ZA/iWkLSMcpnFb+uX6QBqvD6+RNxul1FaB5iHY= +-----END CERTIFICATE----- + diff --git a/nix/configurations/iron/nixos/display.nix b/nix/configurations/iron/nixos/display.nix new file mode 100644 index 00000000..c54cd9d9 --- /dev/null +++ b/nix/configurations/iron/nixos/display.nix @@ -0,0 +1,4 @@ +{ + me.extraGroups = ["video"]; + programs.light.enable = true; +} diff --git a/nix/configurations/iron/nixos/fs.nix b/nix/configurations/iron/nixos/fs.nix new file mode 100644 index 00000000..e904ac30 --- /dev/null +++ b/nix/configurations/iron/nixos/fs.nix @@ -0,0 +1,23 @@ +{pkgs, ...}: { + services.btrfs.autoScrub = { + enable = true; + fileSystems = [ + "/" + "/home" + "/nix" + ]; + }; + + systemd.tmpfiles.rules = [ + # tmux-sessionizer directories + "d /home/leana/r 0700 leana leana - -" + "d /home/leana/pg 0700 leana leana 4w -" + "d /home/leana/wt 0700 leana leana - -" + ]; + + environment.systemPackages = [ + pkgs.lsof + pkgs.smartmontools + pkgs.compsize + ]; +} diff --git a/nix/configurations/iron/nixos/hardware-configuration.nix b/nix/configurations/iron/nixos/hardware-configuration.nix new file mode 100644 index 00000000..98e5c89c --- /dev/null +++ b/nix/configurations/iron/nixos/hardware-configuration.nix @@ -0,0 +1,30 @@ +# 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, + ... +}: { + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = ["uhci_hcd" "ehci_pci" "ahci" "firewire_ohci" "usbhid" "uas" "sd_mod" "sr_mod" "sdhci_pci"]; + boot.initrd.kernelModules = ["dm-snapshot"]; + boot.kernelModules = ["kvm-intel"]; + boot.extraModulePackages = []; + + # 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.enp2s0f0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp3s0b1.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/nix/configurations/iron/nixos/input.nix b/nix/configurations/iron/nixos/input.nix new file mode 100644 index 00000000..6e8d794e --- /dev/null +++ b/nix/configurations/iron/nixos/input.nix @@ -0,0 +1,11 @@ +{ + services.xserver.xkb = { + layout = "us"; + variant = "dvorak"; + options = builtins.concatStringsSep "," [ + "caps:swapescape" + "compose:ralt" + ]; + }; + console.useXkbConfig = true; +} diff --git a/nix/configurations/iron/nixos/locale.nix b/nix/configurations/iron/nixos/locale.nix new file mode 100644 index 00000000..de1bd43f --- /dev/null +++ b/nix/configurations/iron/nixos/locale.nix @@ -0,0 +1,52 @@ +{lib, ...}: { + # https://en.wikipedia.org/wiki/List_of_tz_database_time_zones + # `timedatectl list-timezones` + time.timeZone = "Asia/Taipei"; + + i18n = { + defaultLocale = "en_US.UTF-8"; + extraLocales = [ + "en_US.UTF-8/UTF-8" + "fr_FR.UTF-8/UTF-8" + "zh_TW.UTF-8/UTF-8" + ]; + extraLocaleSettings = + # A list of env variables you might want to set + # + # "LC_CTYPE" + # "LC_NUMERIC" + # "LC_TIME" + # "LC_COLLATE" + # "LC_MONETARY" + # "LC_MESSAGES" + # "LC_PAPER" + # "LC_NAME" + # "LC_ADDRESS" + # "LC_TELEPHONE" + # "LC_MEASUREMENT" + # "LC_IDENTIFICATION" + let + genLocale = locale: lib.flip lib.genAttrs (_: locale); + in + # - xscreensaver freaks out on the time display + # - evolution add event becomes hard to use + # https://gitlab.gnome.org/GNOME/evolution/-/issues/3120 + genLocale "fr_FR.UTF-8" [ + "LC_TIME" + ] + // genLocale "zh_TW.UTF-8" [ + "LC_MONETARY" + "LC_ADDRESS" + ]; + }; + + # Wireless Regulatory Domain, uses ISO / IEC 3166 country code + # + # links: + # https://community.frame.work/t/framework-nixos-linux-users-self-help/31426/77 + # https://wireless.docs.kernel.org/en/latest/en/developers/regulatory.html#the-ieee80211-regdom-module-parameter + hardware.wirelessRegulatoryDatabase = true; + boot.extraModprobeConfig = '' + options cfg80211 ieee80211_regdom="TW" + ''; +} diff --git a/nix/configurations/iron/nixos/misc.nix b/nix/configurations/iron/nixos/misc.nix new file mode 100644 index 00000000..7f389df2 --- /dev/null +++ b/nix/configurations/iron/nixos/misc.nix @@ -0,0 +1,11 @@ +{ + system.stateVersion = "25.05"; + + boot.loader = { + systemd-boot = { + enable = true; + editor = false; + }; + efi.canTouchEfiVariables = true; + }; +} diff --git a/nix/configurations/iron/nixos/programs.nix b/nix/configurations/iron/nixos/programs.nix new file mode 100644 index 00000000..0e605d66 --- /dev/null +++ b/nix/configurations/iron/nixos/programs.nix @@ -0,0 +1,16 @@ +{pkgs, ...}: { + environment.systemPackages = [ + pkgs.man-pages + pkgs.man-pages-posix + ]; + + # + # Programs + # + programs = { + vim.enable = true; + vim.defaultEditor = true; + + git.enable = true; + }; +} diff --git a/nix/configurations/iron/nixos/secure_dns.nix b/nix/configurations/iron/nixos/secure_dns.nix new file mode 100644 index 00000000..eebd747a --- /dev/null +++ b/nix/configurations/iron/nixos/secure_dns.nix @@ -0,0 +1,80 @@ +# https://nixos.wiki/wiki/Encrypted_DNS +{ + lib, + pkgs, + ... +}: { + networking = { + nameservers = ["127.0.0.1" "::1"]; + dhcpcd.extraConfig = "nohook resolv.conf"; + # networkmanager.dns = "none"; + }; + + services.resolved.enable = false; + + services.dnscrypt-proxy2 = { + enable = true; + # Settings reference: + # https://github.com/DNSCrypt/dnscrypt-proxy/blob/master/dnscrypt-proxy/example-dnscrypt-proxy.toml + settings = { + listen_addresses = ["127.0.0.1:53"]; + ipv4_servers = true; + + require_dnssec = true; + require_nolog = true; + require_nofilter = true; + + lb_strategy = "p2"; + lb_estimator = true; + + # Blocklists are made of one pattern per line. + # https://github.com/DNSCrypt/dnscrypt-proxy/blob/fa59f990431a49b6485f63f96601bc7e64017bf8/dnscrypt-proxy/example-dnscrypt-proxy.toml#L583C4-L583C75 + blocked_names.blocked_names_file = let + # Prevent building up reliance on chatbots + # Gotta preserve that thinking ability of my smoof bwain + ai_list = let + src = pkgs.fetchFromGitHub { + owner = "laylavish"; + repo = "uBlockOrigin-HUGE-AI-Blocklist"; + rev = "9bb188e2701138e03f73bacebd6b19b181ca0012"; + hash = "sha256-p3wfR28DH6V8BHn9DT10d09Yq3mdbBecWwlR1CdDYUA="; + }; + in + lib.pipe (builtins.readFile "${src}/noai_hosts.txt") [ + (lib.replaceStrings ["\r\n"] ["\n"]) # convert to unix ending just in case + (lib.splitString "\n") + (builtins.filter (x: ! (x == "" || lib.hasPrefix "#" x))) + (builtins.map (x: builtins.elemAt (lib.splitString " " x) 1)) # remove 0.0.0.0 + ]; + + hategroup_list = let + src = pkgs.fetchFromGitHub { + owner = "chigh"; + repo = "hategroup-dnsbl"; + rev = "cc19c050997d5f54014bb20c764b131e003dfb17"; + hash = "sha256-SZBrjIBUw687MdrbOV7WrP5IhAAtKvPL2GqdcICHNvQ="; + }; + in + lib.pipe (builtins.readFile "${src}/blocklist.txt") [ + (lib.replaceStrings ["\r\n"] ["\n"]) # convert to unix ending just in case + (lib.splitString "\n") + (builtins.filter (x: ! (x == "" || lib.hasPrefix "#" x))) + ]; + + combined_lists = ai_list ++ hategroup_list; + in + pkgs.writeText "dnsblocklist" (builtins.concatStringsSep "\n" combined_lists); + + # Add this to test if dnscrypt-proxy is actually used to resolve DNS requests + # query_log.file = "/var/log/dnscrypt-proxy/query.log"; + sources.public-resolvers = { + urls = [ + "https://raw.githubusercontent.com/DNSCrypt/dnscrypt-resolvers/master/v3/public-resolvers.md" + "https://download.dnscrypt.info/resolvers-list/v3/public-resolvers.md" + ]; + cache_file = "/var/cache/dnscrypt-proxy/public-resolvers.md"; + minisign_key = "RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3"; + }; + }; + }; +} diff --git a/nix/disko/tungsten/btrfs.nix b/nix/disko/iron/btrfs.nix similarity index 100% rename from nix/disko/tungsten/btrfs.nix rename to nix/disko/iron/btrfs.nix diff --git a/nix/disko/tungsten/default.nix b/nix/disko/iron/default.nix similarity index 100% rename from nix/disko/tungsten/default.nix rename to nix/disko/iron/default.nix diff --git a/nix/nixosModules/extra/macbook-broacom-b43.nix b/nix/nixosModules/extra/macbook-broacom-b43.nix new file mode 100644 index 00000000..705b04aa --- /dev/null +++ b/nix/nixosModules/extra/macbook-broacom-b43.nix @@ -0,0 +1,4 @@ +{ + nixpkgs.config.allowUnfree = true; + networking.enableB43Firmware = true; +} From eb750b585d2de63cee8096638b6de7c7d236e28a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Mon, 8 Dec 2025 23:52:55 +0800 Subject: [PATCH 175/178] iron: fix connectivity issues --- nix/configurations/iron.nix | 1 - .../iron/nixos/connectivity.nix | 39 +------- .../iron/nixos/connectivity/networks.nix | 97 ------------------- .../connectivity/universite_de_rennes.pem | 97 ------------------- nix/configurations/iron/nixos/secure_dns.nix | 80 --------------- 5 files changed, 5 insertions(+), 309 deletions(-) delete mode 100644 nix/configurations/iron/nixos/connectivity/networks.nix delete mode 100644 nix/configurations/iron/nixos/connectivity/universite_de_rennes.pem delete mode 100644 nix/configurations/iron/nixos/secure_dns.nix diff --git a/nix/configurations/iron.nix b/nix/configurations/iron.nix index a1e8e97e..72ae0f54 100644 --- a/nix/configurations/iron.nix +++ b/nix/configurations/iron.nix @@ -73,7 +73,6 @@ in ./iron/nixos/battery.nix ./iron/nixos/connectivity.nix - ./iron/nixos/secure_dns.nix ./iron/nixos/input.nix ./iron/nixos/misc.nix diff --git a/nix/configurations/iron/nixos/connectivity.nix b/nix/configurations/iron/nixos/connectivity.nix index 403cab13..d8605aed 100644 --- a/nix/configurations/iron/nixos/connectivity.nix +++ b/nix/configurations/iron/nixos/connectivity.nix @@ -26,41 +26,12 @@ userControlled.enable = true; secretsFile = config.age.secrets.wpa_password.path; scanOnLowSignal = false; - networks = let - # wpa_supplicant uses `strchr` to seek to the first `=`, so the only forbidden character is `=`. - escapePwdKey = lib.replaceStrings ["="] ["_"]; - - fromList = ns: let - go = networkArgs @ { - ssid, - # Custom fields wrapping nixpkgs module options - hasPassword ? false, - scanOnLowSignal ? false, - randomizeMac ? false, - ... - }: { - ${ssid} = lib.mkMerge [ - (builtins.removeAttrs networkArgs ["ssid" "hasPassword" "scanOnLowSignal" "randomizeMac"]) - (lib.optionalAttrs hasPassword { - pskRaw = "ext:${escapePwdKey ssid}"; - }) - (lib.optionalAttrs scanOnLowSignal { - extraConfig = '' - bgscan="simple:30:-70:3600" - ''; - }) - (lib.optionalAttrs randomizeMac { - extraConfig = '' - mac_addr=1 - ''; - }) - ]; - }; + networks = + let + fromList = import ../../../networks/wpa_supplicant-compat.nix; + networks = import ../../../networks/list.nix; in - lib.mkMerge (map go ns); - in - # TODO: move this upward like identities - fromList (import ./connectivity/networks.nix); + fromList networks; }; }; diff --git a/nix/configurations/iron/nixos/connectivity/networks.nix b/nix/configurations/iron/nixos/connectivity/networks.nix deleted file mode 100644 index e603f0e2..00000000 --- a/nix/configurations/iron/nixos/connectivity/networks.nix +++ /dev/null @@ -1,97 +0,0 @@ -let - privatePriority = 10; - limitedPriority = -10; -in [ - { - ssid = "~"; - priority = privatePriority; - hasPassword = true; - } - { - ssid = "Pei’s Wifi"; - priority = privatePriority; - hasPassword = true; - } - { - ssid = "girlypop-net"; - priority = privatePriority; - hasPassword = true; - } - - { - ssid = "annapurna"; - priority = privatePriority; - hasPassword = true; - scanOnLowSignal = true; - } - { - ssid = "5526-1"; # TODO: set bssid preference ? - priority = privatePriority; - hasPassword = true; - scanOnLowSignal = true; - } - - { - ssid = "eduroam"; - priority = privatePriority; - scanOnLowSignal = true; - - authProtocols = ["WPA-EAP"]; - auth = '' - pairwise=CCMP - group=CCMP TKIP - eap=PEAP - ca_cert="${./universite_de_rennes.pem}" - identity="ychiang@etudiant.univ-rennes.fr" - altsubject_match="DNS:radius.univ-rennes1.fr;DNS:radius1.univ-rennes1.fr;DNS:radius2.univ-rennes1.fr;DNS:vmradius-psf1.univ-rennes1.fr;DNS:vmradius-psf2.univ-rennes1.fr" - phase2="auth=MSCHAPV2" - password=ext:EDUROAM - anonymous_identity="anonymous@univ-rennes.fr" - ''; - } - - { - ssid = "A-WAY"; - priority = privatePriority; - hasPassword = true; - randomizeMac = true; - } - { - ssid = "CAT.jpgcafe"; - priority = privatePriority; - hasPassword = true; - randomizeMac = true; - } - { - ssid = "LOUISA"; # 區公所 - priority = privatePriority; - hasPassword = true; - randomizeMac = true; - } - { - ssid = "LouisaCoffee"; # 七張 - priority = privatePriority; - hasPassword = true; - randomizeMac = true; - } - { - ssid = "MetroTaipei x Louisa"; # 大安 - priority = privatePriority; - hasPassword = true; - randomizeMac = true; - } - - {ssid = "_SNCF_WIFI_INOUI";} - {ssid = "_WIFI_LYRIA";} - {ssid = "EurostarTrainsWiFi";} - {ssid = "SBB-FREE";} - {ssid = "AOT Airport Free Wi-Fi by NT";} - {ssid = "NewTaipei";} - {ssid = "Fami-WiFi";} - - { - ssid = "iPhone de Léana 江"; - priority = limitedPriority; - hasPassword = true; - } -] diff --git a/nix/configurations/iron/nixos/connectivity/universite_de_rennes.pem b/nix/configurations/iron/nixos/connectivity/universite_de_rennes.pem deleted file mode 100644 index ac4d2e1f..00000000 --- a/nix/configurations/iron/nixos/connectivity/universite_de_rennes.pem +++ /dev/null @@ -1,97 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIEMjCCAxqgAwIBAgIBATANBgkqhkiG9w0BAQUFADB7MQswCQYDVQQGEwJHQjEb -MBkGA1UECAwSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRow -GAYDVQQKDBFDb21vZG8gQ0EgTGltaXRlZDEhMB8GA1UEAwwYQUFBIENlcnRpZmlj -YXRlIFNlcnZpY2VzMB4XDTA0MDEwMTAwMDAwMFoXDTI4MTIzMTIzNTk1OVowezEL -MAkGA1UEBhMCR0IxGzAZBgNVBAgMEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UE -BwwHU2FsZm9yZDEaMBgGA1UECgwRQ29tb2RvIENBIExpbWl0ZWQxITAfBgNVBAMM -GEFBQSBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczCCASIwDQYJKoZIhvcNAQEBBQADggEP -ADCCAQoCggEBAL5AnfRu4ep2hxxNRUSOvkbIgwadwSr+GB+O5AL686tdUIoWMQua -BtDFcCLNSS1UY8y2bmhGC1Pqy0wkwLxyTurxFa70VJoSCsN6sjNg4tqJVfMiWPPe -3M/vg4aijJRPn2jymJBGhCfHdr/jzDUsi14HZGWCwEiwqJH5YZ92IFCokcdmtet4 -YgNW8IoaE+oxox6gmf049vYnMlhvB/VruPsUK6+3qszWY19zjNoFmag4qMsXeDZR -rOme9Hg6jc8P2ULimAyrL58OAd7vn5lJ8S3frHRNG5i1R8XlKdH5kBjHYpy+g8cm -ez6KJcfA3Z3mNWgQIJ2P2N7Sw4ScDV7oL8kCAwEAAaOBwDCBvTAdBgNVHQ4EFgQU -oBEKIz6W8Qfs4q8p74Klf9AwpLQwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQF -MAMBAf8wewYDVR0fBHQwcjA4oDagNIYyaHR0cDovL2NybC5jb21vZG9jYS5jb20v -QUFBQ2VydGlmaWNhdGVTZXJ2aWNlcy5jcmwwNqA0oDKGMGh0dHA6Ly9jcmwuY29t -b2RvLm5ldC9BQUFDZXJ0aWZpY2F0ZVNlcnZpY2VzLmNybDANBgkqhkiG9w0BAQUF -AAOCAQEACFb8AvCb6P+k+tZ7xkSAzk/ExfYAWMymtrwUSWgEdujm7l3sAg9g1o1Q -GE8mTgHj5rCl7r+8dFRBv/38ErjHT1r0iWAFf2C3BUrz9vHCv8S5dIa2LX1rzNLz -Rt0vxuBqw8M0Ayx9lt1awg6nCpnBBYurDC/zXDrPbDdVCYfeU0BsWO/8tqtlbgT2 -G9w84FoVxp7Z8VlIMCFlA2zs6SFz7JsDoeA3raAVGI/6ugLOpyypEBMs1OUIJqsi -l2D4kF501KKaU73yqWjgom7C12yxow+ev+to51byrvLjKzg6CYG1a4XXvi3tPxq3 -smPi9WIsgtRqAEFQ8TmDn5XpNpaYbg== ------END CERTIFICATE----- ------BEGIN CERTIFICATE----- -MIIFgTCCBGmgAwIBAgIQOXJEOvkit1HX02wQ3TE1lTANBgkqhkiG9w0BAQwFADB7 -MQswCQYDVQQGEwJHQjEbMBkGA1UECAwSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYD -VQQHDAdTYWxmb3JkMRowGAYDVQQKDBFDb21vZG8gQ0EgTGltaXRlZDEhMB8GA1UE -AwwYQUFBIENlcnRpZmljYXRlIFNlcnZpY2VzMB4XDTE5MDMxMjAwMDAwMFoXDTI4 -MTIzMTIzNTk1OVowgYgxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpOZXcgSmVyc2V5 -MRQwEgYDVQQHEwtKZXJzZXkgQ2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBO -ZXR3b3JrMS4wLAYDVQQDEyVVU0VSVHJ1c3QgUlNBIENlcnRpZmljYXRpb24gQXV0 -aG9yaXR5MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAgBJlFzYOw9sI -s9CsVw127c0n00ytUINh4qogTQktZAnczomfzD2p7PbPwdzx07HWezcoEStH2jnG -vDoZtF+mvX2do2NCtnbyqTsrkfjib9DsFiCQCT7i6HTJGLSR1GJk23+jBvGIGGqQ -Ijy8/hPwhxR79uQfjtTkUcYRZ0YIUcuGFFQ/vDP+fmyc/xadGL1RjjWmp2bIcmfb -IWax1Jt4A8BQOujM8Ny8nkz+rwWWNR9XWrf/zvk9tyy29lTdyOcSOk2uTIq3XJq0 -tyA9yn8iNK5+O2hmAUTnAU5GU5szYPeUvlM3kHND8zLDU+/bqv50TmnHa4xgk97E -xwzf4TKuzJM7UXiVZ4vuPVb+DNBpDxsP8yUmazNt925H+nND5X4OpWaxKXwyhGNV -icQNwZNUMBkTrNN9N6frXTpsNVzbQdcS2qlJC9/YgIoJk2KOtWbPJYjNhLixP6Q5 -D9kCnusSTJV882sFqV4Wg8y4Z+LoE53MW4LTTLPtW//e5XOsIzstAL81VXQJSdhJ -WBp/kjbmUZIO8yZ9HE0XvMnsQybQv0FfQKlERPSZ51eHnlAfV1SoPv10Yy+xUGUJ -5lhCLkMaTLTwJUdZ+gQek9QmRkpQgbLevni3/GcV4clXhB4PY9bpYrrWX1Uu6lzG -KAgEJTm4Diup8kyXHAc/DVL17e8vgg8CAwEAAaOB8jCB7zAfBgNVHSMEGDAWgBSg -EQojPpbxB+zirynvgqV/0DCktDAdBgNVHQ4EFgQUU3m/WqorSs9UgOHYm8Cd8rID -ZsswDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQFMAMBAf8wEQYDVR0gBAowCDAG -BgRVHSAAMEMGA1UdHwQ8MDowOKA2oDSGMmh0dHA6Ly9jcmwuY29tb2RvY2EuY29t -L0FBQUNlcnRpZmljYXRlU2VydmljZXMuY3JsMDQGCCsGAQUFBwEBBCgwJjAkBggr -BgEFBQcwAYYYaHR0cDovL29jc3AuY29tb2RvY2EuY29tMA0GCSqGSIb3DQEBDAUA -A4IBAQAYh1HcdCE9nIrgJ7cz0C7M7PDmy14R3iJvm3WOnnL+5Nb+qh+cli3vA0p+ -rvSNb3I8QzvAP+u431yqqcau8vzY7qN7Q/aGNnwU4M309z/+3ri0ivCRlv79Q2R+ -/czSAaF9ffgZGclCKxO/WIu6pKJmBHaIkU4MiRTOok3JMrO66BQavHHxW/BBC5gA -CiIDEOUMsfnNkjcZ7Tvx5Dq2+UUTJnWvu6rvP3t3O9LEApE9GQDTF1w52z97GA1F -zZOFli9d31kWTz9RvdVFGD/tSo7oBmF0Ixa1DVBzJ0RHfxBdiSprhTEUxOipakyA -vGp4z7h/jnZymQyd/teRCBaho1+V ------END CERTIFICATE----- ------BEGIN CERTIFICATE----- -MIIG5TCCBM2gAwIBAgIRANpDvROb0li7TdYcrMTz2+AwDQYJKoZIhvcNAQEMBQAw -gYgxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpOZXcgSmVyc2V5MRQwEgYDVQQHEwtK -ZXJzZXkgQ2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMS4wLAYD -VQQDEyVVU0VSVHJ1c3QgUlNBIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTIw -MDIxODAwMDAwMFoXDTMzMDUwMTIzNTk1OVowRDELMAkGA1UEBhMCTkwxGTAXBgNV -BAoTEEdFQU5UIFZlcmVuaWdpbmcxGjAYBgNVBAMTEUdFQU5UIE9WIFJTQSBDQSA0 -MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEApYhi1aEiPsg9ZKRMAw9Q -r8Mthsr6R20VSfFeh7TgwtLQi6RSRLOh4or4EMG/1th8lijv7xnBMVZkTysFiPmT -PiLOfvz+QwO1NwjvgY+Jrs7fSoVA/TQkXzcxu4Tl3WHi+qJmKLJVu/JOuHud6mOp -LWkIbhODSzOxANJ24IGPx9h4OXDyy6/342eE6UPXCtJ8AzeumTG6Dfv5KVx24lCF -TGUzHUB+j+g0lSKg/Sf1OzgCajJV9enmZ/84ydh48wPp6vbWf1H0O3Rd3LhpMSVn -TqFTLKZSbQeLcx/l9DOKZfBCC9ghWxsgTqW9gQ7v3T3aIfSaVC9rnwVxO0VjmDdP -FNbdoxnh0zYwf45nV1QQgpRwZJ93yWedhp4ch1a6Ajwqs+wv4mZzmBSjovtV0mKw -d+CQbSToalEUP4QeJq4Udz5WNmNMI4OYP6cgrnlJ50aa0DZPlJqrKQPGL69KQQz1 -2WgxvhCuVU70y6ZWAPopBa1ykbsttpLxADZre5cH573lIuLHdjx7NjpYIXRx2+QJ -URnX2qx37eZIxYXz8ggM+wXH6RDbU3V2o5DP67hXPHSAbA+p0orjAocpk2osxHKo -NSE3LCjNx8WVdxnXvuQ28tKdaK69knfm3bB7xpdfsNNTPH9ElcjscWZxpeZ5Iij8 -lyrCG1z0vSWtSBsgSnUyG/sCAwEAAaOCAYswggGHMB8GA1UdIwQYMBaAFFN5v1qq -K0rPVIDh2JvAnfKyA2bLMB0GA1UdDgQWBBRvHTVJEGwy+lmgnryK6B+VvnF6DDAO -BgNVHQ8BAf8EBAMCAYYwEgYDVR0TAQH/BAgwBgEB/wIBADAdBgNVHSUEFjAUBggr -BgEFBQcDAQYIKwYBBQUHAwIwOAYDVR0gBDEwLzAtBgRVHSAAMCUwIwYIKwYBBQUH -AgEWF2h0dHBzOi8vc2VjdGlnby5jb20vQ1BTMFAGA1UdHwRJMEcwRaBDoEGGP2h0 -dHA6Ly9jcmwudXNlcnRydXN0LmNvbS9VU0VSVHJ1c3RSU0FDZXJ0aWZpY2F0aW9u -QXV0aG9yaXR5LmNybDB2BggrBgEFBQcBAQRqMGgwPwYIKwYBBQUHMAKGM2h0dHA6 -Ly9jcnQudXNlcnRydXN0LmNvbS9VU0VSVHJ1c3RSU0FBZGRUcnVzdENBLmNydDAl -BggrBgEFBQcwAYYZaHR0cDovL29jc3AudXNlcnRydXN0LmNvbTANBgkqhkiG9w0B -AQwFAAOCAgEAUtlC3e0xj/1BMfPhdQhUXeLjb0xp8UE28kzWE5xDzGKbfGgnrT2R -lw5gLIx+/cNVrad//+MrpTppMlxq59AsXYZW3xRasrvkjGfNR3vt/1RAl8iI31lG -hIg6dfIX5N4esLkrQeN8HiyHKH6khm4966IkVVtnxz5CgUPqEYn4eQ+4eeESrWBh -AqXaiv7HRvpsdwLYekAhnrlGpioZ/CJIT2PTTxf+GHM6cuUnNqdUzfvrQgA8kt1/ -ASXx2od/M+c8nlJqrGz29lrJveJOSEMX0c/ts02WhsfMhkYa6XujUZLmvR1Eq08r -48/EZ4l+t5L4wt0DV8VaPbsEBF1EOFpz/YS2H6mSwcFaNJbnYqqJHIvm3PLJHkFm -EoLXRVrQXdCT+3wgBfgU6heCV5CYBz/YkrdWES7tiiT8sVUDqXmVlTsbiRNiyLs2 -bmEWWFUl76jViIJog5fongEqN3jLIGTG/mXrJT1UyymIcobnIGrbwwRVz/mpFQo0 -vBYIi1k2ThVh0Dx88BbF9YiP84dd8Fkn5wbE6FxXYJ287qfRTgmhePecPc73Yrzt -apdRcsKVGkOpaTIJP/l+lAHRLZxk/dUtyN95G++bOSQqnOCpVPabUGl2E/OEyFrp -Ipwgu2L/WJclvd6g+ZA/iWkLSMcpnFb+uX6QBqvD6+RNxul1FaB5iHY= ------END CERTIFICATE----- - diff --git a/nix/configurations/iron/nixos/secure_dns.nix b/nix/configurations/iron/nixos/secure_dns.nix deleted file mode 100644 index eebd747a..00000000 --- a/nix/configurations/iron/nixos/secure_dns.nix +++ /dev/null @@ -1,80 +0,0 @@ -# https://nixos.wiki/wiki/Encrypted_DNS -{ - lib, - pkgs, - ... -}: { - networking = { - nameservers = ["127.0.0.1" "::1"]; - dhcpcd.extraConfig = "nohook resolv.conf"; - # networkmanager.dns = "none"; - }; - - services.resolved.enable = false; - - services.dnscrypt-proxy2 = { - enable = true; - # Settings reference: - # https://github.com/DNSCrypt/dnscrypt-proxy/blob/master/dnscrypt-proxy/example-dnscrypt-proxy.toml - settings = { - listen_addresses = ["127.0.0.1:53"]; - ipv4_servers = true; - - require_dnssec = true; - require_nolog = true; - require_nofilter = true; - - lb_strategy = "p2"; - lb_estimator = true; - - # Blocklists are made of one pattern per line. - # https://github.com/DNSCrypt/dnscrypt-proxy/blob/fa59f990431a49b6485f63f96601bc7e64017bf8/dnscrypt-proxy/example-dnscrypt-proxy.toml#L583C4-L583C75 - blocked_names.blocked_names_file = let - # Prevent building up reliance on chatbots - # Gotta preserve that thinking ability of my smoof bwain - ai_list = let - src = pkgs.fetchFromGitHub { - owner = "laylavish"; - repo = "uBlockOrigin-HUGE-AI-Blocklist"; - rev = "9bb188e2701138e03f73bacebd6b19b181ca0012"; - hash = "sha256-p3wfR28DH6V8BHn9DT10d09Yq3mdbBecWwlR1CdDYUA="; - }; - in - lib.pipe (builtins.readFile "${src}/noai_hosts.txt") [ - (lib.replaceStrings ["\r\n"] ["\n"]) # convert to unix ending just in case - (lib.splitString "\n") - (builtins.filter (x: ! (x == "" || lib.hasPrefix "#" x))) - (builtins.map (x: builtins.elemAt (lib.splitString " " x) 1)) # remove 0.0.0.0 - ]; - - hategroup_list = let - src = pkgs.fetchFromGitHub { - owner = "chigh"; - repo = "hategroup-dnsbl"; - rev = "cc19c050997d5f54014bb20c764b131e003dfb17"; - hash = "sha256-SZBrjIBUw687MdrbOV7WrP5IhAAtKvPL2GqdcICHNvQ="; - }; - in - lib.pipe (builtins.readFile "${src}/blocklist.txt") [ - (lib.replaceStrings ["\r\n"] ["\n"]) # convert to unix ending just in case - (lib.splitString "\n") - (builtins.filter (x: ! (x == "" || lib.hasPrefix "#" x))) - ]; - - combined_lists = ai_list ++ hategroup_list; - in - pkgs.writeText "dnsblocklist" (builtins.concatStringsSep "\n" combined_lists); - - # Add this to test if dnscrypt-proxy is actually used to resolve DNS requests - # query_log.file = "/var/log/dnscrypt-proxy/query.log"; - sources.public-resolvers = { - urls = [ - "https://raw.githubusercontent.com/DNSCrypt/dnscrypt-resolvers/master/v3/public-resolvers.md" - "https://download.dnscrypt.info/resolvers-list/v3/public-resolvers.md" - ]; - cache_file = "/var/cache/dnscrypt-proxy/public-resolvers.md"; - minisign_key = "RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3"; - }; - }; - }; -} From 6783ce6f7207ee5b3670d71ff99b9b4fc5c49eec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Mon, 8 Dec 2025 23:54:56 +0800 Subject: [PATCH 176/178] iron: format configuration --- nix/configurations/iron.nix | 261 +++++++++--------- nix/configurations/iron/home/programs.nix | 15 +- .../iron/nixos/connectivity.nix | 12 +- nix/configurations/iron/nixos/display.nix | 2 +- nix/configurations/iron/nixos/fs.nix | 3 +- .../iron/nixos/hardware-configuration.nix | 21 +- nix/configurations/iron/nixos/locale.nix | 23 +- nix/configurations/iron/nixos/programs.nix | 3 +- 8 files changed, 180 insertions(+), 160 deletions(-) diff --git a/nix/configurations/iron.nix b/nix/configurations/iron.nix index 72ae0f54..6be03297 100644 --- a/nix/configurations/iron.nix +++ b/nix/configurations/iron.nix @@ -5,158 +5,159 @@ let hostname = "iron"; username = "leana"; in - { - config, - lib, - pkgs, - ... - }: let - inherit (lib.modules) mkAliasOptionModule; - in { - imports = [ - # - # Shorthands - # - (mkAliasOptionModule ["me"] ["users" "users" username]) - (mkAliasOptionModule ["hm"] ["home-manager" "users" username]) +{ + config, + lib, + pkgs, + ... +}: +let + inherit (lib.modules) mkAliasOptionModule; +in +{ + imports = [ + # + # Shorthands + # + (mkAliasOptionModule [ "me" ] [ "users" "users" username ]) + (mkAliasOptionModule [ "hm" ] [ "home-manager" "users" username ]) - # - # hostname - # - {_module.args = {inherit hostname;};} + # + # hostname + # + { _module.args = { inherit hostname; }; } - # - # nixpkgs - # - { - # affect the generated nix.conf, doesn't need to be turned off during nixos-install - nix = { - distributedBuilds = true; - settings.builders-use-substitutes = true; - }; + # + # nixpkgs + # + { + # affect the generated nix.conf, doesn't need to be turned off during nixos-install + nix = { + distributedBuilds = true; + settings.builders-use-substitutes = true; + }; - nixpkgs = { - overlays = - map import - [ - ../overlays/agenix.nix - ../overlays/disko.nix - ../overlays/nur.nix - ../overlays/nix-tree.nix - ../overlays/nil.nix - ../overlays/dix.nix + nixpkgs = { + overlays = + map import [ + ../overlays/agenix.nix + ../overlays/disko.nix + ../overlays/nur.nix + ../overlays/nix-tree.nix + ../overlays/nil.nix + ../overlays/dix.nix - ../packages/overlay.nix - ] - # use lix everywhere and wrap it with nom - ++ [ - (import (sources.lix-module + "/overlay.nix") {inherit (sources) lix;}) - (import ../overlays/nix-monitored.nix) - ]; + ../packages/overlay.nix + ] + # use lix everywhere and wrap it with nom + ++ [ + (import (sources.lix-module + "/overlay.nix") { inherit (sources) lix; }) + (import ../overlays/nix-monitored.nix) + ]; - # Set NIX_PATH and flake registry at the same time - # https://github.com/NixOS/nixpkgs/pull/254405 - flake.source = sources.nixpkgs; - }; + # Set NIX_PATH and flake registry at the same time + # https://github.com/NixOS/nixpkgs/pull/254405 + flake.source = sources.nixpkgs; + }; - nix.package = pkgs.nix-monitored; + nix.package = pkgs.nix-monitored; - system.nixos.version = lib.substring 0 8 sources.nixpkgs.revision; - } + system.nixos.version = lib.substring 0 8 sources.nixpkgs.revision; + } - # - # NixOS modules - # - ./iron/nixos/hardware-configuration.nix # generated - ./iron/nixos/fs.nix + # + # NixOS modules + # + ./iron/nixos/hardware-configuration.nix # generated + ./iron/nixos/fs.nix - ./iron/nixos/battery.nix + ./iron/nixos/battery.nix - ./iron/nixos/connectivity.nix - ./iron/nixos/input.nix + ./iron/nixos/connectivity.nix + ./iron/nixos/input.nix - ./iron/nixos/misc.nix + ./iron/nixos/misc.nix - ./iron/nixos/display.nix + ./iron/nixos/display.nix - ./iron/nixos/locale.nix - ./iron/nixos/programs.nix + ./iron/nixos/locale.nix + ./iron/nixos/programs.nix - ../nixosModules/common/disable-command-not-found.nix - ../nixosModules/common/network.nix - ../nixosModules/common/sudo-conf.nix - ../nixosModules/common/system-nixconf.nix + ../nixosModules/common/disable-command-not-found.nix + ../nixosModules/common/network.nix + ../nixosModules/common/sudo-conf.nix + ../nixosModules/common/system-nixconf.nix - ../nixosModules/extra/leana.nix + ../nixosModules/extra/leana.nix - # - # Extern modules - # - (sources.disko + "/module.nix") - ../disko/iron/btrfs.nix + # + # Extern modules + # + (sources.disko + "/module.nix") + ../disko/iron/btrfs.nix - (sources.agenix + "/modules/age.nix") + (sources.agenix + "/modules/age.nix") - ../nixosModules/extra/macbook-pro-radeon.nix - ../nixosModules/extra/macbook-swap-cmd-opt.nix - ../nixosModules/extra/macbook-swap-fn-ctrl.nix - ../nixosModules/extra/macbook-broacom-b43.nix + ../nixosModules/extra/macbook-pro-radeon.nix + ../nixosModules/extra/macbook-swap-cmd-opt.nix + ../nixosModules/extra/macbook-swap-fn-ctrl.nix + ../nixosModules/extra/macbook-broacom-b43.nix - # - # home-manager - # - (sources.home-manager + "/nixos") - { - home-manager = { - useGlobalPkgs = true; - useUserPackages = true; - sharedModules = [{home.stateVersion = lib.mkDefault config.system.stateVersion;}]; - }; + # + # home-manager + # + (sources.home-manager + "/nixos") + { + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + sharedModules = [ { home.stateVersion = lib.mkDefault config.system.stateVersion; } ]; + }; - hm.imports = [ - # - # hostname - # - {_module.args = {inherit hostname;};} + hm.imports = [ + # + # hostname + # + { _module.args = { inherit hostname; }; } - # - # home modules - # - ./iron/home/programs.nix + # + # home modules + # + ./iron/home/programs.nix - ../homeModules/common/btop - ../homeModules/common/fish - ../homeModules/common/starship - ../homeModules/common/tmux - ../homeModules/common/vim - ../homeModules/common/direnv.nix - ../homeModules/common/fzf.nix - ../homeModules/common/git.nix - ../homeModules/common/gpg.nix - ../homeModules/common/leana.nix - ../homeModules/common/locale.nix - ../homeModules/common/lazygit.nix - ../homeModules/common/packages.nix - ../homeModules/common/password-store.nix - ../homeModules/common/tealdeer.nix - ../homeModules/common/user-nixconf.nix + ../homeModules/common/btop + ../homeModules/common/fish + ../homeModules/common/starship + ../homeModules/common/tmux + ../homeModules/common/vim + ../homeModules/common/direnv.nix + ../homeModules/common/fzf.nix + ../homeModules/common/git.nix + ../homeModules/common/gpg.nix + ../homeModules/common/leana.nix + ../homeModules/common/locale.nix + ../homeModules/common/lazygit.nix + ../homeModules/common/packages.nix + ../homeModules/common/password-store.nix + ../homeModules/common/tealdeer.nix + ../homeModules/common/user-nixconf.nix - ../homeModules/extra/tmux-fish-integration.nix + ../homeModules/extra/tmux-fish-integration.nix - # - # Extern modules - # - (sources.agenix + "/modules/age-home.nix") - ]; - } + # + # Extern modules + # + (sources.agenix + "/modules/age-home.nix") + ]; + } - # - # Secrets - # - { - age.secrets = { - wpa_password.file = "${../secrets/wpa_password.age}"; - }; - } - ]; - } + # + # Secrets + # + { + age.secrets = { + wpa_password.file = "${../secrets/wpa_password.age}"; + }; + } + ]; +} diff --git a/nix/configurations/iron/home/programs.nix b/nix/configurations/iron/home/programs.nix index 925fb616..8be454fa 100644 --- a/nix/configurations/iron/home/programs.nix +++ b/nix/configurations/iron/home/programs.nix @@ -3,16 +3,19 @@ lib, config, ... -}: { +}: +{ home.sessionPath = [ "${config.home.homeDirectory}/.local/bin" ]; - home.sessionVariables = let - fishCfg = config.programs.fish; - in { - "SHELL" = lib.mkIf fishCfg.enable (lib.getExe fishCfg.package); - }; + home.sessionVariables = + let + fishCfg = config.programs.fish; + in + { + "SHELL" = lib.mkIf fishCfg.enable (lib.getExe fishCfg.package); + }; home.packages = [ pkgs.nmap diff --git a/nix/configurations/iron/nixos/connectivity.nix b/nix/configurations/iron/nixos/connectivity.nix index d8605aed..019fd2d4 100644 --- a/nix/configurations/iron/nixos/connectivity.nix +++ b/nix/configurations/iron/nixos/connectivity.nix @@ -2,11 +2,13 @@ config, lib, ... -}: { - users.users.root.openssh.authorizedKeys.keys = let - # TODO: put iron keys in identities - ids = import ../../../identities.nix; - in +}: +{ + users.users.root.openssh.authorizedKeys.keys = + let + # TODO: put iron keys in identities + ids = import ../../../identities.nix; + in builtins.concatMap builtins.attrValues (builtins.attrValues ids); networking = { diff --git a/nix/configurations/iron/nixos/display.nix b/nix/configurations/iron/nixos/display.nix index c54cd9d9..9328481c 100644 --- a/nix/configurations/iron/nixos/display.nix +++ b/nix/configurations/iron/nixos/display.nix @@ -1,4 +1,4 @@ { - me.extraGroups = ["video"]; + me.extraGroups = [ "video" ]; programs.light.enable = true; } diff --git a/nix/configurations/iron/nixos/fs.nix b/nix/configurations/iron/nixos/fs.nix index e904ac30..9a636a29 100644 --- a/nix/configurations/iron/nixos/fs.nix +++ b/nix/configurations/iron/nixos/fs.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ services.btrfs.autoScrub = { enable = true; fileSystems = [ diff --git a/nix/configurations/iron/nixos/hardware-configuration.nix b/nix/configurations/iron/nixos/hardware-configuration.nix index 98e5c89c..92a104d9 100644 --- a/nix/configurations/iron/nixos/hardware-configuration.nix +++ b/nix/configurations/iron/nixos/hardware-configuration.nix @@ -7,15 +7,26 @@ pkgs, modulesPath, ... -}: { +}: +{ imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = ["uhci_hcd" "ehci_pci" "ahci" "firewire_ohci" "usbhid" "uas" "sd_mod" "sr_mod" "sdhci_pci"]; - boot.initrd.kernelModules = ["dm-snapshot"]; - boot.kernelModules = ["kvm-intel"]; - boot.extraModulePackages = []; + boot.initrd.availableKernelModules = [ + "uhci_hcd" + "ehci_pci" + "ahci" + "firewire_ohci" + "usbhid" + "uas" + "sd_mod" + "sr_mod" + "sdhci_pci" + ]; + boot.initrd.kernelModules = [ "dm-snapshot" ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; # 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 diff --git a/nix/configurations/iron/nixos/locale.nix b/nix/configurations/iron/nixos/locale.nix index de1bd43f..666053d8 100644 --- a/nix/configurations/iron/nixos/locale.nix +++ b/nix/configurations/iron/nixos/locale.nix @@ -1,4 +1,5 @@ -{lib, ...}: { +{ lib, ... }: +{ # https://en.wikipedia.org/wiki/List_of_tz_database_time_zones # `timedatectl list-timezones` time.timeZone = "Asia/Taipei"; @@ -28,16 +29,16 @@ let genLocale = locale: lib.flip lib.genAttrs (_: locale); in - # - xscreensaver freaks out on the time display - # - evolution add event becomes hard to use - # https://gitlab.gnome.org/GNOME/evolution/-/issues/3120 - genLocale "fr_FR.UTF-8" [ - "LC_TIME" - ] - // genLocale "zh_TW.UTF-8" [ - "LC_MONETARY" - "LC_ADDRESS" - ]; + # - xscreensaver freaks out on the time display + # - evolution add event becomes hard to use + # https://gitlab.gnome.org/GNOME/evolution/-/issues/3120 + genLocale "fr_FR.UTF-8" [ + "LC_TIME" + ] + // genLocale "zh_TW.UTF-8" [ + "LC_MONETARY" + "LC_ADDRESS" + ]; }; # Wireless Regulatory Domain, uses ISO / IEC 3166 country code diff --git a/nix/configurations/iron/nixos/programs.nix b/nix/configurations/iron/nixos/programs.nix index 0e605d66..bc9f95ae 100644 --- a/nix/configurations/iron/nixos/programs.nix +++ b/nix/configurations/iron/nixos/programs.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ environment.systemPackages = [ pkgs.man-pages pkgs.man-pages-posix From 9627e74f1d73b7876aee8c5b178497fa3216fde1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Mon, 8 Dec 2025 23:57:03 +0800 Subject: [PATCH 177/178] iron: update old entrypoint configuration --- nix/configurations/iron.nix | 41 ++++++++++--------- .../iron/nixos/connectivity.nix | 7 +--- 2 files changed, 23 insertions(+), 25 deletions(-) diff --git a/nix/configurations/iron.nix b/nix/configurations/iron.nix index 6be03297..6745f3a5 100644 --- a/nix/configurations/iron.nix +++ b/nix/configurations/iron.nix @@ -35,34 +35,37 @@ in nix = { distributedBuilds = true; settings.builders-use-substitutes = true; + + # don't use `nixpkgs.flake.source`, it uses flake so it double fetches + nixPath = [ "nixpkgs=${sources.nixpkgs}" ]; }; nixpkgs = { - overlays = - map import [ - ../overlays/agenix.nix - ../overlays/disko.nix - ../overlays/nur.nix - ../overlays/nix-tree.nix - ../overlays/nil.nix - ../overlays/dix.nix + overlays = map import [ + ../overlays/agenix.nix + ../overlays/disko.nix + ../overlays/nur.nix + ../overlays/nix-tree.nix + ../overlays/nil.nix + ../overlays/dix.nix - ../packages/overlay.nix - ] + ../packages/overlay.nix # use lix everywhere and wrap it with nom - ++ [ - (import (sources.lix-module + "/overlay.nix") { inherit (sources) lix; }) - (import ../overlays/nix-monitored.nix) - ]; - - # Set NIX_PATH and flake registry at the same time - # https://github.com/NixOS/nixpkgs/pull/254405 - flake.source = sources.nixpkgs; + ../overlays/lix.nix + ../overlays/nix-monitored.nix + ]; }; nix.package = pkgs.nix-monitored; - system.nixos.version = lib.substring 0 8 sources.nixpkgs.revision; + system.nixos = + let + rev = lib.substring 0 8 sources.nixpkgs.revision; + in + { + versionSuffix = "-git:${rev}"; + revision = rev; + }; } # diff --git a/nix/configurations/iron/nixos/connectivity.nix b/nix/configurations/iron/nixos/connectivity.nix index 019fd2d4..7cd0abd4 100644 --- a/nix/configurations/iron/nixos/connectivity.nix +++ b/nix/configurations/iron/nixos/connectivity.nix @@ -4,12 +4,7 @@ ... }: { - users.users.root.openssh.authorizedKeys.keys = - let - # TODO: put iron keys in identities - ids = import ../../../identities.nix; - in - builtins.concatMap builtins.attrValues (builtins.attrValues ids); + users.users.root.openssh.authorizedKeys.keys = import ../../../identities.nix; networking = { networkmanager.enable = lib.mkForce false; From a320cba90972dbf2d618a910b7a320b782cc25a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Tue, 9 Dec 2025 00:00:02 +0800 Subject: [PATCH 178/178] iron: update to match 25.11 --- nix/configurations/iron/home/programs.nix | 2 +- nix/configurations/iron/nixos/battery.nix | 12 ++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/nix/configurations/iron/home/programs.nix b/nix/configurations/iron/home/programs.nix index 8be454fa..3368e909 100644 --- a/nix/configurations/iron/home/programs.nix +++ b/nix/configurations/iron/home/programs.nix @@ -32,7 +32,7 @@ pkgs.nix-which # pretty tui tools - pkgs.du-dust + pkgs.dust pkgs.tokei pkgs.hyperfine pkgs.watchexec diff --git a/nix/configurations/iron/nixos/battery.nix b/nix/configurations/iron/nixos/battery.nix index bf6ca78a..54e4a0dd 100644 --- a/nix/configurations/iron/nixos/battery.nix +++ b/nix/configurations/iron/nixos/battery.nix @@ -1,11 +1,7 @@ { - systemd.sleep.extraConfig = '' - HibernateDelaySec=1d - ''; - - services.logind = { - powerKey = "hibernate"; - lidSwitch = "suspend-then-hibernate"; # won't happen there's no battery anyway - lidSwitchDocked = "ignore"; + services.logind.settings = { + # It's a server :sparkles: + Login.HandleLidSwitch = "ignore"; + Login.HandleLidSwitchDocked = "ignore"; }; }