ToyVo / nh_darwin

Yet another nix cli helper
European Union Public License 1.2
15 stars 3 forks source link

feat: support different flakes for os and home #17

Closed thecaralice closed 1 week ago

thecaralice commented 1 week ago

Also fixes the issue with default nix-darwin and home-manager paths not working due to the default values having a ~ instead of the home directory path.

Configuration (from least priority to most):

Nix module configuration:

ToyVo commented 1 week ago

Thanks again, I just recently came across the bug with ~.

ToyVo commented 1 week ago

the lazy lock you added requires rustc 1.80.0 nixpkgs-24.05 has 1.77.2, nixpkgs-unstable has 1.80.1, so I'm going to switch which nixpkgs we track

ToyVo commented 1 week ago

the options that were changed conflict with the definitions for nixos because flake goes from an options to a submodule with two options, but the option is still defined on nixos. -programs.nh.flake +programs.nh.flake.os +programs.nh.flake.home

error: The option `programs.nh.flake' in module `/nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/nixos/modules/programs/nh.nix' would be a parent of the following options, but its type `null or path' does not support nested options.
 - option(s) with prefix `programs.nh.flake.home' in module `/nix/store/qhpyvb6k5y1cgncdaf1876221rhsixiv-source/flake.nix#nixosModules.default'
 - option(s) with prefix `programs.nh.flake.os' in module `/nix/store/qhpyvb6k5y1cgncdaf1876221rhsixiv-source/flake.nix#nixosModules.default'

I think the easy solution is to swap that, so os.flake and home.flake

ToyVo commented 1 week ago

@thecaralice unless you want to put in some effort to upstream that?

thecaralice commented 1 week ago

the options that were changed conflict with the definitions for nixos because flake goes from an options to a submodule with two options, but the option is still defined on nixos.

try something like

disabledModules = [ <nixpkgs/nixos/modules/programs/nh.nix> ];