refactor(flake.nix): Use flake-parts to simplify flake.nix

This commit is contained in:
Tristan Daniël Maat 2026-02-20 05:33:26 +08:00
parent f7a64063bb
commit e75c7b831b
Signed by: tlater
GPG key ID: 02E935006CF2E8E7
10 changed files with 381 additions and 271 deletions

43
dev-utils.nix Normal file
View 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;
};
};
}