init devshell

This commit is contained in:
Abel Luck 2026-05-05 13:28:32 +02:00
parent 277b627dc1
commit 4d8b83cbb6
4 changed files with 95 additions and 0 deletions

5
.envrc Normal file
View file

@ -0,0 +1,5 @@
#!/usr/bin/env bash
if [[ $(type -t use_flake) != function ]]; then
echo "ERROR: direnv's use_flake function missing. update direnv to v2.30.0 or later." && exit 1
fi
use flake

3
.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
.direnv
result

25
flake.lock generated Normal file
View file

@ -0,0 +1,25 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1777578337,
"narHash": "sha256-Ad49moKWeXtKBJNy2ebiTQUEgdLyvGmTeykAQ9xM+Z4=",
"rev": "15f4ee454b1dce334612fa6843b3e05cf546efab",
"revCount": 990025,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.990025%2Brev-15f4ee454b1dce334612fa6843b3e05cf546efab/019de756-85a1-7400-84a3-d277a7ed191b/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/NixOS/nixpkgs/0.1"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

62
flake.nix Normal file
View file

@ -0,0 +1,62 @@
{
inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1";
outputs =
{ self, nixpkgs }:
let
systems = [
"x86_64-linux"
"aarch64-linux"
"aarch64-darwin"
];
forAllSystems = fn: nixpkgs.lib.genAttrs systems (system: fn nixpkgs.legacyPackages.${system});
in
{
#packages = forAllSystems (pkgs: {
# default = pkgs.callPackage ./package.nix { };
#});
#checks = forAllSystems (
# pkgs:
# {
# tests = self.packages.${pkgs.stdenv.hostPlatform.system}.default.overrideAttrs (_: {
# pname = "nix-cache-login-tests";
# checkPhase = ''
# runHook preCheck
# go test ./...
# runHook postCheck
# '';
# doCheck = true;
# });
# module-checks = import ./module-checks.nix { inherit self pkgs; };
# devShell = self.devShells.${pkgs.stdenv.hostPlatform.system}.default;
# }
# // pkgs.lib.optionalAttrs pkgs.stdenv.isLinux {
# nixos-module = pkgs.testers.runNixOSTest (import ./nixos-test.nix self);
# nixos-module-server = pkgs.testers.runNixOSTest (import ./nixos-test-server.nix self);
# }
#);
devShells = forAllSystems (pkgs: {
default = pkgs.mkShell {
packages = with pkgs; [
go
];
};
});
#nixosModules.default =
# {
# config,
# lib,
# pkgs,
# ...
# }:
# {
# imports = [ ./nixos-module.nix ];
# services.prometheus.exporters.dnstt.package =
# lib.mkDefault
# self.packages.${pkgs.stdenv.hostPlatform.system}.default;
# };
};
}