modules: drop any logic already done by fup
this includes creating multiPkgs, and dropping options already set by fup
This commit is contained in:
parent
abd133c244
commit
59383e871f
@ -1,28 +1,16 @@
|
||||
{ lib }:
|
||||
{
|
||||
modOverrides = { overrides }:
|
||||
{ config, overrideModulesPath, ... }:
|
||||
let
|
||||
inherit (overrides) modules disabledModules;
|
||||
in
|
||||
{
|
||||
disabledModules = modules ++ disabledModules;
|
||||
imports = map
|
||||
(path: "${overrideModulesPath}/${path}")
|
||||
modules;
|
||||
};
|
||||
|
||||
hmDefaults = { userSuites, extern, homeModules }: {
|
||||
hmDefaults = { suites, modules }: {
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
|
||||
extraSpecialArgs = extern.userSpecialArgs // { suites = userSuites; };
|
||||
sharedModules = extern.userModules ++ (builtins.attrValues homeModules);
|
||||
extraSpecialArgs = { inherit suites; };
|
||||
sharedModules = modules;
|
||||
};
|
||||
};
|
||||
|
||||
globalDefaults = { self, nixos, inputs, multiPkgs }:
|
||||
globalDefaults = { self, inputs }:
|
||||
let
|
||||
experimentalFeatures = [
|
||||
"flakes"
|
||||
@ -31,27 +19,22 @@
|
||||
"ca-derivations"
|
||||
];
|
||||
in
|
||||
{ config, pkgs, ... }: {
|
||||
{ channel, config, pkgs, ... }: {
|
||||
users.mutableUsers = lib.mkDefault false;
|
||||
|
||||
hardware.enableRedistributableFirmware = lib.mkDefault true;
|
||||
|
||||
nix.nixPath = [
|
||||
"nixpkgs=${nixos}"
|
||||
"nixpkgs=${channel.input}"
|
||||
"nixos-config=${self}/lib/compat/nixos"
|
||||
"home-manager=${inputs.home}"
|
||||
];
|
||||
|
||||
nixpkgs.pkgs = lib.mkDefault multiPkgs.${config.nixpkgs.system};
|
||||
|
||||
nix.registry = {
|
||||
devos.flake = self;
|
||||
nixos.flake = nixos;
|
||||
override.flake = inputs.override;
|
||||
nixos.flake = channel.input;
|
||||
};
|
||||
|
||||
nix.package = pkgs.nixFlakes;
|
||||
|
||||
nix.extraOptions = ''
|
||||
experimental-features = ${lib.concatStringsSep " "
|
||||
experimentalFeatures
|
||||
@ -61,19 +44,10 @@
|
||||
system.configurationRevision = lib.mkIf (self ? rev) self.rev;
|
||||
};
|
||||
|
||||
cachix = { self }:
|
||||
let rootCachix = "${self}/cachix.nix"; in
|
||||
if builtins.pathExists rootCachix
|
||||
then rootCachix
|
||||
else { };
|
||||
isoConfig = { self, inputs, fullHostConfig }:
|
||||
{ config, modulesPath, suites, ... }: {
|
||||
|
||||
flakeModules = { self, extern }: { imports = builtins.attrValues self.nixosModules ++ extern.modules; };
|
||||
|
||||
isoConfig = { self, nixos, inputs, fullHostConfig }:
|
||||
{ config, suites, ... }: {
|
||||
|
||||
imports = let modpath = "nixos/modules"; in
|
||||
[ "${nixos}/${modpath}/installer/cd-dvd/installation-cd-minimal-new-kernel.nix" ];
|
||||
imports = [ "${modulesPath}/installer/cd-dvd/installation-cd-minimal-new-kernel.nix" ];
|
||||
# avoid unwanted systemd service startups
|
||||
# all strings in disabledModules get appended to modulesPath
|
||||
# so convert each to list which can be coerced to string
|
||||
|
Loading…
Reference in New Issue
Block a user