Fix resolving FQDN when resolved is enabled
This commit is contained in:
parent
3816e6fc5d
commit
a9f86e7ced
|
@ -167,5 +167,15 @@
|
|||
(lib.mkIf (!config.sbruder.full) {
|
||||
documentation.enable = lib.mkDefault false;
|
||||
})
|
||||
(lib.mkIf (config.services.resolved.enable) {
|
||||
# With NixOS’s default database order for hosts,
|
||||
# resolving the FQDN with hostname -f always returns “localhost”
|
||||
# when resolved is enabled.
|
||||
# This changes the priority of the files database,
|
||||
# which fixes this.
|
||||
# This workaround was taken from
|
||||
# https://github.com/NixOS/nixpkgs/issues/132646#issuecomment-1782684381
|
||||
system.nssDatabases.hosts = lib.mkOrder 500 [ "files" ];
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue