diff --git a/README.adoc b/README.adoc index 340c9ba0..6737b089 100644 --- a/README.adoc +++ b/README.adoc @@ -37,6 +37,7 @@ nixos-config ├── modules/ ├── pkgs/ ├── secrets/ +├── shells/ ├── users/ ├── flake.lock ├── flake.nix @@ -55,6 +56,10 @@ It is exported in the flakes at `outputs.packages` compiled through various syst * link:./secrets/[`./secrets/`] contains my secrets managed with link:https://github.com/ryantm/agenix[agenix]. +* link:./shells/[`./shells/`] contains my development shells for interacting with the usual type of projects. +Setting this up can bring benefits outside of NixOS (unless you're interacting with projects with any OpenGL-related stuff). +footnote:[Since packages brought from Nix shells can only work with the store, a container might be better at some situations.] + * link:./users/[`./users/`] contains my link:https://github.com/nix-community/home-manager[home-manager] configurations and modules. It is exported in the flakes at `outputs.homeConfigurations`. For more information, see the link:./users/README.adoc[related documentation]. @@ -68,7 +73,7 @@ In order of priority: * [x] Create custom modules. * [x] Create a themes system similar to link:https://github.com/hlissner/dotfiles[this NixOS config]. -* [ ] Create development shells. +* [x] Create development shells. * [x] Manage secrets with agenix. * [x] Automate backups with NixOS config. * [x] Create custom packages and export it to flakes. (Maybe consider making it to upstream) diff --git a/flake.nix b/flake.nix index 75bb6348..5b75d7d0 100644 --- a/flake.nix +++ b/flake.nix @@ -121,5 +121,11 @@ # I just want to try out supporting other systems. packages = forAllSystems (system: import ./pkgs { pkgs = import nixpkgs { inherit system; }; }); + + # My several development shells for usual type of projects. This is much + # more preferable than installing all of the packages at the system + # configuration (or even home environment). + devShells = forAllSystems + (system: import ./shells { pkgs = import nixpkgs { inherit system; }; }); }; } diff --git a/shells/default.nix b/shells/default.nix new file mode 100644 index 00000000..ced1f8f7 --- /dev/null +++ b/shells/default.nix @@ -0,0 +1,5 @@ +{ pkgs ? import { } }: + +with pkgs; { + flatpak = callPackage ./flatpak.nix { }; +} diff --git a/shells/flatpak.nix b/shells/flatpak.nix new file mode 100644 index 00000000..3babadc4 --- /dev/null +++ b/shells/flatpak.nix @@ -0,0 +1,12 @@ +# My custom shell for developing Flatpak manifests. +{ mkShell, lib, flatpak-builder, editorconfig-checker, editorconfig-core-c, git, dasel }: + +mkShell { + packages = [ + dasel # For converting various data into something. + flatpak-builder # A required tool. + editorconfig-checker # We're most likely writing manifests in YAML so I need them consistent spaces. + editorconfig-core-c # editorconfig will not work without the engine, of course. + git # This is the common choice as the VCS — otherwise, bring your own. + ]; +}