diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index bf9ab16..6b750ca 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -51,19 +51,19 @@ Hosts enable services declaratively: `custom.web-services.forgejo = { enable = t ## Developer Workflows -| Task | Command | -| ----------------------------- | ------------------------------------------ | -| Rebuild & switch locally | `just switch` | -| Test config without switching | `just test` | -| Deploy to remote host(s) | `just deploy hostname1 hostname2` | -| Format all files | `just fmt` or `nix fmt` | -| Run flake checks + tests | `just check` | -| Check without building | `just check-lite` | -| Update flake inputs | `just update` | -| Edit SOPS secrets | `just sops-edit hosts//secrets.json` | -| Rotate all secrets | `just sops-rotate-all` | -| Install a new host | `just install root@` | -| Open nix repl for a host | `just repl ` | +| Task | Command | +|---|---| +| Rebuild & switch locally | `just switch` | +| Test config without switching | `just test` | +| Deploy to remote host(s) | `just deploy hostname1 hostname2` | +| Format all files | `just fmt` or `nix fmt` | +| Run flake checks + tests | `just check` | +| Check without building | `just check-lite` | +| Update flake inputs | `just update` | +| Edit SOPS secrets | `just sops-edit hosts//secrets.json` | +| Rotate all secrets | `just sops-rotate-all` | +| Install a new host | `just install root@` | +| Open nix repl for a host | `just repl ` | SOPS commands auto-enter a `nix develop .#sops` shell if `sops` isn't available, which handles Bitwarden login and age key retrieval. diff --git a/flake-parts/checks.nix b/flake-parts/checks.nix deleted file mode 100644 index 980b2f6..0000000 --- a/flake-parts/checks.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ inputs, self, ... }: -{ - perSystem = - { inputs', pkgs, ... }: - { - checks = { - formatting = (inputs.treefmt.lib.evalModule pkgs "${self}/treefmt.nix").config.build.check self; - - statix = pkgs.runCommand "statix" { buildInputs = [ inputs'.statix.packages.statix ]; } '' - statix check ${self} - touch $out - ''; - - deadnix = pkgs.runCommand "deadnix" { buildInputs = [ pkgs.deadnix ]; } '' - deadnix --fail ${self} - touch $out - ''; - }; - }; -} diff --git a/flake-parts/formatter.nix b/flake-parts/formatter.nix index e8ac02a..c2350b8 100644 --- a/flake-parts/formatter.nix +++ b/flake-parts/formatter.nix @@ -1,8 +1,16 @@ -{ inputs, self, ... }: +{ inputs, ... }: { perSystem = { pkgs, ... }: { - formatter = (inputs.treefmt.lib.evalModule pkgs "${self}/treefmt.nix").config.build.wrapper; + formatter = + (inputs.treefmt.lib.evalModule pkgs { + projectRootFile = "flake.nix"; + programs = { + nixfmt.enable = true; + prettier.enable = true; + just.enable = true; + }; + }).config.build.wrapper; }; } diff --git a/flake.lock b/flake.lock index a0ddfe5..35f1b99 100644 --- a/flake.lock +++ b/flake.lock @@ -114,27 +114,6 @@ "type": "github" } }, - "flake-parts_2": { - "inputs": { - "nixpkgs-lib": [ - "statix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1754487366, - "narHash": "sha256-pHYj8gUBapuUzKV/kN/tR3Zvqc7o6gdFB9XKXIp1SQ8=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "af66ad14b28a127c5c0f3bbb298218fc63528a18", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, "home-manager": { "inputs": { "nixpkgs": [ @@ -305,7 +284,6 @@ "nixpkgs-unstable": "nixpkgs-unstable", "radicale-birthday-calendar": "radicale-birthday-calendar", "sops": "sops", - "statix": "statix", "treefmt": "treefmt", "vscode-extensions": "vscode-extensions" } @@ -330,44 +308,6 @@ "type": "github" } }, - "statix": { - "inputs": { - "flake-parts": "flake-parts_2", - "nixpkgs": [ - "nixpkgs" - ], - "systems": "systems" - }, - "locked": { - "lastModified": 1760596293, - "narHash": "sha256-duH6Il124g+CdYX+HCqOGnpJxyxOCgWYcrcK0CBnA2M=", - "owner": "oppiliappan", - "repo": "statix", - "rev": "e9df54ce918457f151d2e71993edeca1a7af0132", - "type": "github" - }, - "original": { - "owner": "oppiliappan", - "repo": "statix", - "type": "github" - } - }, - "systems": { - "flake": false, - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, "treefmt": { "inputs": { "nixpkgs": [ diff --git a/flake.nix b/flake.nix index 3667723..3233b49 100644 --- a/flake.nix +++ b/flake.nix @@ -35,11 +35,6 @@ inputs.nixpkgs.follows = "nixpkgs"; }; - statix = { - url = "github:oppiliappan/statix"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - vscode-extensions = { url = "github:nix-community/nix-vscode-extensions"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/treefmt.nix b/treefmt.nix deleted file mode 100644 index d81baf4..0000000 --- a/treefmt.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ - projectRootFile = "flake.nix"; - programs = { - nixfmt.enable = true; - prettier.enable = true; - just.enable = true; - }; -}