diff --git a/flake.lock b/flake.lock index 3fa72d9..de1e90f 100644 --- a/flake.lock +++ b/flake.lock @@ -100,6 +100,26 @@ "type": "github" } }, + "home-manager-unstable": { + "inputs": { + "nixpkgs": [ + "nixpkgs-unstable" + ] + }, + "locked": { + "lastModified": 1681586243, + "narHash": "sha256-vdP79IZuDZVNSl4RN1LgEuab1Tkbv4gCxiE8VLdRf7U=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "40ebb62101c83de81e5fd7c3cfe5cea2ed21b1ad", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, "infinisilSystem": { "flake": false, "locked": { @@ -354,6 +374,7 @@ "bang-evaluator": "bang-evaluator", "flake-utils": "flake-utils", "home-manager": "home-manager", + "home-manager-unstable": "home-manager-unstable", "infinisilSystem": "infinisilSystem", "krops": "krops", "nix-pre-commit-hooks": "nix-pre-commit-hooks", diff --git a/flake.nix b/flake.nix index c7d73a0..6255560 100644 --- a/flake.nix +++ b/flake.nix @@ -10,6 +10,8 @@ home-manager.url = "github:nix-community/home-manager/release-22.11"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; + home-manager-unstable.url = "github:nix-community/home-manager"; + home-manager-unstable.inputs.nixpkgs.follows = "nixpkgs-unstable"; krops.url = "github:Mic92/krops"; krops.inputs.flake-utils.follows = "flake-utils"; @@ -196,7 +198,8 @@ }; }) ] ++ (with inputs; [ - home-manager.nixosModules.home-manager + # Use newest home-manager for hosts that use unstable, otherwise there are conflicts + (if nixpkgs == inputs.nixpkgs-unstable then home-manager-unstable else home-manager).nixosModules.home-manager sops-nix.nixosModules.sops bang-evaluator.nixosModules.bang-evaluator diff --git a/users/simon/modules/zsh/default.nix b/users/simon/modules/zsh/default.nix index 16065c4..3f02507 100644 --- a/users/simon/modules/zsh/default.nix +++ b/users/simon/modules/zsh/default.nix @@ -56,7 +56,15 @@ in enable = true; }; }; - exa.enable = true; + exa = { + enable = true; + } // lib.optionalAttrs (pkgs.lib.versionAtLeast (pkgs.lib.substring 0 5 pkgs.lib.version) "23.05") { + # FIXME: remove condition with 23.05 + git = true; + extraOptions = [ + "--binary" # prefer MiB over MB etc. + ]; + }; nix-index.enable = true; starship = { enable = true; @@ -82,16 +90,18 @@ in dcauto = dcauto; dcsd = "dynamic-colors switch solarized-dark"; dcsl = "dynamic-colors switch solarized-light"; - exa = "exa --git --binary"; ip = "ip --color=auto"; ipy = "ipython3"; + userctl = "systemctl --user"; + vim = "nvim"; + vimdiff = "nvim -d"; + } // lib.optionalAttrs (pkgs.lib.versionOlder (pkgs.lib.substring 0 5 pkgs.lib.version) "23.05") { + # FIXME: remove with 23.05 + exa = "exa --git --binary"; l = "exa -l"; la = "exa -la"; ll = "exa -l"; ls = "exa"; - userctl = "systemctl --user"; - vim = "nvim"; - vimdiff = "nvim -d"; }; initExtra = lib.mkMerge [ (lib.mkBefore ''