mirror of
https://github.com/nmasur/dotfiles
synced 2025-08-24 16:34:40 +00:00
Compare commits
5 Commits
120b97f970
...
nixd
Author | SHA1 | Date | |
---|---|---|---|
|
6cf5f08fd5 | ||
|
8cba026f10 | ||
|
a6e4b3130d | ||
|
33868c1add | ||
|
d806bd7f56 |
@@ -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 = {
|
xdg.mimeApps = {
|
||||||
associations.added = {
|
associations.added = {
|
||||||
"text/html" = [ "firefox.desktop" ];
|
"text/html" = [ "firefox.desktop" ];
|
||||||
|
@@ -11,6 +11,11 @@
|
|||||||
options.terraform = lib.mkEnableOption "Whether to enable Terraform LSP";
|
options.terraform = lib.mkEnableOption "Whether to enable Terraform LSP";
|
||||||
options.github = lib.mkEnableOption "Whether to enable GitHub features";
|
options.github = lib.mkEnableOption "Whether to enable GitHub features";
|
||||||
options.kubernetes = lib.mkEnableOption "Whether to enable Kubernetes 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 = {
|
config = {
|
||||||
plugins = [
|
plugins = [
|
||||||
@@ -43,6 +48,21 @@
|
|||||||
use.lspconfig.nixd.setup = dsl.callWith {
|
use.lspconfig.nixd.setup = dsl.callWith {
|
||||||
cmd = [ "${pkgs.nixd}/bin/nixd" ];
|
cmd = [ "${pkgs.nixd}/bin/nixd" ];
|
||||||
capabilities = dsl.rawLua "require('cmp_nvim_lsp').default_capabilities()";
|
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 {
|
use.lspconfig.pyright.setup = dsl.callWith {
|
||||||
|
@@ -13,6 +13,7 @@ let
|
|||||||
terraform = config.terraform.enable;
|
terraform = config.terraform.enable;
|
||||||
github = true;
|
github = true;
|
||||||
kubernetes = config.kubernetes.enable;
|
kubernetes = config.kubernetes.enable;
|
||||||
|
nixosConfiguration = config.networking.hostName; # Used for Nixd
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
@@ -50,9 +51,9 @@ in
|
|||||||
|
|
||||||
# Create a desktop option for launching Neovim from a file manager
|
# Create a desktop option for launching Neovim from a file manager
|
||||||
# (Requires launching the terminal and then executing Neovim)
|
# (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";
|
name = "Neovim wrapper";
|
||||||
exec = "kitty nvim %F";
|
exec = "${config.home-manager.users.${config.user}.programs.rofi.terminal} nvim %F";
|
||||||
mimeType = [
|
mimeType = [
|
||||||
"text/plain"
|
"text/plain"
|
||||||
"text/markdown"
|
"text/markdown"
|
||||||
|
@@ -32,6 +32,7 @@
|
|||||||
terraform ? false,
|
terraform ? false,
|
||||||
github ? false,
|
github ? false,
|
||||||
kubernetes ? false,
|
kubernetes ? false,
|
||||||
|
nixosConfiguration ? "default",
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@@ -44,6 +45,7 @@ pkgs.neovimBuilder {
|
|||||||
terraform
|
terraform
|
||||||
github
|
github
|
||||||
kubernetes
|
kubernetes
|
||||||
|
nixosConfiguration
|
||||||
;
|
;
|
||||||
imports = [
|
imports = [
|
||||||
../config/align.nix
|
../config/align.nix
|
||||||
|
Reference in New Issue
Block a user