mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-30 22:57:55 +00:00
flake-parts/setups: update Nix modules to be more self-contained
This commit is contained in:
parent
b08945aa39
commit
8a9e20b5f4
@ -158,11 +158,16 @@ let
|
||||
modules = [
|
||||
../../../configs/home-manager/${name}
|
||||
|
||||
{
|
||||
nixpkgs.overlays = config.overlays;
|
||||
home.username = lib.mkForce name;
|
||||
home.homeDirectory = lib.mkForce config.homeDirectory;
|
||||
}
|
||||
(
|
||||
let
|
||||
setupConfig = config;
|
||||
in
|
||||
{ config, lib, ... }: {
|
||||
nixpkgs.overlays = setupConfig.overlays;
|
||||
home.username = lib.mkForce name;
|
||||
home.homeDirectory = lib.mkForce setupConfig.homeDirectory;
|
||||
}
|
||||
)
|
||||
];
|
||||
};
|
||||
};
|
||||
|
@ -209,14 +209,23 @@ let
|
||||
inputs.${config.homeManagerBranch}.nixosModules.home-manager
|
||||
../../../configs/nixos/${name}
|
||||
|
||||
{
|
||||
nixpkgs.overlays = config.overlays;
|
||||
networking.hostName = lib.mkDefault config.hostname;
|
||||
}
|
||||
(
|
||||
let
|
||||
setupConfig = config;
|
||||
in
|
||||
{ lib, ... }: {
|
||||
config = lib.mkMerge [
|
||||
{
|
||||
nixpkgs.overlays = setupConfig.overlays;
|
||||
networking.hostName = lib.mkDefault setupConfig.hostname;
|
||||
}
|
||||
|
||||
(lib.mkIf (config.domain != null) {
|
||||
networking.domain = lib.mkForce config.domain;
|
||||
})
|
||||
(lib.mkIf (config.domain != null) {
|
||||
networking.domain = lib.mkForce setupConfig.domain;
|
||||
})
|
||||
];
|
||||
}
|
||||
)
|
||||
];
|
||||
};
|
||||
};
|
||||
@ -289,11 +298,16 @@ in
|
||||
|
||||
config = lib.mkIf (cfg.configs != { }) {
|
||||
setups.nixos.sharedModules = [
|
||||
{
|
||||
home-manager.useUserPackages = lib.mkDefault true;
|
||||
home-manager.useGlobalPkgs = lib.mkDefault true;
|
||||
home-manager.sharedModules = config.setups.home-manager.sharedModules;
|
||||
}
|
||||
(
|
||||
let
|
||||
osConfig = config;
|
||||
in
|
||||
{ lib, ... }: {
|
||||
home-manager.useUserPackages = lib.mkDefault true;
|
||||
home-manager.useGlobalPkgs = lib.mkDefault true;
|
||||
home-manager.sharedModules = osConfig.setups.home-manager.sharedModules;
|
||||
}
|
||||
)
|
||||
];
|
||||
|
||||
flake =
|
||||
|
Loading…
Reference in New Issue
Block a user