mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 04:58:01 +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 = [
|
modules = [
|
||||||
../../../configs/home-manager/${name}
|
../../../configs/home-manager/${name}
|
||||||
|
|
||||||
{
|
(
|
||||||
nixpkgs.overlays = config.overlays;
|
let
|
||||||
home.username = lib.mkForce name;
|
setupConfig = config;
|
||||||
home.homeDirectory = lib.mkForce config.homeDirectory;
|
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
|
inputs.${config.homeManagerBranch}.nixosModules.home-manager
|
||||||
../../../configs/nixos/${name}
|
../../../configs/nixos/${name}
|
||||||
|
|
||||||
{
|
(
|
||||||
nixpkgs.overlays = config.overlays;
|
let
|
||||||
networking.hostName = lib.mkDefault config.hostname;
|
setupConfig = config;
|
||||||
}
|
in
|
||||||
|
{ lib, ... }: {
|
||||||
|
config = lib.mkMerge [
|
||||||
|
{
|
||||||
|
nixpkgs.overlays = setupConfig.overlays;
|
||||||
|
networking.hostName = lib.mkDefault setupConfig.hostname;
|
||||||
|
}
|
||||||
|
|
||||||
(lib.mkIf (config.domain != null) {
|
(lib.mkIf (config.domain != null) {
|
||||||
networking.domain = lib.mkForce config.domain;
|
networking.domain = lib.mkForce setupConfig.domain;
|
||||||
})
|
})
|
||||||
|
];
|
||||||
|
}
|
||||||
|
)
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -289,11 +298,16 @@ in
|
|||||||
|
|
||||||
config = lib.mkIf (cfg.configs != { }) {
|
config = lib.mkIf (cfg.configs != { }) {
|
||||||
setups.nixos.sharedModules = [
|
setups.nixos.sharedModules = [
|
||||||
{
|
(
|
||||||
home-manager.useUserPackages = lib.mkDefault true;
|
let
|
||||||
home-manager.useGlobalPkgs = lib.mkDefault true;
|
osConfig = config;
|
||||||
home-manager.sharedModules = config.setups.home-manager.sharedModules;
|
in
|
||||||
}
|
{ lib, ... }: {
|
||||||
|
home-manager.useUserPackages = lib.mkDefault true;
|
||||||
|
home-manager.useGlobalPkgs = lib.mkDefault true;
|
||||||
|
home-manager.sharedModules = osConfig.setups.home-manager.sharedModules;
|
||||||
|
}
|
||||||
|
)
|
||||||
];
|
];
|
||||||
|
|
||||||
flake =
|
flake =
|
||||||
|
Loading…
Reference in New Issue
Block a user