5 Commits

Author SHA1 Message Date
Noah Masur
6cf5f08fd5 nixd neovim setup 2024-10-25 08:53:27 -04:00
Noah Masur
8cba026f10 temp: not sure if this is even required 2024-10-25 08:53:04 -04:00
Noah Masur
a6e4b3130d fix: tabs should be spaces 2024-10-19 09:01:26 -04:00
Noah Masur
33868c1add fix: only setup desktop entry for gui 2024-10-19 08:45:26 -04:00
Noah Masur
d806bd7f56 use dynamic terminal for neovim based on rofi in linux 2024-10-12 11:57:38 -04:00
5 changed files with 36 additions and 4 deletions

View File

@@ -159,6 +159,15 @@
};
};
# Mimic nixpkgs package environment for read-only profiles.ini management
# From: https://github.com/booxter/home-manager/commit/dd1602e306fec366280f5953c5e1b553e3d9672a
home.sessionVariables = {
MOZ_LEGACY_PROFILES = 1;
MOZ_ALLOW_DOWNGRADE = 1;
};
# launchd.user.envVariables = config.home-manager.users.${config.user}.home.sessionVariables;
xdg.mimeApps = {
associations.added = {
"text/html" = [ "firefox.desktop" ];

View File

@@ -11,6 +11,11 @@
options.terraform = lib.mkEnableOption "Whether to enable Terraform LSP";
options.github = lib.mkEnableOption "Whether to enable GitHub features";
options.kubernetes = lib.mkEnableOption "Whether to enable Kubernetes features";
options.nixosConfiguration = lib.mkOption {
type = lib.types.str;
description = "Configuration to use for nixd options checking";
default = "default";
};
config = {
plugins = [
@@ -43,6 +48,21 @@
use.lspconfig.nixd.setup = dsl.callWith {
cmd = [ "${pkgs.nixd}/bin/nixd" ];
capabilities = dsl.rawLua "require('cmp_nvim_lsp').default_capabilities()";
# settings = {
# nixd = {
# options = {
# nixos = {
# expr = "(builtins.getFlake (\"git+file://\" + toString ./.)).nixosConfigurations.${config.nixosConfiguration}.options";
# };
# home-manager = {
# expr = "(builtins.getFlake (\"git+file://\" + toString ./.)).homeConfigurations.${config.nixosConfiguration}.options";
# };
# darwin = {
# expr = "(builtins.getFlake (\"git+file://\" + toString ./.)).darwinConfigurations.${config.nixosConfiguration}.options";
# };
# };
# };
# };
};
use.lspconfig.pyright.setup = dsl.callWith {

View File

@@ -13,6 +13,7 @@ let
terraform = config.terraform.enable;
github = true;
kubernetes = config.kubernetes.enable;
nixosConfiguration = config.networking.hostName; # Used for Nixd
};
in
{
@@ -50,9 +51,9 @@ in
# Create a desktop option for launching Neovim from a file manager
# (Requires launching the terminal and then executing Neovim)
xdg.desktopEntries.nvim = lib.mkIf pkgs.stdenv.isLinux {
xdg.desktopEntries.nvim = lib.mkIf (pkgs.stdenv.isLinux && config.gui.enable) {
name = "Neovim wrapper";
exec = "kitty nvim %F";
exec = "${config.home-manager.users.${config.user}.programs.rofi.terminal} nvim %F";
mimeType = [
"text/plain"
"text/markdown"

View File

@@ -32,6 +32,7 @@
terraform ? false,
github ? false,
kubernetes ? false,
nixosConfiguration ? "default",
...
}:
@@ -44,6 +45,7 @@ pkgs.neovimBuilder {
terraform
github
kubernetes
nixosConfiguration
;
imports = [
../config/align.nix