mirror of
https://github.com/nickolaj-jepsen/nixos.git
synced 2026-01-22 00:01:58 +01:00
feat: add devshell
This commit is contained in:
parent
d38a51ae5c
commit
a177ce510f
3 changed files with 45 additions and 0 deletions
|
|
@ -121,6 +121,15 @@ just age -e <file> -o <output.age>
|
||||||
|
|
||||||
## Development
|
## 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
|
### Formatting
|
||||||
|
|
||||||
Code is formatted using `treefmt-nix` with:
|
Code is formatted using `treefmt-nix` with:
|
||||||
|
|
|
||||||
35
devshell.nix
Normal file
35
devshell.nix
Normal 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"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
imports = [
|
imports = [
|
||||||
inputs.agenix-rekey.flakeModule
|
inputs.agenix-rekey.flakeModule
|
||||||
./formatter.nix
|
./formatter.nix
|
||||||
|
./devshell.nix
|
||||||
./hosts
|
./hosts
|
||||||
];
|
];
|
||||||
systems = [
|
systems = [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue