From 5f106daf7a21eec4c605115c1e360a3d5f34dcc6 Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Thu, 11 Jul 2024 23:09:25 -0700 Subject: [PATCH] feat: switch to zimfw instead of antigen --- flake.lock | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++- flake.nix | 6 +++-- home.nix | 22 ++++++++++------- 3 files changed, 87 insertions(+), 12 deletions(-) diff --git a/flake.lock b/flake.lock index 4b27604..9a6b73e 100755 --- a/flake.lock +++ b/flake.lock @@ -36,6 +36,25 @@ "type": "github" } }, + "home-manager_2": { + "inputs": { + "nixpkgs": "nixpkgs_3", + "utils": "utils" + }, + "locked": { + "lastModified": 1678109311, + "narHash": "sha256-Q64FoCH5rp3XHoC8u1+KyjLEFGTY7kX9YaIaYfugvfY=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "04d6cad67557512452decbfe888c68fa11338a96", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, "hyprcursor": { "inputs": { "hyprlang": [ @@ -229,12 +248,29 @@ "type": "github" } }, + "nixpkgs_3": { + "locked": { + "lastModified": 1677932085, + "narHash": "sha256-+AB4dYllWig8iO6vAiGGYl0NEgmMgGHpy9gzWJ3322g=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "3c5319ad3aa51551182ac82ea17ab1c6b0f0df89", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "root": { "inputs": { "catppuccin": "catppuccin", "home-manager": "home-manager", "hyprland": "hyprland", - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs_2", + "zimfw": "zimfw" } }, "systems": { @@ -252,6 +288,21 @@ "type": "github" } }, + "utils": { + "locked": { + "lastModified": 1676283394, + "narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "xdph": { "inputs": { "hyprland-protocols": "hyprland-protocols", @@ -281,6 +332,24 @@ "repo": "xdg-desktop-portal-hyprland", "type": "github" } + }, + "zimfw": { + "inputs": { + "home-manager": "home-manager_2" + }, + "locked": { + "lastModified": 1704039982, + "narHash": "sha256-JgMBZXW+33/b3nTcTaDc1r3vSn8DkCIlNuz7DcwWiiM=", + "owner": "joedevivo", + "repo": "zimfw.nix", + "rev": "1abc53e3d1c2711abf653ae05e91cb9668efa211", + "type": "github" + }, + "original": { + "owner": "joedevivo", + "repo": "zimfw.nix", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 20bc668..d996423 100755 --- a/flake.nix +++ b/flake.nix @@ -9,15 +9,16 @@ }; hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; catppuccin.url = "github:catppuccin/nix"; + zimfw.url = "github:joedevivo/zimfw.nix"; }; - outputs = { self, nixpkgs, home-manager, catppuccin, ... }@inputs: { + outputs = { self, nixpkgs, home-manager, catppuccin, zimfw, ... }@inputs: { nixosConfigurations.nixos = nixpkgs.lib.nixosSystem { specialArgs = { inherit inputs; }; system = "x86_64-linux"; modules = [ ./configuration.nix - + catppuccin.nixosModules.catppuccin home-manager.nixosModules.home-manager @@ -25,6 +26,7 @@ home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.backupFileExtension = "backup"; + home-manager.sharedModules = [ zimfw.homeManagerModules.zimfw ]; home-manager.users.youwen = { imports = [ ./home.nix diff --git a/home.nix b/home.nix index b7091b4..b9b9b75 100755 --- a/home.nix +++ b/home.nix @@ -505,15 +505,20 @@ }; initExtra = "eval \"$(oh-my-posh init zsh --config \"/etc/nixos/prompt.omp.json\")\""; defaultKeymap = "viins"; - antidote = { + + zimfw = { enable = true; - plugins = [ - "zimfw/environment" - "zimfw/input" - "zimfw/archive" - "zimfw/fzf" - "zimfw/magic-enter" - "zimfw/utility" + disableVersionCheck = true; + degit = true; + zmodules = [ + "environment" + "git" + "input" + "termtitle" + "utility" + "exa" + "fzf" + "magic-enter" ]; }; }; @@ -540,7 +545,6 @@ vimAlias = true; }; - # This value determines the home Manager release that your # configuration is compatible with. This helps avoid breakage # when a new home Manager release introduces backwards