feat: add devshell

This commit is contained in:
Nickolaj Jepsen 2025-12-13 20:04:09 +01:00
parent d38a51ae5c
commit a177ce510f
3 changed files with 45 additions and 0 deletions

View file

@ -121,6 +121,15 @@ just age -e <file> -o <output.age>
## Development
### Development Shell
A Nix development shell is available with useful tools for working on this configuration:
```bash
# Enter the development shell
nix develop
```
### Formatting
Code is formatted using `treefmt-nix` with:

35
devshell.nix Normal file
View file

@ -0,0 +1,35 @@
{inputs, ...}: {
perSystem = {
pkgs,
system,
...
}: {
devShells.default = pkgs.mkShell {
name = "nixos-config";
packages = with pkgs; [
# Nix tools
nil # Nix LSP
alejandra # Nix formatter
nix-diff # Compare derivations
nix-tree # Visualize dependencies
nvd # Nix version diff
# Secrets management
inputs.agenix.packages.${system}.default
age
# Deployment
just
# Git
git
jujutsu
];
shellHook = ''
echo "🔧 NixOS Configuration Development Shell"
echo " Run 'just' to see available commands"
'';
};
};
}

View file

@ -6,6 +6,7 @@
imports = [
inputs.agenix-rekey.flakeModule
./formatter.nix
./devshell.nix
./hosts
];
systems = [