feat(neovim,devkit): use neovim homeManagerModule

This commit is contained in:
Guz
2025-03-05 18:07:04 -03:00
parent e077f01821
commit f6d0e6a520
4 changed files with 47 additions and 27 deletions

52
flake.lock generated
View File

@@ -144,7 +144,7 @@
}, },
"devshell": { "devshell": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_3"
}, },
"locked": { "locked": {
"lastModified": 1735644329, "lastModified": 1735644329,
@@ -501,7 +501,7 @@
}, },
"home-manager_2": { "home-manager_2": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_3" "nixpkgs": "nixpkgs_4"
}, },
"locked": { "locked": {
"lastModified": 1737968762, "lastModified": 1737968762,
@@ -591,7 +591,7 @@
"hyprlang": "hyprlang", "hyprlang": "hyprlang",
"hyprutils": "hyprutils", "hyprutils": "hyprutils",
"hyprwayland-scanner": "hyprwayland-scanner", "hyprwayland-scanner": "hyprwayland-scanner",
"nixpkgs": "nixpkgs_4", "nixpkgs": "nixpkgs_5",
"pre-commit-hooks": "pre-commit-hooks", "pre-commit-hooks": "pre-commit-hooks",
"systems": "systems_3", "systems": "systems_3",
"xdph": "xdph" "xdph": "xdph"
@@ -802,16 +802,14 @@
"inputs": { "inputs": {
"blink-cmp": "blink-cmp", "blink-cmp": "blink-cmp",
"go-grip": "go-grip", "go-grip": "go-grip",
"nixpkgs": [ "nixpkgs": "nixpkgs"
"nixpkgs-unstable"
]
}, },
"locked": { "locked": {
"lastModified": 1741201430, "lastModified": 1741207158,
"narHash": "sha256-FZguj+Fqt4iAccqEbr8RvNhTghFILyi2GYpEF/1/iAo=", "narHash": "sha256-ZBI10bDhMC4OBBogR1kZk3Axmt62rRZsUZk0/OmpHVM=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "71dede35503067d0b0ba8c8145e7573708e232f9", "rev": "1edf9524e3719406d9bb92a11b3527e3a8b869ba",
"revCount": 106, "revCount": 112,
"type": "git", "type": "git",
"url": "https://forge.capytal.company/dot013/nvim" "url": "https://forge.capytal.company/dot013/nvim"
}, },
@@ -860,16 +858,16 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1740339700, "lastModified": 1740828860,
"narHash": "sha256-cbrw7EgQhcdFnu6iS3vane53bEagZQy/xyIkDWpCgVE=", "narHash": "sha256-cjbHI+zUzK5CPsQZqMhE3npTyYFt9tJ3+ohcfaOF/WM=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "04ef94c4c1582fd485bbfdb8c4a8ba250e359195", "rev": "303bd8071377433a2d8f76e684ec773d70c5b642",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "nixos",
"ref": "nixos-24.11", "ref": "nixos-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
@@ -915,6 +913,22 @@
} }
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": {
"lastModified": 1740339700,
"narHash": "sha256-cbrw7EgQhcdFnu6iS3vane53bEagZQy/xyIkDWpCgVE=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "04ef94c4c1582fd485bbfdb8c4a8ba250e359195",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-24.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1722073938, "lastModified": 1722073938,
"narHash": "sha256-OpX0StkL8vpXyWOGUD6G+MA26wAXK6SpT94kLJXo6B4=", "narHash": "sha256-OpX0StkL8vpXyWOGUD6G+MA26wAXK6SpT94kLJXo6B4=",
@@ -930,7 +944,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_3": { "nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1737746512, "lastModified": 1737746512,
"narHash": "sha256-nU6AezEX4EuahTO1YopzueAXfjFfmCHylYEFCagduHU=", "narHash": "sha256-nU6AezEX4EuahTO1YopzueAXfjFfmCHylYEFCagduHU=",
@@ -946,7 +960,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_4": { "nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1737885589, "lastModified": 1737885589,
"narHash": "sha256-Zf0hSrtzaM1DEz8//+Xs51k/wdSajticVrATqDrfQjg=", "narHash": "sha256-Zf0hSrtzaM1DEz8//+Xs51k/wdSajticVrATqDrfQjg=",
@@ -962,7 +976,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_5": { "nixpkgs_6": {
"locked": { "locked": {
"lastModified": 1735554305, "lastModified": 1735554305,
"narHash": "sha256-zExSA1i/b+1NMRhGGLtNfFGXgLtgo+dcuzHzaWA6w3Q=", "narHash": "sha256-zExSA1i/b+1NMRhGGLtNfFGXgLtgo+dcuzHzaWA6w3Q=",
@@ -1008,7 +1022,7 @@
"neovim": "neovim", "neovim": "neovim",
"nix-flatpak": "nix-flatpak", "nix-flatpak": "nix-flatpak",
"nixpak": "nixpak", "nixpak": "nixpak",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs_2",
"nixpkgs-unstable": "nixpkgs-unstable", "nixpkgs-unstable": "nixpkgs-unstable",
"sops-nix": "sops-nix", "sops-nix": "sops-nix",
"stylix": "stylix", "stylix": "stylix",
@@ -1186,7 +1200,7 @@
}, },
"treefmt-nix": { "treefmt-nix": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_5" "nixpkgs": "nixpkgs_6"
}, },
"locked": { "locked": {
"lastModified": 1738070913, "lastModified": 1738070913,

View File

@@ -35,7 +35,6 @@
neovim = { neovim = {
url = "git+https://forge.capytal.company/dot013/nvim"; url = "git+https://forge.capytal.company/dot013/nvim";
inputs.nixpkgs.follows = "nixpkgs-unstable";
}; };
}; };
@@ -113,8 +112,13 @@
}; };
}; };
nixosModules = {
neovim = inputs.neovim.nixosModules.default;
};
homeManagerModules = { homeManagerModules = {
devkit = ./modules/home-manager/devkit.nix; devkit = ./modules/home-manager/devkit.nix;
neovim = inputs.neovim.homeManagerModules.default;
eww = ./modules/home-manager/eww.nix; eww = ./modules/home-manager/eww.nix;
}; };

