diff options
| -rw-r--r-- | config/.tmux.conf | 5 | ||||
| -rw-r--r-- | config/git/default.nix | 8 | ||||
| -rw-r--r-- | config/nvim/init.lua | 8 | ||||
| -rw-r--r-- | flake.lock | 12 | ||||
| -rw-r--r-- | machines/x/configuration.nix | 11 | ||||
| -rw-r--r-- | machines/x/home.nix | 24 | ||||
| -rw-r--r-- | modules/bluetooth.nix | 2 | ||||
| -rw-r--r-- | modules/compromyse.nix | 2 | ||||
| -rw-r--r-- | modules/login.nix | 2 | ||||
| -rw-r--r-- | modules/nvidia.nix | 2 | ||||
| -rw-r--r-- | modules/plasma.nix | 7 | ||||
| -rw-r--r-- | modules/virtualization.nix | 13 | ||||
| -rw-r--r-- | modules/wm.nix (renamed from modules/desktop.nix) | 0 | ||||
| -rw-r--r-- | packages/tlauncher.nix | 85 |
14 files changed, 152 insertions, 29 deletions
diff --git a/config/.tmux.conf b/config/.tmux.conf index ac27bc9..248b37c 100644 --- a/config/.tmux.conf +++ b/config/.tmux.conf @@ -37,13 +37,14 @@ bind-key r command-prompt -I "#W" "rename-window '%%'" bind-key x kill-pane bind-key c new-window -c "#{pane_current_path}" -bg="#272727" +fg="#272727" +bg="#f2f0fa" set -g status-position "bottom" set -g status-style bg=default,fg=default set -g status-left " λ " set -g status-right "" set -g window-status-format " #I:#W " -set -g window-status-current-format "#[bg=${bg},fg=#f2f0fa] #I:#W " +set -g window-status-current-format "#[bg=${bg},fg=${fg}] #I:#W " run '~/.tmux/plugins/tpm/tpm' diff --git a/config/git/default.nix b/config/git/default.nix index 4fe7ef6..2645900 100644 --- a/config/git/default.nix +++ b/config/git/default.nix @@ -5,5 +5,13 @@ enable = true; userName = "Raghuram Subramani"; userEmail = "raghus2247@gmail.com"; + extraConfig = { + "filter \"lfs\"" = { + clean = "${pkgs.git-lfs}/bin/git-lfs clean -- %f"; + smudge = "${pkgs.git-lfs}/bin/git-lfs smudge --skip -- %f"; + process = "${pkgs.git-lfs}/bin/git-lfs filter-process --skip"; + required = true; + }; + }; }; } diff --git a/config/nvim/init.lua b/config/nvim/init.lua index f3873b6..4bf32b4 100644 --- a/config/nvim/init.lua +++ b/config/nvim/init.lua @@ -37,6 +37,7 @@ require('packer').startup(function(use) use 'hrsh7th/nvim-cmp' use 'neovim/nvim-lspconfig' use 'hrsh7th/cmp-nvim-lsp-signature-help' + use 'L3MON4D3/LuaSnip' use { 'nvim-telescope/telescope.nvim', requires = { {'nvim-lua/plenary.nvim'} } @@ -84,6 +85,11 @@ require('Comment').setup { -- CMP Setup local cmp = require'cmp' cmp.setup({ + snippet = { + expand = function(args) + require('luasnip').lsp_expand(args.body) + end + }, window = { completion = cmp.config.window.bordered(), documentation = cmp.config.window.bordered(), @@ -125,7 +131,7 @@ cmp.setup.cmdline(':', { -- Set Up Lspconfig local lspconfig = require('lspconfig') local capabilities = require('cmp_nvim_lsp').default_capabilities() -servers = { 'pyright', 'ccls', 'gopls' } +servers = { 'pyright', 'ccls', 'gopls', 'rubocop' } for _, lsp in pairs(servers) do lspconfig[lsp].setup { capabilities = capabilities @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1706955260, - "narHash": "sha256-W3y0j77IDVbmbajudHoUr46RpswujUCl+D5Vru53UsI=", + "lastModified": 1708988456, + "narHash": "sha256-RCz7Xe64tN2zgWk+MVHkzg224znwqknJ1RnB7rVqUWw=", "owner": "nix-community", "repo": "home-manager", - "rev": "880d9bc2110f7cae59698f715b8ca42cdc53670c", + "rev": "1d085ea4444d26aa52297758b333b449b2aa6fca", "type": "github" }, "original": { @@ -22,11 +22,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1706732774, - "narHash": "sha256-hqJlyJk4MRpcItGYMF+3uHe8HvxNETWvlGtLuVpqLU0=", + "lastModified": 1708984720, + "narHash": "sha256-gJctErLbXx4QZBBbGp78PxtOOzsDaQ+yw1ylNQBuSUY=", "owner": "nixos", "repo": "nixpkgs", - "rev": "b8b232ae7b8b144397fdb12d20f592e5e7c1a64d", + "rev": "13aff9b34cc32e59d35c62ac9356e4a41198a538", "type": "github" }, "original": { diff --git a/machines/x/configuration.nix b/machines/x/configuration.nix index 933239f..bd0a385 100644 --- a/machines/x/configuration.nix +++ b/machines/x/configuration.nix @@ -1,13 +1,15 @@ { lib, inputs, pkgs, ... }: -{ +let + tlauncher = (pkgs.callPackage ../../packages/tlauncher.nix {}); +in { imports = [ ./hardware-configuration.nix inputs.home-manager.nixosModules.default ] ++ (map (path: ../../modules/${path}) [ "global.nix" "compromyse.nix" - "desktop.nix" + "plasma.nix" "login.nix" "fonts.nix" "bluetooth.nix" @@ -33,5 +35,10 @@ networking.hostName = "x"; + environment.systemPackages = [tlauncher]; + + virtualisation.lxd.enable = true; + home-manager.users.compromyse = import ./home.nix; + programs.steam.enable = true; } diff --git a/machines/x/home.nix b/machines/x/home.nix index 4ef6f48..bddd06c 100644 --- a/machines/x/home.nix +++ b/machines/x/home.nix @@ -19,8 +19,8 @@ unzip zip - cinnamon.nemo - mate.eom + # cinnamon.nemo + # mate.eom spotify firefox @@ -28,29 +28,27 @@ obs-studio - pavucontrol - blueman - brillo + # pavucontrol + # blueman + # brillo - wbg + # wbg + + kcalc ccls + rubocop nodePackages.pyright + git-lfs ]; imports = (map (path: ../../config/${path}) [ - "themes.nix" + # "themes.nix" "dotfiles.nix" "git" "nvim" "alacritty" - "dunst" - "swaylock" - "dwl.nix" - "way-displays" "bash.nix" - "fuzzel" - "waybar" ]); home.stateVersion = "23.11"; diff --git a/modules/bluetooth.nix b/modules/bluetooth.nix index 5e64d97..fbd9b48 100644 --- a/modules/bluetooth.nix +++ b/modules/bluetooth.nix @@ -3,5 +3,5 @@ { hardware.bluetooth.enable = true; hardware.bluetooth.powerOnBoot = true; - services.blueman.enable = true; + # services.blueman.enable = true; } diff --git a/modules/compromyse.nix b/modules/compromyse.nix index 505a04d..03adf3e 100644 --- a/modules/compromyse.nix +++ b/modules/compromyse.nix @@ -5,6 +5,6 @@ initialPassword = "changeme"; isNormalUser = true; # openssh.authorizedKeys.keys = []; - extraGroups = [ "wheel" "storage" "input" "plugdev" "libvirtd" ]; + extraGroups = [ "wheel" "storage" "input" "plugdev" "libvirtd" "lxd" "docker" ]; }; } diff --git a/modules/login.nix b/modules/login.nix index 8efefb4..67cd6d9 100644 --- a/modules/login.nix +++ b/modules/login.nix @@ -10,7 +10,7 @@ enable = true; settings = { default_session = { - command = "tuigreet --time --remember --cmd \"dwl > ~/.cache/dwl-log\""; + command = "tuigreet --time --remember --cmd \"startplasma-wayland\""; user = "greeter"; }; }; diff --git a/modules/nvidia.nix b/modules/nvidia.nix index c72317f..1d59539 100644 --- a/modules/nvidia.nix +++ b/modules/nvidia.nix @@ -23,5 +23,5 @@ }; }; - environment.systemPackages = [ pkgs.cudatoolkit ]; + # environment.systemPackages = [ pkgs.cudatoolkit ]; } diff --git a/modules/plasma.nix b/modules/plasma.nix new file mode 100644 index 0000000..35849b2 --- /dev/null +++ b/modules/plasma.nix @@ -0,0 +1,7 @@ +{ pkgs, ... }: + +{ + environment.sessionVariables.NIXOS_OZONE_WL = "1"; + services.xserver.enable = true; + services.xserver.desktopManager.plasma5.enable = true; +} diff --git a/modules/virtualization.nix b/modules/virtualization.nix index 12e8d08..2d4937e 100644 --- a/modules/virtualization.nix +++ b/modules/virtualization.nix @@ -1,6 +1,17 @@ { pkgs, config, ... }: { - virtualisation.libvirtd.enable = true; + virtualisation = { + libvirtd = { + enable = true; + qemu = { + swtpm.enable = true; + ovmf.enable = true; + ovmf.packages = [ pkgs.OVMFFull.fd ]; + }; + }; + spiceUSBRedirection.enable = true; + }; + services.spice-vdagentd.enable = true; programs.virt-manager.enable = true; } diff --git a/modules/desktop.nix b/modules/wm.nix index 03cf3ef..03cf3ef 100644 --- a/modules/desktop.nix +++ b/modules/wm.nix diff --git a/packages/tlauncher.nix b/packages/tlauncher.nix new file mode 100644 index 0000000..4f23abd --- /dev/null +++ b/packages/tlauncher.nix @@ -0,0 +1,85 @@ +{ lib +, stdenv +, openjdk8 +, buildFHSUserEnv +, fetchzip +, fetchurl +, copyDesktopItems +}: +let + version = "2.895"; + src = stdenv.mkDerivation { + pname = "tlauncher"; + inherit version; + src = fetchzip { + name = "tlauncher.zip"; + url = "https://dl2.tlauncher.org/f.php?f=files%2FTLauncher-${version}.zip"; + sha256 = "sha256-6p1rxEpGpvjBCd+TCsb8ZTRnvqL6GiEv+V7ZI4+pjJk="; + stripRoot = false; + }; + installPhase = '' + cp $src/*.jar $out + ''; + }; + fhs = buildFHSUserEnv { + name = "tlauncher"; + runScript = '' + ${openjdk8}/bin/java -jar "${src}" "$@" + ''; + targetPkgs = pkgs: with pkgs; [ + alsa-lib + cpio + cups + file + fontconfig + freetype + giflib + glib + gnome2.GConf + gnome2.gnome_vfs + gtk2 + libjpeg + libGL + openjdk8-bootstrap + perl + which + xorg.libICE + xorg.libX11 + xorg.libXcursor + xorg.libXext + xorg.libXi + xorg.libXinerama + xorg.libXrandr + xorg.xrandr + xorg.libXrender + xorg.libXt + xorg.libXtst + xorg.libXtst + xorg.libXxf86vm + zip + zlib + ]; + }; +in stdenv.mkDerivation { + pname = "tlauncher-wrapper"; + inherit version; + + dontUnpack = true; + + installPhase = '' + runHook preInstall + mkdir $out/{bin,share/applications} -p + install ${fhs}/bin/tlauncher $out/bin + runHook postInstall + ''; + + nativeBuildInputs = [ copyDesktopItems ]; + + meta = with lib; { + description = "Minecraft launcher that already deal with forge, optifine and mods"; + homepage = "https://tlauncher.org/"; + maintainers = with maintainers; [ lucasew ]; + license = licenses.unfree; + platforms = openjdk8.meta.platforms; + }; +} |
