diff options
| -rw-r--r-- | flake.nix | 29 | ||||
| -rwxr-xr-x | nix.sh | 1 | ||||
| -rw-r--r-- | nixos/languages/default.nix | 22 | ||||
| -rw-r--r-- | nixos/opt/default.nix | 9 | ||||
| -rw-r--r-- | nvim/lua/configs/lspconfig.lua | 3 |
5 files changed, 34 insertions, 30 deletions
@@ -15,8 +15,8 @@ zen-browser = { url = "github:0xc000022070/zen-browser-flake"; inputs = { - # IMPORTANT: we're using "libgbm" and is only available in unstable so ensure - # to have it up-to-date or simply don't specify the nixpkgs input + # IMPORTANT: we're using "libgbm" and is only available in unstable so + # ensure to have it up-to-date or simply don't specify the nixpkgs input nixpkgs.follows = "nixpkgs"; home-manager.follows = "home-manager"; }; @@ -34,16 +34,26 @@ system = "x86_64-linux"; username = "aargh"; hostname = "pegasus"; - nvidia = true; - llm = true; + opt = { + nvidia = true; + llm = true; + }; + languages = { + c = true; + asm = true; + lua = true; + python = true; + + go = false; + beam = false; + javascript = false; + rust = false; + zig = false; + }; # This is where I have keep the dotfiles folder, replace it accordingly symlinkRoot = "/home/${username}/dotfiles"; - pkgs = import nixpkgs { - inherit system; - config.allowUnfree = true; - }; unstable = import nixpkgs-unstable { inherit system; config.allowUnfree = true; @@ -52,7 +62,8 @@ nixosConfigurations.main = nixpkgs.lib.nixosSystem { inherit system; specialArgs = { - inherit quickshell inputs system username hostname unstable symlinkRoot nvidia llm; + inherit quickshell inputs system + username hostname unstable symlinkRoot opt languages; }; modules = [ @@ -1 +1,2 @@ sudo nixos-rebuild switch --flake .#main + diff --git a/nixos/languages/default.nix b/nixos/languages/default.nix index 4f5cc75..b469aa4 100644 --- a/nixos/languages/default.nix +++ b/nixos/languages/default.nix @@ -1,15 +1,13 @@ -{ config, pkgs, ... }: +{ config, pkgs, languages, ... }: { imports = - [ - ./beam.nix - ./c.nix - ./asm.nix - ./go.nix - ./javascript.nix - ./lua.nix - ./python.nix - ./rust.nix - ./zig.nix - ]; + (if languages.beam then [ ./beam.nix ] else []) ++ + (if languages.c then [ ./c.nix ] else []) ++ + (if languages.asm then [ ./asm.nix ] else []) ++ + (if languages.go then [ ./go.nix ] else []) ++ + (if languages.javascript then [ ./javascript.nix ] else []) ++ + (if languages.lua then [ ./lua.nix ] else []) ++ + (if languages.python then [ ./python.nix ] else []) ++ + (if languages.rust then [ ./rust.nix ] else []) ++ + (if languages.zig then [ ./zig.nix ] else []); } diff --git a/nixos/opt/default.nix b/nixos/opt/default.nix index c9b6892..58a6dcf 100644 --- a/nixos/opt/default.nix +++ b/nixos/opt/default.nix @@ -1,9 +1,6 @@ -{ nvidia, llm, ... }: +{ opt, ... }: { imports = - (if nvidia then [ - ./nvidia.nix - ] else []) ++ (if llm then [ - ./llm.nix - ] else []); + (if opt.nvidia then [ ./nvidia.nix ] else []) ++ + (if opt.llm then [ ./llm.nix ] else []); } diff --git a/nvim/lua/configs/lspconfig.lua b/nvim/lua/configs/lspconfig.lua index cc741bd..14912dd 100644 --- a/nvim/lua/configs/lspconfig.lua +++ b/nvim/lua/configs/lspconfig.lua @@ -5,9 +5,6 @@ vim.lsp.enable(servers) local lspconfig = require("lspconfig") --- Rust -lspconfig.rust_analyzer.setup{} - -- Zig lspconfig.zls.setup{ cmd = { "zls" }, |
