Skip to content

Commit

Permalink
Merge pull request #31 from datsfilipe/update-datsnvim
Browse files Browse the repository at this point in the history
chore: update datsnvim
  • Loading branch information
datsfilipe authored Jan 15, 2025
2 parents 27fe93a + f2d4ba9 commit eb24d07
Show file tree
Hide file tree
Showing 11 changed files with 83 additions and 137 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "home/base/tui/editors/neovim/conf"]
path = home/base/tui/editors/neovim/conf
url = [email protected]:datsfilipe/datsnvim.git
[submodule "home/linux/base/scripts/conf"]
path = home/linux/base/scripts/conf
url = [email protected]:datsfilipe/unix-scripts.git
46 changes: 7 additions & 39 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 19 additions & 15 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,33 +1,37 @@
{
description = "description";
description = "datsdots";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.11";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
datsnvim = {
inputs.nixpkgs.follows = "nixpkgs";
url = "github:datsfilipe/datsnvim/main";
inputs = {
home-manager.follows = "home-manager";
nixpkgs.follows = "nixpkgs";
};
url = "github:datsfilipe/datsnvim/main";
};
home-manager = {
inputs.nixpkgs.follows = "nixpkgs";
inputs.nixpkgs.follows = "nixpkgs";
url = "github:nix-community/home-manager/master";
};
};
linux-shimeji = {
inputs.nixpkgs.follows = "nixpkgs";
inputs.nixpkgs.follows = "nixpkgs";
url = "github:datsfilipe/linux-shimeji/main";
};
};
sops-nix = {
inputs.nixpkgs.follows = "nixpkgs";
inputs.nixpkgs.follows = "nixpkgs";
url = "github:Mic92/sops-nix/master";
};
};
zellij-switch = {
inputs.nixpkgs.follows = "nixpkgs";
inputs.nixpkgs.follows = "nixpkgs";
url = "github:datsfilipe/zellij-switch/flake";
};
};
unix-scripts = {
flake = false;
flake = false;
url = "git+file:///home/dtsf/.dotfiles/home/linux/base/scripts/conf?shallow=1";
};
};
};
outputs = inputs: import ./outputs inputs;
}
}

35 changes: 35 additions & 0 deletions home/base/tui/editors/neovim.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
pkgs,
lib,
...
}:
with lib; let
lockfile = "vim.fn.expand('$HOME/.dotfiles/home/base/tui/editors/neovim/conf') .. '/lazy-lock.json'";
in {
programs.datsnvim = {
enable = true;
settings = {
lazy.lock = lockfile;
};
};

home.packages = with pkgs; [
tree-sitter
fd
];

programs.neovim = {
enable = true;
vimAlias = true;
extraWrapperArgs = [
"--suffix"
"LIBRARY_PATH"
":"
"${makeLibraryPath [pkgs.stdenv.cc.cc pkgs.zlib]}"
"--suffix"
"PKG_CONFIG_PATH"
":"
"${makeSearchPathOutput "dev" "lib/pkgconfig" [pkgs.stdenv.cc.cc pkgs.zlib]}"
];
};
}
1 change: 0 additions & 1 deletion home/base/tui/editors/neovim/conf
Submodule conf deleted from a4a877
48 changes: 0 additions & 48 deletions home/base/tui/editors/neovim/default.nix

This file was deleted.

5 changes: 3 additions & 2 deletions modules/colorscheme/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,9 @@
lib.mkMerge [
(lib.mkIf (config.modules.desktop.colorscheme.enable) (lib.mkMerge [
(lib.mkIf config.modules.desktop.colorscheme.enableNeovimIntegration {
modules.desktop.nupkgs = {
programs_datsnvim_theme = config.modules.desktop.colorscheme.theme;
programs.datsnvim.settings.theme = import ./integrations/neovim.nix {
inherit mylib pkgs;
name = config.modules.desktop.colorscheme.theme;
};
})

Expand Down
2 changes: 0 additions & 2 deletions modules/nupkgs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
mylib,
zellij-switch,
linux-shimeji,
datsnvim,
...
}: let
packageFiles =
Expand All @@ -26,7 +25,6 @@
// {
inherit (pkgsWithOverlays) zellij-switch;
linux-shimeji = linux-shimeji.packages.${pkgs.system}.little-ghost-polite;
datsnvim = datsnvim.packages.${pkgs.system}.default;
};
in
packages
19 changes: 1 addition & 18 deletions modules/nupkgs/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
lib,
pkgs,
mylib,
datsnvim,
...
}: {
options.modules.desktop.nupkgs = {
Expand All @@ -14,25 +13,9 @@
default = [];
description = "List of user packages managed via NIX User Packages.";
};

programs_datsnvim_theme = lib.mkOption {
type = lib.types.str;
default = "default";
};
programs_datsnvim_lazy_lock = lib.mkOption {
type = lib.types.str;
default = "default";
};
};

config = lib.mkIf config.modules.desktop.nupkgs.enable {
home.packages =
config.modules.desktop.nupkgs.packages
++ [
(datsnvim.packages.${pkgs.system}.default.override {
theme = config.modules.desktop.nupkgs.programs_datsnvim_theme;
lazy = {lock = config.modules.desktop.nupkgs.programs_datsnvim_lazy_lock;};
})
];
home.packages = config.modules.desktop.nupkgs.packages;
};
}
18 changes: 11 additions & 7 deletions outputs/x86_64-linux/src/dtsf-pc.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,17 @@
++ [
inputs.sops-nix.nixosModules.sops
];
home-modules = map mylib.file.relativeToRoot [
"home/linux/gui.nix"
"hosts/${name}/home"
"modules/nupkgs/home.nix"
"modules/colorscheme/home.nix"
"modules/conf/home.nix"
];
home-modules =
map mylib.file.relativeToRoot [
"home/linux/gui.nix"
"hosts/${name}/home"
"modules/nupkgs/home.nix"
"modules/colorscheme/home.nix"
"modules/conf/home.nix"
]
++ [
inputs.datsnvim.homeManagerModules.${system}.default
];
};

modules-i3 = {
Expand Down
9 changes: 7 additions & 2 deletions templates/flake.template.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,17 @@ with builtins; let
in
genFlake ./flake.template.nix
{
description = "description";
description = "datsdots";
inputs = let
ext = url: {
inherit url;
inputs.nixpkgs.follows = "nixpkgs";
};
ext-hm = url: {
inherit url;
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
local = path: {
url = "git+file://${toString path}?shallow=1";
flake = false;
Expand All @@ -37,7 +42,7 @@ in
zellij-switch = ext "github:datsfilipe/zellij-switch/flake";
home-manager = ext "github:nix-community/home-manager/master";
sops-nix = ext "github:Mic92/sops-nix/master";
datsnvim = ext "github:datsfilipe/datsnvim/main";
datsnvim = ext-hm "github:datsfilipe/datsnvim/main";
unix-scripts = local ../home/linux/base/scripts/conf;
};
outputs = "inputs: import ./outputs inputs";
Expand Down

0 comments on commit eb24d07

Please sign in to comment.