diff --git a/home-manager/default.nix b/home-manager/default.nix index 24dd73b..390cdd2 100644 --- a/home-manager/default.nix +++ b/home-manager/default.nix @@ -28,7 +28,9 @@ in modules/manual.nix modules/tig.nix ../secrets/ssh-config.nix - ] ++ lib.optionals (config.networking.hostName == "smithers") [ + ] ++ lib.optionals (config.networking.hostName == "jimbo") [ + modules/kanshi.nix + ] ++ lib.optionals (config.networking.hostName == "milhouse") [ modules/kanshi.nix ]; @@ -90,6 +92,7 @@ in fzf ncmpcpp acpi + joplin # cli joplin-desktop # gui unstable.prusa-slicer @@ -104,13 +107,19 @@ in gnome.gedit pwgen - nixpkgs-fmt + # for coc + nodejs + #rnix-lsp # kubernetes stuff kubectl krew kubectx + # from my overlay + studio-link + python3.pkgs.brother-ql + ] ++ lib.optionals (config.my.isLaptop) [ networkmanager ]; @@ -146,6 +155,11 @@ in defaultTimeout = 5000; }; + services.kanshi = { + enable = true; + + }; + services.gammastep = { enable = true; tray = true; diff --git a/home-manager/dell.nix b/home-manager/dell.nix index 5e06418..09c9b71 100644 --- a/home-manager/dell.nix +++ b/home-manager/dell.nix @@ -26,8 +26,13 @@ subversionClient tig freerdp + mattermost-desktop firefox + # for coc + nodejs + #rnix-lsp + # for zsh-fzf plugin fzf diff --git a/home-manager/modules/kanshi.nix b/home-manager/modules/kanshi.nix index d8b864b..89843e7 100644 --- a/home-manager/modules/kanshi.nix +++ b/home-manager/modules/kanshi.nix @@ -17,12 +17,12 @@ let status = "disable"; } { - criteria = "DP-10"; + criteria = "DP-9"; scale = 1.3; position = "0,0"; } { - criteria = "DP-9"; + criteria = "DP-10"; scale = 1.3; position = "2952,0"; } diff --git a/home-manager/modules/neovim.nix b/home-manager/modules/neovim.nix index 9fe3a7b..5c314c7 100644 --- a/home-manager/modules/neovim.nix +++ b/home-manager/modules/neovim.nix @@ -4,10 +4,10 @@ enable = true; withPython3 = true; extraPackages = with pkgs; [ - nil - nixpkgs-fmt - gopls - pyright + nil + nixpkgs-fmt + gopls + pyright (python3.withPackages (ps: with ps; [ black flake8 @@ -63,9 +63,6 @@ # show marks vim-signature - - # Session management - auto-session ]; extraConfig = '' @@ -144,7 +141,6 @@ let g:go_highlight_types = 1 let g:go_highlight_operators = 1 let g:go_highlight_build_constraints = 1 - " Don't use gopls from vim-go let g:go_gopls_enabled = 0 @@ -158,29 +154,11 @@ let g:neoformat_enabled_python = ['black', 'isort'] lua << EOF - require("auto-session").setup { - auto_save_enabled = true; - auto_restore_enabled = true; - } require("bufferline").setup{} require('lspconfig').gopls.setup{} require('lspconfig').pyright.setup{} - require('lspconfig').nil_ls.setup { - autostart = true, - capabilities = caps, - cmd = { "nil" }, - settings = { - ['nil'] = { - testSetting = 42, - formatting = { - command = { "nixpkgs-fmt" }, - }, - }, - }, - } - vim.api.nvim_create_autocmd('LspAttach', { desc = 'LSP actions', callback = function() diff --git a/home-manager/modules/sway.nix b/home-manager/modules/sway.nix index bc7b24b..ddb805f 100644 --- a/home-manager/modules/sway.nix +++ b/home-manager/modules/sway.nix @@ -5,7 +5,6 @@ in { wayland.windowManager.sway = { enable = true; - package = pkgs.swayfx; wrapperFeatures.gtk = true; config = { @@ -34,67 +33,21 @@ in scale = "1.3"; position = "2953,0"; }; - } // lib.optionalAttrs (nixosConfig.networking.hostName == "smithers") { - "eDP-1" = { - mode = "2256x1504"; - scale = "1.3"; - position = "0,0"; - }; }; - gaps = { inner = 10; }; - window.border = 2; - window.hideEdgeBorders = "smart"; + gaps = { inner = 8; }; + window.border = 0; workspaceAutoBackAndForth = true; terminal = "foot"; - colors = { - focused = { - border = "#4c7899"; - background = "#285577"; - text = "#ffffff"; - indicator = "#2e9ef4"; - childBorder = "#285577"; - }; - focusedInactive = { - border = "#333333"; - background = "#5f676a"; - text = "#ffffff"; - indicator = "#484e50"; - childBorder = "#5f676a"; - }; - unfocused = { - border = "#333333"; - background = "#222222"; - text = "#888888"; - indicator = "#292d2e"; - childBorder = "#900000"; - }; - urgent = { - border = "#2f343a"; - background = "#900000"; - text = "#ffffff"; - indicator = "#900000"; - childBorder = "#900000"; - }; - placeholder = { - border = "#000000"; - background = "#0c0c0c"; - text = "#ffffff"; - indicator = "#000000"; - childBorder = "#0c0c0c"; - }; - }; - - bars = [{ command = "${pkgs.waybar}/bin/waybar"; }]; startup = [ { command = ''${pkgs.swayidle}/bin/swayidle -w \ timeout 600 "${lockCmd}" \ - timeout 900 "${pkgs.swayfx}/bin/swaymsg output * dpms off" \ - resume "${pkgs.swayfx}/bin/swaymsg output * dpms on" \ + timeout 900 "${pkgs.sway}/bin/swaymsg output * dpms off" \ + resume "${pkgs.sway}/bin/swaymsg output * dpms on" \ before-sleep "${lockCmd}"''; } ]; @@ -186,13 +139,6 @@ in }; }; - extraConfig = '' - blur enable - blur_radius 10 - - default_dim_inactive 0.2 - corner_radius 15 - ''; }; } diff --git a/home-manager/modules/waybar.css b/home-manager/modules/waybar.css index a153050..69584f8 100644 --- a/home-manager/modules/waybar.css +++ b/home-manager/modules/waybar.css @@ -1,3 +1,11 @@ +/* ============================================================================= + * + * Waybar configuration + * + * Configuration reference: https://github.com/Alexays/Waybar/wiki/Configuration + * + * =========================================================================== */ + /* ----------------------------------------------------------------------------- * Keyframes * -------------------------------------------------------------------------- */ @@ -47,34 +55,22 @@ @define-color teal #8ec07c; @define-color gray #928374; +/* Reset all styles */ * { - border: none; - font-family: Inconsolata, Inconsolata Nerd Font, FiraCode Nerd Font Mono; - font-weight: bold; - font-size: 14pt; - color: @light; - border-radius: 20px; - background: transparent; + border: none; + border-radius: 0; + min-height: 0; + margin: 0; + padding: 0; } -/*-----module groups----*/ -.modules-right { - padding: 3px; - background-color: @dark; - margin: 0 5px 5px 0; - border-radius: 10px; -} -.modules-center { - padding: 3px; - background-color: @dark; - margin: 0 0 5px 0; - border-radius: 10px; -} -.modules-left { - padding: 3px; - margin: 0 0 5px 5px; - background-color: @dark; - border-radius: 10px; +/* The whole bar */ +#waybar { + background: @dark; + color: @light; + font-family: Inconsolata, Inconsolata Nerd Font, FiraCode Nerd Font Mono; + font-size: 14pt; + font-weight: bold; } /* All modules */ @@ -86,8 +82,7 @@ #network, #pulseaudio, #temperature, -#tray, -#disk { +#tray { background: transparent; color: @light; padding-left: 10px; @@ -137,6 +132,7 @@ animation-duration: 3s; } +/* And now modules themselves in their respective order */ /* Workspaces stuff */ #workspaces button { @@ -148,14 +144,60 @@ } #workspaces button.focused { - border: 1px solid @orange; + border-bottom: 2px solid @orange; } #workspaces button.visible:not(.focused) { - border: 1px solid @gray; + border-bottom: 2px solid @gray; } #workspaces button.urgent { color: @orange; } +#mode { /* Shows current Sway mode (resize etc.) */ + padding-left: 10px; + color: @light; + background: @red; +} + +#window { + margin-right: 30px; + margin-left: 30px; +} + +#pulseaudio { + border-bottom: 2px solid @red; +} + +#network { + border-bottom: 2px solid @orange; +} + +#memory { + border-bottom: 2px solid @yellow; +} + +#cpu { + border-bottom: 2px solid @green; +} + +#temperature { + border-bottom: 2px solid @teal; +} + +#battery { + border-bottom: 2px solid @blue; +} + +#tray { +} + +#clock { + border-bottom: 2px solid @light; +} + +#pulseaudio.muted { + /* No styles */ +} + diff --git a/home-manager/modules/waybar.nix b/home-manager/modules/waybar.nix index 579b822..750c457 100644 --- a/home-manager/modules/waybar.nix +++ b/home-manager/modules/waybar.nix @@ -7,9 +7,9 @@ height = 28; modules-left = [ "sway/workspaces" + "sway/window" ]; modules-center = [ - "clock" ]; modules-right = [ "disk" @@ -20,6 +20,7 @@ "temperature" "battery" "tray" + "clock" ]; modules = { "battery" = { @@ -27,7 +28,7 @@ warning = 20; critical = 10; }; - format = " {capacity}%"; + format = " {capacity}%"; format-discharging = "{icon} {capacity}%"; format-icons = [ "" diff --git a/modules/fwupd.nix b/modules/fwupd.nix deleted file mode 100644 index a62f709..0000000 --- a/modules/fwupd.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ - services.fwupd.enable = true; -} diff --git a/modules/sway.nix b/modules/sway.nix index d5a8dec..9afd805 100644 --- a/modules/sway.nix +++ b/modules/sway.nix @@ -1,7 +1,6 @@ { # enable sway, so we have a swaylock pam config programs.sway.enable = true; - programs.sway.package = null; # autologin services.greetd = { diff --git a/roles/all.nix b/roles/all.nix index 2c4f8db..9d9a2ce 100644 --- a/roles/all.nix +++ b/roles/all.nix @@ -1,6 +1,6 @@ -{ pkgs, config, ... }: +{pkgs, config, ...}: let - consoleFont = hiDPI: if hiDPI then "Lat2-Terminus16" else "Lat2-Terminus20"; + consoleFont = hiDPI : if hiDPI then "Lat2-Terminus16" else "Lat2-Terminus20"; in { imports = [ @@ -23,7 +23,6 @@ in ../modules/gc.nix ../modules/sway.nix ../modules/nixld.nix - ../modules/fwupd.nix ../secrets/remote-builder.nix ../users/fleaz.nix @@ -60,11 +59,7 @@ in # Look mum, I'm using all the new shiny stuff! nix.settings.experimental-features = [ "nix-command" "flakes" ]; - # TMP - networking.firewall = { - allowedTCPPorts = [ 3000 ]; - }; - networking.extraHosts = '' ''; } +