mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-23 00:39:07 +01:00
Compare commits
No commits in common. "aa12d74f4598ef1af1ea6d3ae5ee51a23156e236" and "71132b3c943a5fb2d18f196755cc23422f42978a" have entirely different histories.
aa12d74f45
...
71132b3c94
6 changed files with 23 additions and 108 deletions
26
.github/copilot-instructions.md
vendored
26
.github/copilot-instructions.md
vendored
|
|
@ -51,19 +51,19 @@ Hosts enable services declaratively: `custom.web-services.forgejo = { enable = t
|
||||||
|
|
||||||
## Developer Workflows
|
## Developer Workflows
|
||||||
|
|
||||||
| Task | Command |
|
| Task | Command |
|
||||||
| ----------------------------- | ------------------------------------------ |
|
|---|---|
|
||||||
| Rebuild & switch locally | `just switch` |
|
| Rebuild & switch locally | `just switch` |
|
||||||
| Test config without switching | `just test` |
|
| Test config without switching | `just test` |
|
||||||
| Deploy to remote host(s) | `just deploy hostname1 hostname2` |
|
| Deploy to remote host(s) | `just deploy hostname1 hostname2` |
|
||||||
| Format all files | `just fmt` or `nix fmt` |
|
| Format all files | `just fmt` or `nix fmt` |
|
||||||
| Run flake checks + tests | `just check` |
|
| Run flake checks + tests | `just check` |
|
||||||
| Check without building | `just check-lite` |
|
| Check without building | `just check-lite` |
|
||||||
| Update flake inputs | `just update` |
|
| Update flake inputs | `just update` |
|
||||||
| Edit SOPS secrets | `just sops-edit hosts/<host>/secrets.json` |
|
| Edit SOPS secrets | `just sops-edit hosts/<host>/secrets.json` |
|
||||||
| Rotate all secrets | `just sops-rotate-all` |
|
| Rotate all secrets | `just sops-rotate-all` |
|
||||||
| Install a new host | `just install <host> root@<ip>` |
|
| Install a new host | `just install <host> root@<ip>` |
|
||||||
| Open nix repl for a host | `just repl <hostname>` |
|
| Open nix repl for a host | `just repl <hostname>` |
|
||||||
|
|
||||||
SOPS commands auto-enter a `nix develop .#sops` shell if `sops` isn't available, which handles Bitwarden login and age key retrieval.
|
SOPS commands auto-enter a `nix develop .#sops` shell if `sops` isn't available, which handles Bitwarden login and age key retrieval.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,8 +1,16 @@
|
||||||
{ inputs, self, ... }:
|
{ inputs, ... }:
|
||||||
{
|
{
|
||||||
perSystem =
|
perSystem =
|
||||||
{ pkgs, ... }:
|
{ 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;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
60
flake.lock
generated
60
flake.lock
generated
|
|
@ -114,27 +114,6 @@
|
||||||
"type": "github"
|
"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": {
|
"home-manager": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
|
@ -305,7 +284,6 @@
|
||||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||||
"radicale-birthday-calendar": "radicale-birthday-calendar",
|
"radicale-birthday-calendar": "radicale-birthday-calendar",
|
||||||
"sops": "sops",
|
"sops": "sops",
|
||||||
"statix": "statix",
|
|
||||||
"treefmt": "treefmt",
|
"treefmt": "treefmt",
|
||||||
"vscode-extensions": "vscode-extensions"
|
"vscode-extensions": "vscode-extensions"
|
||||||
}
|
}
|
||||||
|
|
@ -330,44 +308,6 @@
|
||||||
"type": "github"
|
"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": {
|
"treefmt": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
|
|
||||||
|
|
@ -35,11 +35,6 @@
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
statix = {
|
|
||||||
url = "github:oppiliappan/statix";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
vscode-extensions = {
|
vscode-extensions = {
|
||||||
url = "github:nix-community/nix-vscode-extensions";
|
url = "github:nix-community/nix-vscode-extensions";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
{
|
|
||||||
projectRootFile = "flake.nix";
|
|
||||||
programs = {
|
|
||||||
nixfmt.enable = true;
|
|
||||||
prettier.enable = true;
|
|
||||||
just.enable = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue