Move dotfiles into home-manager

finchie
Dec 16, 2025, 4:19 AM
KULJ4F7P662VMDOV3DXOXJZWUI4Z52GLHR2K2HO2E2UWXIMFVNWAC

Dependencies

Change contents

  • edit in home.nix at line 17
    [3.37]
    [3.37]
    home.file = {
    ".cargo/config.toml".source = ./dotfiles/cargo.toml;
    ".config/Code/User/settings.json".source = ./dotfiles/vscode.jsonc;
    ".config/jj/config.toml".source = ./dotfiles/jj.toml;
    ".config/nushell/config.nu".source = ./dotfiles/config.nu;
    };
  • file addition: dotfiles (d--r------)
    [2.1]
  • file addition: vscode.jsonc (----------)
    [0.292]
    {
    // -- Editor behaviour --
    "editor.formatOnSave": true,
    "explorer.confirmDelete": false,
    "explorer.confirmDragAndDrop": false,
    "liveServer.settings.donotVerifyTags": true,
    "security.workspace.trust.untrustedFiles": "open",
    "workbench.editor.empty.hint": "hidden",
    "terminal.integrated.initialHint": false,
    "workbench.startupEditor": "none",
    // -- File associations --
    "files.associations": {
    "*.asm": "gas",
    ".ignore": "ignore"
    },
    "files.watcherExclude": {
    "**/.trunk/*out": true
    },
    "workbench.editorAssociations": {
    "{hexdiff}:/**/*.*": "hexEditor.hexedit",
    "*.rom": "hexEditor.hexedit",
    "*.bin": "hexEditor.hexedit"
    },
    // -- Formatters --
    // Biome toolchain
    "[javascript]": {
    "editor.defaultFormatter": "biomejs.biome"
    },
    "[json]": {
    "editor.defaultFormatter": "biomejs.biome"
    },
    "[jsonc]": {
    "editor.defaultFormatter": "biomejs.biome"
    },
    "[typescript]": {
    "editor.defaultFormatter": "biomejs.biome"
    },
    // Other
    "[markdown]": {
    "editor.defaultFormatter": "DavidAnson.vscode-markdownlint"
    },
    "[python]": {
    "editor.defaultFormatter": "charliermarsh.ruff"
    },
    // -- Language servers --
    // Rust
    "rust-analyzer.cargo.extraArgs": [
    "--all-features",
    "--profile",
    "rust-analyzer",
    "--target-dir",
    "/tmp/rust-analyzer"
    ],
    "rust-analyzer.check.command": "clippy",
    "rust-analyzer.diagnostics.experimental.enable": true,
    "rust-analyzer.imports.granularity.group": "module",
    "rust-analyzer.inlayHints.bindingModeHints.enable": true,
    "rust-analyzer.inlayHints.closureCaptureHints.enable": true,
    "rust-analyzer.inlayHints.closureReturnTypeHints.enable": "always",
    "rust-analyzer.inlayHints.closureStyle": "rust_analyzer",
    "rust-analyzer.inlayHints.discriminantHints.enable": "always",
    // "rust-analyzer.inlayHints.expressionAdjustmentHints.enable": "always",
    "rust-analyzer.inlayHints.genericParameterHints.lifetime.enable": true,
    "rust-analyzer.inlayHints.genericParameterHints.type.enable": true,
    // "rust-analyzer.inlayHints.implicitDrops.enable": true,
    "rust-analyzer.inlayHints.implicitSizedBoundHints.enable": true,
    "rust-analyzer.inlayHints.lifetimeElisionHints.enable": "always",
    "rust-analyzer.inlayHints.lifetimeElisionHints.useParameterNames": true,
    "rust-analyzer.inlayHints.rangeExclusiveHints.enable": true,
    "rust-analyzer.interpret.tests": true,
    "rust-analyzer.lens.references.adt.enable": true,
    "rust-analyzer.lens.references.enumVariant.enable": true,
    "rust-analyzer.lens.references.method.enable": true,
    "rust-analyzer.lens.references.trait.enable": true,
    "rust-analyzer.showUnlinkedFileNotification": false,
    // Python
    "python.languageServer": "None",
    "ty.path": ["/etc/profiles/per-user/finchie/bin/ty"],
    // Nix
    "nix.enableLanguageServer": true,
    "nix.serverPath": "/etc/profiles/per-user/finchie/bin/nil",
    // Markdown
    "markdownlint.config": {
    "no-inline-html": false
    },
    // -- Spellcheck --
    "harper.path": "/etc/profiles/per-user/finchie/bin/harper-ls",
    // -- Debugging --
    "launch": {
    "version": "0.2.0",
    "configurations": [
    {
    "type": "midas-rr",
    "request": "attach",
    "name": "Launch replay debug session",
    "cwd": "${workspaceFolder}",
    // "stopOnEntry": true,
    "trace": "Off",
    "setupCommands": ["set print object on", "set auto-load safe-path /"]
    }
    ]
    },
    // -- Version Control --
    "git.openRepositoryInParentFolders": "always",
    "gitlens.launchpad.indicator.enabled": false,
    "pijul.ignoreMissingInstallation": true,
    // -- Diff --
    "semanticdiff.closeOriginalTab": true,
    "semanticdiff.defaultDiffViewer": true,
    // -- Disable AI --
    // https://leonidboykov.com/how-to-disable-all-ai-stuff-in-visual-studio-code/
    "chat.agent.enabled": false,
    "chat.commandCenter.enabled": false,
    "inlineChat.accessibleDiffView": "off"
    }
  • file addition: jj.toml (----------)
    [0.292]
    [user]
    name = "Finchie"
    email = "git@finchie.dev"
    [ui]
    diff-formatter = "difft"
    [git]
    colocate = false
  • file addition: config.nu (----------)
    [0.292]
    use std/util "path add"
    # PATH
    path add "~/.cargo/bin"
    # Environment variables
    $env.CARAPACE_BRIDGES = 'zsh,fish,bash,inshellisense'
    $env.DIFF = "difft"
    $env.EDITOR = "hx"
    $env.NU_EXPERIMENTAL_OPTIONS = "all"
    $env.SSH_AUTH_SOCK = "/run/user/1000/gcr/ssh"
    # Configuration
    # TODO: add `$env.config.cp.progress_bar`
    $env.config.buffer_editor = "hx"
    $env.config.rm.always_trash = true
    $env.config.show_banner = false
    $env.config.use_kitty_protocol = true
    # Aliases
    alias c = cargo
    alias p = pijul
    alias rebuild = /home/finchie/config/src/rebuild.nu
    # Direnv hook (from https://www.nushell.sh/cookbook/direnv.html#configuring-direnv)
    $env.config = {
    hooks: {
    pre_prompt: [{ ||
    if (which direnv | is-empty) {
    return
    }
    direnv export json | from json | default {} | load-env
    if 'ENV_CONVERSIONS' in $env and 'PATH' in $env.ENV_CONVERSIONS {
    $env.PATH = do $env.ENV_CONVERSIONS.PATH.from_string $env.PATH
    }
    }]
    }
    }
    # Drop into the Projects directory
    cd ~/Projects
  • file addition: cargo.toml (----------)
    [0.292]
    # TODO: cargo/rustc should warn if unstable options are no longer valid
    # (including when previously unstable behaviour is stabilized)
    [unstable]
    codegen-backend = true
    gc = true
    unstable-options = true
    no-embed-metadata = true
    rustdoc-depinfo = true
    [unstable.git]
    shallow_index = true
    shallow_deps = true
    [unstable.gitoxide]
    fetch = true
    checkout = true
    internal_use_git2 = false
    # TODO: if build.rustflags is set here, the rustflags below seem to override them??
    # at least for -Zproc-macro-backtrace.
    # Cargo should definitely warn about this
    [target.x86_64-unknown-linux-gnu]
    linker = "clang"
    rustflags = [
    # Link using the much faster `wild` linker
    "-C",
    "link-arg=--ld-path=wild",
    # Enable frame pointers for better debugging
    "-C",
    "force-frame-pointers=yes",
    # Enable parallel frontend using all threads
    "-Z",
    "threads=8",
    # Use new solver
    "-Z",
    "next-solver=globally",
    # Share generics across crates
    "-Z",
    "share-generics",
    # Debug incremental issues
    "-Z",
    "incremental-verify-ich",
    # Macro debugging
    "-Z",
    "macro-backtrace",
    "-Z",
    "proc-macro-backtrace",
    ]
    [profile.dev]
    # Use cranelift instead of LLVM for much faster debug codegen
    codegen-backend = "cranelift"
    # # Split debug info generation
    # split-debuginfo = "unpacked"
    # Reduce generated debug info
    debug = "line-tables-only"
    # Front-load optimisations when building dependencies
    # This should only hurt clean-build performance as incremental compiles are enabled
    [profile.dev.package."*"]
    opt-level = 3
    [profile.rust-analyzer]
    inherits = "dev"
    [profile.profiling]
    inherits = "release"
    debug = true
    [cargo-new]
    vcs = "pijul"