diff --git a/.envrc b/.envrc index 6a9b262..d5f0eb0 100644 --- a/.envrc +++ b/.envrc @@ -1 +1,2 @@ use flake .#nix +use flake .#SkyOS \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9b42106 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.direnv/ diff --git a/devShells/default.nix b/devShells/default.nix index 88586a9..6d16d81 100644 --- a/devShells/default.nix +++ b/devShells/default.nix @@ -53,20 +53,32 @@ in }: { - devShells = builtins.listToAttrs ( - map (name: { - inherit name; - value = + devShells = + builtins.listToAttrs ( + map (name: { + inherit name; + value = + let + cfg = import ./${name}/default.nix pkgs; + in + pkgs.mkShell { + inherit name; + packages = map (p: p) (builtins.attrValues cfg.packages); + shellHook = cfg.shellHook or ""; + }; + }) dirs + ) + // { + nixos = let - cfg = import ./${name}/default.nix pkgs; + cfg = import ./nixos.nix pkgs; in pkgs.mkShell { - inherit name; + name = "SkyOS"; packages = map (p: p) (builtins.attrValues cfg.packages); shellHook = cfg.shellHook or ""; }; - }) dirs - ); + }; }; flake.templates = builtins.listToAttrs ( map (name: { diff --git a/devShells/nixos.nix b/devShells/nixos.nix new file mode 100644 index 0000000..3b5e899 --- /dev/null +++ b/devShells/nixos.nix @@ -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; +}