Issue
I have a MacBook and a server. I wanted to use denix to manage my nix configurations. But running nix flake check .# as told in the documentation gave me following error
… while checking flake output 'nixosConfigurations'
at /nix/store/4nhqfb9a4pmc1xi7bdg7qry4mfas2v34-source/flake.nix:52:7:
51| # you can safely remove the corresponding lines below.
52| nixosConfigurations = mkConfigurations "nixos";
| ^
53| homeConfigurations = mkConfigurations "home";
… while checking the NixOS configuration 'nixosConfigurations.desktop'
at /nix/store/8qqm1vy9alwailivcy085pzaf11m4fy7-source/lib/configurations/default.nix:253:19:
252| lib.optionalAttrs (!rice.inheritanceOnly or false) {
253| "${lib.optionalString (moduleSystem == "home") "${host.homeManagerUser}@"}${hostName}${
| ^
254| lib.optionalString (riceName != null) "-${riceName}"
error: The option `home-manager.users.muradb.home.homeDirectory' has conflicting definition values:
- In `/nix/store/4nhqfb9a4pmc1xi7bdg7qry4mfas2v34-source/modules/config/home.nix': "/Users/muradb"
- In `/nix/store/mnc7gdgqpmqxi0s4nyqdk6p2n50yvgin-source/nixos/common.nix': "/home/muradb"
Use `lib.mkForce value` or `lib.mkDefault value` to change the priority on any of these definitions.
This is because even though mkConfigurations "nixos" call generates nixosConfigurations.desktop entry even though the system argument in delib.host call is aarch64-darwin. I don't know if this is the intended behavior, but if it is it's very strange to generate nixosConfigurations or darwinConfigurations for every host. I kept the mkConfigurations "nixos" call since I want to add my server configurations which is running nixos.
To reproduce
nix flake init -t github:yunfachi/denix#minimal
And made following edits:
- edit
hosts/desktop/*.nix
system to "aarch64-darwin"
- delete
nixos key entirely from hardware.nix
home.home.stateVersion to "25.05"
- change values in
modules/config/constants.nix to appropriate values
- edit
flake.nix changing homeManagerUser arg in denix.lib.configurations call to appropriate value
Issue
I have a MacBook and a server. I wanted to use denix to manage my nix configurations. But running
nix flake check .#as told in the documentation gave me following errorThis is because even though
mkConfigurations "nixos"call generatesnixosConfigurations.desktopentry even though thesystemargument indelib.hostcall isaarch64-darwin. I don't know if this is the intended behavior, but if it is it's very strange to generatenixosConfigurationsordarwinConfigurationsfor every host. I kept themkConfigurations "nixos"call since I want to add my server configurations which is running nixos.To reproduce
And made following edits:
hosts/desktop/*.nixsystemto"aarch64-darwin"nixoskey entirely fromhardware.nixhome.home.stateVersionto"25.05"modules/config/constants.nixto appropriate valuesflake.nixchanginghomeManagerUserarg indenix.lib.configurationscall to appropriate value