diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs deleted file mode 100644 index fb5a3ba..0000000 --- a/.git-blame-ignore-revs +++ /dev/null @@ -1 +0,0 @@ -ce54be9aac846c7798307d6d6fcee3346c01f601 diff --git a/common/default.nix b/common/default.nix index 1fef46d..a600ff3 100644 --- a/common/default.nix +++ b/common/default.nix @@ -28,6 +28,7 @@ in # configure console console = { + font = "Lat2-Terminus16"; keyMap = "de"; }; @@ -180,7 +181,7 @@ in # Flatpak support services.flatpak.enable = true; - xdg.portal.extraPortals = [ pkgs.kdePackages.xdg-desktop-portal-kde ]; + xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-kde ]; # Define a user account. Don't forget to set a password with `passwd`. users.users.spiollinux = { @@ -268,5 +269,4 @@ in networking.networkmanager.unmanaged = [ "interface-name:ve-*" ]; services.dbus.implementation = "broker"; - system.rebuild.enableNg = true; } diff --git a/common/packages.nix b/common/packages.nix index ec4f22b..9634e2a 100644 --- a/common/packages.nix +++ b/common/packages.nix @@ -40,7 +40,7 @@ exfat iotop cifs-utils - dool + dstat lsof macchanger borgbackup diff --git a/common/pulseaudio.nix b/common/pulseaudio.nix index 7323b57..ed94170 100644 --- a/common/pulseaudio.nix +++ b/common/pulseaudio.nix @@ -1,7 +1,7 @@ { pkgs, ... }: { # Enable sound. - services.pulseaudio = { + hardware.pulseaudio = { enable = true; package = pkgs.pulseaudioFull; # decouple pulseaudio application and sink volumes diff --git a/darwin/configuration.nix b/darwin/configuration.nix index 307836f..fc577ec 100644 --- a/darwin/configuration.nix +++ b/darwin/configuration.nix @@ -4,6 +4,7 @@ imports = [ ../common/nix-settings.nix ]; nix = { enable = true; + package = pkgs.nixVersions.nix_2_25; settings = { trusted-users = [ "os" @@ -20,6 +21,9 @@ }; }; + # Auto upgrade nix package and the daemon service. + services.nix-daemon.enable = true; + # List packages installed in system profile. To search by name, run: # $ nix-env -qaP | grep wget environment.systemPackages = [ pkgs.vim ]; @@ -34,7 +38,6 @@ # system-wide SSH configuration, used by nix-daemon for remote builders # show hidden files - system.primaryUser = "os"; system.defaults.NSGlobalDomain.AppleShowAllFiles = true; # Used for backwards compatibility, please read the changelog before changing. diff --git a/flake.lock b/flake.lock index 6ceab5d..8ee8ebd 100644 --- a/flake.lock +++ b/flake.lock @@ -102,16 +102,16 @@ ] }, "locked": { - "lastModified": 1753592768, - "narHash": "sha256-oV695RvbAE4+R9pcsT9shmp6zE/+IZe6evHWX63f2Qg=", + "lastModified": 1747020534, + "narHash": "sha256-D/6rkiC6w2p+4SwRiVKrWIeYzun8FBg7NlMKMwQMxO0=", "owner": "nix-community", "repo": "home-manager", - "rev": "fc3add429f21450359369af74c2375cb34a2d204", + "rev": "b4bbdc6fde16fc2051fcde232f6e288cd22007ca", "type": "github" }, "original": { "owner": "nix-community", - "ref": "release-25.05", + "ref": "release-24.11", "repo": "home-manager", "type": "github" } @@ -163,27 +163,27 @@ ] }, "locked": { - "lastModified": 1749744770, - "narHash": "sha256-MEM9XXHgBF/Cyv1RES1t6gqAX7/tvayBC1r/KPyK1ls=", + "lastModified": 1743127615, + "narHash": "sha256-+sMGqywrSr50BGMLMeY789mSrzjkoxZiu61eWjYS/8o=", "owner": "LnL7", "repo": "nix-darwin", - "rev": "536f951efb1ccda9b968e3c9dee39fbeb6d3fdeb", + "rev": "fc843893cecc1838a59713ee3e50e9e7edc6207c", "type": "github" }, "original": { "owner": "LnL7", - "ref": "nix-darwin-25.05", + "ref": "nix-darwin-24.11", "repo": "nix-darwin", "type": "github" } }, "nixos-hardware": { "locked": { - "lastModified": 1754564048, - "narHash": "sha256-dz303vGuzWjzOPOaYkS9xSW+B93PSAJxvBd6CambXVA=", + "lastModified": 1747129300, + "narHash": "sha256-L3clA5YGeYCF47ghsI7Tcex+DnaaN/BbQ4dR2wzoiKg=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "26ed7a0d4b8741fe1ef1ee6fa64453ca056ce113", + "rev": "e81fd167b33121269149c57806599045fd33eeed", "type": "github" }, "original": { @@ -195,11 +195,11 @@ }, "nixos-unstable": { "locked": { - "lastModified": 1754725699, - "narHash": "sha256-iAcj9T/Y+3DBy2J0N+yF9XQQQ8IEb5swLFzs23CdP88=", + "lastModified": 1746904237, + "narHash": "sha256-3e+AVBczosP5dCLQmMoMEogM57gmZ2qrVSrmq9aResQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "85dbfc7aaf52ecb755f87e577ddbe6dbbdbc1054", + "rev": "d89fc19e405cb2d55ce7cc114356846a0ee5e956", "type": "github" }, "original": { @@ -243,27 +243,27 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1754937576, - "narHash": "sha256-3sWA5WJybUE16kIMZ3+uxcxKZY/JRR4DFBqLdSLBo7w=", + "lastModified": 1746957726, + "narHash": "sha256-k9ut1LSfHCr0AW82ttEQzXVCqmyWVA5+SHJkS5ID/Jo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ddae11e58c0c345bf66efbddbf2192ed0e58f896", + "rev": "a39ed32a651fdee6842ec930761e31d1f242cb94", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-25.05", + "ref": "nixos-24.11", "repo": "nixpkgs", "type": "github" } }, "nixpkgs_3": { "locked": { - "lastModified": 1754725699, - "narHash": "sha256-iAcj9T/Y+3DBy2J0N+yF9XQQQ8IEb5swLFzs23CdP88=", + "lastModified": 1746904237, + "narHash": "sha256-3e+AVBczosP5dCLQmMoMEogM57gmZ2qrVSrmq9aResQ=", "owner": "nixos", "repo": "nixpkgs", - "rev": "85dbfc7aaf52ecb755f87e577ddbe6dbbdbc1054", + "rev": "d89fc19e405cb2d55ce7cc114356846a0ee5e956", "type": "github" }, "original": { @@ -276,14 +276,15 @@ "nur": { "inputs": { "flake-parts": "flake-parts_2", - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs_3", + "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1755080806, - "narHash": "sha256-P94SMIPWhpSX5tvX4ccFDEC1pm0SsddKNouM49Dz5Oo=", + "lastModified": 1747261242, + "narHash": "sha256-6p8kO62jbk+LUrDrLT23XbClNRyosnlfh/KCbE5fwnQ=", "owner": "nix-community", "repo": "NUR", - "rev": "3a675e8f6015cb8ea14138b0c69722b2a0e09dee", + "rev": "e29c558fa4174da179e2e7f9a41c34466a200fda", "type": "github" }, "original": { @@ -329,7 +330,7 @@ "nixos-unstable": "nixos-unstable", "nixpkgs": "nixpkgs_2", "nur": "nur", - "treefmt-nix": "treefmt-nix", + "treefmt-nix": "treefmt-nix_2", "utils": "utils" } }, @@ -372,15 +373,36 @@ "treefmt-nix": { "inputs": { "nixpkgs": [ + "nur", "nixpkgs" ] }, "locked": { - "lastModified": 1748243702, - "narHash": "sha256-9YzfeN8CB6SzNPyPm2XjRRqSixDopTapaRsnTpXUEY8=", + "lastModified": 1733222881, + "narHash": "sha256-JIPcz1PrpXUCbaccEnrcUS8jjEb/1vJbZz5KkobyFdM=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "1f3f7b784643d488ba4bf315638b2b0a4c5fb007", + "rev": "49717b5af6f80172275d47a418c9719a31a78b53", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, + "treefmt-nix_2": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1746216483, + "narHash": "sha256-4h3s1L/kKqt3gMDcVfN8/4v2jqHrgLIe4qok4ApH5x4=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "29ec5026372e0dec56f890e50dbe4f45930320fd", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index cb177ff..470ae9b 100644 --- a/flake.nix +++ b/flake.nix @@ -2,11 +2,11 @@ description = "NixOS system flake"; inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; nixos-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; nixos-hardware.url = "github:NixOS/nixos-hardware/master"; home-manager = { - url = "github:nix-community/home-manager/release-25.05"; + url = "github:nix-community/home-manager/release-24.11"; inputs.nixpkgs.follows = "nixpkgs"; }; lanzaboote = { @@ -19,7 +19,7 @@ inputs.nixpkgs.follows = "nixpkgs"; }; nix-darwin = { - url = "github:LnL7/nix-darwin/nix-darwin-25.05"; + url = "github:LnL7/nix-darwin/nix-darwin-24.11"; inputs.nixpkgs.follows = "nixpkgs"; }; @@ -53,7 +53,7 @@ (import nixpkgs { inherit system; }).applyPatches { name = "nixpkgs-patched"; src = nixpkgs; - patches = [ ]; + patches = [ ./patches/nixos-nixpkgs-362c2bc76d359b908ad1389ee28c23ee0e862324.patch ]; }; # necessary to make the top-level inputs available to system configuration @@ -166,7 +166,6 @@ # inspired by https://github.com/Mic92/dotfiles/blob/main/home-manager/flake-module.nix # run like: `nix run .#hm -- ` apps.hm = { - meta.description = "Wrapper around home-manager with automatic profile selection"; type = "app"; program = "${pkgs.writeShellScriptBin "hm" '' set -x diff --git a/home/common.nix b/home/common.nix index b8dc67f..9cb8df9 100644 --- a/home/common.nix +++ b/home/common.nix @@ -11,7 +11,6 @@ ./modules/packages.nix ./modules/vscodium.nix ./modules/fonts.nix - ./modules/captive-browser.nix ]; home.homeDirectory = if pkgs.stdenv.isDarwin then "/Users/${config.home.username}" else "/home/${config.home.username}"; @@ -52,7 +51,9 @@ merge.tool = "vimdiff"; # provide `git mergetool -t nixfmt` mergetool.nixfmt = { - cmd = "${lib.getExe pkgs.nixfmt-rfc-style} --mergetool \"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\""; + cmd = "${ + lib.getExe inputs.nixos-unstable.legacyPackages.${system}.nixfmt-rfc-style + } --mergetool \"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\""; trustExitCode = true; }; core.excludesfile = toString ( @@ -104,7 +105,7 @@ enable = true; syntaxHighlighting.enable = true; history.ignoreSpace = true; - initContent = '' + initExtra = '' # Uncomment following line if you want red dots to be displayed while waiting for completion COMPLETION_WAITING_DOTS="true" ### Fix slowness of pastes with zsh-syntax-highlighting.zsh diff --git a/home/desktop.nix b/home/desktop.nix index 7fa7840..212debf 100644 --- a/home/desktop.nix +++ b/home/desktop.nix @@ -33,45 +33,46 @@ contacts = import "${inputs.mysecrets}/contacts.nix" { inherit lib; }; in { - includes = [ - { - condition = "gitdir:~/Seafile/Studium/"; - contents = { - user.name = contacts.personal.name; - user.email = contacts.uni.email; - }; - } - { - condition = "gitdir:~/src/nixpkgs/"; - contents = { - user.name = "Trolli Schmittlauch"; - user.email = contacts.nixOs.email; - }; - } - ] - # set default name for several other common locations - ++ - map - (dir: { - condition = "gitdir:${dir}"; + includes = + [ + { + condition = "gitdir:~/Seafile/Studium/"; contents = { - user = { - inherit (contacts.schmittlauch) email name; - }; + user.name = contacts.personal.name; + user.email = contacts.uni.email; }; - }) - [ - "~/src/" - "~/bin/" - "~/tmp/" - "~/nixconfigs/" - ]; + } + { + condition = "gitdir:~/src/nixpkgs/"; + contents = { + user.name = "Trolli Schmittlauch"; + user.email = contacts.nixOs.email; + }; + } + ] + # set default name for several other common locations + ++ + map + (dir: { + condition = "gitdir:${dir}"; + contents = { + user = { + inherit (contacts.schmittlauch) email name; + }; + }; + }) + [ + "~/src/" + "~/bin/" + "~/tmp/" + "~/nixconfigs/" + ]; }; services.gpg-agent = { enable = true; #enableSshSupport = true; - pinentry.package = pkgs.pinentry-qt; + pinentryPackage = pkgs.pinentry-qt; }; programs.ssh = { diff --git a/home/modules/captive-browser.nix b/home/modules/captive-browser.nix deleted file mode 100644 index f3c8453..0000000 --- a/home/modules/captive-browser.nix +++ /dev/null @@ -1,81 +0,0 @@ -{ - pkgs, - lib, - inputs, - config, - system, - ... -}: - -let - tomlFormat = pkgs.formats.toml { }; - cfg = config.programs.captive-browser; - inherit (pkgs.stdenv.hostPlatform) isDarwin; -in -{ - options.programs.captive-browser = { - enable = lib.mkEnableOption "Enable custom captive-browser in user PATH"; - package = lib.mkPackageOption pkgs "captive-browser" { nullable = true; }; - settings = lib.mkOption { - type = lib.types.submodule { - freeformType = tomlFormat.type; - - options = { - browser = lib.mkOption { - type = lib.types.str; - description = "command to invoke the browser with"; - - # browser is the shell (/bin/sh) command executed once the proxy starts. - # When browser exits, the proxy exits. An extra env var PROXY is available. - # - # Here, we use a separate Chrome instance in Incognito mode, so that - # it can run (and be waited for) alongside the default one, and that - # it maintains no state across runs. To configure this browser open a - # normal window in it, settings will be preserved. - default = '' - ${cfg.browserCommand} \ - --user-data-dir="$HOME/Library/Application Support/Google/Captive" \ - --proxy-server="socks5://$PROXY" \ - --host-resolver-rules="MAP * ~NOTFOUND , EXCLUDE localhost" \ - --no-first-run --new-window --incognito \ - http://example.com - ''; - }; - }; - }; - }; - interface = lib.mkOption { - type = lib.types.str; - description = "WLAN interface to use"; - }; - browserCommand = lib.mkOption { - type = lib.types.str; - default = if isDarwin then "open -n -W -a \"Google Chrome\" --args" else (lib.getExe pkgs.chromium); - }; - }; - config = lib.mkIf cfg.enable { - home.packages = [ cfg.package ]; - - programs.captive-browser.settings = builtins.mapAttrs (_: lib.mkOptionDefault) { - # dhcp-dns is the shell (/bin/sh) command executed to obtain the DHCP - # DNS server address. The first match of an IPv4 regex is used. - # IPv4 only, because let's be real, it's a captive portal. - dhcp-dns = - if isDarwin then - "ipconfig getoption ${cfg.interface} domain_name_server" - else - "${lib.getExe pkgs.dhcpcd} -U ${cfg.interface} | grep domain_name_servers"; - - # socks5-addr is the listen address for the SOCKS5 proxy server. - socks5-addr = "localhost:1666"; - }; - home.file.".config/captive-browser.toml" = lib.mkIf (isDarwin && !config.xdg.enable) { - source = tomlFormat.generate "captive-browser-config" cfg.settings; - }; - - xdg.configFile."captive-browser.toml" = lib.mkIf (!(isDarwin && !config.xdg.enable)) { - source = tomlFormat.generate "captive-browser-config" cfg.settings; - }; - - }; -} diff --git a/home/modules/latex.nix b/home/modules/latex.nix index a9b853c..3f79930 100644 --- a/home/modules/latex.nix +++ b/home/modules/latex.nix @@ -43,6 +43,5 @@ in koma-script ; }) - ] - ++ lib.optionals config.schmittlauch.latex.guiTools latexGuiTools; + ] ++ lib.optionals config.schmittlauch.latex.guiTools latexGuiTools; } diff --git a/home/modules/packages.nix b/home/modules/packages.nix index d9f1a31..79052c5 100644 --- a/home/modules/packages.nix +++ b/home/modules/packages.nix @@ -12,85 +12,83 @@ let unstable = inputs.nixos-unstable.legacyPackages.${system}; nur = inputs.nur.legacyPackages.${system}; - graphicsApps = [ - inkscape - darktable - exiftool - ] - ++ (with gimp3Plugins; [ - #fourier # broken - #lqrPlugin # broken - ]) - ++ lib.optionals pkgs.stdenv.isLinux [ - gimp3 - hugin - #luminanceHDR # FIXME, build failure - xournalpp - ] - ++ lib.optionals pkgs.stdenv.isDarwin [ - gimp - ]; + graphicsApps = + [ + inkscape + darktable + exiftool + gimp + ] + ++ (with gimpPlugins; [ + fourier + lqrPlugin + ]) + ++ lib.optionals pkgs.stdenv.isLinux [ + hugin + luminanceHDR + xournal + ]; - multimediaApps = [ - mpv - yt-dlp - ] - ++ lib.optionals pkgs.stdenv.isDarwin [ vlc-bin ] - ++ lib.optionals pkgs.stdenv.isLinux [ - vlc - amarok - clementine - kdePackages.elisa - musescore - tenacity - soundkonverter - #nur.repos.fooker.studio-link - ]; + multimediaApps = + [ + mpv + yt-dlp + ] + ++ lib.optionals pkgs.stdenv.isLinux [ + vlc + amarok + clementine + elisa + musescore + tenacity + soundkonverter + #nur.repos.fooker.studio-link + ]; - cliApps = [ - coreutils - myVim - htop - tmux - httpie - rsync - ponysay - gti - tree - lsof - mosh - openssh - sshfs-fuse - sshuttle - cryfs - thefuck - gnupg - unar - lzop - p7zip - pwgen - pandoc - pdfgrep - # zig dependency breaks occasionally, stay on C version for now - ncdu_1 - dos2unix - unzip - fswatch - jq - age - lnav - spacer + cliApps = + [ + coreutils + myVim + htop + tmux + httpie + ponysay + gti + tree + lsof + mosh + openssh + sshfs-fuse + sshuttle + cryfs + thefuck + gnupg + unar + lzop + p7zip + pwgen + pandoc + pdfgrep + # zig dependency breaks occasionally, stay on C version for now + ncdu_1 + dos2unix + unzip + fswatch + jq + age + lnav + spacer - nix-output-monitor # putting this here as a plain `nix` alternative - ] - ++ lib.optionals pkgs.stdenv.isLinux [ - xclip - smbnetfs # for FUSE smb mounting - psmisc # for killall - torsocks - agrep - reptyr # re-bind running program to other tty - ]; + nix-output-monitor # putting this here as a plain `nix` alternative + ] + ++ lib.optionals pkgs.stdenv.isLinux [ + xclip + smbnetfs # for FUSE smb mounting + psmisc # for killall + torsocks + agrep + reptyr # re-bind running program to other tty + ]; nixHelpers = [ nixpkgs-review @@ -98,32 +96,33 @@ let nix-top statix ]; - devTools = [ - curl - httpie - gcc - shellcheck - mtr - ripgrep - fd - gitui - pre-commit - scriv + devTools = + [ + curl + httpie + gcc + shellcheck + mtr + ripgrep + fd + gitui + pre-commit + scriv - # Haskell - ghc - cabal2nix - ] - ++ lib.optionals pkgs.stdenv.isLinux [ - gdb - strace - ltrace - valgrind - zeal - ]; + # Haskell + ghc + cabal2nix + ] + ++ lib.optionals pkgs.stdenv.isLinux [ + gdb + strace + ltrace + valgrind + zeal + ]; pythonTools = with python3Packages; [ - python # to shadow old macOS python + python3 # to shadow old macOS python ipython uv pip @@ -143,12 +142,13 @@ let desktopCommon = [ keepassxc + tigervnc ]; desktopLinux = [ firefox chromium - kdePackages.falkon + falkon thunderbird calibre dino @@ -164,15 +164,15 @@ let seafile-client alacritty libreoffice-qt6 # still with KDE integration + backintime-common anki signal-desktop (tor-browser-bundle-bin.override { mediaSupport = true; pulseaudioSupport = pkgs.stdenv.isLinux; }) - tigervnc - rustdesk-flutter pdfpc + quaternion nheko gpxsee subsurface @@ -183,7 +183,7 @@ let #(pkgs.pidgin-with-plugins.override { # plugins = [ pkgs.pidginotr ];}) - logseq + unstable.logseq # for Hibiscus banking software jameica @@ -192,32 +192,33 @@ let chromedriver ]; - kdeTools = [ - okteta - plasma5Packages.kdeconnect-kde - ] - ++ (with kdePackages; [ - okular - gwenview - yakuake - dolphin - spectacle - kate - kleopatra - qdirstat - ark - kwalletmanager - #ktouch # TODO: unbreak - kcharselect - konversation - krdc - skanlite - akonadiconsole - tokodon # mastodon client - networkmanager-qt - kcrash - breeze-gtk - ]); + kdeTools = + [ + okteta + plasma5Packages.kdeconnect-kde + ] + ++ (with kdePackages; [ + okular + gwenview + yakuake + dolphin + spectacle + kate + kleopatra + qdirstat + ark + kwalletmanager + #ktouch # TODO: unbreak + kcharselect + konversation + krdc + skanlite + akonadiconsole + tokodon # mastodon client + networkmanager-qt + kcrash + breeze-gtk + ]); in { options.schmittlauch.packages = { diff --git a/home/modules/vscodium.nix b/home/modules/vscodium.nix index a42b7ec..76b4c8d 100644 --- a/home/modules/vscodium.nix +++ b/home/modules/vscodium.nix @@ -11,110 +11,112 @@ enable = true; package = pkgs.vscodium; mutableExtensionsDir = true; - profiles.default = { - extensions = - with pkgs.vscode-extensions; - [ - ms-python.python - charliermarsh.ruff - vscodevim.vim - yzhang.markdown-all-in-one - bungcip.better-toml - eamodio.gitlens - jnoortheen.nix-ide - mkhl.direnv - editorconfig.editorconfig - ] - ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [ - { - name = "Sync-Rsync"; - publisher = "vscode-ext"; - version = "0.36.0"; - sha256 = "sha256-0b/OHLZfXo0NAVAVkzZSqMGDzF0uvPRoiqsZtW1iOdA"; - } - # TODO: probably available in nixpkgs soonish? - { - name = "mypy-type-checker"; - publisher = "ms-python"; - version = "2023.3.12681020"; - sha256 = "sha256-rhed7CQlvxksVCGc9nPU2oYQWtXcAV5TzuG63e8Y3zM="; - } - { - name = "vscode-pets"; - publisher = "tonybaloney"; - version = "1.25.1"; - sha256 = "sha256-as3e2LzKBSsiGs/UGIZ06XqbLh37irDUaCzslqITEJQ="; - } - ]; - userSettings = - let - defaultPython = pkgs.python3.withPackages (ps: [ - ps.jedi - ps.jedi-language-server - ps.pip - ps.setuptools # for pkg_resources - ps.black - ps.mypy - ]); - in + extensions = + with pkgs.vscode-extensions; + [ + ms-python.python + vscodevim.vim + yzhang.markdown-all-in-one + bungcip.better-toml + eamodio.gitlens + jnoortheen.nix-ide + mkhl.direnv + editorconfig.editorconfig + ] + ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [ { - "editor.fontLigatures" = true; - "editor.accessibilitySupport" = false; # prevent asking - "editor.cursorBlinking" = "phase"; - "editor.stickyScroll.enabled" = true; - "workbench.editor.highlightModifiedTabs" = true; - "window.autoDetectColorScheme" = true; - "workbench.preferredDarkColorTheme" = "Default Dark Modern"; - "workbench.preferredLightColorTheme" = "Default Light Modern"; - "[nix]" = { - "editor.insertSpaces" = true; - "editor.tabSize" = 2; - # for now, disable automatic formatting to prevent disruption of existing code bases - "editor.formatOnPaste" = false; - "editor.formatOnSave" = false; - "editor.formatOnType" = false; - }; - "nix.formatterPath" = lib.getExe pkgs.nixfmt-rfc-style; - "nix.enableLanguageServer" = true; - "nix.serverPath" = lib.getExe pkgs.nixd; - "nix.serverSettings" = { }; - "editor.fontSize" = 13; - "editor.fontWeight" = "normal"; - "git.detectSubmodulesLimit" = 30; - "[python]" = { - "breadcrumbs.showClasses" = true; - "breadcrumbs.showFunctions" = true; - "gitlens.codeLens.symbolScopes" = [ "!Module" ]; - "editor.defaultFormatter" = "charliermarsh.ruff"; - "editor.formatOnSave" = true; - }; - "python.experiments.enabled" = false; - "python.languageServer" = "Jedi"; # don't use proprietary pylance server - "python.defaultInterpreterPath" = "${defaultPython}/bin/python"; - "mypy-type-checker.path" = [ "${pkgs.python3Packages.mypy}/bin/mypy" ]; - "mypy-type-checker.importStrategy" = "fromEnvironment"; - "mypy-type-checker.args" = [ "--ignore-missing-imports" ]; - "ruff.path" = [ (lib.getExe pkgs.ruff) ]; - "ruff.importStrategy" = "fromEnvironment"; - "gitlens.telemetry.enabled" = false; - "vim.highlightedyank.enable" = true; - "vim.history" = 500; - "vim.neovimUseConfigFile" = true; - "vim.enableNeovim" = true; - "git.suggestSmartCommit" = false; - "editor.rulers" = [ 79 ]; - "vim.useSystemClipboard" = true; - "vim.smartRelativeLine" = true; - "diffEditor.ignoreTrimWhitespace" = false; - "files.associations" = { - "*.py" = "python"; - }; - "editor.renderWhitespace" = "all"; - "editor.fontFamily" = "Iosevka Curly Slab, Menlo, Monaco, 'Courier New', monospace"; - "vim.neovimPath" = lib.getExe pkgs.myVim; - "sync-rsync.options" = [ ]; - "direnv.path.executable" = lib.getExe pkgs.direnv; + name = "Sync-Rsync"; + publisher = "vscode-ext"; + version = "0.36.0"; + sha256 = "sha256-0b/OHLZfXo0NAVAVkzZSqMGDzF0uvPRoiqsZtW1iOdA"; + } + # TODO: probably available in nixpkgs soonish? + { + name = "mypy-type-checker"; + publisher = "ms-python"; + version = "2023.3.12681020"; + sha256 = "sha256-rhed7CQlvxksVCGc9nPU2oYQWtXcAV5TzuG63e8Y3zM="; + } + { + name = "black-formatter"; + publisher = "ms-python"; + version = "2023.5.12771008"; + sha256 = "sha256-lJG0RRUUMhQGs2a6oBtoqt+uY1kSJ0+cbmaP07hNh2o="; + } + { + name = "vscode-pets"; + publisher = "tonybaloney"; + version = "1.25.1"; + sha256 = "sha256-as3e2LzKBSsiGs/UGIZ06XqbLh37irDUaCzslqITEJQ="; + } + ]; + userSettings = + let + defaultPython = pkgs.python3.withPackages (ps: [ + ps.jedi + ps.jedi-language-server + ps.pip + ps.setuptools # for pkg_resources + ps.black + ps.mypy + ]); + in + { + "editor.fontLigatures" = true; + "editor.accessibilitySupport" = false; # prevent asking + "editor.cursorBlinking" = "phase"; + "editor.stickyScroll.enabled" = true; + "workbench.editor.highlightModifiedTabs" = true; + "window.autoDetectColorScheme" = true; + "workbench.preferredDarkColorTheme" = "Default Dark Modern"; + "workbench.preferredLightColorTheme" = "Default Light Modern"; + "[nix]" = { + "editor.insertSpaces" = true; + "editor.tabSize" = 2; + # for now, disable automatic formatting to prevent disruption of existing code bases + "editor.formatOnPaste" = false; + "editor.formatOnSave" = false; + "editor.formatOnType" = false; }; - }; + "nix.formatterPath" = lib.getExe pkgs.nixfmt-rfc-style; + "nix.enableLanguageServer" = true; + "nix.serverPath" = lib.getExe pkgs.nixd; + "nix.serverSettings" = { }; + "editor.fontSize" = 13; + "editor.fontWeight" = "normal"; + "git.detectSubmodulesLimit" = 30; + "[python]" = { + "breadcrumbs.showClasses" = true; + "breadcrumbs.showFunctions" = true; + "gitlens.codeLens.symbolScopes" = [ "!Module" ]; + "editor.defaultFormatter" = "ms-python.black-formatter"; + "editor.formatOnSave" = true; + }; + "python.languageServer" = "Jedi"; # don't use proprietary pylance server + "python.defaultInterpreterPath" = "${defaultPython}/bin/python"; + "black-formatter.path" = [ "${pkgs.python3Packages.black}/bin/black" ]; + "black-formatter.importStrategy" = "fromEnvironment"; + "mypy-type-checker.path" = [ "${pkgs.python3Packages.mypy}/bin/mypy" ]; + "mypy-type-checker.importStrategy" = "fromEnvironment"; + "mypy-type-checker.args" = [ "--ignore-missing-imports" ]; + "gitlens.telemetry.enabled" = false; + "vim.highlightedyank.enable" = true; + "vim.history" = 500; + "vim.neovimUseConfigFile" = true; + "vim.enableNeovim" = true; + "git.suggestSmartCommit" = false; + "editor.rulers" = [ 79 ]; + "vim.useSystemClipboard" = true; + "vim.smartRelativeLine" = true; + "diffEditor.ignoreTrimWhitespace" = false; + "files.associations" = { + "*.py" = "python"; + }; + "editor.renderWhitespace" = "all"; + "editor.fontFamily" = "Iosevka Curly Slab, Menlo, Monaco, 'Courier New', monospace"; + "vim.neovimPath" = lib.getExe pkgs.myVim; + "sync-rsync.options" = [ ]; + "direnv.path.executable" = lib.getExe pkgs.direnv; + }; }; } diff --git a/home/workmac.nix b/home/workmac.nix index 0f8fd43..f2b7969 100644 --- a/home/workmac.nix +++ b/home/workmac.nix @@ -35,11 +35,9 @@ in # defaults in bottom match block "*" # TODO: common config for desktop as well # multiplexer, e.g. to avoid rate limiting on jumphost usage - serverAliveInterval = 10; - serverAliveCountMax = 2; # 2 strikes and you're out + serverAliveInterval = 60; controlMaster = "auto"; - # not too long, due to the frequent keepalives - controlPersist = "1h"; + controlPersist = "4h"; # ssh host config matchBlocks = { @@ -47,6 +45,7 @@ in "*" = { extraOptions = { IdentityAgent = "\"~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock\""; + #ControlPath = "/tmp/ssh_mux_%h_%p_%r"; }; }; @@ -67,38 +66,34 @@ in contacts = import "${inputs.mysecrets}/contacts.nix" { inherit lib; }; in { - includes = [ - { - condition = "gitdir:~/src/schmittlauch/"; + includes = + [ + { + condition = "gitdir:~/src/schmittlauch/"; + contents = { + user = { + inherit (contacts.schmittlauch) name email; + }; + }; + } + ] + # set default name for several other common locations + ++ map (dir: { + condition = "gitdir:${dir}"; contents = { user = { - inherit (contacts.schmittlauch) name email; + inherit (contacts.work) name email; }; }; - } - ] - # set default name for several other common locations - ++ map (dir: { - condition = "gitdir:${dir}"; - contents = { - user = { - inherit (contacts.work) name email; - }; - }; - }) [ "~/" ]; + }) [ "~/" ]; }; # some extra shell scripts - programs.zsh.initContent = lib.mkAfter ( + programs.zsh.initExtra = lib.mkAfter ( import ./scripts/reporsync.nix { inherit pkgs lib; } + import ./scripts/ssh-loop-fc.nix { inherit pkgs lib; } ); - # separate proxied browser using the DHCP-supplied DNS for accessing captive portals - programs.captive-browser = { - enable = true; - interface = "en0"; - }; launchd.agents.hydra_proxy = { enable = true; config = { @@ -108,7 +103,7 @@ in "0" "-D" "1080" - "-oServerAliveInterval=30" + "-oServerAliveInterval=60" "-oControlMaster=no" "-N" "vpn-whq.services.fcio.net" diff --git a/hosts/framenix/storage.nix b/hosts/framenix/storage.nix index 8acb7fd..7fb2801 100644 --- a/hosts/framenix/storage.nix +++ b/hosts/framenix/storage.nix @@ -39,17 +39,6 @@ in fsType = "vfat"; options = [ "discard" ]; }; - # nix/ lix build directory - # lix: - # > If you plan to use a tmpfs, we **strongly recommend** to set `mode=0755` as a mount option for that `tmpfs`, otherwise you are effectively reverting this mitigation. - "/nix/var/nix/builds" = { - device = "tmpfs"; - fsType = "tmpfs"; - options = [ - "mode=0755" - "size=75%" - ]; - }; }; services.fstrim.enable = true; diff --git a/hosts/thinknix/hardware-configuration.nix b/hosts/thinknix/hardware-configuration.nix index 74708b5..e60ac46 100644 --- a/hosts/thinknix/hardware-configuration.nix +++ b/hosts/thinknix/hardware-configuration.nix @@ -21,6 +21,7 @@ boot.extraModulePackages = [ ]; nix.settings.max-jobs = lib.mkDefault 4; + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; # modesetting is always better than intel (legacy) services.xserver.videoDrivers = [ "modesetting" ]; diff --git a/nixremotebuildermachines b/nixremotebuildermachines deleted file mode 100644 index 82800d1..0000000 --- a/nixremotebuildermachines +++ /dev/null @@ -1 +0,0 @@ -ssh-ng://schmittlauch@build01.nix-community.org x86_64-linux /root/.ssh/remote_builder_key 64 1 big-parallel,kvm,nixos-test - diff --git a/patches/nixos-nixpkgs-362c2bc76d359b908ad1389ee28c23ee0e862324.patch b/patches/nixos-nixpkgs-362c2bc76d359b908ad1389ee28c23ee0e862324.patch new file mode 100644 index 0000000..dbaf9ee --- /dev/null +++ b/patches/nixos-nixpkgs-362c2bc76d359b908ad1389ee28c23ee0e862324.patch @@ -0,0 +1,26 @@ +From 362c2bc76d359b908ad1389ee28c23ee0e862324 Mon Sep 17 00:00:00 2001 +From: Ihar Hrachyshka +Date: Mon, 7 Apr 2025 21:03:09 -0400 +Subject: [PATCH] nodejs_20: fix test failure on darwin on latest MacOS 15.4 + +Signed-off-by: Ihar Hrachyshka +(cherry picked from commit 9674c1f688d12b99fbde26e6068ab62609fef3b1) +--- + pkgs/development/web/nodejs/v20.nix | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/pkgs/development/web/nodejs/v20.nix b/pkgs/development/web/nodejs/v20.nix +index b9c9345c441afa..20cceb5b5d1cda 100644 +--- a/pkgs/development/web/nodejs/v20.nix ++++ b/pkgs/development/web/nodejs/v20.nix +@@ -50,5 +50,10 @@ buildNodejs { + stripLen = 1; + hash = "sha256-6y3aEqxNC4iTQEv1oewodJrhOHxjp5xZMq1P1QL94Rg="; + }) ++ # fix test failure on macos 15.4 ++ (fetchpatch2 { ++ url = "https://github.com/nodejs/node/commit/33f6e1ea296cd20366ab94e666b03899a081af94.patch?full_index=1"; ++ hash = "sha256-aVBMcQlhQeviUQpMIfC988jjDB2BgYzlMYsq+w16mzU="; ++ }) + ] ++ gypPatches; + }