From beea3bdfa607d084fb21d32f9d720c0bed383a3f Mon Sep 17 00:00:00 2001 From: Joinemm Date: Mon, 13 May 2024 20:18:00 +0300 Subject: [PATCH] Add remote builder and more --- home-modules/common.nix | 2 ++ home-modules/neovim.nix | 33 ++++++++++++++++++++++++++++++--- home-modules/ssh-work.nix | 4 ++++ home-modules/xmonad/xmonad.hs | 3 ++- hosts/x1/configuration.nix | 1 + hosts/zeus/configuration.nix | 1 + modules/bootloader.nix | 3 +++ modules/default.nix | 1 + modules/remotebuild.nix | 28 ++++++++++++++++++++++++++++ 9 files changed, 72 insertions(+), 4 deletions(-) create mode 100644 modules/remotebuild.nix diff --git a/home-modules/common.nix b/home-modules/common.nix index ec4fada..c8ddef0 100644 --- a/home-modules/common.nix +++ b/home-modules/common.nix @@ -33,9 +33,11 @@ nsxiv via freecad + krita # cli apps glow # render markdown on the cli + nix-output-monitor # utils rsync diff --git a/home-modules/neovim.nix b/home-modules/neovim.nix index cbf3f1a..f9859c0 100644 --- a/home-modules/neovim.nix +++ b/home-modules/neovim.nix @@ -17,14 +17,14 @@ ]; opts = { - autoindent = true; number = true; relativenumber = true; + scrolloff = 8; shiftwidth = 2; tabstop = 2; softtabstop = 2; - scrolloff = 8; expandtab = true; + autoindent = true; smartindent = true; wrap = false; hlsearch = false; @@ -41,9 +41,9 @@ files = { "ftplugin/sh.lua" = { opts = { - expandtab = true; shiftwidth = 4; tabstop = 4; + softtabstop = 4; }; }; "ftplugin/markdown.lua" = { @@ -53,6 +53,11 @@ linebreak = true; }; }; + "ftplugin/make.lua" = { + opts = { + tabstop = 4; + }; + }; }; colorschemes.dracula.enable = true; @@ -351,6 +356,28 @@ cmp_autopairs.on_confirm_done() ) + local _border = "rounded" + + vim.lsp.handlers["textDocument/hover"] = vim.lsp.with( + vim.lsp.handlers.hover, { + border = _border + } + ) + + vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with( + vim.lsp.handlers.signature_help, { + border = _border + } + ) + + vim.diagnostic.config{ + float={border=_border} + } + + require('lspconfig.ui.windows').default_options = { + border = _border + } + require("smartcolumn").setup() require'lspconfig'.glslls.setup{ diff --git a/home-modules/ssh-work.nix b/home-modules/ssh-work.nix index dd68006..baf8856 100644 --- a/home-modules/ssh-work.nix +++ b/home-modules/ssh-work.nix @@ -67,6 +67,10 @@ host = "testagent"; hostname = "172.18.16.60"; } + { + host = "hetzarm"; + hostname = "65.21.20.242"; + } { host = "awsarm"; hostname = "13.51.226.233"; diff --git a/home-modules/xmonad/xmonad.hs b/home-modules/xmonad/xmonad.hs index d3ebcd3..afcfb16 100644 --- a/home-modules/xmonad/xmonad.hs +++ b/home-modules/xmonad/xmonad.hs @@ -163,7 +163,8 @@ myKeys conf@(XConfig {XMonad.modMask = modm}) = (modm .|. shiftMask, xK_q) ~> spawn "xmonad --restart", -- Take a screenshot (modm .|. shiftMask, xK_s) ~> spawn "flameshot gui", - (0, xK_Print) ~> spawn "flameshot gui", + (0, xK_Print) ~> spawn "flameshot screen -c", + (0 .|. shiftMask, xK_Print) ~> spawn "flameshot screen", -- Window Copying Bindings -- Pin to all workspaces (modm, xK_s) ~> windows copyToAll, diff --git a/hosts/x1/configuration.nix b/hosts/x1/configuration.nix index 24bce01..b3c490e 100644 --- a/hosts/x1/configuration.nix +++ b/hosts/x1/configuration.nix @@ -19,6 +19,7 @@ locale networking nix + remotebuild sound syncthing users diff --git a/hosts/zeus/configuration.nix b/hosts/zeus/configuration.nix index 21e5330..29086e7 100644 --- a/hosts/zeus/configuration.nix +++ b/hosts/zeus/configuration.nix @@ -18,6 +18,7 @@ locale networking nix + remotebuild sound syncthing transmission diff --git a/modules/bootloader.nix b/modules/bootloader.nix index bc652b3..022fb17 100644 --- a/modules/bootloader.nix +++ b/modules/bootloader.nix @@ -7,5 +7,8 @@ }; efi.canTouchEfiVariables = true; }; + kernelParams = [ + "split_lock_detect=off" + ]; }; } diff --git a/modules/default.nix b/modules/default.nix index 848e929..9199151 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -14,6 +14,7 @@ networking = import ./networking.nix; nginx = import ./nginx.nix; nix = import ./nix.nix; + remotebuild = import ./remotebuild.nix; sound = import ./sound.nix; ssh-access = import ./ssh-access.nix; syncthing = import ./syncthing.nix; diff --git a/modules/remotebuild.nix b/modules/remotebuild.nix new file mode 100644 index 0000000..00b1872 --- /dev/null +++ b/modules/remotebuild.nix @@ -0,0 +1,28 @@ +{ + nix = { + distributedBuilds = true; + + buildMachines = [ + { + hostName = "hetzarm"; + system = "aarch64-linux"; + maxJobs = 80; + speedFactor = 1; + supportedFeatures = ["nixos-test" "benchmark" "big-parallel" "kvm"]; + mandatoryFeatures = []; + sshUser = "jrautiola"; + sshKey = "/home/joonas/.ssh/id_ed25519"; + } + ]; + }; + + programs.ssh = { + extraConfig = '' + Host hetzarm + HostName 65.21.20.242 + ''; + knownHosts = { + "65.21.20.242".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILx4zU4gIkTY/1oKEOkf9gTJChdx/jR3lDgZ7p/c7LEK"; + }; + }; +}