From 75a38fab6506f032f66b364187823f57b1ba4372 Mon Sep 17 00:00:00 2001 From: liv Date: Sun, 22 Sep 2024 10:38:42 +0200 Subject: [PATCH] install solaar for use on yukari --- dotfiles/nvim/.neoconf.json | 15 ------- dotfiles/nvim/init.lua | 1 - dotfiles/nvim/lua/config/autocmds.lua | 3 -- dotfiles/nvim/lua/config/keymaps.lua | 3 -- dotfiles/nvim/lua/config/lazy.lua | 45 -------------------- dotfiles/nvim/lua/config/options.lua | 22 ---------- dotfiles/nvim/lua/plugins/cmp.lua | 9 ---- dotfiles/nvim/lua/plugins/colorscheme.lua | 9 ---- dotfiles/nvim/lua/plugins/elixir.lua | 17 -------- dotfiles/nvim/lua/plugins/keymaps.lua | 8 ---- dotfiles/nvim/lua/plugins/nushell.lua | 30 ------------- dotfiles/nvim/lua/plugins/projects.lua | 42 ------------------ dotfiles/nvim/lua/plugins/tmux.lua | 32 -------------- dotfiles/nvim/stylua.toml | 3 -- home/features/cli/neovim.nix | 24 ----------- home/yukari.nix | 8 ++-- nixos/yukari/configuration.nix | 52 +++++++---------------- 17 files changed, 21 insertions(+), 302 deletions(-) delete mode 100644 dotfiles/nvim/.neoconf.json delete mode 100644 dotfiles/nvim/init.lua delete mode 100644 dotfiles/nvim/lua/config/autocmds.lua delete mode 100644 dotfiles/nvim/lua/config/keymaps.lua delete mode 100644 dotfiles/nvim/lua/config/lazy.lua delete mode 100644 dotfiles/nvim/lua/config/options.lua delete mode 100644 dotfiles/nvim/lua/plugins/cmp.lua delete mode 100644 dotfiles/nvim/lua/plugins/colorscheme.lua delete mode 100644 dotfiles/nvim/lua/plugins/elixir.lua delete mode 100644 dotfiles/nvim/lua/plugins/keymaps.lua delete mode 100644 dotfiles/nvim/lua/plugins/nushell.lua delete mode 100644 dotfiles/nvim/lua/plugins/projects.lua delete mode 100644 dotfiles/nvim/lua/plugins/tmux.lua delete mode 100644 dotfiles/nvim/stylua.toml delete mode 100644 home/features/cli/neovim.nix diff --git a/dotfiles/nvim/.neoconf.json b/dotfiles/nvim/.neoconf.json deleted file mode 100644 index 7c48087..0000000 --- a/dotfiles/nvim/.neoconf.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "neodev": { - "library": { - "enabled": true, - "plugins": true - } - }, - "neoconf": { - "plugins": { - "lua_ls": { - "enabled": true - } - } - } -} diff --git a/dotfiles/nvim/init.lua b/dotfiles/nvim/init.lua deleted file mode 100644 index 55b8979..0000000 --- a/dotfiles/nvim/init.lua +++ /dev/null @@ -1 +0,0 @@ -require("config.lazy") diff --git a/dotfiles/nvim/lua/config/autocmds.lua b/dotfiles/nvim/lua/config/autocmds.lua deleted file mode 100644 index 27e9e06..0000000 --- a/dotfiles/nvim/lua/config/autocmds.lua +++ /dev/null @@ -1,3 +0,0 @@ --- Autocmds are automatically loaded on the VeryLazy event --- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua --- Add any additional autocmds here diff --git a/dotfiles/nvim/lua/config/keymaps.lua b/dotfiles/nvim/lua/config/keymaps.lua deleted file mode 100644 index 2c134f7..0000000 --- a/dotfiles/nvim/lua/config/keymaps.lua +++ /dev/null @@ -1,3 +0,0 @@ --- Keymaps are automatically loaded on the VeryLazy event --- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua --- Add any additional keymaps here diff --git a/dotfiles/nvim/lua/config/lazy.lua b/dotfiles/nvim/lua/config/lazy.lua deleted file mode 100644 index 8e200e5..0000000 --- a/dotfiles/nvim/lua/config/lazy.lua +++ /dev/null @@ -1,45 +0,0 @@ -local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" -if not vim.loop.fs_stat(lazypath) then - -- bootstrap lazy.nvim - -- stylua: ignore - vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath }) -end -vim.opt.rtp:prepend(vim.env.LAZY or lazypath) - -require("lazy").setup({ - spec = { - -- add LazyVim and import its plugins - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - -- import any extras modules here - { import = "lazyvim.plugins.extras.editor.aerial" }, - { import = "lazyvim.plugins.extras.editor.leap" }, - { import = "lazyvim.plugins.extras.lang.typescript" }, - { import = "lazyvim.plugins.extras.lang.svelte" }, - { import = "lazyvim.plugins.extras.lang.rust" }, - { import = "lazyvim.plugins.extras.lang.haskell" }, - { import = "lazyvim.plugins.extras.formatting.prettier" }, - -- import/override with your plugins - { import = "plugins" }, - }, - defaults = { - lazy = false, - version = false, -- always use the latest git commit - }, - install = { colorscheme = { "tokyonight", "habamax" } }, - checker = { enabled = true }, -- automatically check for plugin updates - performance = { - rtp = { - -- disable some rtp plugins - disabled_plugins = { - "gzip", - -- "matchit", - -- "matchparen", - -- "netrwPlugin", - "tarPlugin", - "tohtml", - "tutor", - "zipPlugin", - }, - }, - }, -}) diff --git a/dotfiles/nvim/lua/config/options.lua b/dotfiles/nvim/lua/config/options.lua deleted file mode 100644 index f416859..0000000 --- a/dotfiles/nvim/lua/config/options.lua +++ /dev/null @@ -1,22 +0,0 @@ --- Options are automatically loaded before lazy.nvim startup --- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua --- Add any additional options here - --- Disable relative line numbers -vim.o.relativenumber = false - --- Change the default font --- Some of my machines have HDR displayed, meaning they need a smaller font size -if vim.fn.hostname() == "enoko" then - vim.o.guifont = "JetBrainsMono NF:h12" -else - vim.o.guifont = "JetBrainsMono NF:h14" -end - -if vim.g.neovide then - -- Reduce neovide scroll animation length - vim.g.neovide_scroll_animation_length = 0.1 -end - --- Prepend mise shims to path -vim.env.PATH = vim.env.HOME .. ".local/share/mise/shims:" .. vim.env.PATH diff --git a/dotfiles/nvim/lua/plugins/cmp.lua b/dotfiles/nvim/lua/plugins/cmp.lua deleted file mode 100644 index 63a63f8..0000000 --- a/dotfiles/nvim/lua/plugins/cmp.lua +++ /dev/null @@ -1,9 +0,0 @@ -return { - "hrsh7th/nvim-cmp", - opts = function(_, opts) - opts.experimental = { - -- Disable ghost text because it pisses me off. - ghost_text = false, - } - end, -} diff --git a/dotfiles/nvim/lua/plugins/colorscheme.lua b/dotfiles/nvim/lua/plugins/colorscheme.lua deleted file mode 100644 index 54db547..0000000 --- a/dotfiles/nvim/lua/plugins/colorscheme.lua +++ /dev/null @@ -1,9 +0,0 @@ -return { - { "catppuccin/nvim" }, - { - "LazyVim/LazyVim", - opts = { - colorscheme = "catppuccin-mocha", - }, - }, -} diff --git a/dotfiles/nvim/lua/plugins/elixir.lua b/dotfiles/nvim/lua/plugins/elixir.lua deleted file mode 100644 index f9de1ec..0000000 --- a/dotfiles/nvim/lua/plugins/elixir.lua +++ /dev/null @@ -1,17 +0,0 @@ --- Set up elixir-tools.nvim for better Elixir support - -return { - { - "elixir-tools/elixir-tools.nvim", - event = { "BufReadPre", "BufNewFile" }, - config = function() - local elixir = require("elixir") - - elixir.setup({ - elixirls = { - enable = false, -- handle elixirls through mason - }, - }) - end, - }, -} diff --git a/dotfiles/nvim/lua/plugins/keymaps.lua b/dotfiles/nvim/lua/plugins/keymaps.lua deleted file mode 100644 index 8a87ae5..0000000 --- a/dotfiles/nvim/lua/plugins/keymaps.lua +++ /dev/null @@ -1,8 +0,0 @@ --- Override plugin keymaps - -return { - "nvim-telescope/telescope.nvim", - keys = { - { "", "Telescope find_files", desc = "Find files" }, - }, -} diff --git a/dotfiles/nvim/lua/plugins/nushell.lua b/dotfiles/nvim/lua/plugins/nushell.lua deleted file mode 100644 index c46345f..0000000 --- a/dotfiles/nvim/lua/plugins/nushell.lua +++ /dev/null @@ -1,30 +0,0 @@ -return { - { - "neovim/nvim-lspconfig", - opts = { - servers = { - nushell = {}, - }, - }, - }, - { - "nvim-treesitter/nvim-treesitter", - dependencies = { - { "nushell/tree-sitter-nu" }, - }, - opts = function(_, opts) - require("nvim-treesitter.parsers").get_parser_configs().nu = { - install_info = { - url = "https://github.com/nushell/tree-sitter-nu", - files = { "src/parser.c" }, - branch = "main", - }, - filetype = "nu", - } - - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "nu" }) - end - end, - }, -} diff --git a/dotfiles/nvim/lua/plugins/projects.lua b/dotfiles/nvim/lua/plugins/projects.lua deleted file mode 100644 index 990e8f5..0000000 --- a/dotfiles/nvim/lua/plugins/projects.lua +++ /dev/null @@ -1,42 +0,0 @@ --- Better project/cd support - -return { - { - "gnikdroy/projections.nvim", - config = function() - require("projections").setup({ - workspaces = { - "~/Projects/Personal", - }, - }) - require("telescope").load_extension("projections") - - -- Load project if started in a project directory - local switcher = require("projections.switcher") - vim.api.nvim_create_autocmd({ "VimEnter" }, { - callback = function() - if vim.fn.argc() == 0 then - switcher.switch(vim.loop.cwd()) - end - end, - }) - end, - keys = { - { "fp", "Telescope projections", desc = "Search projects" }, - }, - }, - { - "nvimdev/dashboard-nvim", - opts = function(_, opts) - local button = { - action = "Telescope projections", - desc = "Projects", - icon = "🕮 ", - key = "p", - } - - button.key_format = " %s" - table.insert(opts.config.center, 6, button) - end, - }, -} diff --git a/dotfiles/nvim/lua/plugins/tmux.lua b/dotfiles/nvim/lua/plugins/tmux.lua deleted file mode 100644 index c83e7aa..0000000 --- a/dotfiles/nvim/lua/plugins/tmux.lua +++ /dev/null @@ -1,32 +0,0 @@ -return { - { - "aserowy/tmux.nvim", - event = "VeryLazy", - config = function() - local tmux = require("tmux") - tmux.setup({ - copy_sync = { - enable = false, - }, - navigation = { - cycle_navigation = false, - enable_default_keybindings = false, - persist_zoom = true, - }, - resize = { - enable_default_keybindings = false, - }, - }) - end, - keys = { - { "", mode = { "n", "t", "i" }, 'lua require("tmux").move_left()' }, - { "", mode = { "n", "t", "i" }, 'lua require("tmux").move_right()' }, - { "", mode = { "n", "t", "i" }, 'lua require("tmux").move_bottom()' }, - { "", mode = { "n", "t", "i" }, 'lua require("tmux").move_top()' }, - { "", mode = { "n", "t", "i" }, 'lua require("tmux").resize_left()' }, - { "", mode = { "n", "t", "i" }, 'lua require("tmux").resize_bottom()' }, - { "", mode = { "n", "t", "i" }, 'lua require("tmux").resize_top()' }, - { "", mode = { "n", "t", "i" }, 'lua require("tmux").resize_right()' }, - }, - }, -} diff --git a/dotfiles/nvim/stylua.toml b/dotfiles/nvim/stylua.toml deleted file mode 100644 index 0f90030..0000000 --- a/dotfiles/nvim/stylua.toml +++ /dev/null @@ -1,3 +0,0 @@ -indent_type = "Spaces" -indent_width = 2 -column_width = 120 diff --git a/home/features/cli/neovim.nix b/home/features/cli/neovim.nix deleted file mode 100644 index f445a31..0000000 --- a/home/features/cli/neovim.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ pkgs, ... }: -{ - programs.neovim = { - enable = true; - extraPackages = with pkgs; [ - # LazyVim - lua-language-server - stylua - # Telescope - ripgrep - ]; - - plugins = with pkgs.vimPlugins; [ - lazy-nvim - ]; - }; - - home.sessionVariables.EDITOR = "nvim"; - - xdg.configFile."nvim/init.lua".source = ../../../dotfiles/nvim/init.lua; - xdg.configFile."nvim/stylua.toml".source = ../../../dotfiles/nvim/stylua.toml; - xdg.configFile."nvim/.neoconf.json".source = ../../../dotfiles/nvim/.neoconf.json; - xdg.configFile."nvim/lua".source = ../../../dotfiles/nvim/lua; -} diff --git a/home/yukari.nix b/home/yukari.nix index b74bf83..4ad63ed 100644 --- a/home/yukari.nix +++ b/home/yukari.nix @@ -1,6 +1,5 @@ # yukari my main desktop workstation, running nixos -{ ... }: -{ +{ pkgs, ... }: { imports = [ ./global.nix ./global.linux.nix @@ -8,10 +7,13 @@ ./features/desktop/games ]; + # Install Solaar, a management application for Logitech dongle devices + home.packages = with pkgs; [ solaar ]; + # ---------- ------ # | HDMI-A-5 | | DP-5 | # ---------- ------ - config.monitors = [ + monitors = [ { name = "HDMI-A-1"; width = 3440; diff --git a/nixos/yukari/configuration.nix b/nixos/yukari/configuration.nix index 3feb996..5e40b60 100644 --- a/nixos/yukari/configuration.nix +++ b/nixos/yukari/configuration.nix @@ -1,11 +1,4 @@ -{ - inputs, - lib, - config, - pkgs, - ... -}: -{ +{ inputs, lib, config, pkgs, ... }: { imports = [ ../common ./hardware-configuration.nix @@ -14,31 +7,25 @@ ../desktop/plasma.nix ]; - nixpkgs = { - config = { - allowUnfree = true; + nixpkgs = { config = { allowUnfree = true; }; }; + + nix = let flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs; + in { + settings = { + flake-registry = ""; + nix-path = config.nix.nixPath; }; + channel.enable = false; + + registry = lib.mapAttrs (_: flake: { inherit flake; }) flakeInputs; + nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs; }; - nix = - let - flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs; - in - { - settings = { - flake-registry = ""; - nix-path = config.nix.nixPath; - }; - channel.enable = false; - - registry = lib.mapAttrs (_: flake: { inherit flake; }) flakeInputs; - nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs; - }; - boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; boot.initrd.kernelModules = [ "amdgpu" ]; hardware.graphics.enable = true; + hardware.logitech.wireless.enable = true; networking.hostName = "yukari"; @@ -66,17 +53,12 @@ lu = { shell = pkgs.fish; isNormalUser = true; - extraGroups = [ - "wheel" - "storage" - ]; + extraGroups = [ "wheel" "storage" ]; }; }; # network stuff - networking.networkmanager = { - enable = true; - }; + networking.networkmanager = { enable = true; }; # fish shell programs.fish = { @@ -89,9 +71,7 @@ }; # hyprland stuff - programs.hyprland = { - enable = true; - }; + programs.hyprland = { enable = true; }; # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion system.stateVersion = "23.11";