diff --git a/flake.lock b/flake.lock index 5232ce3..8c272eb 100644 --- a/flake.lock +++ b/flake.lock @@ -44,14 +44,17 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1737307637, - "narHash": "sha256-lfx4/4SEtpybaHj5iIFl05XEuFyem7zTReE5pK5F8Bo=", - "path": "/home/nixos/dev/git/neovim-flake", - "type": "path" + "lastModified": 1737305661, + "narHash": "sha256-Y8JhBrvP3eRERJPkcBp/SkPoK3myWmx4etCug/zjeY0=", + "owner": "LarssonMartin1998", + "repo": "neovim-flake", + "rev": "35f8497440ae4702f9b772eab03d63f443875c15", + "type": "github" }, "original": { - "path": "/home/nixos/dev/git/neovim-flake", - "type": "path" + "owner": "LarssonMartin1998", + "repo": "neovim-flake", + "type": "github" } }, "nixpkgs": { diff --git a/flake.nix b/flake.nix index c7e1ec4..d5737e6 100644 --- a/flake.nix +++ b/flake.nix @@ -10,35 +10,44 @@ }; neovim = { - url = "path:/home/nixos/dev/git/neovim-flake"; + url = "github:LarssonMartin1998/neovim-flake"; }; }; - outputs = { nixpkgs, home-manager, neovim, ... }: + outputs = + { + nixpkgs, + home-manager, + neovim, + ... + }: let lib = nixpkgs.lib; - makeHomeConfig = { + makeHomeConfig = + { name, system, - extraModules ? [] + extraModules ? [ ], }: - home-manager.lib.homeManagerConfiguration { - pkgs = import nixpkgs { inherit system; }; - modules = [ + home-manager.lib.homeManagerConfiguration { + pkgs = import nixpkgs { inherit system; }; + modules = + [ ./nix/home.nix ./nix/local_machine.nix - ] + ] ++ extraModules ++ lib.optional (builtins.match ".*-darwin$" system != null) ./nix/darwin.nix ++ lib.optional (builtins.match ".*-linux$" system != null) ./nix/linux.nix; - # Pass neovim-flake to all modules - extraSpecialArgs = { - neovim-flake = neovim; - }; + # Pass neovim-flake to all modules + extraSpecialArgs = { + neovim-flake = neovim; }; - in { + }; + in + { homeConfigurations = { "wsl" = makeHomeConfig { name = "wsl"; @@ -49,16 +58,19 @@ "linux-x86" = makeHomeConfig { name = "linux-x86"; system = "x86_64-linux"; + extraModules = [ ./nix/linux.nix ]; }; "linux-aarch64" = makeHomeConfig { name = "linux-aarch64"; system = "aarch64-linux"; + extraModules = [ ./nix/linux.nix ]; }; "darwin-aarch64" = makeHomeConfig { name = "darwin-aarch64"; system = "aarch64-darwin"; + extraModules = [ ./nix/darwin.nix ]; }; }; }; diff --git a/nix/home.nix b/nix/home.nix index f0edd57..c6a5a63 100644 --- a/nix/home.nix +++ b/nix/home.nix @@ -9,42 +9,42 @@ stateVersion = "24.05"; packages = with pkgs; [ neovim-flake.packages.${system}.neovim - fzf - bat - git - yazi - tmux - eza - curl - wget - ripgrep - fd - jq - starship - fastfetch - clang - clang-tools - nixfmt-rfc-style - luajit - zoxide - rustup - zig - zls - nil - lldb - gopls - delve - golangci-lint - cmake - cmake-language-server - cmake-format - cmake-lint - python313Packages.debugpy - pyright - lua-language-server - gnumake - ninja - ]; + fzf + bat + git + yazi + tmux + eza + curl + wget + ripgrep + fd + jq + starship + fastfetch + clang + clang-tools + nixfmt-rfc-style + luajit + zoxide + rustup + zig + zls + nil + lldb + gopls + delve + golangci-lint + cmake + cmake-language-server + cmake-format + cmake-lint + python313Packages.debugpy + pyright + lua-language-server + gnumake + ninja + ]; file = { ".zshrc".source = ../zsh/.zshrc; ".config/nvim".source = ../nvim; @@ -55,6 +55,7 @@ ".config/bat".source = ../bat; ".config/ghostty".source = ../ghostty; ".config/confutils".source = ../confutils; + ".config/wallpapers".source = ../wallpapers; }; }; } diff --git a/nix/linux.nix b/nix/linux.nix index 4b2c5c4..77273d3 100644 --- a/nix/linux.nix +++ b/nix/linux.nix @@ -1,2 +1,9 @@ -{ ... }: { +{ pkgs, ... }: +{ + home = { + stateVersion = "24.05"; + file = { + ".config/sway".source = ../sway; + }; + }; }