mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 09:07:21 +01:00
chore: make dynamic import usage clearer
This commit is contained in:
parent
b54d3ee065
commit
b67abcce27
2 changed files with 66 additions and 60 deletions
|
|
@ -4419,30 +4419,33 @@ TODO
|
|||
systemFunc {
|
||||
specialArgs = { inherit inputs outputs lib self; };
|
||||
modules = [
|
||||
# put inports here that are for all hosts
|
||||
inputs.disko.nixosModules.disko
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
inputs.impermanence.nixosModules.impermanence
|
||||
inputs.lanzaboote.nixosModules.lanzaboote
|
||||
"${self}/hosts/${type}/${host}"
|
||||
] ++
|
||||
# toto (deployment sandbox) & iso should never receive general configuration
|
||||
(if (host == "toto" || host == "iso") then [ ] else
|
||||
(
|
||||
# sync & winters (servers) should not receive common non-server config
|
||||
([
|
||||
# put inports here that are for all servers and normal hosts
|
||||
inputs.nix-topology.nixosModules.default
|
||||
] ++
|
||||
(if (host == "winters" || host == "sync") then [ ] else [
|
||||
# put imports here that are for all normal hosts
|
||||
"${self}/profiles/${type}/common"
|
||||
inputs.stylix.nixosModules.stylix
|
||||
inputs.nswitch-rcm-nix.nixosModules.nswitch-rcm
|
||||
inputs.nix-topology.nixosModules.default
|
||||
]) ++ (if (type == "nixos") then [
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.users.swarsel.imports = (
|
||||
# sync & winters (servers) should not receive common non-server config
|
||||
if (host == "winters" || host == "sync") then [ ] else [
|
||||
# put imports here that are for all normal hosts
|
||||
"${self}/profiles/home/common"
|
||||
]
|
||||
) ++ [
|
||||
# put inports here that are for all servers and normal hosts
|
||||
inputs.sops-nix.homeManagerModules.sops
|
||||
inputs.nix-index-database.hmModules.nix-index
|
||||
] ++ (builtins.attrValues outputs.homeModules);
|
||||
|
|
|
|||
|
|
@ -32,30 +32,33 @@
|
|||
systemFunc {
|
||||
specialArgs = { inherit inputs outputs lib self; };
|
||||
modules = [
|
||||
# put inports here that are for all hosts
|
||||
inputs.disko.nixosModules.disko
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
inputs.impermanence.nixosModules.impermanence
|
||||
inputs.lanzaboote.nixosModules.lanzaboote
|
||||
"${self}/hosts/${type}/${host}"
|
||||
] ++
|
||||
# toto (deployment sandbox) & iso should never receive general configuration
|
||||
(if (host == "toto" || host == "iso") then [ ] else
|
||||
(
|
||||
# sync & winters (servers) should not receive common non-server config
|
||||
([
|
||||
# put inports here that are for all servers and normal hosts
|
||||
inputs.nix-topology.nixosModules.default
|
||||
] ++
|
||||
(if (host == "winters" || host == "sync") then [ ] else [
|
||||
# put imports here that are for all normal hosts
|
||||
"${self}/profiles/${type}/common"
|
||||
inputs.stylix.nixosModules.stylix
|
||||
inputs.nswitch-rcm-nix.nixosModules.nswitch-rcm
|
||||
inputs.nix-topology.nixosModules.default
|
||||
]) ++ (if (type == "nixos") then [
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.users.swarsel.imports = (
|
||||
# sync & winters (servers) should not receive common non-server config
|
||||
if (host == "winters" || host == "sync") then [ ] else [
|
||||
# put imports here that are for all normal hosts
|
||||
"${self}/profiles/home/common"
|
||||
]
|
||||
) ++ [
|
||||
# put inports here that are for all servers and normal hosts
|
||||
inputs.sops-nix.homeManagerModules.sops
|
||||
inputs.nix-index-database.hmModules.nix-index
|
||||
] ++ (builtins.attrValues outputs.homeModules);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue