From 8a3614d6a1f4be537fd0bbacb2a671c9679c071c Mon Sep 17 00:00:00 2001 From: Noah Pederson Date: Tue, 6 May 2025 15:59:34 -0500 Subject: [PATCH] FIX: rename noah-home.nix to home.nix, update lock --- flake.lock | 24 ++-- flake.nix | 2 +- home.nix | 363 +++++++++++++++++++++++++++++++++++++++++--------- noah-home.nix | 318 ------------------------------------------- 4 files changed, 313 insertions(+), 394 deletions(-) delete mode 100644 noah-home.nix diff --git a/flake.lock b/flake.lock index 463a84b..842d89f 100644 --- a/flake.lock +++ b/flake.lock @@ -44,11 +44,11 @@ ] }, "locked": { - "lastModified": 1745557122, - "narHash": "sha256-eqSo9ugzsqhFgaDFYUZj943nurlX4L6f+AW0skJ4W+M=", + "lastModified": 1746171682, + "narHash": "sha256-EyXUNSa+H+YvGVuQJP1nZskXAowxKYp79RNUsNdQTj4=", "owner": "nix-community", "repo": "home-manager", - "rev": "dd26f75fb4ec1c731d4b1396eaf4439ce40a91c1", + "rev": "50eee705bbdbac942074a8c120e8194185633675", "type": "github" }, "original": { @@ -60,11 +60,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1746055187, - "narHash": "sha256-3dqArYSMP9hM7Qpy5YWhnSjiqniSaT2uc5h2Po7tmg0=", + "lastModified": 1746422338, + "narHash": "sha256-NTtKOTLQv6dPfRe00OGSywg37A1FYqldS6xiNmqBUYc=", "owner": "nixos", "repo": "nixpkgs", - "rev": "3e362ce63e16b9572d8c2297c04f7c19ab6725a5", + "rev": "5b35d248e9206c1f3baf8de6a7683fee126364aa", "type": "github" }, "original": { @@ -76,11 +76,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1745930157, - "narHash": "sha256-y3h3NLnzRSiUkYpnfvnS669zWZLoqqI6NprtLQ+5dck=", + "lastModified": 1746461020, + "narHash": "sha256-7+pG1I9jvxNlmln4YgnlW4o+w0TZX24k688mibiFDUE=", "owner": "nixos", "repo": "nixpkgs", - "rev": "46e634be05ce9dc6d4db8e664515ba10b78151ae", + "rev": "3730d8a308f94996a9ba7c7138ede69c1b9ac4ae", "type": "github" }, "original": { @@ -113,11 +113,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1742649964, - "narHash": "sha256-DwOTp7nvfi8mRfuL1escHDXabVXFGT1VlPD1JHrtrco=", + "lastModified": 1746537231, + "narHash": "sha256-Wb2xeSyOsCoTCTj7LOoD6cdKLEROyFAArnYoS+noCWo=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "dcf5072734cb576d2b0c59b2ac44f5050b5eac82", + "rev": "fa466640195d38ec97cf0493d6d6882bc4d14969", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 6291b9b..c6ca86c 100644 --- a/flake.nix +++ b/flake.nix @@ -24,7 +24,7 @@ # Specify your home configuration modules here, for example, # the path to your home.nix. - modules = [ ./noah-home.nix ]; + modules = [ ./home.nix ]; # Optionally use extraSpecialArgs # to pass through arguments to home.nix diff --git a/home.nix b/home.nix index 187a2ca..69ad765 100644 --- a/home.nix +++ b/home.nix @@ -1,76 +1,313 @@ -{ config, pkgs, ... }: - +{ pkgs, unstable, ... }: { # Home Manager needs a bit of information about you and the paths it should # manage. home.username = "noah"; home.homeDirectory = "/Users/noah"; + nix = { + package = pkgs.nix; + settings = { + experimental-features = [ "nix-command" "flakes" ]; + #substituters = [ + # "http://cache.misaki.local" + #]; + #trusted-public-keys = [ + # "misaki.packetlost.dev:y5Z/utaVBozpL0UAbUQDWLjpm2sVMOoKzyG76n/167A=" + #]; + }; + }; + home.packages = with pkgs; [ + # main tool + direnv + #fish + tree + btop + # Apple Silicon top monitoring + asitop + htop + mtr + moreutils + rsync + bash + tmux + coreutils + util-linux + + unzip + fd + jq + ripgrep + bat + netcat + stunnel + iperf3 + entr + ncdu + # broken? + #unstable.bitwarden-cli + sqlite + age + just + unstable.catgirl + plan9port + unstable.rc + unstable.glow + unstable.vis + # Tcl/Tk + #unstable.tcl + #unstable.tk + #unstable.tclPackages.tclx + + + # Dev tools + git + unstable.ruff + # Rust REPL + evcxr + #unstable.gcc + #unstable.clang + # Swift stuff + #swift + #swift-format + # Swift LSP + #sourcekit-lsp + unstable.go + unstable.gopls + gnumake + #unstable.babashka + unstable.ccls + unstable.clojure + unstable.cljfmt + unstable.clojure-lsp + unstable.janet + unstable.jpm + unstable.fennel-ls + unstable.graalvm-ce + cmake + ctags + #kotlin + #nodejs + #yarn + #node2nix + #opam + # Scala stuff + #unstable.scala_3 + #unstable.scalafmt + #unstable.metals + # Scala / Java build tool + #unstable.sbt + # Haskell + #cabal-install + #ghc + + # Lua + luarocks + luajit + unstable.lua-language-server + luaformatter + libressl + # Erlang + #erlang + #elixir + unstable.nil # nix language server + #typescript + # This is currently broken + #vscode-langservers-extracted + scdoc + #dockerfile-language-server-nodejs + # BROKEN + #yaml-language-server + mkcert + natscli + python312Full + python312Packages.psycopg + unstable.uv + sqlite + #unstable.gleam + #unstable.rebar3 + #unstable.flyctl + unstable.bun + unstable.gh + unstable.kraft + unstable.doctl + + # GUI tools + zathura + + # Python dev tools + ruff-lsp + #unstable.pyright + #unstable.python311Packages.python-lsp-server + #unstable.python311Packages.python-lsp-ruff + unstable.pyright + unstable.python311Packages.python-lsp-server + unstable.python311Packages.python-lsp-ruff - # This value determines the Home Manager release that your configuration is - # compatible with. This helps avoid breakage when a new Home Manager release - # introduces backwards incompatible changes. - # - # You should not change this value, even if you update Home Manager. If you do - # want to update the value, then make sure to first check the Home Manager - # release notes. - home.stateVersion = "24.11"; # Please read the comment before changing. - - # The home.packages option allows you to install Nix packages into your - # environment. - home.packages = [ - # # Adds the 'hello' command to your environment. It prints a friendly - # # "Hello, world!" when run. - # pkgs.hello - - # # It is sometimes useful to fine-tune packages, for example, by applying - # # overrides. You can do that directly here, just don't forget the - # # parentheses. Maybe you want to install Nerd Fonts with a limited number of - # # fonts? - # (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; }) - - # # You can also create simple shell scripts directly inside your - # # configuration. For example, this adds a command 'my-hello' to your - # # environment: - # (pkgs.writeShellScriptBin "my-hello" '' - # echo "Hello, ${config.home.username}!" - # '') + # JavaScript tools + #typescript-language-server + + # Certificate Management + minica + mkcert + step-cli + + # Fish Plugins + #fishPlugins.fzf + #fishPlugins.pure + + # Libraries because MacOS is kinda stupid + ncurses ]; - # Home Manager is pretty good at managing dotfiles. The primary way to manage - # plain files is through 'home.file'. - home.file = { - # # Building this configuration will create a copy of 'dotfiles/screenrc' in - # # the Nix store. Activating the configuration will then make '~/.screenrc' a - # # symlink to the Nix store copy. - # ".screenrc".source = dotfiles/screenrc; - - # # You can also set the file content immediately. - # ".gradle/gradle.properties".text = '' - # org.gradle.console=verbose - # org.gradle.daemon.idletimeout=3600000 - # ''; + #programs.fish = { + # enable = true; + # package = unstable.fish; + #}; + programs.fzf = { + enable = true; + enableFishIntegration = true; + }; + programs.pistol.enable = true; + programs.lf.enable = true; + programs.home-manager.enable = true; + programs.neovim = { + #package = unstable.neovim-unwrapped; + enable = true; + defaultEditor = true; + withNodeJs = false; + withPython3 = true; + extraPackages = with pkgs; [ fzf ripgrep luarocks tree-sitter ]; + }; + programs.git = { + enable = true; + lfs.enable = true; + userName = "Noah Pederson"; + userEmail = "noah@packetlost.dev"; + extraConfig = { + sendemail = { + smtpserver = "smtp.migadu.com"; + smtpuser = "noah@packetlost.dev"; + smtpencryption = "ssl"; + smtpserverport = 465; + }; + init = { + defaultBranch = "master"; + }; + pull = { + rebase = true; + }; + push = { + default = "simple"; + autoSetupRemote = true; + followTags = true; + }; + credential = { + helper = "cache"; + }; + alias = { + out = "log @{u}.."; + }; + column = { + ui = "auto"; + }; + branch = { + sort = "-committerdate"; + }; + tag = { + sort = "version:refname"; + }; + diff = { + algorithm = "histogram"; + colorMoved = "plain"; + mnemonicPrefix = true; + renames = true; + }; + fetch = { + prune = true; + pruneTags = true; + all = true; + }; + help = { + autocorrect = "prompt"; + }; + commit = { + verbose = true; + }; + rerere = { + enabled = true; + autoupdate = true; + }; + rebase = { + autoSquash = true; + autoStash = true; + updateRefs = true; + }; + merge = { + conflictStyle = "zdiff3"; + }; + }; + ignores = [ + ".direnv/" + ".envrc" + "flake.nix" + "shell.nix" + ".env/" + ".clj-kondo/" + ]; + }; + programs.aerc = { + # BROKEN + enable = false; + }; + programs.ssh = { + enable = true; + extraConfig = builtins.readFile ./ssh/extra; + addKeysToAgent = "yes"; + forwardAgent = true; + }; + + programs.direnv = { + enable = true; + nix-direnv.enable = true; }; - # Home Manager can also manage your environment variables through - # 'home.sessionVariables'. These will be explicitly sourced when using a - # shell provided by Home Manager. If you don't want to manage your shell - # through Home Manager then you have to manually source 'hm-session-vars.sh' - # located at either - # - # ~/.nix-profile/etc/profile.d/hm-session-vars.sh - # - # or - # - # ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh - # - # or - # - # /etc/profiles/per-user/noah/etc/profile.d/hm-session-vars.sh - # - home.sessionVariables = { - # EDITOR = "emacs"; + programs.nix-index = { + enable = true; + enableFishIntegration = true; }; - # Let Home Manager install and manage itself. - programs.home-manager.enable = true; + # Independent config files. + xdg.configFile.nvim = { + source = ./nvim; + recursive = true; + }; + + xdg.configFile.vis = { + source = ./vis; + recursive = true; + }; + + xdg.configFile.fish = { + source = ./fish; + recursive = true; + }; + xdg.configFile."fish/completions/nix.fish".source = "${pkgs.nix}/share/fish/vendor_completions.d/nix.fish"; + + xdg.configFile.aerc = { + source = ./aerc; + recursive = true; + }; + + xdg.configFile.ghostty = { + source = ./ghostty; + recursive = true; + }; + + home.file.".local/bin" = { + source = ./scripts; + recursive = true; + }; + + home.stateVersion = "24.11"; + } diff --git a/noah-home.nix b/noah-home.nix deleted file mode 100644 index c4ade4c..0000000 --- a/noah-home.nix +++ /dev/null @@ -1,318 +0,0 @@ -{ pkgs, unstable, ... }: -{ - # Home Manager needs a bit of information about you and the paths it should - # manage. - home.username = "noah"; - home.homeDirectory = "/Users/noah"; - nix = { - package = pkgs.nix; - settings = { - substituters = [ - "http://cache.misaki.local" - ]; - trusted-public-keys = [ - "misaki.packetlost.dev:y5Z/utaVBozpL0UAbUQDWLjpm2sVMOoKzyG76n/167A=" - ]; - }; - }; - home.packages = with pkgs; [ - # main tool - direnv - #fish - tree - btop - # Apple Silicon top monitoring - asitop - htop - mtr - moreutils - rsync - bash - tmux - coreutils - util-linux - - unzip - fd - jq - ripgrep - bat - netcat - stunnel - iperf3 - entr - ncdu - # broken? - #unstable.bitwarden-cli - sqlite - age - just - unstable.catgirl - devenv - plan9port - unstable.rc - unstable.glow - unstable.vis - # Tcl/Tk - #unstable.tcl - #unstable.tk - #unstable.tclPackages.tclx - - - # Dev tools - git - unstable.ruff - # Rust REPL - evcxr - #unstable.gcc - swift - swift-format - sourcekit-lsp - #unstable.clang - unstable.go - unstable.gopls - gnumake - #unstable.babashka - ccls - #unstable.clojure - #unstable.cljfmt - #unstable.clojure-lsp - #unstable.janet - #unstable.jpm - unstable.fennel-ls - #graalvm-ce - cmake - ctags - #kotlin - #nodejs - yarn - #node2nix - #opam - # Scala stuff - #unstable.scala_3 - #unstable.scalafmt - #unstable.metals - # Scala / Java build tool - #unstable.sbt - # Haskell - #cabal-install - #ghc - - # Lua - luarocks - luajit - lua-language-server - luaformatter - libressl - # Erlang - #erlang - #elixir - nil # nix language server - typescript - # This is currently broken - #vscode-langservers-extracted - scdoc - dockerfile-language-server-nodejs - # BROKEN - #yaml-language-server - mkcert - natscli - python312Full - python312Packages.psycopg - unstable.uv - sqlite - #unstable.gleam - #unstable.rebar3 - #unstable.flyctl - unstable.bun - unstable.gh - unstable.kraft - unstable.doctl - - # GUI tools - zathura - - # Python dev tools - ruff-lsp - unstable.pyright - unstable.python311Packages.python-lsp-server - unstable.python311Packages.python-lsp-ruff - - # JavaScript tools - typescript-language-server - - # Certificate Management - minica - mkcert - step-cli - - # Fish Plugins - #fishPlugins.fzf - #fishPlugins.pure - - # Libraries because MacOS is kinda stupid - ncurses - # Unfree - #unstable.discord - #unstable.spotify - # Work related stuff - solana-cli - google-cloud-sdk - ]; - - nix = { - settings.experimental-features = [ "nix-command" "flakes" ]; - }; - - #programs.fish = { - # enable = true; - # package = unstable.fish; - #}; - programs.fzf = { - enable = true; - enableFishIntegration = true; - }; - programs.pistol.enable = true; - programs.lf.enable = true; - programs.home-manager.enable = true; - programs.neovim = { - package = unstable.neovim-unwrapped; - enable = true; - defaultEditor = true; - withNodeJs = true; - withPython3 = true; - extraPackages = with pkgs; [ fzf ripgrep luarocks tree-sitter ]; - }; - programs.git = { - enable = true; - lfs.enable = true; - userName = "Noah Pederson"; - userEmail = "noah@packetlost.dev"; - extraConfig = { - sendemail = { - smtpserver = "smtp.migadu.com"; - smtpuser = "noah@packetlost.dev"; - smtpencryption = "ssl"; - smtpserverport = 465; - }; - init = { - defaultBranch = "master"; - }; - pull = { - rebase = true; - }; - push = { - default = "simple"; - autoSetupRemote = true; - followTags = true; - }; - credential = { - helper = "cache"; - }; - alias = { - out = "log @{u}.."; - }; - column = { - ui = "auto"; - }; - branch = { - sort = "-committerdate"; - }; - tag = { - sort = "version:refname"; - }; - diff = { - algorithm = "histogram"; - colorMoved = "plain"; - mnemonicPrefix = true; - renames = true; - }; - fetch = { - prune = true; - pruneTags = true; - all = true; - }; - help = { - autocorrect = "prompt"; - }; - commit = { - verbose = true; - }; - rerere = { - enabled = true; - autoupdate = true; - }; - rebase = { - autoSquash = true; - autoStash = true; - updateRefs = true; - }; - merge = { - conflictStyle = "zdiff3"; - }; - }; - ignores = [ - ".direnv/" - ".envrc" - "flake.nix" - "shell.nix" - ".env/" - ".clj-kondo/" - ]; - }; - programs.aerc = { - # BROKEN - enable = false; - }; - programs.ssh = { - enable = true; - extraConfig = builtins.readFile ./ssh/extra; - addKeysToAgent = "yes"; - forwardAgent = true; - }; - - programs.direnv = { - enable = true; - nix-direnv.enable = true; - }; - - programs.nix-index = { - enable = true; - enableFishIntegration = true; - }; - - # Independent config files. - xdg.configFile.nvim = { - source = ./nvim; - recursive = true; - }; - - xdg.configFile.vis = { - source = ./vis; - recursive = true; - }; - - xdg.configFile.fish = { - source = ./fish; - recursive = true; - }; - xdg.configFile."fish/completions/nix.fish".source = "${pkgs.nix}/share/fish/vendor_completions.d/nix.fish"; - - xdg.configFile.aerc = { - source = ./aerc; - recursive = true; - }; - - xdg.configFile.ghostty = { - source = ./ghostty; - recursive = true; - }; - - home.file.".local/bin" = { - source = ./scripts; - recursive = true; - }; - - home.stateVersion = "24.11"; - -} -- 2.51.2