instant repl for system flake with nixpkgs, use system nixpkgs for nix commands
This commit is contained in:
parent
4ab26233b7
commit
f6fffc51ab
@ -13,7 +13,7 @@ let
|
|||||||
usr = { inherit utils; };
|
usr = { inherit utils; };
|
||||||
util = utils;
|
util = utils;
|
||||||
nixosPersistence = "${impermanence}/nixos.nix";
|
nixosPersistence = "${impermanence}/nixos.nix";
|
||||||
nixpkgsFlake = nixpkgs;
|
inputs = inputs;
|
||||||
};
|
};
|
||||||
|
|
||||||
modules =
|
modules =
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ config, lib, pkgs, util, nixpkgsFlake, ... }:
|
{ config, lib, pkgs, util, inputs, ... }:
|
||||||
let
|
let
|
||||||
inherit (util) pkgBin;
|
inherit (util) pkgBin;
|
||||||
inherit (lib) fileContents mkIf;
|
inherit (lib) fileContents mkIf;
|
||||||
@ -86,20 +86,36 @@ in
|
|||||||
|
|
||||||
myip =
|
myip =
|
||||||
"${pkgs.dnsutils}/bin/dig +short myip.opendns.com @208.67.222.222 2>&1";
|
"${pkgs.dnsutils}/bin/dig +short myip.opendns.com @208.67.222.222 2>&1";
|
||||||
|
|
||||||
|
sys-repl =
|
||||||
|
"source /etc/set-environment && ${nixBin} repl ${./..}/repl.nix";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
nix = {
|
nix =
|
||||||
package = pkgs.nixFlakes;
|
let
|
||||||
autoOptimiseStore = true;
|
flakes = lib.filterAttrs (name: value: value ? outputs) inputs;
|
||||||
optimise.automatic = true;
|
|
||||||
allowedUsers = [ "@wheel" ];
|
nixPath = lib.mapAttrsToList
|
||||||
trustedUsers = [ "root" "@wheel" ];
|
(name: _: "${name}=${inputs.${name}}")
|
||||||
extraOptions = ''
|
flakes;
|
||||||
experimental-features = nix-command flakes ca-references
|
|
||||||
'';
|
registry = builtins.mapAttrs
|
||||||
registry.nixpkgs.flake = nixpkgsFlake;
|
(name: v: { flake = v; })
|
||||||
};
|
flakes;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
package = pkgs.nixFlakes;
|
||||||
|
autoOptimiseStore = true;
|
||||||
|
optimise.automatic = true;
|
||||||
|
allowedUsers = [ "@wheel" ];
|
||||||
|
trustedUsers = [ "root" "@wheel" ];
|
||||||
|
extraOptions = ''
|
||||||
|
experimental-features = nix-command flakes ca-references
|
||||||
|
'';
|
||||||
|
nixPath = nixPath ++ [ "repl=${./..}/repl.nix" ];
|
||||||
|
inherit registry;
|
||||||
|
};
|
||||||
|
|
||||||
# security = {
|
# security = {
|
||||||
# hideProcessInformation = true;
|
# hideProcessInformation = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user