Change neovim flake to repo rather than path, include sway config in linux module.
This commit is contained in:
parent
4e4361be5d
commit
4b1a5df3d8
4 changed files with 79 additions and 56 deletions
38
flake.nix
38
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 ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue