diff options
| author | ozpv <39195175+ozpv@users.noreply.github.com> | 2024-08-24 06:21:15 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-24 06:21:15 +0000 |
| commit | c85ba298330d2743761c9f47bd4a97bb464968b2 (patch) | |
| tree | 78787752fdfa598c09ed0b78b2441d9f4fac4bf3 | |
| parent | c110f7dedf1666db7b212ed470bae5d56a9b3874 (diff) | |
add nixvim and spicetify
| -rw-r--r-- | apps/nixvim.nix | 78 | ||||
| -rw-r--r-- | apps/spicetify.nix | 34 | ||||
| -rw-r--r-- | flake.nix | 17 | ||||
| -rw-r--r-- | home.nix | 4 |
4 files changed, 113 insertions, 20 deletions
diff --git a/apps/nixvim.nix b/apps/nixvim.nix new file mode 100644 index 0000000..7a959be --- /dev/null +++ b/apps/nixvim.nix @@ -0,0 +1,78 @@ +{ config, pkgs, inputs, ... }: + +{ + imports = [ inputs.nixvim.homeManagerModules.nixvim ]; + + programs.nixvim = { + enable = true; + + keymaps = [ + # Equivalent to nnoremap ; : + { + key = ";"; + action = ":"; + } + + # Equivalent to nmap <silent> <buffer> <leader>gg <cmd>Man<CR> + { + key = "<leader>gg"; + action = "<cmd>Man<CR>"; + options = { + silent = true; + remap = false; + }; + } + # Etc... + ]; + + # We can set the leader key: + globals.mapleader = " "; + + # We can also set options: + opts = { + tabstop = 4; + shiftwidth = 4; + expandtab = false; + + mouse = "a"; + + # etc... + }; + + plugins = { + lazy.enable = true; + + telescope = { + enable = true; + keymaps = { + "<leader>ff" = "find_files"; + "<leader>lg" = "live_grep"; + }; + }; + + lsp = { + enable = true; + servers = { + tsserver.enable = true; + lua-ls.enable = true; + bashls.enable = true; + html.enable = true; + pyright.enable = true; + jsonls.enable = true; + java-language-server.enable = true; + cmake.enable = true; + sqls.enable = true; + rust-analyzer = { + enable = true; + installRustc = true; + installCargo = true; + }; + }; + }; + }; + + colorschemes.gruvbox.enable = true; + + extraPlugins = with pkgs.vimPlugins; [ vim-toml ]; + }; +} diff --git a/apps/spicetify.nix b/apps/spicetify.nix index d215468..b1a0965 100644 --- a/apps/spicetify.nix +++ b/apps/spicetify.nix @@ -1,20 +1,20 @@ -{ pkgs, lib, spicetify-nix, ... }: +{ pkgs, lib, inputs, ... }: { - imports = [ spicetify-nix.homeManagerModule ]; - programs.spicetify = let - spicePkgs = spicetify-nix.legacyPackages.${pkgs.system}; - in { - # configure spicetify :) - enable = true; # this is the line that will cause spotify to get installed - theme = spicePkgs.themes.catppuccin-mocha; - colorScheme = "mauve"; - # enabledExtensions = with spicePkgs.extensions; [ - # # "playlistIcons.js" # only needed if not using dribbblish - # "fullAlbumDate.js" - # "showQueueDuration.js" - # "playNext.js" - # "shuffle+.js" - # ]; - } + imports = [ inputs.spicetify-nix.homeManagerModules.default ]; + + programs.spicetify = + let + spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system}; + in + { + enable = true; + enabledExtensions = with spicePkgs.extensions; [ + adblock + hidePodcasts + shuffle # shuffle+ (special characters are sanitized out of extension names) + ]; + theme = spicePkgs.themes.starryNight; + # colorScheme = "mocha"; + }; } @@ -8,9 +8,20 @@ url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; + + nixvim = { + url = "github:nix-community/nixvim"; + # If using a stable channel you can use `url = "github:nix-community/nixvim/nixos-<version>"` + inputs.nixpkgs.follows = "nixpkgs"; + }; + + spicetify-nix = { + url = "github:Gerg-L/spicetify-nix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; - outputs = { self, nixpkgs, ... }@inputs: + outputs = { nixpkgs, home-manager, nixvim, spicetify-nix, ... }@inputs: let system = "x86_64-linux"; pkgs = nixpkgs.legacyPackages.${system}; @@ -20,7 +31,9 @@ specialArgs = {inherit inputs;}; modules = [ ./configuration.nix - inputs.home-manager.nixosModules.default + home-manager.nixosModules.home-manager { + home-manager.extraSpecialArgs = { inherit inputs; }; + } ]; }; devShells.x86_64-linux = { @@ -1,8 +1,10 @@ -{ config, pkgs, libs, ... }: +{ config, pkgs, libs, inputs, ... }: { imports = [ ./apps/firefox.nix + ./apps/nixvim.nix + ./apps/spicetify.nix ]; home.username = "ozpv"; |
