articles/NixOS-configuration-restruc.../configuration-inputs-output...

96 lines
2.2 KiB
Plaintext

@startuml
left to right direction
<style>
cloud {
LineThickness 3
LineColor lightblue
BackGroundColor lightcyan
}
folder {
LineThickness 3
LineColor lightblue
BackGroundColor lightcyan
}
</style>
node "NixOS machine" as machine {
file "hardware-configuration.nix" as hardware_configuration #lightcyan
folder """userdata/""" as userdata_folder {
/'
' file "schema.json\n<i>(who uses?)" as schema
' file "tokens_schema.json\n<i>(who uses?)" as tokens_schema
'/
file "tokens.json" as tokens
file "<b>userdata.json" as userdata
}
collections "/nix/store/*" as nix_store
/'
' file local_flake [
' <b>flake.nix
' ===
' inputs = {
' selfprivacy-nixos-config.url = ...;
' };
' outputs = {
' nixosConfigurations =
' selfprivacy-nixos-config.outputs.nixosConfigurations-fun userdata;
' };
' ]
'/
}
folder "configuration repo" as config_repo {
/'
' file "flake.nix" as flake_nix {
' card "input: nixpkgs.url"
' card "input: selfprivacy-overlay.url"
' }
'/
file flake_nix [
<b>flake.nix
===
inputs = {
nixpkgs.url = ...;
selfprivacy-overlay.url = ...;
};
]
file flake_lock [
<b>flake.lock
]
flake_lock - flake_nix
note top of flake_lock : pinning with hashes
file "<b><u>configuration.nix" as configuration
collections "pure imports" as pure_imports
}
cloud "overlay\n<i>commit @ git.selfprivacy.org" as overlay {
node "selfprivacy-graphql-api" as selfprivacy_graphql_api
}
cloud "selfprivacy-rest-api\n<i>commit @ git.selfprivacy.org" as selfprivacy_rest_api_commit {
component "python app" as selfprivacy_api_app
}
cloud " <b>nixpkgs\n<i>commit @ github.com (?)" as nixpkgs
nixpkgs --> flake_lock
overlay --> flake_lock
configuration <-- userdata : <b>impure!
configuration <-- hardware_configuration : <b>impure!
selfprivacy_rest_api_commit -->> selfprivacy_graphql_api
flake_nix --> configuration
flake_lock --> configuration
configuration -[bold]-|> nix_store : nixos-rebuild
configuration <-l- pure_imports
@enduml