From f0c4a843b97721cbf06c3e896bf90e0a9cc0169c Mon Sep 17 00:00:00 2001 From: emily Date: Wed, 14 Feb 2024 21:40:07 +0100 Subject: [PATCH] fixes --- config/common/default.nix | 2 +- config/common/users/emily/default.nix | 2 +- config/profiles/graphical/default.nix | 221 +-------------------- config/profiles/graphical/nixvim.nix | 203 ++++++++++++++++++++ flake.lock | 266 +++++++++++++++++++++++++- flake.nix | 3 +- 6 files changed, 481 insertions(+), 216 deletions(-) create mode 100644 config/profiles/graphical/nixvim.nix diff --git a/config/common/default.nix b/config/common/default.nix index 86b698f..ae5484c 100644 --- a/config/common/default.nix +++ b/config/common/default.nix @@ -59,7 +59,7 @@ with lib; { nixpkgs.hostPlatform.system = "x86_64-linux"; - boot.tmp.cleanOnBoot = = mkDefault true; + boot.tmp.cleanOnBoot = mkDefault true; services.journald.extraConfig = "SystemMaxUse=256M"; security.sudo.enable = false; diff --git a/config/common/users/emily/default.nix b/config/common/users/emily/default.nix index 2de8c0a..a09a9cf 100644 --- a/config/common/users/emily/default.nix +++ b/config/common/users/emily/default.nix @@ -45,7 +45,7 @@ programs.eza = { enable = true; - enableAlias = true; + enableAliases = true; icons = true; git = true; extraOptions = [ diff --git a/config/profiles/graphical/default.nix b/config/profiles/graphical/default.nix index 344b395..9897d91 100644 --- a/config/profiles/graphical/default.nix +++ b/config/profiles/graphical/default.nix @@ -2,7 +2,7 @@ imports = [ inputs.home-manager.nixosModules.home-manager inputs.stylix.nixosModules.stylix - inputs.nixvim.homeManagerModules.nixvim + ./nixvim.nix ]; kyouma.machine-type.graphical = true; @@ -94,7 +94,7 @@ home.file.".config/rofi" = { enable = true; recursive = true; - source = .files/rofi; + source = ./files/rofi; }; wayland.windowManager.hyprland = { enable = true; @@ -184,24 +184,19 @@ use_nearest_neighbor = false; force_zero_scaling = true; }; - "device:syna8013:00-06cb:ce69-touchpad" = { + device."syna8013:00-06cb:ce69-touchpad" = { sensitivity = 0.3; }; - "device:logitech-m705" = { + device.":logitech-m705" = { sensitivity = 0.1; accel_profile = "flat"; }; - "device:tpps/2-ibm-trackpoint" = { + device."tpps/2-ibm-trackpoint" = { sensitivity = 0.2; scroll_method = "on_button_down"; accel_profile = "flat"; }; - "device:tpps/2-elan-trackpoint" = { - sensitivity = 0; - scroll_method = "on_button_down"; - accel_profile = "flat"; - }; - "device:tpps/2-elan-trackpoint" = { + device."tpps/2-elan-trackpoint" = { sensitivity = 0; scroll_method = "on_button_down"; accel_profile = "flat"; @@ -384,204 +379,6 @@ programs.imv.enable = true; - programs.nixvim = { - extraPlugins. = [ pkgs.vimPlugins.molokai ]; - coloscheme = "molokai"; - vimAlias = true; - highlight.Normal = { - ctermbg = "NONE"; - guibg = "NONE"; - }; - options = { - number = true; - autoindent = true; - mouse = false; - encoding = "utf-8"; - shiftwidth = 2; - smartindent = true; - tabstop = 2; - - ignorecase = true; - incsearch = true; - smartcase = true; - }; - keymaps = [ - { - action = "Neotree toggle"; - key = ""; - mode = "n"; - options.silent = true; - } - { - action = ""; - key = ""; - mode = "t"; - } - ]; - plugins.nvim-cmp = { - enable = true; - sources = [ - { name = "nvim_lsp"; } - { name = "luasnip"; } - { name = "buffer"; } - { name = "nvim_lua"; } - { name = "path"; } - ]; - formatting = { - fields = [ "abbr" "kind" "menu" ]; - format = '' - function(_, item) - local icons = { - Namespace = "󰌗", - Text = "󰉿", - Method = "󰆧", - Function = "󰆧", - Constructor = "", - Field = "󰜢", - Variable = "󰀫", - Class = "󰠱", - Interface = "", - Module = "", - Property = "󰜢", - Unit = "󰑭", - Value = "󰎠", - Enum = "", - Keyword = "󰌋", - Snippet = "", - Color = "󰏘", - File = "󰈚", - Reference = "󰈇", - Folder = "󰉋", - EnumMember = "", - Constant = "󰏿", - Struct = "󰙅", - Event = "", - Operator = "󰆕", - TypeParameter = "󰊄", - Table = "", - Object = "󰅩", - Tag = "", - Array = "[]", - Boolean = "", - Number = "", - Null = "󰟢", - String = "󰉿", - Calendar = "", - Watch = "󰥔", - Package = "", - Copilot = "", - Codeium = "", - TabNine = "", - } - - local icon = icons[item.kind] or "" - item.kind = string.format("%s %s", icon, item.kind or "") - return item - end - ''; - }; - snippet = { expand = "luasnip"; }; - window = { - completion = { - winhighlight = "FloatBorder:CmpBorder,Normal:CmpPmenu,CursorLine:CmpSel,Search:PmenuSel"; - scrollbar = false; - sidePadding = 0; - border = [ "╭" "─" "╮" "│" "╯" "─" "╰" "│" ]; - }; - documentation = { - border = [ "╭" "─" "╮" "│" "╯" "─" "╰" "│" ]; - winhighlight = "FloatBorder:CmpBorder,Normal:CmpPmenu,CursorLine:CmpSel,Search:PmenuSel"; - }; - }; - mapping = { - "" = "cmp.mapping.select_next_item()"; - "" = "cmp.mapping.select_prev_item()"; - "" = "cmp.mapping.select_next_item()"; - "" = "cmp.mapping.select_prev_item()"; - "" = "cmp.mapping.scroll_docs(-4)"; - "" = "cmp.mapping.scroll_docs(4)"; - "" = "cmp.mapping.complete()"; - "" = "cmp.mapping.close()"; - "" = "cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Insert, select = true })"; - "" = { - modes = [ "i" "s" ]; - action = '' - function(fallback) - if cmp.visible() then - cmp.select_next_item() - elseif require("luasnip").expand_or_jumpable() then - vim.fn.feedkeys(vim.api.nvim_replace_termcodes("luasnip-expand-or-jump", true, true, true), "") - else - fallback() - end - end - ''; - }; - "" = { - modes = [ "i" "s" ]; - action = '' - function(fallback) - if cmp.visible() then - cmp.select_prev_item() - elseif require("luasnip").jumpable(-1) then - vim.fn.feedkeys(vim.api.nvim_replace_termcodes("luasnip-jump-prev", true, true, true), "") - else - fallback() - end - end - ''; - }; - }; - }; - plugins.lsp = { - enable = true; - keymaps.lspBuf = { - "K" = "hover"; - "gd" = "definition"; - "gD" = "references"; - "gt" = "type_definition"; - "gi" = "implementation"; - }; - servers = { - bashls.enable = true; - lua-ls.enable = true; - nixd.enable = true; - ruff-lsp.enable = true; - }; - }; - plugins.none-ls = { - enable = true; - sources.diagnostics = { - pylint.enable = true; - shellcheck.enable = true; - statix.enable = true; - }; - sources.formatting = { - nixfmt.enable = true; - markdownlint.enable = true; - rustfmt.enable = true; - }; - }; - plugins.neo-tree = { - enable = true; - closeIfLastWindow = true; - }; - plugins.treesitter = { - enable = true; - nixGrammars = true; - indent = true; - }; - plugins.cmp-buffer.enable = true; - plugins.cmp-emoji.enable = true; - plugins.cmp-nvim-lsp.enable = true; - plugins.cmp-path.enable = true; - plugins.cmp_luasnip.enable = true; - plugins.luasnip.enable = true; - plugins.lightline.enable = true; - plugins.rainbow-delimiters.enable = true; - plugins.rustaceanvim.enable = true; - plugins.treesitter-context.enable = true; - }; programs.wpaperd = { enable = true; @@ -653,7 +450,7 @@ }; backlight = { format = "{icon} {percent: >3}%"; - format-icons = ["", ""]; + format-icons = ["" ""]; on-scroll-down = "${pkgs.brightnessctl}/bin/brightnessctl -c backlight set 1%-"; on-scroll-up = "${pkgs.brightnessctl}/bin/brightnessctl -c backlight set +1%"; }; @@ -667,7 +464,7 @@ format-discharging = "{icon} {capacity: >3}% {power:0.1f}W"; format-charging = "\uf1e6 {capacity: >3}% {power:0.1f}W"; interval = 3; - format-icons = ["", "", "", "", ""]; + format-icons = ["" "" "" "" ""]; }; network = { format = "⚠ Disabled"; @@ -688,7 +485,7 @@ phone = ""; portable = ""; car = ""; - default = ["", ""]; + default = ["" ""]; }; on-click = "${pkgs.pavucontrol}/bin/pavucontrol"; }; diff --git a/config/profiles/graphical/nixvim.nix b/config/profiles/graphical/nixvim.nix new file mode 100644 index 0000000..51e2cff --- /dev/null +++ b/config/profiles/graphical/nixvim.nix @@ -0,0 +1,203 @@ +{config, pkgs, inputs, ... }: { + imports = [ + inputs.nixvim.homeManagerModules.nixvim + ]; + programs.nixvim = { + extraPlugins = [ pkgs.vimPlugins.molokai ]; + coloscheme = "molokai"; + vimAlias = true; + highlight.Normal = { + ctermbg = "NONE"; + guibg = "NONE"; + }; + options = { + number = true; + autoindent = true; + mouse = false; + encoding = "utf-8"; + shiftwidth = 2; + smartindent = true; + tabstop = 2; + + ignorecase = true; + incsearch = true; + smartcase = true; + }; + keymaps = [ + { + action = "Neotree toggle"; + key = ""; + mode = "n"; + options.silent = true; + } + { + action = ""; + key = ""; + mode = "t"; + } + ]; + plugins.nvim-cmp = { + enable = true; + sources = [ + { name = "nvim_lsp"; } + { name = "luasnip"; } + { name = "buffer"; } + { name = "nvim_lua"; } + { name = "path"; } + ]; + formatting = { + fields = [ "abbr" "kind" "menu" ]; + format = '' + function(_, item) + local icons = { + Namespace = "󰌗", + Text = "󰉿", + Method = "󰆧", + Function = "󰆧", + Constructor = "", + Field = "󰜢", + Variable = "󰀫", + Class = "󰠱", + Interface = "", + Module = "", + Property = "󰜢", + Unit = "󰑭", + Value = "󰎠", + Enum = "", + Keyword = "󰌋", + Snippet = "", + Color = "󰏘", + File = "󰈚", + Reference = "󰈇", + Folder = "󰉋", + EnumMember = "", + Constant = "󰏿", + Struct = "󰙅", + Event = "", + Operator = "󰆕", + TypeParameter = "󰊄", + Table = "", + Object = "󰅩", + Tag = "", + Array = "[]", + Boolean = "", + Number = "", + Null = "󰟢", + String = "󰉿", + Calendar = "", + Watch = "󰥔", + Package = "", + Copilot = "", + Codeium = "", + TabNine = "", + } + + local icon = icons[item.kind] or "" + item.kind = string.format("%s %s", icon, item.kind or "") + return item + end + ''; + }; + snippet = { expand = "luasnip"; }; + window = { + completion = { + winhighlight = "FloatBorder:CmpBorder,Normal:CmpPmenu,CursorLine:CmpSel,Search:PmenuSel"; + scrollbar = false; + sidePadding = 0; + border = [ "╭" "─" "╮" "│" "╯" "─" "╰" "│" ]; + }; + documentation = { + border = [ "╭" "─" "╮" "│" "╯" "─" "╰" "│" ]; + winhighlight = "FloatBorder:CmpBorder,Normal:CmpPmenu,CursorLine:CmpSel,Search:PmenuSel"; + }; + }; + mapping = { + "" = "cmp.mapping.select_next_item()"; + "" = "cmp.mapping.select_prev_item()"; + "" = "cmp.mapping.select_next_item()"; + "" = "cmp.mapping.select_prev_item()"; + "" = "cmp.mapping.scroll_docs(-4)"; + "" = "cmp.mapping.scroll_docs(4)"; + "" = "cmp.mapping.complete()"; + "" = "cmp.mapping.close()"; + "" = "cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Insert, select = true })"; + "" = { + modes = [ "i" "s" ]; + action = '' + function(fallback) + if cmp.visible() then + cmp.select_next_item() + elseif require("luasnip").expand_or_jumpable() then + vim.fn.feedkeys(vim.api.nvim_replace_termcodes("luasnip-expand-or-jump", true, true, true), "") + else + fallback() + end + end + ''; + }; + "" = { + modes = [ "i" "s" ]; + action = '' + function(fallback) + if cmp.visible() then + cmp.select_prev_item() + elseif require("luasnip").jumpable(-1) then + vim.fn.feedkeys(vim.api.nvim_replace_termcodes("luasnip-jump-prev", true, true, true), "") + else + fallback() + end + end + ''; + }; + }; + }; + plugins.lsp = { + enable = true; + keymaps.lspBuf = { + "K" = "hover"; + "gd" = "definition"; + "gD" = "references"; + "gt" = "type_definition"; + "gi" = "implementation"; + }; + servers = { + bashls.enable = true; + lua-ls.enable = true; + nixd.enable = true; + ruff-lsp.enable = true; + }; + }; + plugins.none-ls = { + enable = true; + sources.diagnostics = { + pylint.enable = true; + shellcheck.enable = true; + statix.enable = true; + }; + sources.formatting = { + nixfmt.enable = true; + markdownlint.enable = true; + rustfmt.enable = true; + }; + }; + plugins.neo-tree = { + enable = true; + closeIfLastWindow = true; + }; + plugins.treesitter = { + enable = true; + nixGrammars = true; + indent = true; + }; + plugins.cmp-buffer.enable = true; + plugins.cmp-emoji.enable = true; + plugins.cmp-nvim-lsp.enable = true; + plugins.cmp-path.enable = true; + plugins.cmp_luasnip.enable = true; + plugins.luasnip.enable = true; + plugins.lightline.enable = true; + plugins.rainbow-delimiters.enable = true; + plugins.rustaceanvim.enable = true; + plugins.treesitter-context.enable = true; + }; +} diff --git a/flake.lock b/flake.lock index 6df8b8c..5493bf2 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,152 @@ { "nodes": { + "base16": { + "inputs": { + "fromYaml": "fromYaml" + }, + "locked": { + "lastModified": 1705180696, + "narHash": "sha256-6TwTHERD+2SX21zvBwmm58mtmgVXHLPu273i04JdH9Y=", + "owner": "SenchoPens", + "repo": "base16.nix", + "rev": "b390e87cd404e65ab4d786666351f1292e89162a", + "type": "github" + }, + "original": { + "owner": "SenchoPens", + "repo": "base16.nix", + "type": "github" + } + }, + "base16-alacritty": { + "flake": false, + "locked": { + "lastModified": 1703982197, + "narHash": "sha256-TNxKbwdiUXGi4Z4chT72l3mt3GSvOcz6NZsUH8bQU/k=", + "owner": "aarowill", + "repo": "base16-alacritty", + "rev": "c95c200b3af739708455a03b5d185d3d2d263c6e", + "type": "github" + }, + "original": { + "owner": "aarowill", + "repo": "base16-alacritty", + "type": "github" + } + }, + "base16-alacritty-yaml": { + "flake": false, + "locked": { + "lastModified": 1674275109, + "narHash": "sha256-Adwx9yP70I6mJrjjODOgZJjt4OPPe8gJu7UuBboXO4M=", + "owner": "aarowill", + "repo": "base16-alacritty", + "rev": "63d8ae5dfefe5db825dd4c699d0cdc2fc2c3eaf7", + "type": "github" + }, + "original": { + "owner": "aarowill", + "repo": "base16-alacritty", + "rev": "63d8ae5dfefe5db825dd4c699d0cdc2fc2c3eaf7", + "type": "github" + } + }, + "base16-fish": { + "flake": false, + "locked": { + "lastModified": 1622559957, + "narHash": "sha256-PebymhVYbL8trDVVXxCvZgc0S5VxI7I1Hv4RMSquTpA=", + "owner": "tomyun", + "repo": "base16-fish", + "rev": "2f6dd973a9075dabccd26f1cded09508180bf5fe", + "type": "github" + }, + "original": { + "owner": "tomyun", + "repo": "base16-fish", + "type": "github" + } + }, + "base16-foot": { + "flake": false, + "locked": { + "lastModified": 1696725948, + "narHash": "sha256-65bz2bUL/yzZ1c8/GQASnoiGwaF8DczlxJtzik1c0AU=", + "owner": "tinted-theming", + "repo": "base16-foot", + "rev": "eedbcfa30de0a4baa03e99f5e3ceb5535c2755ce", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-foot", + "type": "github" + } + }, + "base16-helix": { + "flake": false, + "locked": { + "lastModified": 1696727917, + "narHash": "sha256-FVrbPk+NtMra0jtlC5oxyNchbm8FosmvXIatkRbYy1g=", + "owner": "tinted-theming", + "repo": "base16-helix", + "rev": "dbe1480d99fe80f08df7970e471fac24c05f2ddb", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-helix", + "type": "github" + } + }, + "base16-kitty": { + "flake": false, + "locked": { + "lastModified": 1665001328, + "narHash": "sha256-aRaizTYPpuWEcvoYE9U+YRX+Wsc8+iG0guQJbvxEdJY=", + "owner": "kdrag0n", + "repo": "base16-kitty", + "rev": "06bb401fa9a0ffb84365905ffbb959ae5bf40805", + "type": "github" + }, + "original": { + "owner": "kdrag0n", + "repo": "base16-kitty", + "type": "github" + } + }, + "base16-tmux": { + "flake": false, + "locked": { + "lastModified": 1696725902, + "narHash": "sha256-wDPg5elZPcQpu7Df0lI5O8Jv4A3T6jUQIVg63KDU+3Q=", + "owner": "tinted-theming", + "repo": "base16-tmux", + "rev": "c02050bebb60dbb20cb433cd4d8ce668ecc11ba7", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-tmux", + "type": "github" + } + }, + "base16-vim": { + "flake": false, + "locked": { + "lastModified": 1663659192, + "narHash": "sha256-uJvaYYDMXvoo0fhBZUhN8WBXeJ87SRgof6GEK2efFT0=", + "owner": "chriskempson", + "repo": "base16-vim", + "rev": "3be3cd82cd31acfcab9a41bad853d9c68d30478d", + "type": "github" + }, + "original": { + "owner": "chriskempson", + "repo": "base16-vim", + "type": "github" + } + }, "communities": { "flake": false, "locked": { @@ -52,6 +199,22 @@ "type": "github" } }, + "flake-compat_2": { + "flake": false, + "locked": { + "lastModified": 1673956053, + "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-parts": { "inputs": { "nixpkgs-lib": [ @@ -127,6 +290,22 @@ "type": "github" } }, + "fromYaml": { + "flake": false, + "locked": { + "lastModified": 1689549921, + "narHash": "sha256-iX0pk/uB019TdBGlaJEWvBCfydT6sRq+eDcGPifVsCM=", + "owner": "SenchoPens", + "repo": "fromYaml", + "rev": "11fbbbfb32e3289d3c631e0134a23854e7865c84", + "type": "github" + }, + "original": { + "owner": "SenchoPens", + "repo": "fromYaml", + "type": "github" + } + }, "gitignore": { "inputs": { "nixpkgs": [ @@ -149,6 +328,23 @@ "type": "github" } }, + "gnome-shell": { + "flake": false, + "locked": { + "lastModified": 1698794309, + "narHash": "sha256-/TIkZ8y5Wv3QHLFp79Poao9fINurKs5pa4z0CRe+F8s=", + "owner": "GNOME", + "repo": "gnome-shell", + "rev": "a7c169c6c29cf02a4c392fa0acbbc5f5072823e7", + "type": "github" + }, + "original": { + "owner": "GNOME", + "ref": "45.1", + "repo": "gnome-shell", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -190,6 +386,27 @@ "type": "github" } }, + "home-manager_3": { + "inputs": { + "nixpkgs": [ + "stylix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1706001011, + "narHash": "sha256-J7Bs9LHdZubgNHZ6+eE/7C18lZ1P6S5/zdJSdXFItI4=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "3df2a80f3f85f91ea06e5e91071fa74ba92e5084", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, "kyouma-www": { "inputs": { "flake-utils": "flake-utils_2", @@ -309,6 +526,22 @@ "type": "github" } }, + "nixpkgs_5": { + "locked": { + "lastModified": 1700856099, + "narHash": "sha256-RnEA7iJ36Ay9jI0WwP+/y4zjEhmeN6Cjs9VOFBH7eVQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "0bd59c54ef06bc34eca01e37d689f5e46b3fe2f1", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nixvim": { "inputs": { "flake-parts": "flake-parts", @@ -369,7 +602,8 @@ "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs_3", "nixvim": "nixvim", - "secrix": "secrix" + "secrix": "secrix", + "stylix": "stylix" } }, "secrix": { @@ -390,6 +624,36 @@ "type": "github" } }, + "stylix": { + "inputs": { + "base16": "base16", + "base16-alacritty": "base16-alacritty", + "base16-alacritty-yaml": "base16-alacritty-yaml", + "base16-fish": "base16-fish", + "base16-foot": "base16-foot", + "base16-helix": "base16-helix", + "base16-kitty": "base16-kitty", + "base16-tmux": "base16-tmux", + "base16-vim": "base16-vim", + "flake-compat": "flake-compat_2", + "gnome-shell": "gnome-shell", + "home-manager": "home-manager_3", + "nixpkgs": "nixpkgs_5" + }, + "locked": { + "lastModified": 1707757489, + "narHash": "sha256-YyqHbxtDGB3OIITPQ3XtkM20fh9/t4CXkYXKzg9DuP8=", + "owner": "danth", + "repo": "stylix", + "rev": "50cae37cfe23e5ad202ed53f48529139dfa0d008", + "type": "github" + }, + "original": { + "owner": "danth", + "repo": "stylix", + "type": "github" + } + }, "systems": { "locked": { "lastModified": 1681028828, diff --git a/flake.nix b/flake.nix index 6411c8a..0a18b27 100644 --- a/flake.nix +++ b/flake.nix @@ -6,6 +6,7 @@ fernglas.url = "github:wobcom/fernglas"; kyouma-www.url = "git+ssh://git@git.bsd.gay/snaki/kyouma-net.git"; secrix.url = "github:Platonic-Systems/secrix"; + stylix.url = "github:danth/stylix"; home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; @@ -30,7 +31,7 @@ imports = [ ./config/hosts/crime/configuration.nix ]; }; ryuuko = { - imports = [ ./config/hosts/ryuuko/configuartion.nix ]; + imports = [ ./config/hosts/ryuuko/configuration.nix ]; }; }; apps.x86_64-linux.secrix = inputs.secrix.secrix self;