diff options
| -rw-r--r-- | flake.lock | 44 | ||||
| -rw-r--r-- | flake.nix | 2 | ||||
| -rw-r--r-- | home/desktops/sway/idle.nix | 2 | ||||
| -rw-r--r-- | home/development.nix | 3 | ||||
| -rw-r--r-- | home/neovim/default.nix | 4 | ||||
| -rw-r--r-- | home/neovim/init.lua | 46 | ||||
| -rw-r--r-- | hosts/shinji/hardware.nix | 4 | ||||
| -rw-r--r-- | pkgs/default.nix | 13 | ||||
| -rw-r--r-- | pkgs/kotlin-language-server/default.nix | 12 | ||||
| -rw-r--r-- | system/default.nix | 11 | ||||
| -rw-r--r-- | system/gaming/steam.nix | 3 | ||||
| -rw-r--r-- | system/nvidia.nix | 4 | ||||
| -rw-r--r-- | system/unfree.nix | 9 | ||||
| -rw-r--r-- | system/virt/docker.nix | 16 | ||||
| -rw-r--r-- | themes/tricolors.nix | 41 |
15 files changed, 125 insertions, 89 deletions
@@ -15,11 +15,11 @@ "sf-pro": "sf-pro" }, "locked": { - "lastModified": 1772251183, - "narHash": "sha256-Zfr9trB8LaesfpupugDgXPqC4F25MO18kyMyb9b2PkM=", + "lastModified": 1777376912, + "narHash": "sha256-aLvNGToDh5g3Lm2NoTPN3ifYLxlCs3yF7qO3qZ1X46s=", "owner": "Lyndeno", "repo": "apple-fonts.nix", - "rev": "f8dad87c2cb956695d18c1f36360322d8a0b7d63", + "rev": "746df8b060c2f16080ea2faf502fee652b733047", "type": "github" }, "original": { @@ -186,11 +186,11 @@ ] }, "locked": { - "lastModified": 1774007980, - "narHash": "sha256-FOnZjElEI8pqqCvB6K/1JRHTE8o4rer8driivTpq2uo=", + "lastModified": 1777988791, + "narHash": "sha256-DtbtSW5+Hls7z+D9BfsAXvFuivt5iZ0OzUXjQ8d8lB8=", "owner": "nix-community", "repo": "home-manager", - "rev": "9670de2921812bc4e0452f6e3efd8c859696c183", + "rev": "d987617879f613053f6fdf4491fe28ce0283d543", "type": "github" }, "original": { @@ -298,16 +298,16 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1773149218, - "narHash": "sha256-m5Ewi+rgn18qPP54Um4O2zwZ02oiomlZssHvXYEUv3U=", + "lastModified": 1774635470, + "narHash": "sha256-dYVtjeSZgQzNNDmeSwBnp7gH/zOLsI2YTlv7hagY6gs=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "59f9f2688ac508a0584d1462151195a6c4992f99", + "rev": "521ece463c4a9d3d128670688a34756805a4328f", "type": "github" }, "original": { "owner": "hyprwm", - "ref": "v0.54.2", + "ref": "v0.54.3", "repo": "Hyprland", "type": "github" } @@ -576,11 +576,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1774018263, - "narHash": "sha256-HHYEwK1A22aSaxv2ibhMMkKvrDGKGlA/qObG4smrSqc=", + "lastModified": 1777917524, + "narHash": "sha256-k+LVe9YaO2BEPB9AaCtTtOMCeGi4dxDo6gt4Un3qoPY=", "owner": "nixos", "repo": "nixos-hardware", - "rev": "2d4b4717b2534fad5c715968c1cece04a172b365", + "rev": "df7783100babf59001340a7a874ba3824e441ecb", "type": "github" }, "original": { @@ -598,11 +598,11 @@ ] }, "locked": { - "lastModified": 1773882647, - "narHash": "sha256-VzcOcE0LLpEnyoxLuMuptZ9ZWCkSBn99bTgEQoz5Viw=", + "lastModified": 1777732699, + "narHash": "sha256-2uX/XtOWZ/oy2rerRynVhqVA//ZXZ3Fo60PikLHEPQc=", "owner": "nix-community", "repo": "nixos-wsl", - "rev": "fd0eae98d1ecee31024271f8d64676250a386ee7", + "rev": "5482f113fd31ebac131d1ebeb2ae90bf0d5e41f5", "type": "github" }, "original": { @@ -613,11 +613,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1773821835, - "narHash": "sha256-TJ3lSQtW0E2JrznGVm8hOQGVpXjJyXY2guAxku2O9A4=", + "lastModified": 1777578337, + "narHash": "sha256-Ad49moKWeXtKBJNy2ebiTQUEgdLyvGmTeykAQ9xM+Z4=", "owner": "nixos", "repo": "nixpkgs", - "rev": "b40629efe5d6ec48dd1efba650c797ddbd39ace0", + "rev": "15f4ee454b1dce334612fa6843b3e05cf546efab", "type": "github" }, "original": { @@ -789,11 +789,11 @@ ] }, "locked": { - "lastModified": 1773889674, - "narHash": "sha256-+ycaiVAk3MEshJTg35cBTUa0MizGiS+bgpYw/f8ohkg=", + "lastModified": 1777944972, + "narHash": "sha256-VfGRo1qTBKOe3s2gOv8LSoA6Fk19PvBlwQ1ECN0Evn8=", "owner": "Mic92", "repo": "sops-nix", - "rev": "29b6519f3e0780452bca0ac0be4584f04ac16cc5", + "rev": "c591bf665727040c6cc5cb409079acb22dcce33c", "type": "github" }, "original": { @@ -8,7 +8,7 @@ home-manager.url = "github:nix-community/home-manager/master"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; # hyprland - hyprland.url = "github:hyprwm/Hyprland/v0.54.2"; + hyprland.url = "github:hyprwm/Hyprland/v0.54.3"; hyprland.inputs.nixpkgs.follows = "nixpkgs"; # hyprland plugins hyprland-plugins.url = "github:hyprwm/hyprland-plugins/v0.53.0"; diff --git a/home/desktops/sway/idle.nix b/home/desktops/sway/idle.nix index ccfa888..54ec857 100644 --- a/home/desktops/sway/idle.nix +++ b/home/desktops/sway/idle.nix @@ -1,7 +1,7 @@ {config, ...}: { services.swayidle = { enable = config.desktops.sway.enable; - systemdTarget = "sway-session.target"; + systemdTargets = ["sway-session.target"]; timeouts = [ { diff --git a/home/development.nix b/home/development.nix index 773ee07..fc71a7f 100644 --- a/home/development.nix +++ b/home/development.nix @@ -32,9 +32,8 @@ in { ]) ++ (optionals cfg.java.enable [ gradle - jdk + jdk25 jdt-language-server - kotlin kotlin-language-server maven ]) diff --git a/home/neovim/default.nix b/home/neovim/default.nix index 1eb18d8..88c7d8e 100644 --- a/home/neovim/default.nix +++ b/home/neovim/default.nix @@ -39,10 +39,6 @@ in { trouble-nvim # Telescope (buffers/find/grep/help) telescope-nvim - # Snippets - vim-vsnip - vim-vsnip-integ - friendly-snippets # Completion cmp-buffer cmp-nvim-lsp diff --git a/home/neovim/init.lua b/home/neovim/init.lua index e66e523..8afff4c 100644 --- a/home/neovim/init.lua +++ b/home/neovim/init.lua @@ -12,6 +12,12 @@ local function bind(key, action, opts) vim.keymap.set('n', key, action, opts) end +local function alias(name, vimFn) + vim.api.nvim_create_user_command(name, function () + vim.cmd(vimFn) + end, {}) +end + --[[ VIM ]]-- vim.opt.tabstop = config.tabwidth @@ -24,10 +30,8 @@ vim.opt.hlsearch = true vim.opt.autoindent = true vim.opt.ttyfast = true vim.opt.number = true -vim.opt.relativenumber = true -vim.opt.rnu = true vim.opt.swapfile = false -vim.opt.fillchars = { eob = " "} +vim.opt.fillchars = { eob = " " } vim.opt.signcolumn = "yes" --[[ BUF ]]-- @@ -221,7 +225,7 @@ bind(config.keys.menus.undo, vim.cmd.UndotreeToggle) --[[ ERROR MENU ]]-- -bind(config.keys.menus.error, function() require('trouble').toggle() end) +bind(config.keys.menus.error, function() require('trouble').toggle("diagnostics") end) --[[ TELESCOPE ]]-- @@ -254,34 +258,20 @@ local cmp_mappings = cmp.mapping.preset.insert({ cmp_mappings['<Tab>'] = nil cmp_mappings['<S-Tab>'] = nil +local borderOpts = { + border = 'rounded', + winhighlight = 'Normal:Normal,FloatBorder:FloatBorder,CursorLine:Visual,Search:None', +} + cmp.setup { - snippet = { - expand = function(args) - vim.fn["vsnip#anonymous"](args.body) - end, - }, + mapping = cmp_mappings, sources = cmp.config.sources { { name = 'nvim_lsp' }, - { name = 'vsnip' }, { name = 'buffer' }, }, - mapping = cmp_mappings, - formatting = { - format = function(entry, vim_item) - local css_colors = require("nvim-highlight-colors").format - local lsp_colors = require("colorful-menu").cmp_highlights(entry) - - if lsp_colors ~= nil then - vim_item.abbr_hl_group = lsp_colors.highlights - vim_item.abbr = lsp_colors.text - end - - return css_colors(entry, vim_item) - end - }, window = { - completion = cmp.config.window.bordered(), - documentation = cmp.config.window.bordered(), + completion = cmp.config.window.bordered(borderOpts), + documentation = cmp.config.window.bordered(borderOpts), }, } @@ -329,6 +319,10 @@ vim.diagnostic.config({ virtual_text = true, }) +-- bring back old Lsp commands (muscle memory) +alias("LspRestart", "lsp restart") +alias("LspInfo", "checkhealth vim.lsp") + --[[ NOTIFICATIONS ]]-- require('fidget').setup { diff --git a/hosts/shinji/hardware.nix b/hosts/shinji/hardware.nix index e79deb0..88990f8 100644 --- a/hosts/shinji/hardware.nix +++ b/hosts/shinji/hardware.nix @@ -44,6 +44,10 @@ hardware.enableRedistributableFirmware = true; hardware.cpu.amd.updateMicrocode = true; + # hibernation + boot.resumeDevice = (builtins.head config.swapDevices).device; + powerManagement.enable = true; + # luks device boot.initrd.luks.devices."root".device = "/dev/disk/by-uuid/ad489bfa-4280-44ea-8ad2-60347b516d60"; boot.initrd.luks.devices."swap".device = "/dev/disk/by-uuid/550e638d-eade-4d2f-aa39-c38774c91af3"; diff --git a/pkgs/default.nix b/pkgs/default.nix index ae80ed7..3a31acf 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -1,9 +1,20 @@ { final, prev ? final, -}: { +}: rec { arcanist = final.callPackage ./arcanist {}; astal = final.callPackage ./astal {}; libfprint-2-tod1-vfs0090 = final.callPackage ./libfprint-2-tod1-vfs0090 {inherit (prev) libfprint-2-tod1-vfs0090;}; solaar-udev-rules = final.callPackage ./solaar-udev-rules {}; + + # change default jdk + openjdk = final.openjdk25; + jdk = openjdk; + gradle = final.gradle_9.override {java = openjdk;}; + + # patch jdk25 into kotlin lsp + kotlin-language-server = final.callPackage ./kotlin-language-server { + inherit (prev) kotlin-language-server; + inherit gradle openjdk; + }; } diff --git a/pkgs/kotlin-language-server/default.nix b/pkgs/kotlin-language-server/default.nix new file mode 100644 index 0000000..2b7a8a8 --- /dev/null +++ b/pkgs/kotlin-language-server/default.nix @@ -0,0 +1,12 @@ +{ + kotlin-language-server, + gradle, + openjdk, +}: +(kotlin-language-server.overrideAttrs + { + src = fetchTarball { + url = "https://f.freya.cat/bin/kotlin-language-server.tar.gz"; + sha256 = "14bcah09dsgx4frffl2k9cppjqgpn1q0pnx6bpx2qlz9wiw4kwzs"; + }; + }).override {inherit gradle openjdk;} diff --git a/system/default.nix b/system/default.nix index 2857222..62c8306 100644 --- a/system/default.nix +++ b/system/default.nix @@ -21,6 +21,7 @@ in { ./nvidia.nix ./sshd.nix ./tpm.nix + ./unfree.nix ]; # allow flakes @@ -104,6 +105,9 @@ in { htop jq killall + linux-manual + man-pages + man-pages-posix openssh p7zip ripgrep @@ -140,10 +144,13 @@ in { # docs documentation = { enable = true; + dev.enable = true; doc.enable = false; - man.enable = true; - dev.enable = false; info.enable = false; + man = { + enable = true; + cache.enable = false; + }; nixos.enable = false; }; diff --git a/system/gaming/steam.nix b/system/gaming/steam.nix index 2364291..358a94a 100644 --- a/system/gaming/steam.nix +++ b/system/gaming/steam.nix @@ -30,6 +30,9 @@ in { # controllers hardware.steam-hardware.enable = true; + # gamer mode xd + programs.gamemode.enable = true; + # cod networking.firewall = { allowedTCPPorts = [3074]; diff --git a/system/nvidia.nix b/system/nvidia.nix index 810f685..d9818e0 100644 --- a/system/nvidia.nix +++ b/system/nvidia.nix @@ -16,8 +16,8 @@ in { hardware.nvidia = { modesetting.enable = true; powerManagement = { - enable = false; - finegrained = false; + enable = true; + finegrained = true; }; prime = cfg.primeBusIds diff --git a/system/unfree.nix b/system/unfree.nix new file mode 100644 index 0000000..fd26d3a --- /dev/null +++ b/system/unfree.nix @@ -0,0 +1,9 @@ +_: { + # list of unfree packages used in + # the home module, since "unfreePackages" + # does not work in home when using `rs` + unfreePackages = [ + "vim-table-mode" + "nvim-highlight-colors" + ]; +} diff --git a/system/virt/docker.nix b/system/virt/docker.nix index 2376574..8f7c5ba 100644 --- a/system/virt/docker.nix +++ b/system/virt/docker.nix @@ -8,14 +8,14 @@ rootfs = config.fileSystems."/".fsType; in { config = mkIf cfg.enable { - virtualisation.docker = - { - enable = true; - enableOnBoot = false; - } - // mkIf (rootfs == "btrfs") { - storageDriver = "btrfs"; - }; + virtualisation.docker = { + enable = true; + enableOnBoot = false; + storageDriver = + if rootfs == "btrfs" + then "btrfs" + else null; + }; users.groups.docker.members = [config.user]; }; } diff --git a/themes/tricolors.nix b/themes/tricolors.nix index 4f8f551..42c99c0 100644 --- a/themes/tricolors.nix +++ b/themes/tricolors.nix @@ -2,41 +2,42 @@ rec { name = "tricolors"; author = "https://trimill.xyz"; - text = bright.white; - subtext = normal.white; + text = normal.white; + subtext = "ada2a8"; base = normal.black; - surface = "2c2b3b"; + surface = "302f3e"; overlay = bright.black; primary = bright.blue; + secondary = bright.pink; success = bright.green; warning = bright.yellow; error = bright.red; normal = { black = "14171d"; - blue = "3d67a2"; - cyan = "578c7c"; - green = "759438"; - magenta = "7b5687"; - red = "a63a3a"; - white = "ada0a8"; - yellow = "de7e54"; + blue = "4d75ab"; + cyan = "5c9183"; + green = "769d61"; + magenta = "855f91"; + red = "ab4353"; + white = "d5d2cc"; + yellow = "dcac52"; pink = normal.magenta; - orange = normal.yellow; + orange = "d1764f"; }; bright = { - black = "4d4754"; - blue = "789ebf"; - cyan = "82bfb3"; - green = "97bd5e"; - magenta = "a97fb3"; - red = "cc5c5c"; - white = "c7c6c3"; - yellow = "f0c767"; + black = "514b5f"; + blue = "7ea1c0"; + cyan = "87c4b8"; + green = "9dc265"; + magenta = "ac84b6"; + red = "ce6363"; + white = "f6f4e9"; + yellow = "f0c96c"; pink = bright.magenta; - orange = bright.yellow; + orange = "edad80"; }; } |