refactor(flake.nix): Use flake-parts to simplify flake.nix
This commit is contained in:
parent
f7a64063bb
commit
10e72d3c19
10 changed files with 380 additions and 271 deletions
43
dev-utils.nix
Normal file
43
dev-utils.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{ self, ... }:
|
||||
{
|
||||
# Systems on which to make dev utilities runnable; anything
|
||||
# NixOS-related encodes its own system.
|
||||
systems = [ "x86_64-linux" ];
|
||||
|
||||
perSystem =
|
||||
{
|
||||
inputs',
|
||||
self',
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
apps = {
|
||||
default = self'.apps.runVm;
|
||||
|
||||
runVm = {
|
||||
type = "app";
|
||||
program = lib.getExe self.nixosConfigurations.hetzner-1.config.system.build.vm;
|
||||
meta.description = "Run the test VM";
|
||||
};
|
||||
};
|
||||
|
||||
devShells = {
|
||||
default = pkgs.mkShell {
|
||||
sopsPGPKeyDirs = [
|
||||
"./keys/hosts/"
|
||||
"./keys/users/"
|
||||
];
|
||||
|
||||
packages = lib.attrValues {
|
||||
inherit (inputs'.sops-nix.packages) sops-import-keys-hook sops-init-gpg-key;
|
||||
inherit (pkgs) deploy-rs;
|
||||
};
|
||||
};
|
||||
|
||||
minecraft = pkgs.mkShell { packages = lib.attrValues { inherit (pkgs) packwiz; }; };
|
||||
webserver = self'.packages.webserver.devShell;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue