diff --git a/flake.nix b/flake.nix --- a/flake.nix +++ b/flake.nix @@ -69,10 +69,6 @@ darwinConfigurations."Supadupa" = (import ./hosts/supadupa.nix {inherit inputs;}) .system; - homeConfigurations."hauleth" = - (import ./users/hauleth.nix {inherit inputs;}) - .home; - templates = { elixir = { path = ./templates/elixir; @@ -96,16 +92,7 @@ (pkgs.callPackage ./pkgs {}) // { default = pkgs.writeScriptBin "activate" '' #!/bin/sh - echo ========= System ========= ${pkgs.lib.getExe self'.packages.system} switch - echo - echo ========= Home ========= - ${pkgs.lib.getExe self'.packages.home} switch - ''; - - home = pkgs.writeScriptBin "activate-home" '' - #!/bin/sh - exec ${pkgs.lib.getExe inputs'.home-manager.packages.default} --flake "${self}" "$@" ''; system = let diff --git a/hosts/modules/builders.nix b/hosts/modules/builders.nix --- a/hosts/modules/builders.nix +++ b/hosts/modules/builders.nix @@ -1,4 +1,8 @@ -{pkgs, inputs, ...}: let +{ + pkgs, + inputs, + ... +}: let pkgs-stable = inputs.darwin-stable.legacyPackages.${pkgs.stdenv.hostPlatform.system}; in { nix.linux-builder = { @@ -9,7 +13,7 @@ maxJobs = 4; config = { virtualisation = { darwin-builder = { - # diskSize = 20 * 1024; + # diskSize = 20 * 1024; memorySize = 4 * 1024; }; cores = 4; diff --git a/hosts/niuniobook.nix b/hosts/niuniobook.nix --- a/hosts/niuniobook.nix +++ b/hosts/niuniobook.nix @@ -23,6 +23,13 @@ documentation.enable = true; } inputs.lix-module.nixosModules.default inputs.home-manager.darwinModules.home-manager + { + users.users.hauleth.home = "/Users/hauleth"; + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.hauleth = import ../users/hauleth.nix; + home-manager.extraSpecialArgs = {inherit inputs;}; + } ]; inherit inputs; diff --git a/lib.nix b/lib.nix --- a/lib.nix +++ b/lib.nix @@ -7,7 +7,7 @@ notComment = line: !lib.strings.hasPrefix "#" line; in builtins.filter notComment (lib.strings.splitString "\n" content); - dontCheck = drv: drv.overrideAttrs { doCheck = false; }; + dontCheck = drv: drv.overrideAttrs {doCheck = false;}; in { inherit readFileWithComments dontCheck; } diff --git a/modules/curl.nix b/modules/curl.nix --- a/modules/curl.nix +++ b/modules/curl.nix @@ -8,9 +8,8 @@ home.file.curlrc = { target = ".curlrc"; text = '' - silent=true - - netrc-optional + netrc + netrc-file = "/User/hauleth/.netrc.fix" ''; }; } diff --git a/modules/darwin.nix b/modules/darwin.nix --- a/modules/darwin.nix +++ b/modules/darwin.nix @@ -1,4 +1,8 @@ -{pkgs, inputs, ...}: { +{ + pkgs, + inputs, + ... +}: { nix.settings.extra-sandbox-paths = [ "/System/Library/Frameworks" "/System/Library/PrivateFrameworks" diff --git a/modules/ghostty.nix b/modules/ghostty.nix --- a/modules/ghostty.nix +++ b/modules/ghostty.nix @@ -1,4 +1,8 @@ -{config, lib, ...}: { +{ + config, + lib, + ... +}: { programs.ghostty = { enable = true; package = null; # Set explicitly to null, as it is managed externally diff --git a/modules/nvim.nix b/modules/nvim.nix --- a/modules/nvim.nix +++ b/modules/nvim.nix @@ -15,7 +15,6 @@ set runtimepath^=${./nvim} lua << EOF vim.g.lsp_paths = { ['lexical'] = "${pkgs.lexical}/bin/lexical", - ['nixd'] = "${pkgs.nixd}/bin/nixd", ['typos_lsp'] = "${pkgs.typos-lsp}/bin/typos-lsp" } package.path = package.path .. ";${pkgs.luajitPackages.fennel}/share/lua/5.1/?.lua" diff --git a/modules/nvim/fnl/langclient.fnl b/modules/nvim/fnl/langclient.fnl --- a/modules/nvim/fnl/langclient.fnl +++ b/modules/nvim/fnl/langclient.fnl @@ -62,10 +62,10 @@ }) (setup :zls {}) -(setup :nixd { - :autostart true - :cmd [vim.g.lsp_paths.nixd] - }) +;(setup :nixd { +; :autostart true +; :cmd [vim.g.lsp_paths.nixd] +; }) (setup :typos_lsp { :autostart true diff --git a/overlays/fix-curl.nix b/overlays/fix-curl.nix new file mode 100644 --- /dev/null +++ b/overlays/fix-curl.nix @@ -0,0 +1,24 @@ +# Hot fix for curl in nix breaking with netrc +# https://github.com/NixOS/nixpkgs/pull/356133 +final: prev: let + patched-curl = prev.curl.overrideAttrs (oldAttrs: { + patches = + (oldAttrs.patches or []) + ++ [ + # https://github.com/curl/curl/issues/15496 + (prev.fetchpatch { + url = "https://github.com/curl/curl/commit/f5c616930b5cf148b1b2632da4f5963ff48bdf88.patch"; + hash = "sha256-FlsAlBxAzCmHBSP+opJVrZG8XxWJ+VP2ro4RAl3g0pQ="; + }) + # https://github.com/curl/curl/issues/15513 + (prev.fetchpatch { + url = "https://github.com/curl/curl/commit/0cdde0fdfbeb8c35420f6d03fa4b77ed73497694.patch"; + hash = "sha256-WP0zahMQIx9PtLmIDyNSJICeIJvN60VzJGN2IhiEYv0="; + }) + ]; + }); +in { + nix = prev.nix.override (old: { + curl = patched-curl; + }); +} diff --git a/users/hauleth.nix b/users/hauleth.nix --- a/users/hauleth.nix +++ b/users/hauleth.nix @@ -1,35 +1,19 @@ {inputs, ...}: { - username = "hauleth"; - - home = inputs.home-manager.lib.homeManagerConfiguration { - pkgs = import inputs.nixpkgs { - system = "aarch64-darwin"; - }; - - extraSpecialArgs = { - inherit inputs; - }; - - modules = [ - { - home.username = "hauleth"; - home.homeDirectory = "/Users/hauleth/"; - } - inputs.ghostty.homeModules.default - ../modules/fish.nix - ../modules/direnv.nix - ../modules/git.nix - ../modules/plan.nix - ../modules/ctags.nix - ../modules/curl.nix - ../modules/tools.nix - ../modules/swiftbar.nix - ../modules/email.nix - ../modules/pijul.nix - ../modules/nvim.nix - ../modules/ghostty.nix - ./modules/dircolors.nix - {home.stateVersion = "24.11";} - ]; - }; + imports = [ + inputs.ghostty.homeModules.default + ../modules/fish.nix + ../modules/direnv.nix + ../modules/git.nix + ../modules/plan.nix + ../modules/ctags.nix + ../modules/curl.nix + ../modules/tools.nix + ../modules/swiftbar.nix + ../modules/email.nix + ../modules/pijul.nix + ../modules/nvim.nix + ../modules/ghostty.nix + ./modules/dircolors.nix + {home.stateVersion = "24.11";} + ]; }