feat(devShells): shell for NixOS configuration development
This commit is contained in:
parent
f0a1b103e0
commit
e4f81f2e3f
4 changed files with 47 additions and 8 deletions
1
.envrc
1
.envrc
|
|
@ -1 +1,2 @@
|
|||
use flake .#nix
|
||||
use flake .#SkyOS
|
||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
.direnv/
|
||||
|
|
@ -53,7 +53,8 @@ in
|
|||
}:
|
||||
|
||||
{
|
||||
devShells = builtins.listToAttrs (
|
||||
devShells =
|
||||
builtins.listToAttrs (
|
||||
map (name: {
|
||||
inherit name;
|
||||
value =
|
||||
|
|
@ -66,7 +67,18 @@ in
|
|||
shellHook = cfg.shellHook or "";
|
||||
};
|
||||
}) dirs
|
||||
);
|
||||
)
|
||||
// {
|
||||
nixos =
|
||||
let
|
||||
cfg = import ./nixos.nix pkgs;
|
||||
in
|
||||
pkgs.mkShell {
|
||||
name = "SkyOS";
|
||||
packages = map (p: p) (builtins.attrValues cfg.packages);
|
||||
shellHook = cfg.shellHook or "";
|
||||
};
|
||||
};
|
||||
};
|
||||
flake.templates = builtins.listToAttrs (
|
||||
map (name: {
|
||||
|
|
|
|||
25
devShells/nixos.nix
Normal file
25
devShells/nixos.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
# SkyOS
|
||||
/**
|
||||
Development shell with tools needed for configuration editing
|
||||
*/
|
||||
pkgs: {
|
||||
/**
|
||||
tool for managing __runtime__ secrets. See [sops-nix](https://github.com/mic92/sops-nix) for more info
|
||||
*/
|
||||
packages.sops = pkgs.sops;
|
||||
/**
|
||||
tool for managing __eval time__ secrets.
|
||||
|
||||
In near future, it's going to be replaced by my own project which uses `sops` instead of bare `age`
|
||||
*/
|
||||
packages.git-agecrypt = pkgs.git-agecrypt;
|
||||
|
||||
/**
|
||||
tool for generating documentation from comments in .nix files
|
||||
*/
|
||||
packages.nixdoc = pkgs.nixdoc;
|
||||
/**
|
||||
tool for generating book from md files made by `nixdoc`
|
||||
*/
|
||||
packages.mdbook = pkgs.mdbook;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue