From 73a264f26cad86c41f74af2d81c1684c3a20a6b2 Mon Sep 17 00:00:00 2001 From: Dave Gallant Date: Thu, 26 Feb 2026 22:53:10 -0500 Subject: [PATCH] Cleanup codebase --- .github/workflows/cachix.yml | 4 +- README.md | 1 - common-packages.nix | 89 ------------- flake.lock | 245 ++--------------------------------- flake.nix | 153 ++++++++++------------ home.nix | 46 ++++--- hosts/hephaestus.nix | 81 ------------ hosts/zelus.nix | 4 - justfile | 2 +- overlays/cd-fzf/default.nix | 22 ++-- packages.nix | 174 +++++++++++++++++++++++++ update-flake.sh | 2 +- 12 files changed, 289 insertions(+), 534 deletions(-) delete mode 100644 common-packages.nix create mode 100644 packages.nix diff --git a/.github/workflows/cachix.yml b/.github/workflows/cachix.yml index 3747a16..c88817b 100644 --- a/.github/workflows/cachix.yml +++ b/.github/workflows/cachix.yml @@ -16,10 +16,8 @@ jobs: steps: - uses: actions/checkout@v6 - uses: cachix/install-nix-action@v31 - with: - nix_path: nixpkgs=channel:nixos-unstable - uses: cachix/cachix-action@v16 with: name: davegallant authToken: '${{ secrets.CACHIX_API_KEY }}' - - run: nix-build | cachix push davegallant + - run: nix build .#nixosConfigurations.hephaestus.config.system.build.toplevel --json | jq -r '.[].outputs | to_entries[].value' | cachix push davegallant diff --git a/README.md b/README.md index 0f94338..da20276 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,6 @@ The configuration is very specific to my own machines and setup, but it may be a ## Prerequisites - [NixOS](nixos.org) (Linux) -- [Determinate Nix](https://determinate.systems/nix-installer) (macOS) - [just](https://github.com/casey/just) ## Build diff --git a/common-packages.nix b/common-packages.nix deleted file mode 100644 index d5a5825..0000000 --- a/common-packages.nix +++ /dev/null @@ -1,89 +0,0 @@ -{ - pkgs, - unstable, - ... -}: -{ - environment.systemPackages = with pkgs; [ - # essentials - curl - gnumake - gnupg - jq - unzip - xclip - xdg-utils - zip - - # modern cli - atuin - bat - cd-fzf - doggo - eza - fd - github-cli - hadolint - lazygit - macchina - ncdu - progress - ripgrep - shellcheck - shfmt - viddy - yq-go - - # containers - unstable.k9s - unstable.krew - unstable.kubecolor - unstable.kubectl - unstable.kubectx - unstable.kubernetes-helm - unstable.stern - - # cloud - awscli2 - google-cloud-sdk - terraform - - # lsp - nodePackages.bash-language-server - nodePackages.eslint - nodePackages.yaml-language-server - terraform-ls - - # monitoring - btop - - # golang - gofumpt - golangci-lint - gopls - - # rust - rustup - - # networking - arp-scan - dnsutils - iperf - nmap - openssl - openvpn - tcpdump - - # nix - nix-tree - nixfmt-rfc-style - nixpkgs-review - nvd - - # python - virtualenv - - # media - yt-dlp - ]; -} diff --git a/flake.lock b/flake.lock index c3e28a7..c667cb9 100644 --- a/flake.lock +++ b/flake.lock @@ -21,101 +21,7 @@ "type": "github" } }, - "determinate": { - "inputs": { - "determinate-nixd-aarch64-darwin": "determinate-nixd-aarch64-darwin", - "determinate-nixd-aarch64-linux": "determinate-nixd-aarch64-linux", - "determinate-nixd-x86_64-linux": "determinate-nixd-x86_64-linux", - "nix": "nix", - "nixpkgs": "nixpkgs_2" - }, - "locked": { - "lastModified": 1771910357, - "narHash": "sha256-ns+2FDFS2BUbT1CshCF0hLYyYR2BiTOQqCMHDoGFXUo=", - "rev": "b0833008a670c5d1ad2d1afbd711c1bf101f5296", - "revCount": 405, - "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/determinate/3.16.3/019c8e19-e7a4-7fe4-ad79-b4b5feefd24a/source.tar.gz" - }, - "original": { - "type": "tarball", - "url": "https://flakehub.com/f/DeterminateSystems/determinate/%2A" - } - }, - "determinate-nixd-aarch64-darwin": { - "flake": false, - "locked": { - "narHash": "sha256-NK3YCWCmz9WYQtXTg5/VYNo+KrV/7P5rBYqVhkzWEv8=", - "type": "file", - "url": "https://install.determinate.systems/determinate-nixd/tag/v3.16.3/macOS" - }, - "original": { - "type": "file", - "url": "https://install.determinate.systems/determinate-nixd/tag/v3.16.3/macOS" - } - }, - "determinate-nixd-aarch64-linux": { - "flake": false, - "locked": { - "narHash": "sha256-RtiD/ualuvKSZH04G5KpBd2D4tcr5pv//cU+CGnByKs=", - "type": "file", - "url": "https://install.determinate.systems/determinate-nixd/tag/v3.16.3/aarch64-linux" - }, - "original": { - "type": "file", - "url": "https://install.determinate.systems/determinate-nixd/tag/v3.16.3/aarch64-linux" - } - }, - "determinate-nixd-x86_64-linux": { - "flake": false, - "locked": { - "narHash": "sha256-XDzjUdfsnWtANfAzd8GpLkuch1+3rHDGD2uKN93Fw6M=", - "type": "file", - "url": "https://install.determinate.systems/determinate-nixd/tag/v3.16.3/x86_64-linux" - }, - "original": { - "type": "file", - "url": "https://install.determinate.systems/determinate-nixd/tag/v3.16.3/x86_64-linux" - } - }, - "flake-compat": { - "flake": false, - "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, "flake-parts": { - "inputs": { - "nixpkgs-lib": [ - "determinate", - "nix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1748821116, - "narHash": "sha256-F82+gS044J1APL0n4hH50GYdPRv/5JWm34oCJYmVKdE=", - "rev": "49f0870db23e8c1ca0b5259734a02cd9e1e371a1", - "revCount": 377, - "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/hercules-ci/flake-parts/0.1.377%2Brev-49f0870db23e8c1ca0b5259734a02cd9e1e371a1/01972f28-554a-73f8-91f4-d488cc502f08/source.tar.gz" - }, - "original": { - "type": "tarball", - "url": "https://flakehub.com/f/hercules-ci/flake-parts/0.1" - } - }, - "flake-parts_2": { "inputs": { "nixpkgs-lib": [ "nixvim", @@ -136,7 +42,7 @@ "type": "github" } }, - "flake-parts_3": { + "flake-parts_2": { "inputs": { "nixpkgs-lib": "nixpkgs-lib" }, @@ -190,35 +96,9 @@ "type": "github" } }, - "git-hooks-nix": { - "inputs": { - "flake-compat": "flake-compat", - "gitignore": [ - "determinate", - "nix" - ], - "nixpkgs": [ - "determinate", - "nix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1747372754, - "narHash": "sha256-2Y53NGIX2vxfie1rOW0Qb86vjRZ7ngizoo+bnXU9D9k=", - "rev": "80479b6ec16fefd9c1db3ea13aeb038c60530f46", - "revCount": 1026, - "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/cachix/git-hooks.nix/0.1.1026%2Brev-80479b6ec16fefd9c1db3ea13aeb038c60530f46/0196d79a-1b35-7b8e-a021-c894fb62163d/source.tar.gz" - }, - "original": { - "type": "tarball", - "url": "https://flakehub.com/f/cachix/git-hooks.nix/0.1.941" - } - }, "home-manager": { "inputs": { - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs" }, "locked": { "lastModified": 1771744638, @@ -263,54 +143,19 @@ "type": "github" } }, - "nix": { - "inputs": { - "flake-parts": "flake-parts", - "git-hooks-nix": "git-hooks-nix", - "nixpkgs": "nixpkgs", - "nixpkgs-23-11": "nixpkgs-23-11", - "nixpkgs-regression": "nixpkgs-regression" - }, - "locked": { - "lastModified": 1771906938, - "narHash": "sha256-yMI4VhuahG1027I+x/xy0F5FUM7ntwB/hDouCmpwEb8=", - "rev": "628d55ca372a6d9eb071804b589aaa8a6974807d", - "revCount": 24688, - "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nix-src/3.16.3/019c8e13-4542-7edc-9244-38a597d18258/source.tar.gz" - }, - "original": { - "type": "tarball", - "url": "https://flakehub.com/f/DeterminateSystems/nix-src/%2A" - } - }, "nixpkgs": { "locked": { - "lastModified": 1761597516, - "narHash": "sha256-wxX7u6D2rpkJLWkZ2E932SIvDJW8+ON/0Yy8+a5vsDU=", - "rev": "daf6dc47aa4b44791372d6139ab7b25269184d55", - "revCount": 811874, - "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2505.811874%2Brev-daf6dc47aa4b44791372d6139ab7b25269184d55/019a3494-3498-707e-9086-1fb81badc7fe/source.tar.gz" - }, - "original": { - "type": "tarball", - "url": "https://flakehub.com/f/NixOS/nixpkgs/0.2505" - } - }, - "nixpkgs-23-11": { - "locked": { - "lastModified": 1717159533, - "narHash": "sha256-oamiKNfr2MS6yH64rUn99mIZjc45nGJlj9eGth/3Xuw=", + "lastModified": 1771574726, + "narHash": "sha256-D1PA3xQv/s4W3lnR9yJFSld8UOLr0a/cBWMQMXS+1Qg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a62e6edd6d5e1fa0329b8653c801147986f8d446", + "rev": "c217913993d6c6f6805c3b1a3bda5e639adfde6d", "type": "github" }, "original": { "owner": "NixOS", + "ref": "nixos-25.11", "repo": "nixpkgs", - "rev": "a62e6edd6d5e1fa0329b8653c801147986f8d446", "type": "github" } }, @@ -329,38 +174,6 @@ "type": "github" } }, - "nixpkgs-master": { - "locked": { - "lastModified": 1771969913, - "narHash": "sha256-WehtkEpgrJDWmkSN8RRgJGA4HFvxWbwnihY8tJAWJqQ=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "c9c494411139bf640b22c332f7a92b94e8454de2", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "master", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-regression": { - "locked": { - "lastModified": 1643052045, - "narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", - "type": "github" - } - }, "nixpkgs-unstable": { "locked": { "lastModified": 1771848320, @@ -378,36 +191,6 @@ } }, "nixpkgs_2": { - "locked": { - "lastModified": 1771177547, - "narHash": "sha256-trTtk3WTOHz7hSw89xIIvahkgoFJYQ0G43IlqprFoMA=", - "rev": "ac055f38c798b0d87695240c7b761b82fc7e5bc2", - "revCount": 946843, - "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nixpkgs-weekly/0.1.946843%2Brev-ac055f38c798b0d87695240c7b761b82fc7e5bc2/019c6a25-fd20-733f-936e-6487e2957fe4/source.tar.gz" - }, - "original": { - "type": "tarball", - "url": "https://flakehub.com/f/DeterminateSystems/nixpkgs-weekly/0.1" - } - }, - "nixpkgs_3": { - "locked": { - "lastModified": 1771574726, - "narHash": "sha256-D1PA3xQv/s4W3lnR9yJFSld8UOLr0a/cBWMQMXS+1Qg=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "c217913993d6c6f6805c3b1a3bda5e639adfde6d", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-25.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_4": { "locked": { "lastModified": 1771903837, "narHash": "sha256-sdaqdnsQCv3iifzxwB22tUwN/fSHoN7j2myFW5EIkGk=", @@ -423,7 +206,7 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_3": { "locked": { "lastModified": 1770843696, "narHash": "sha256-LovWTGDwXhkfCOmbgLVA10bvsi/P8eDDpRudgk68HA8=", @@ -439,7 +222,7 @@ "type": "github" } }, - "nixpkgs_6": { + "nixpkgs_4": { "locked": { "lastModified": 1771008912, "narHash": "sha256-gf2AmWVTs8lEq7z/3ZAsgnZDhWIckkb+ZnAo5RzSxJg=", @@ -457,7 +240,7 @@ }, "nixvim": { "inputs": { - "flake-parts": "flake-parts_2", + "flake-parts": "flake-parts", "nixpkgs": [ "nixpkgs" ], @@ -505,10 +288,8 @@ "root": { "inputs": { "darwin": "darwin", - "determinate": "determinate", "home-manager": "home-manager", - "nixpkgs": "nixpkgs_4", - "nixpkgs-master": "nixpkgs-master", + "nixpkgs": "nixpkgs_2", "nixpkgs-unstable": "nixpkgs-unstable", "nixvim": "nixvim", "vpngate": "vpngate", @@ -563,7 +344,7 @@ "vpngate": { "inputs": { "flake-utils": "flake-utils_2", - "nixpkgs": "nixpkgs_5" + "nixpkgs": "nixpkgs_3" }, "locked": { "lastModified": 1771695802, @@ -581,8 +362,8 @@ }, "weathr": { "inputs": { - "flake-parts": "flake-parts_3", - "nixpkgs": "nixpkgs_6" + "flake-parts": "flake-parts_2", + "nixpkgs": "nixpkgs_4" }, "locked": { "lastModified": 1771953414, diff --git a/flake.nix b/flake.nix index 04316b9..d1fa63e 100644 --- a/flake.nix +++ b/flake.nix @@ -2,9 +2,7 @@ description = "nixos and macos configurations"; inputs = { - determinate.url = "https://flakehub.com/f/DeterminateSystems/determinate/*"; nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; - nixpkgs-master.url = "github:NixOS/nixpkgs/master"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11"; darwin = { url = "github:lnl7/nix-darwin/nix-darwin-25.11"; @@ -25,59 +23,82 @@ home-manager, nixpkgs, nixpkgs-unstable, - nixpkgs-master, vpngate, weathr, ... }@inputs: let - supportedSystems = [ - "x86_64-linux" - "aarch64-linux" - "x86_64-darwin" - "aarch64-darwin" - ]; + mkUnstable = + system: + import nixpkgs-unstable { + inherit system; + config.allowUnfree = true; + }; - forAllSystems = nixpkgs.lib.genAttrs supportedSystems; + mkSharedModules = + { + username, + system, + hmModule, + extraModules ? [ ], + }: + let + unstable = mkUnstable system; + in + [ + ./packages.nix + hmModule + ( + { ... }: + { + config = { + nixpkgs.config.allowUnfree = true; + nixpkgs.overlays = [ (import ./overlays) ]; + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + users.${username}.imports = [ + ./home.nix + inputs.nixvim.homeModules.nixvim + weathr.homeModules.weathr + ]; + extraSpecialArgs = { inherit unstable; }; + }; + }; + } + ) + ] + ++ extraModules; in { nixosConfigurations = let - unstable = import nixpkgs-unstable { - system = "x86_64-linux"; - config.allowUnfree = true; - }; - master = import nixpkgs-master { - system = "x86_64-linux"; - config.allowUnfree = true; - }; + system = "x86_64-linux"; + unstable = mkUnstable system; in { hephaestus = nixpkgs.lib.nixosSystem { specialArgs = { inherit unstable - master vpngate inputs ; }; - modules = [ - ./hosts/hephaestus.nix - ./common-packages.nix - home-manager.nixosModules.home-manager - ( - { ... }: - { - config = { - nix = { + modules = mkSharedModules { + username = "dave"; + inherit system; + hmModule = home-manager.nixosModules.home-manager; + extraModules = [ + ./hosts/hephaestus.nix + ( + { ... }: + { + config.nix = { settings = { auto-optimise-store = true; - sandbox = false; substituters = [ "https://davegallant.cachix.org" ]; - trusted-users = [ - "root" - ]; + trusted-users = [ "root" ]; trusted-public-keys = [ "davegallant.cachix.org-1:SsUMqL4+tF2R3/G6X903E9laLlY1rES2QKFfePegF08=" ]; @@ -91,68 +112,32 @@ options = "--delete-older-than 14d"; }; }; - - nixpkgs.config.allowUnfree = true; - nixpkgs.overlays = [ (import ./overlays) ]; - - home-manager = { - useGlobalPkgs = true; - useUserPackages = true; - users.dave.imports = [ - ./home.nix - inputs.nixvim.homeModules.nixvim - weathr.homeModules.weathr - ]; - extraSpecialArgs = { inherit unstable master; }; - }; - }; - } - ) - ]; + } + ) + ]; + }; }; }; darwinConfigurations = let system = "aarch64-darwin"; - unstable = import nixpkgs-unstable { - config.allowUnfree = true; - inherit system; - }; - master = import nixpkgs-master { - config.allowUnfree = true; - inherit system; - }; + unstable = mkUnstable system; in { zelus = darwin.lib.darwinSystem { inherit system; - specialArgs = { inherit unstable master; }; - - modules = [ - home-manager.darwinModules.home-manager - ./hosts/zelus.nix - ./common-packages.nix - ( - { ... }: - { - config = { - nixpkgs.config.allowUnfree = true; - nixpkgs.overlays = [ (import ./overlays) ]; - home-manager = { - useGlobalPkgs = true; - useUserPackages = true; - users."dave.gallant".imports = [ - ./home.nix - inputs.nixvim.homeModules.nixvim - weathr.homeModules.weathr - ]; - extraSpecialArgs = { inherit unstable master; }; - }; - }; - } - ) - ]; + specialArgs = { + inherit unstable inputs; + }; + modules = mkSharedModules { + username = "dave.gallant"; + inherit system; + hmModule = home-manager.darwinModules.home-manager; + extraModules = [ + ./hosts/zelus.nix + ]; + }; }; }; }; diff --git a/home.nix b/home.nix index a544c5d..bc3684c 100644 --- a/home.nix +++ b/home.nix @@ -21,8 +21,6 @@ in }; }; - services.lorri.enable = stdenv.isLinux; - fonts.fontconfig.enable = true; programs = { @@ -116,33 +114,33 @@ in enable = true; interactiveShellInit = '' - set fish_greeting + set fish_greeting - bind \cw backward-kill-word + bind \cw backward-kill-word - set -x DOCKER_CLI_HINTS false - set -x DOCKER_DEFAULT_PLATFORM linux/amd64 - set -x EDITOR vim - set -x NNN_FIFO "$XDG_RUNTIME_DIR/nnn.fifo" - set -x PAGER less - ${lib.optionalString pkgs.stdenv.isLinux "set -x SSH_AUTH_SOCK /home/dave/.bitwarden-ssh-agent.sock"} - set -x TERM xterm-256color + set -x DOCKER_CLI_HINTS false + set -x DOCKER_DEFAULT_PLATFORM linux/amd64 + set -x EDITOR vim + set -x NNN_FIFO "$XDG_RUNTIME_DIR/nnn.fifo" + set -x PAGER less + ${lib.optionalString pkgs.stdenv.isLinux "set -x SSH_AUTH_SOCK /home/dave/.bitwarden-ssh-agent.sock"} + set -x TERM xterm-256color - set -x PATH $PATH \ - ~/.cargo/bin \ - ~/.local/bin \ - ~/.npm-packages/bin \ - /opt/homebrew/bin \ - ~/.krew/bin \ - ~/bin + set -x PATH $PATH \ + ~/.cargo/bin \ + ~/.local/bin \ + ~/.npm-packages/bin \ + /opt/homebrew/bin \ + ~/.krew/bin \ + ~/bin - # golang - set -x GOPATH ~/go - set -x GOBIN $GOPATH/bin - set -x PATH $PATH $GOBIN + # golang + set -x GOPATH ~/go + set -x GOBIN $GOPATH/bin + set -x PATH $PATH $GOBIN - source $HOME/work.fish - # ''; + source $HOME/work.fish + ''; shellInit = '' atuin init fish | source diff --git a/hosts/hephaestus.nix b/hosts/hephaestus.nix index 8881370..e5f4fee 100644 --- a/hosts/hephaestus.nix +++ b/hosts/hephaestus.nix @@ -1,11 +1,9 @@ { - config, lib, modulesPath, pkgs, unstable, - vpngate, ... }: { @@ -63,84 +61,6 @@ }; }; - environment.systemPackages = with pkgs; [ - # desktop apps - bitwarden-desktop - dbeaver-bin - discord - feishin - freefilesync - gimp-with-plugins - google-chrome - httpie-desktop - onlyoffice-desktopeditors - pika-backup - pinta - qbittorrent - unstable.obsidian - unstable.podman-desktop - unstable.signal-desktop-bin - unstable.zoom-us - - # gaming - heroic - ludusavi - lutris - mupen64plus - protonup-qt - unstable.mcpelauncher-ui-qt - unstable.ryubing - wine - - # kde - kdePackages.bluedevil - kdePackages.kcalc - kdePackages.kcharselect - kdePackages.kclock - kdePackages.kcolorchooser - kdePackages.ksystemlog - kdePackages.partitionmanager - kdePackages.sddm-kcm - - # media - calibre - libation - unstable.spotify - vlc - - # networking - iputils - traceroute - unstable.ktailctl - unstable.tailscale - vpngate.packages.x86_64-linux.default - whois - - # security - bleachbit - clamtk - cryptsetup - opensnitch-ui - pinentry-curses - - # system utilities - hardinfo2 - nfs-utils - pciutils - qemu - unrar - unstable.beszel - usbutils - virt-manager - wayland-utils - wl-clipboard - - # development - nodePackages.prettier - nodePackages.yarn - nodejs - ]; - fileSystems = { "/" = { device = "/dev/disk/by-uuid/7f4f0948-041c-47e9-ab28-53132026f158"; @@ -173,7 +93,6 @@ noto-fonts noto-fonts-cjk-sans noto-fonts-color-emoji - noto-fonts ]; fonts.fontconfig.defaultFonts = { diff --git a/hosts/zelus.nix b/hosts/zelus.nix index fe04061..86640e5 100644 --- a/hosts/zelus.nix +++ b/hosts/zelus.nix @@ -113,10 +113,6 @@ taps = [ "hashicorp/tap" - "homebrew/bundle" - "homebrew/cask-fonts" - "homebrew/cask-versions" - "homebrew/services" ]; }; diff --git a/justfile b/justfile index 8758051..4fffbb4 100644 --- a/justfile +++ b/justfile @@ -24,7 +24,7 @@ update: @./update-flake.sh fmt: - nixfmt *.nix + fd -e nix -x nixfmt clean: echo 'Cleaning user...' diff --git a/overlays/cd-fzf/default.nix b/overlays/cd-fzf/default.nix index 49fe529..89d27fd 100644 --- a/overlays/cd-fzf/default.nix +++ b/overlays/cd-fzf/default.nix @@ -1,19 +1,13 @@ -{ - stdenv, - lib, - fetchurl, -}: -stdenv.mkDerivation rec { +{ stdenv, lib }: +stdenv.mkDerivation { pname = "cd-fzf"; version = "0.0.1"; - executable = ./cd-fzf; - phases = [ "unpackPhase" ]; # Remove all other phases - unpackPhase = '' - mkdir -p $out/bin - cp ${executable} $out/bin/cd-fzf + src = ./.; + installPhase = '' + install -Dm755 cd-fzf $out/bin/cd-fzf ''; - meta = with lib; { - description = "\n Fuzzy find change directory"; - platforms = platforms.unix; + meta = { + description = "Fuzzy find change directory"; + platforms = lib.platforms.unix; }; } diff --git a/packages.nix b/packages.nix new file mode 100644 index 0000000..8eae7de --- /dev/null +++ b/packages.nix @@ -0,0 +1,174 @@ +{ + pkgs, + lib, + unstable, + vpngate, + ... +}: +let + inherit (pkgs) stdenv; +in +{ + environment.systemPackages = + with pkgs; + [ + # essentials + curl + gnumake + gnupg + jq + unzip + zip + + # modern cli + atuin + bat + cd-fzf + doggo + eza + fd + github-cli + hadolint + lazygit + macchina + ncdu + progress + ripgrep + shellcheck + shfmt + viddy + yq-go + + # containers + unstable.k9s + unstable.krew + unstable.kubecolor + unstable.kubectl + unstable.kubectx + unstable.kubernetes-helm + unstable.stern + + # cloud + awscli2 + google-cloud-sdk + terraform + + # lsp + nodePackages.bash-language-server + nodePackages.eslint + nodePackages.yaml-language-server + terraform-ls + + # monitoring + btop + + # golang + gofumpt + golangci-lint + gopls + + # rust + rustup + + # nix + nix-tree + nixfmt-rfc-style + nixpkgs-review + nvd + + # python + virtualenv + + # media + yt-dlp + ] + ++ lib.optionals stdenv.isLinux [ + xclip + xdg-utils + + # networking (linux-specific) + arp-scan + dnsutils + iperf + nmap + openssl + openvpn + tcpdump + + # desktop apps + bitwarden-desktop + dbeaver-bin + discord + feishin + freefilesync + gimp-with-plugins + google-chrome + httpie-desktop + onlyoffice-desktopeditors + pika-backup + pinta + qbittorrent + unstable.obsidian + unstable.podman-desktop + unstable.signal-desktop-bin + unstable.zoom-us + + # gaming + heroic + ludusavi + lutris + mupen64plus + protonup-qt + unstable.mcpelauncher-ui-qt + unstable.ryubing + wine + + # kde + kdePackages.bluedevil + kdePackages.kcalc + kdePackages.kcharselect + kdePackages.kclock + kdePackages.kcolorchooser + kdePackages.ksystemlog + kdePackages.partitionmanager + kdePackages.sddm-kcm + + # media + calibre + libation + unstable.spotify + vlc + + # networking + iputils + traceroute + unstable.ktailctl + unstable.tailscale + vpngate.packages.x86_64-linux.default + whois + + # security + bleachbit + clamtk + cryptsetup + opensnitch-ui + pinentry-curses + + # system utilities + hardinfo2 + nfs-utils + pciutils + qemu + unrar + unstable.beszel + usbutils + virt-manager + wayland-utils + wl-clipboard + + # development + nodePackages.prettier + nodePackages.yarn + nodejs + ]; +} diff --git a/update-flake.sh b/update-flake.sh index 77bb9c5..37760ca 100755 --- a/update-flake.sh +++ b/update-flake.sh @@ -3,7 +3,7 @@ set -euo pipefail if ! git diff-index --quiet HEAD --; then - git stash push -m "Auto-stash via update-flash.sh on $(date)" + git stash push -m "Auto-stash via update-flake.sh on $(date)" fi git pull