View File

@@ -10,6 +10,9 @@
devkitPkgs = self.packages.${pkgs.system}.devkit; devkitPkgs = self.packages.${pkgs.system}.devkit;
in { in {
imports = [
self.homeManagerModules.neovim
];
options.devkit = with lib; { options.devkit = with lib; {
enable = mkEnableOption "Enable devkit configuration and packages"; enable = mkEnableOption "Enable devkit configuration and packages";
@@ -25,6 +28,10 @@ in {
type = with types; bool; type = with types; bool;
default = cfg.enable; default = cfg.enable;
}; };
neovim.enable = mkOption {
type = with types; bool;
default = cfg.enable;
};
starship.enable = mkOption { starship.enable = mkOption {
type = with types; bool; type = with types; bool;
default = cfg.enable; default = cfg.enable;
@@ -52,7 +59,6 @@ in {
]; ];
home.sessionVariables = { home.sessionVariables = {
# EDITOR = "nvim"; # Default editor, already defined by dot013-nvim
SHELL = lib.mkIf cfg.zsh.enable "${lib.getExe config.programs.zsh.package}"; SHELL = lib.mkIf cfg.zsh.enable "${lib.getExe config.programs.zsh.package}";
TERM = lib.mkIf cfg.ghostty.enable "xterm-ghostty"; TERM = lib.mkIf cfg.ghostty.enable "xterm-ghostty";
TERMINAL = lib.mkIf cfg.ghostty.enable "${lib.getExe config.programs.ghostty.package}"; TERMINAL = lib.mkIf cfg.ghostty.enable "${lib.getExe config.programs.ghostty.package}";
@@ -115,8 +121,7 @@ in {
}; };
## Neovim (Editor) ## Neovim (Editor)
programs.neovim.enable = true; # Already enabled by dot013-nvim neovim.enable = cfg.neovim.enable;
programs.neovim.package = devkitPkgs.neovim;
## Starship (Shell decoration) ## Starship (Shell decoration)
programs.starship = lib.mkIf cfg.starship.enable { programs.starship = lib.mkIf cfg.starship.enable {
@@ -133,9 +138,6 @@ in {
}; };
# Zellij (Terminal multiplexer) # Zellij (Terminal multiplexer)
# CURRENTLY BORKED https://github.com/zellij-org/zellij/issues/3970
programs.zellij = lib.mkIf cfg.zellij.enable { programs.zellij = lib.mkIf cfg.zellij.enable {
enable = true; enable = true;
package = devkitPkgs.zellij; package = devkitPkgs.zellij;