Change neovim flake to repo rather than path, include sway config in linux module.

This commit is contained in:
Martin Larsson 2025-01-23 17:15:51 +01:00
parent 4e4361be5d
commit 4b1a5df3d8
4 changed files with 79 additions and 56 deletions

15
flake.lock generated
View file

@ -44,14 +44,17 @@
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1737307637, "lastModified": 1737305661,
"narHash": "sha256-lfx4/4SEtpybaHj5iIFl05XEuFyem7zTReE5pK5F8Bo=", "narHash": "sha256-Y8JhBrvP3eRERJPkcBp/SkPoK3myWmx4etCug/zjeY0=",
"path": "/home/nixos/dev/git/neovim-flake", "owner": "LarssonMartin1998",
"type": "path" "repo": "neovim-flake",
"rev": "35f8497440ae4702f9b772eab03d63f443875c15",
"type": "github"
}, },
"original": { "original": {
"path": "/home/nixos/dev/git/neovim-flake", "owner": "LarssonMartin1998",
"type": "path" "repo": "neovim-flake",
"type": "github"
} }
}, },
"nixpkgs": { "nixpkgs": {

View file

@ -10,22 +10,30 @@
}; };
neovim = { 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 let
lib = nixpkgs.lib; lib = nixpkgs.lib;
makeHomeConfig = { makeHomeConfig =
{
name, name,
system, system,
extraModules ? [] extraModules ? [ ],
}: }:
home-manager.lib.homeManagerConfiguration { home-manager.lib.homeManagerConfiguration {
pkgs = import nixpkgs { inherit system; }; pkgs = import nixpkgs { inherit system; };
modules = [ modules =
[
./nix/home.nix ./nix/home.nix
./nix/local_machine.nix ./nix/local_machine.nix
] ]
@ -33,12 +41,13 @@
++ lib.optional (builtins.match ".*-darwin$" system != null) ./nix/darwin.nix ++ lib.optional (builtins.match ".*-darwin$" system != null) ./nix/darwin.nix
++ lib.optional (builtins.match ".*-linux$" system != null) ./nix/linux.nix; ++ lib.optional (builtins.match ".*-linux$" system != null) ./nix/linux.nix;
# Pass neovim-flake to all modules # Pass neovim-flake to all modules
extraSpecialArgs = { extraSpecialArgs = {
neovim-flake = neovim; neovim-flake = neovim;
};
}; };
in { };
in
{
homeConfigurations = { homeConfigurations = {
"wsl" = makeHomeConfig { "wsl" = makeHomeConfig {
name = "wsl"; name = "wsl";
@ -49,16 +58,19 @@
"linux-x86" = makeHomeConfig { "linux-x86" = makeHomeConfig {
name = "linux-x86"; name = "linux-x86";
system = "x86_64-linux"; system = "x86_64-linux";
extraModules = [ ./nix/linux.nix ];
}; };
"linux-aarch64" = makeHomeConfig { "linux-aarch64" = makeHomeConfig {
name = "linux-aarch64"; name = "linux-aarch64";
system = "aarch64-linux"; system = "aarch64-linux";
extraModules = [ ./nix/linux.nix ];
}; };
"darwin-aarch64" = makeHomeConfig { "darwin-aarch64" = makeHomeConfig {
name = "darwin-aarch64"; name = "darwin-aarch64";
system = "aarch64-darwin"; system = "aarch64-darwin";
extraModules = [ ./nix/darwin.nix ];
}; };
}; };
}; };

View file

@ -9,42 +9,42 @@
stateVersion = "24.05"; stateVersion = "24.05";
packages = with pkgs; [ packages = with pkgs; [
neovim-flake.packages.${system}.neovim neovim-flake.packages.${system}.neovim
fzf fzf
bat bat
git git
yazi yazi
tmux tmux
eza eza
curl curl
wget wget
ripgrep ripgrep
fd fd
jq jq
starship starship
fastfetch fastfetch
clang clang
clang-tools clang-tools
nixfmt-rfc-style nixfmt-rfc-style
luajit luajit
zoxide zoxide
rustup rustup
zig zig
zls zls
nil nil
lldb lldb
gopls gopls
delve delve
golangci-lint golangci-lint
cmake cmake
cmake-language-server cmake-language-server
cmake-format cmake-format
cmake-lint cmake-lint
python313Packages.debugpy python313Packages.debugpy
pyright pyright
lua-language-server lua-language-server
gnumake gnumake
ninja ninja
]; ];
file = { file = {
".zshrc".source = ../zsh/.zshrc; ".zshrc".source = ../zsh/.zshrc;
".config/nvim".source = ../nvim; ".config/nvim".source = ../nvim;
@ -55,6 +55,7 @@
".config/bat".source = ../bat; ".config/bat".source = ../bat;
".config/ghostty".source = ../ghostty; ".config/ghostty".source = ../ghostty;
".config/confutils".source = ../confutils; ".config/confutils".source = ../confutils;
".config/wallpapers".source = ../wallpapers;
}; };
}; };
} }

View file

@ -1,2 +1,9 @@
{ ... }: { { pkgs, ... }:
{
home = {
stateVersion = "24.05";
file = {
".config/sway".source = ../sway;
};
};
} }