significantly improve purity
This commit is contained in:
parent
45a7d43f77
commit
68e9b9a1e4
12 changed files with 139 additions and 230 deletions
|
|
@ -1,22 +1,18 @@
|
|||
{ pkgs, lib, config, modulesPath, ... }:
|
||||
let
|
||||
name = config.networking.hostName;
|
||||
nixosLibPath = (modulesPath + "/../lib");
|
||||
moduleList = import (modulesPath + "/module-list.nix");
|
||||
|
||||
optionalPath = p: lib.optional (builtins.pathExists p) p;
|
||||
dynixFromSearchPath = let
|
||||
res = builtins.tryEval <dynix>;
|
||||
in lib.optional res.success res.value;
|
||||
in
|
||||
assert builtins.pathExists nixosLibPath;
|
||||
builtins.seq lib
|
||||
builtins.seq modulesPath
|
||||
builtins.seq moduleList
|
||||
{
|
||||
imports = moduleList ++ [
|
||||
(modulesPath + "/testing/test-instrumentation.nix")
|
||||
"${modulesPath}/testing/test-instrumentation.nix"
|
||||
./hardware-configuration.nix
|
||||
] ++ lib.concatLists [
|
||||
(optionalPath ./hardware-configuration.nix)
|
||||
(optionalPath ./dynamicism)
|
||||
(optionalPath ../../modules/dynamicism)
|
||||
dynixFromSearchPath
|
||||
];
|
||||
|
||||
system.switch.enable = true;
|
||||
|
|
@ -32,13 +28,18 @@ builtins.seq moduleList
|
|||
|
||||
nix = {
|
||||
package = pkgs.lixPackageSets.latest.lix;
|
||||
nixPath = [ "nixpkgs=${pkgs.path}" ];
|
||||
nixPath = [
|
||||
"nixpkgs=${pkgs.path}"
|
||||
"/nix/var/nix/profiles/per-user/root/profile/share/nixos/modules"
|
||||
];
|
||||
|
||||
settings = {
|
||||
experimental-features = [ "nix-command" "pipe-operator" ];
|
||||
substituters = lib.mkForce [ ];
|
||||
hashed-mirrors = null;
|
||||
connect-timeout = 1;
|
||||
# For my debugging purposes.
|
||||
show-trace = true;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -54,6 +55,7 @@ builtins.seq moduleList
|
|||
dynamicism.for.gotosocial.enable = true;
|
||||
|
||||
environment.pathsToLink = [ "/share" ];
|
||||
environment.extraOutputsToInstall = [ "modules" ];
|
||||
environment.variables = {
|
||||
"NIXOS_CONFIG" = "/etc/nixos/configuration.nix";
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue