diff --git a/machines/nix-darwin/x86_64-darwin/limontozu/configuration.nix b/machines/nix-darwin/x86_64-darwin/limontozu/configuration.nix index 3a3e79c..2259f78 100644 --- a/machines/nix-darwin/x86_64-darwin/limontozu/configuration.nix +++ b/machines/nix-darwin/x86_64-darwin/limontozu/configuration.nix @@ -31,21 +31,97 @@ # }; # }; - nix.package = pkgs.nixFlakes; + environment.variables = { + NIX_PATH = + lib.mkForce + (builtins.concatStringsSep + ":" + (lib.mapAttrsToList + (name: input: + "${name}=${input.sourceInfo.outPath}") + (lib.filterAttrs + (name: input: + builtins.hasAttr "_type" input && + builtins.getAttr "_type" input == "flake") + inputs))); + }; - nix.extraOptions = '' - experimental-features = nix-command flakes repl-flake - keep-outputs = true - keep-derivations = true - ''; + nix = { + # Ensure we can work with flakes + package = pkgs.nixUnstable; - # NIX_PATH = - # builtins.concatStringsSep - # ":" - # (lib.mapAttrsToList - # (name: input: - # "${name}=${input.url}?rev=${input.locked.rev}") - # inputs); + # extraOptions = '' + # # Enable flakes and new 'nix' command + # experimental-features = nix-command flakes repl-flake + # # Allow building multiple derivations in parallel + # max-jobs = auto + # # Deduplicate and optimize nix store + # auto-optimise-store = true + # # Keep outputs and derivations + # keep-outputs = true + # keep-derivations = true + # ''; + + registry.nixpkgs.flake = inputs.nixpkgs; + # registry = + # lib.mapAttrs' + # (name: value: + # { + # name = name; + # value = { flake = value; }; + # }) + # inputs; + + settings = { + # Enable flakes and new 'nix' command + experimental-features = [ + # "nix-command" + # "flakes" + # "repl-flake" + + # "no-url-literals" # Disabling URL literals + "ca-derivations" # Content-Addressable Derivations + "recursive-nix" # Recursive Nix + "flakes" # Flakes and related commands + "nix-command" # Experimental Nix commands + "auto-allocate-uids" # Automatic allocation of UIDs + "cgroups" # Cgroup support + # "daemon-trust-override" # Overriding daemon trust settings + # "dynamic-derivations" # Dynamic derivation support + # "discard-references" # Discarding build output references + "fetch-closure" # builtins.fetchClosure + "impure-derivations" # Impure derivations + "repl-flake" # Passing installables to nix repl + ]; + + # Allow building multiple derivations in parallel + max-jobs = "auto"; + + # Deduplicate and optimize nix store + auto-optimise-store = false; + + # Keep outputs and derivations + keep-outputs = true; + keep-derivations = true; + + trusted-users = [ + "root" + "pavelatanasov" + ]; + + # Add nix-community and rix101 cachix caches + substituters = [ + "https://rix101.cachix.org" + "https://nix-community.cachix.org" + "https://lean4.cachix.org" + ]; + trusted-public-keys = [ + "rix101.cachix.org-1:2u9ZGi93zY3hJXQyoHkNBZpJK+GiXQyYf9J5TLzCpFY=" + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + "lean4.cachix.org-1:mawtxSxcaiWE24xCXXgh3qnvlTkyU7evRRnGeAhD4Wk=" + ]; + }; + }; # Create /etc/zshrc that loads the nix-darwin environment. programs.zsh.enable = true; # default shell on catalina diff --git a/machines/nix-darwin/x86_64-darwin/limontozu/home/pavelatanasov.nix b/machines/nix-darwin/x86_64-darwin/limontozu/home/pavelatanasov.nix index 3aff4d7..4aecb1d 100644 --- a/machines/nix-darwin/x86_64-darwin/limontozu/home/pavelatanasov.nix +++ b/machines/nix-darwin/x86_64-darwin/limontozu/home/pavelatanasov.nix @@ -4,7 +4,7 @@ home = { username = lib.mkForce "pavelatanasov"; homeDirectory = lib.mkForce "/Users/pavelatanasov"; - stateVersion = "22.11"; + stateVersion = "23.05"; }; # Let Home Manager install and manage itself. @@ -12,9 +12,39 @@ # Use this flake's version of nixpkgs home.sessionVariables = { - NIX_PATH = "nixpkgs=${inputs.nixpkgs}"; + # NIX_PATH = "nixpkgs=${inputs.nixpkgs}"; + NIX_PATH = + builtins.concatStringsSep + ":" + (lib.mapAttrsToList + (name: input: + "${name}=${input.sourceInfo.outPath}") + inputs); }; + # { + # _type = "flake"; + # inputs = ; + # lastModified = 1686838567; + # lastModifiedDate = "20230615141607"; + # narHash = "sha256-aqKCUD126dRlVSKV6vWuDCitfjFrZlkwNuvj5LtjRRU="; + # nixosModules = ; + # outPath = "/nix/store/mf3nazm479fkbh9n3v7n73yrcvr8avi6-source"; + # outputs = { + # nixosModules = ; + # }; + # rev = "429f232fe1dc398c5afea19a51aad6931ee0fb89"; + # shortRev = "429f232"; + # sourceInfo = { + # lastModified = 1686838567; + # lastModifiedDate = "20230615141607"; + # narHash = "sha256-aqKCUD126dRlVSKV6vWuDCitfjFrZlkwNuvj5LtjRRU="; + # outPath = "/nix/store/mf3nazm479fkbh9n3v7n73yrcvr8avi6-source"; + # rev = "429f232fe1dc398c5afea19a51aad6931ee0fb89"; + # shortRev = "429f232"; + # }; + # } + home.packages = with pkgs; [ # WM yabai @@ -26,12 +56,17 @@ # Neovim neovim + fennel fennel-language-server # Dhall dhall dhall-lsp-server + # Circom + circom + circom-lsp + # Nix rnix-lsp nil @@ -51,9 +86,8 @@ zigpkgs.master inputs.zls-overlay.packages.x86_64-darwin.default - # Polkadot - srtool-cli - pest-ide-tools + # Android + android-tools ]; reo101 = { @@ -62,6 +96,11 @@ atuin = true; direnv = true; zoxide = true; + extraConfig = '' + function take() { + mkdir -p "''$''\{@''\}" && cd "''$''\{@''\}" + } + ''; }; wezterm = { enable = true;