mirror of
https://github.com/divnix/digga.git
synced 2024-12-26 01:26:23 +03:00
25 lines
655 B
Nix
25 lines
655 B
Nix
{ pkgs ? import <nixpkgs> { } }:
|
|
let
|
|
configs = "${toString ./.}#nixosConfigurations";
|
|
|
|
buildIso = pkgs.writeShellScriptBin "build-iso" ''
|
|
nix build ${configs}.niximg.config.system.build.isoImage $@
|
|
'';
|
|
in pkgs.mkShell {
|
|
nativeBuildInputs = with pkgs; [ git git-crypt nixFlakes buildIso ];
|
|
|
|
shellHook = ''
|
|
mkdir -p secrets
|
|
'';
|
|
|
|
NIX_CONF_DIR = let
|
|
current = pkgs.lib.optionalString (builtins.pathExists /etc/nix/nix.conf)
|
|
(builtins.readFile /etc/nix/nix.conf);
|
|
|
|
nixConf = pkgs.writeTextDir "opt/nix.conf" ''
|
|
${current}
|
|
experimental-features = nix-command flakes ca-references
|
|
'';
|
|
in "${nixConf}/opt";
|
|
}
|