Unable to explicitly specify networking.hostName
willruggiano opened this issue · 1 comments
willruggiano commented
If I have;
mkFlake {
hosts.foo = {
modules = [ ./hosts/foo.nix ];
};
}
and then in foo.nix
I have;
{
networking.hostName = "bar";
}
I get an error;
error: The option `networking.hostName` has conflicting definition values:
- In `/nix/store/path/to/foo.nix`: "bar"
- In `<unknown-file>`: "foo"
There is (seemingly?) an attempt to support explicit hostName specification;
flake-utils-plus/lib/mkFlake.nix
Line 138 in 4db80b0
However either I am not specifying
networking.hostName
correctly (e.g. it needs to be an argument to mkFlake
in some way), or this logic is broken, or I am just misinterpreting the code :)gytis-ivaskevicius commented
It is expected for hostname to be specified as hosts.<hostname> = {...}
for consistency reasons. This is not a bug.
If you really wish overwrite it - you can do it via networking.hostName = lib.mkForce "bar";