Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nix-darwin #13

Open
wangkev opened this issue Dec 23, 2020 · 0 comments
Open

nix-darwin #13

wangkev opened this issue Dec 23, 2020 · 0 comments

Comments

@wangkev
Copy link

wangkev commented Dec 23, 2020

First off, thanks for creating doom and sharing your dotfiles - really appreciate it!

I understand that this config is geared toward nixos (and you don't use mac), but was wondering if you would be able to help me understand how I might adapt the libs (and general configs) to also work with darwin and specifically nix-darwin flakes.

For example, I think I need to adapt the mkHost function, to something like:

  mkHost = path: attrs @ { system ? system, ... }:
    if system == "x86_64-darwin" then inputs.nix-darwin.lib.darwinSystem else nixosSystem {
      inherit system;
      specialArgs = { inherit lib inputs; };
      modules = [
        {
          nixpkgs.pkgs = pkgs;
          networking.hostName = mkDefault (removeSuffix ".nix" (baseNameOf path));
        }
        (filterAttrs (n: v: !elem n [ "system" ]) attrs)
        ../.
        (import path)
      ];
    };

and in flake.nix, need to additionally set darwinModules and darwinConfigurations.

      nixosModules = # shared modules and maybe some nixos specific modules in ./modules/os-specific/nixos
      nixosConfigurations = # nixos specific hosts

      darwinModules = # shared modules and maybe some darwin specific modules in ./modules/os-specific/darwin
      darwinConfigurations = # darwin specific hosts

Thanks in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant