From 9f862d40b311870507c944a9bca3457fddde9cbd Mon Sep 17 00:00:00 2001 From: traxys Date: Tue, 17 Oct 2023 16:52:24 +0200 Subject: [PATCH] hostconfig/thinkpad-nixos: Remove --- flake.nix | 2 +- hostconfig/default.nix | 1 - hostconfig/thinkpad-nixos/default.nix | 64 --- hostconfig/thinkpad-nixos/extra_info.nix | 10 - .../thinkpad-nixos/hardware-configuration.nix | 38 -- hostconfig/thinkpad-nixos/hm.nix | 495 ------------------ hostconfig/thinkpad-nixos/nixos.nix | 96 ---- hostconfig/thinkpad-nixos/roaming.toml | 7 - hostconfig/thinkpad-nixos/telescope-team.lua | 43 -- hostconfig/thinkpad-nixos/work.nix | 120 ----- neovim/config/lsp.nix | 2 +- 11 files changed, 2 insertions(+), 876 deletions(-) delete mode 100644 hostconfig/thinkpad-nixos/default.nix delete mode 100644 hostconfig/thinkpad-nixos/extra_info.nix delete mode 100644 hostconfig/thinkpad-nixos/hardware-configuration.nix delete mode 100644 hostconfig/thinkpad-nixos/hm.nix delete mode 100644 hostconfig/thinkpad-nixos/nixos.nix delete mode 100644 hostconfig/thinkpad-nixos/roaming.toml delete mode 100644 hostconfig/thinkpad-nixos/telescope-team.lua delete mode 100644 hostconfig/thinkpad-nixos/work.nix diff --git a/flake.nix b/flake.nix index d223b8d..44521b1 100644 --- a/flake.nix +++ b/flake.nix @@ -147,7 +147,7 @@ de = import ./de/hm.nix; personal-gui = import ./personal-gui/hm.nix; gaming = import ./gaming/hm.nix; - work = import ./hostconfig/thinkpad-nixos/work.nix; + work = import ./hostconfig/fabrial/work.nix; }; nixosModules = { diff --git a/hostconfig/default.nix b/hostconfig/default.nix index 2fe4e7a..1359317 100644 --- a/hostconfig/default.nix +++ b/hostconfig/default.nix @@ -59,7 +59,6 @@ ./ZeNixLaptop ./ZeNixComputa ./minus - ./thinkpad-nixos ./gandalf ./fabrial ]; diff --git a/hostconfig/thinkpad-nixos/default.nix b/hostconfig/thinkpad-nixos/default.nix deleted file mode 100644 index 1a3149f..0000000 --- a/hostconfig/thinkpad-nixos/default.nix +++ /dev/null @@ -1,64 +0,0 @@ -{ - self, - makeMachine, - flakeOverlays, - inputs, - lib, - ... -}: -{ - flake = { - nixosConfigurations.thinkpad-nixos = makeMachine { - system = "x86_64-linux"; - user = "traxys"; - nixosModules = with self.nixosModules; [ - ./extra_info.nix - ./hardware-configuration.nix - ./nixos.nix - minimal - personal-cli - gui - wm - ]; - hmModules = with self.hmModules; [ - ./extra_info.nix - ./hm.nix - minimal - personal-cli - gui - wm - ]; - }; - - homeConfigurations."boyerq@thinkpad-nixos" = inputs.home-manager.lib.homeManagerConfiguration { - modules = - (with self.hmModules; [ - minimal - work - personal-cli - gui - wm - ]) - ++ [ - ./extra_info.nix - ./hm.nix - inputs.fioul.homeManagerModules.default - inputs.gsm.homeManagerModules.default - ]; - - pkgs = import inputs.nixpkgs rec { - system = "x86_64-linux"; - - overlays = flakeOverlays system; - - config.allowUnfreePredicate = - pkg: - builtins.elem (lib.getName pkg) [ - "slack" - "discord" - "spotify" - ]; - }; - }; - }; -} diff --git a/hostconfig/thinkpad-nixos/extra_info.nix b/hostconfig/thinkpad-nixos/extra_info.nix deleted file mode 100644 index c94d723..0000000 --- a/hostconfig/thinkpad-nixos/extra_info.nix +++ /dev/null @@ -1,10 +0,0 @@ -{lib, ...}: let - inherit (import ../../str-obf.nix lib) decode; - workDomain = "lenmlx.ziy"; -in { - extraInfo.email = "quentin.boyer@${decode workDomain}"; - - extraInfo.username = "traxys"; - - extraInfo.inputs.touchpad = "2:7:SynPS/2_Synaptics_TouchPad"; -} diff --git a/hostconfig/thinkpad-nixos/hardware-configuration.nix b/hostconfig/thinkpad-nixos/hardware-configuration.nix deleted file mode 100644 index 250fb75..0000000 --- a/hostconfig/thinkpad-nixos/hardware-configuration.nix +++ /dev/null @@ -1,38 +0,0 @@ -# Do not modify this file! It was generated by ‘nixos-generate-config’ -# and may be overwritten by future invocations. Please make changes -# to /etc/nixos/configuration.nix instead. -{ - config, - lib, - pkgs, - modulesPath, - ... -}: -{ - imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - - boot.initrd.availableKernelModules = [ - "xhci_pci" - "nvme" - "usb_storage" - "sd_mod" - "rtsx_pci_sdmmc" - ]; - boot.initrd.kernelModules = [ "dm-snapshot" ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = { - device = "/dev/disk/by-uuid/a53e1f39-a9e9-481b-a970-740d0c549181"; - fsType = "btrfs"; - }; - - fileSystems."/boot" = { - device = "/dev/disk/by-uuid/21EC-4041"; - fsType = "vfat"; - }; - - swapDevices = [ { device = "/dev/disk/by-uuid/ff3ba4e7-71e0-4723-b2d1-b1ca61f99337"; } ]; - - powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; -} diff --git a/hostconfig/thinkpad-nixos/hm.nix b/hostconfig/thinkpad-nixos/hm.nix deleted file mode 100644 index 69c943d..0000000 --- a/hostconfig/thinkpad-nixos/hm.nix +++ /dev/null @@ -1,495 +0,0 @@ -{ - pkgs, - config, - lib, - ... -}: -let - projects = { - btf = [ - "bxi-test-frameworks" - "bxi-frameworks" - ]; - bxi3 = [ "bxi3" ]; - libs2 = [ "bxi-jenkins-libs2" ]; - hps = [ "bxi-hps" ]; - doc = [ "bxi-doc" ]; - qemu-bxi = [ "qemu" ]; - container = [ "bxi-containers" ]; - flash-tools = [ "bxi-flash-tools" ]; - gpumap = [ "gpumap" ]; - ofi = [ "libfabric-bxi-portals" ]; - lustre = [ "lustre-ptl4lnd" ]; - ptlnet = [ "ptlnet" ]; - openshmem = [ "sandia-openshmem" ]; - bxi-base = [ "bxi-base" ]; - bxi2-portals = [ "bxi-portals" ]; - bxi2-mod = [ "bxi-module" ]; - bxi2-ptltest = [ "bxi-portals-tests" ]; - bxicomm = [ "bxicomm" ]; - bxi3lnd = [ "lustre-release-bxi3" ]; - }; - - mailingLists = { - iommu = { - mail = "iommu@lists.linux.dev"; - tags = [ - "PATCH" - "RFC" - ]; - }; - kvm = { - mail = "kvm@vger.kernel.org"; - tags = [ - "PATCH" - "RFC" - ]; - }; - qemu = { - mail = "qemu-devel@nongnu.org"; - tags = [ - "PATCH" - "RFC" - "Stable" - ]; - }; - }; -in -{ - imports = [ ./work.nix ]; - - home.packages = with pkgs; [ - teams-for-linux - bear - clang-analyzer - clang-tools - cppcheck - jira-cli-go - libfabric - opensc - pcsclite - pcsctools - python3Packages.clustershell - shellcheck - shfmt - slack - sshfs - nixgl.nixGLIntel - ]; - - programs.git = { - settings.user.name = "Quentin Boyer"; - settings.user.email = config.workAddr; - includes = [ - { - condition = "gitdir:~/Perso/"; - contents = { - user = { - email = "quentin@familleboyer.net"; - name = "traxys"; - }; - }; - } - ]; - }; - - home.sessionVariables = { - OPENSC_SO = "${pkgs.opensc}"; - EMAIL_CONN_TEST = "x"; - }; - - home.file = { - "libs/opensc-pkcs11.so".source = "${pkgs.opensc}/lib/opensc-pkcs11.so"; - "libs/libpcsclite.so.1".source = "${pkgs.pcsclite}/lib/libpcsclite.so.1"; - "bin/bxi-cn" = { - text = '' - #!/usr/bin/env bash - - exec podman run -e KERNEL_BULL_ENV=1 -it -v .:/src -w /src bril-docker-release/bxi-rhel:8.6 "$@" - ''; - executable = true; - }; - "bin/bxigpu-cn" = { - text = '' - #!/usr/bin/env bash - - exec podman run -e KERNEL_BULL_ENV=1 -it -v .:/src -w /src bril-docker-release/bxi-gpu:8.6 "$@" - ''; - executable = true; - }; - }; - - terminal.font.size = 10.5; - - programs.mbsync.enable = true; - programs.msmtp.enable = true; - programs.aerc = { - enable = true; - extraAccounts = { - work-t = - let - workCfg = config.accounts.email.accounts.work.aerc; - in - { - inherit (workCfg.extraAccounts) check-mail-cmd check-mail-timeout; - from = "Quentin Boyer <${config.workAddr}>"; - outgoing = "msmtpq --read-envelope-from --read-recipients"; - default = "_unread"; - postpone = "Drafts"; - source = "notmuch://~/Maildir"; - address-book-cmd = "${pkgs.notmuch-addrlookup}/bin/notmuch-addrlookup --format=aerc %s"; - query-map = - let - mkPatchDir = name: "projects/${name}=tag:${name}"; - patchDirs = builtins.concatStringsSep "\n" (builtins.map mkPatchDir (builtins.attrNames projects)); - - mkListDirs = name: '' - ext/${name}=tag:${name} - ext/${name}/non-patch=tag:${name} and tag:non-patch - ext/${name}/unread=tag:${name} and thread:{tag:unread} - ''; - listDirs = lib.pipe mailingLists [ - builtins.attrNames - (builtins.map mkListDirs) - (builtins.concatStringsSep "\n") - ]; - listIgnores = lib.pipe mailingLists [ - builtins.attrNames - (builtins.map (nm: "and not tag:${nm}")) - (builtins.concatStringsSep " ") - ]; - in - "${pkgs.writeText "querymap" '' - inbox=tag:inbox and not tag:spammy - _patches/inflight=thread:{tag:inflight} - _patches/review=thread:{tag:review} - _unread=thread:{tag:unread} ${listIgnores} - _todo=thread:{tag:todo} - - ${listDirs} - - ${patchDirs} - ''}"; - }; - }; - extraConfig = { - general.unsafe-accounts-conf = true; - - ui = { - mouse-enabled = true; - threading-enabled = true; - dirlist-tree = true; - }; - - filters = { - "text/plain" = "colorize"; - "text/calendar" = "calendar"; - "message/delivery-status" = "colorize"; - "message/rfc822" = "colorize"; - "text/html" = "html | colorize"; - "subject,~^\\[PATCH" = "delta"; - "subject,~^\\[RFC" = "delta"; - }; - - openers = { - "x-scheme-handler/http*" = "firefox"; - }; - }; - extraBinds = { - global = { - "" = ":prev-tab"; - "" = ":next-tab"; - "" = ":term"; - "?" = ":help keys"; - }; - - messages = { - "q" = ":quit"; - - "j" = ":next"; - "" = ":next"; - "" = ":next 100%"; - - "k" = ":prev"; - "" = ":prev"; - "" = ":prev 100%"; - - "g" = ":select 0"; - "G" = ":select -1"; - - "J" = ":next-folder"; - "K" = ":prev-folder"; - - "T" = ":toggle-threads"; - - "" = ":view"; - - "C" = ":compose"; - - "" = ":read"; - - "rr" = ":reply -a"; - "rq" = ":reply -aq"; - "Rr" = ":reply"; - "Rq" = ":reply -q"; - - "/" = ":search"; - "\\" = ":filter"; - "n" = ":next-result"; - "N" = ":prev-result"; - "" = ":clear"; - - "v" = ":mark -t"; - "V" = ":mark -v"; - - "tdi" = ":tag -inflight:select 0"; - "tdr" = ":tag -review:select 0"; - "tdt" = ":tag -todo:select 0"; - - "zI" = ":cf inbox"; - "zi" = ":cf _patches/inflight"; - "zr" = ":cf _patches/review"; - "zu" = ":cf _unread"; - "zt" = ":cf _todo"; - "zT" = ":cf tag:"; - }; - - view = { - "/" = ":toggle-key-passthrough/"; - - "q" = ":close"; - "O" = ":open"; - "S" = ":save"; - "D" = ":delete"; - "" = ":open-link "; - "f" = ":forward"; - - "rr" = ":reply -a"; - "rq" = ":reply -aq"; - "Rr" = ":reply"; - "Rq" = ":reply -q"; - - "H" = ":toggle-headers"; - "" = ":prev-part"; - "" = ":prev-part"; - "J" = ":next"; - "K" = ":prev"; - }; - - "view::passthrough" = { - "$noinherit" = "true"; - "$ex" = ""; - "" = ":toggle-key-passthrough"; - }; - - compose = { - "$noinherit" = true; - "$ex" = ""; - - "" = ":prev-field"; - "" = ":next-field"; - - "" = ":next-field"; - "" = ":prev-field"; - - "" = ":prev-tab"; - "" = ":next-tab"; - }; - - "compose::editor" = { - "$noinherit" = true; - "$ex" = ""; - - "" = ":prev-field"; - "" = ":next-field"; - - "" = ":prev-tab"; - "" = ":next-tab"; - }; - - "compose::review" = { - "y" = ":send"; - "n" = ":abort"; - "v" = ":preview"; - "p" = ":postpone"; - "q" = ":choose -o d discard abort -o p postpone postpone"; - "e" = ":edit"; - "a" = ":attach"; - "d" = ":detach"; - }; - }; - }; - - programs.notmuch = { - enable = true; - new.tags = [ "new" ]; - hooks = { - preNew = "${pkgs.isync}/bin/mbsync --all"; - postNew = - let - mkProjectMatch = project: "subject:'/PATCH\\s${project}\\s/'"; - mkProjectMatches = labels: lib.concatStringsSep " or " (builtins.map mkProjectMatch labels); - - mkProject = tag: labels: '' - notmuch tag +${tag} -unread -new -- tag:new and \( ${mkProjectMatches labels} \) and tag:me - notmuch tag +${tag} +unread -new -- tag:new and \( ${mkProjectMatches labels} \) and not tag:me - ''; - - projectFilters = builtins.concatStringsSep "\n" (lib.attrsets.mapAttrsToList mkProject projects); - - spammyFilters = [ - "subject:'[confluence] Recommended in Confluence for Boyer, Quentin'" - "subject:'[PCI-SIG]'" - "from:enterprisedb.com" - ]; - - spammySearch = lib.concatStringsSep " or " spammyFilters; - - mkList = - tag: info: - let - subjects = lib.pipe info.tags [ - (builtins.map (tag: "subject:\"/\\[${tag}/\"")) - (builtins.concatStringsSep " OR ") - ]; - in - '' - notmuch tag +${tag} -new -- tag:new and to:${info.mail} and '(${subjects})' - notmuch tag +${tag} +non-patch -new -- tag:new and to:${info.mail} - ''; - tagLists = lib.pipe mailingLists [ - (lib.mapAttrsToList mkList) - (builtins.concatStringsSep "\n") - ]; - in - '' - notmuch tag +work -- tag:new and 'path:work/**' - ${tagLists} - notmuch tag +inflight -- tag:new and from:${config.workAddr} and subject:'/^\[PATCH/' - notmuch tag +review -- tag:new and not from:${config.workAddr} and subject:'/^\[PATCH/' - notmuch tag -unread +me -- tag:new and from:${config.workAddr} - notmuch tag -unread -new +spammy -- tag:new and \( ${spammySearch} \) - ${projectFilters} - notmuch tag +inbox +unread -new -- tag:new and not tag:me - notmuch tag +inbox -unread -new -- tag:new and tag:me - ''; - }; - }; - - programs.fish.shellAliases = { - "khal-today" = "khal list today today -f '{start-time}-{end-time}: {title}'"; - }; - - traxys.waybar.modules."custom/khal".enable = true; - traxys.waybar.modules."disk#root".enable = false; - traxys.waybar.modules."battery".enable = true; - traxys.waybar.modules."network#wifi" = { - enable = true; - interface = "wlp4s0"; - }; - - accounts = { - calendar = { - accounts.personal.primary = lib.mkForce false; - - accounts.work = { - primary = true; - remote = { - url = "http://localhost:1080/users/${config.workAddr}/calendar/"; - type = "caldav"; - userName = "${config.workAddr}"; - passwordCommand = [ - "echo" - "foobar" - ]; - }; - khal = { - enable = true; - color = "light green"; - }; - vdirsyncer.enable = true; - }; - }; - - email = { - accounts.work = rec { - address = config.workAddr; - imap = { - host = "localhost"; - port = 1143; - tls.enable = false; - }; - mbsync = { - enable = true; - create = "maildir"; - subFolders = "Verbatim"; - extraConfig = { - account = { - AuthMechs = "LOGIN"; - Timeout = 0; - }; - channel = { - Sync = ["Pull" "New" "Upgrade"]; - }; - }; - }; - passwordCommand = "echo foobar"; - notmuch.enable = true; - msmtp = { - enable = true; - extraConfig.auth = "plain"; - }; - primary = true; - realName = "Quentin Boyer"; - userName = address; - smtp = { - host = "localhost"; - port = 1025; - tls.enable = false; - }; - - aerc = { - enable = true; - extraAccounts = { - check-mail-cmd = "notmuch new"; - check-mail-timeout = "60s"; - }; - }; - }; - }; - }; - - systemd.user.services.notmuch-new = { - Unit = { - Description = "notmuch synchronization"; - }; - - Service = { - Type = "oneshot"; - ExecStart = "${pkgs.notmuch}/bin/notmuch new"; - }; - }; - - systemd.user.timers.notmuch = { - Unit = { - Description = "notmuch synchronization"; - }; - - Timer = { - OnCalendar = "*:0/5"; - Unit = "notmuch-new.service"; - }; - - Install = { - WantedBy = [ "default.target" ]; - }; - }; - - home.homeDirectory = "/home/boyerq"; - home.username = "boyerq"; - home.stateVersion = "21.11"; - - traxys.wm = "niri"; - - wayland.windowManager.sway.extraConfig = "exec /usr/libexec/polkit-gnome-authentication-agent-1"; -} diff --git a/hostconfig/thinkpad-nixos/nixos.nix b/hostconfig/thinkpad-nixos/nixos.nix deleted file mode 100644 index 87f8dca..0000000 --- a/hostconfig/thinkpad-nixos/nixos.nix +++ /dev/null @@ -1,96 +0,0 @@ -{ pkgs, lib, ... }: -let - inherit (import ../../str-obf.nix lib) decode; - oldWorkDomain = "hsid.xls"; -in -{ - boot.initrd = { - luks.devices = { - root = { - device = "/dev/disk/by-uuid/6b407da2-2256-4167-93e8-a7bb7be18112"; - preLVM = true; - allowDiscards = true; - }; - }; - }; - boot.loader = { - systemd-boot.enable = true; - efi.canTouchEfiVariables = true; - }; - - environment.systemPackages = [ - (pkgs.davmail.overrideAttrs (old: { - nativeBuildInputs = old.nativeBuildInputs ++ [ pkgs.swt ]; - })) - pkgs.virtiofsd - ]; - - boot.kernelParams = [ - "intel_iommu=on" - "iommu=pt" - ]; - - networking = { - hostName = "thinkpad-nixos"; - interfaces = { - enp0s31f6.useDHCP = true; - wlp4s0.useDHCP = true; - }; - }; - - users = { - users.traxys.uid = 1000; - users.sf-user = { - uid = 1100; - group = "sf-user"; - isSystemUser = true; - }; - groups.sf-user.gid = 1100; - extraGroups.vboxusers.members = [ "traxys" ]; - }; - - nixpkgs.config.allowUnfree = true; - - virtualisation.containers = { - enable = true; - registries = { - search = [ - "registry.sf.bds.${decode oldWorkDomain}" - "docker.io" - "quay.io" - ]; - }; - }; - - systemd.services.roaming_proxy = { - description = "Roaming Http Proxy"; - serviceConfig = { - ExecStart = "${pkgs.roaming_proxy}/bin/roaming_proxy --config ${./roaming.toml}"; - Restart = "on-failure"; - }; - wantedBy = [ "default.target" ]; - }; - systemd.services.roaming_proxy.enable = true; - - # services.privoxy.settings = { - # forward-socks5 = "/ localhost:9080 ."; - # }; - - services.tailscale.enable = true; - systemd.services.tailscaled.serviceConfig.Environment = [ "http_proxy=http://localhost:8100" ]; - - security.sudo.extraConfig = ''Defaults env_keep += "*_proxy *_PROXY"''; - networking.proxy = { - httpProxy = "http://localhost:8100"; - httpsProxy = "http://localhost:8100"; - noProxy = "127.0.0.1,localhost,10.197.128.229,20.79.200.10,integration.frec.bull.fr,172.16.118.8"; - }; - - # This value determines the NixOS release from which the default - # settings for stateful data, like file locations and database versions - # on your system were taken. It‘s perfectly fine and recommended to leave - # this value at the release version of the first install of this system. - # Before changing this value read the documentation for this option - # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). - system.stateVersion = "22.05"; # Did you read the comment? -} diff --git a/hostconfig/thinkpad-nixos/roaming.toml b/hostconfig/thinkpad-nixos/roaming.toml deleted file mode 100644 index e41afb3..0000000 --- a/hostconfig/thinkpad-nixos/roaming.toml +++ /dev/null @@ -1,7 +0,0 @@ -[v4] -#"172.0.0.0/8" = "165.225.77.222:80" -#"172.0.0.0/8" = "127.0.0.1:8118" -"172.0.0.0/8" = "193.56.47.8:8080" -#"172.0.0.0/8" = "165.225.77.222:80" -"10.89.0.0/16" = "193.56.47.8:8080" -[v6] diff --git a/hostconfig/thinkpad-nixos/telescope-team.lua b/hostconfig/thinkpad-nixos/telescope-team.lua deleted file mode 100644 index d24cdbd..0000000 --- a/hostconfig/thinkpad-nixos/telescope-team.lua +++ /dev/null @@ -1,43 +0,0 @@ -local pickers = require("telescope.pickers") -local finders = require("telescope.finders") -local conf = require("telescope.config").values -local actions = require("telescope.actions") -local action_state = require("telescope.actions.state") - -local work_domain = vim.env.WORK_DOMAIN - -local team_picker = function(opts) - opts = opts or {} - return pickers - .new(opts, { - prompt_title = "Team member", - finder = finders.new_table({ - results = vim.tbl_map(function(s) return string.format(s, work_domain) end, { - [[Quentin Boyer ""]], - [[Philippe Dutrueux ""]], - [[Sylvain Goudeau ""]], - [[Jonathan Espié--Caullet ""]], - [[Damien Bergamini ""]], - [[Clément Mathieu--Drif ""]], - [[Marie Badaroux ""]], - }), - }), - sorter = conf.generic_sorter(opts), - attach_mappings = function(prompt_bufnr, map) - actions.select_default:replace(function() - actions.close(prompt_bufnr) - local selection = action_state.get_selected_entry() - vim.api.nvim_put({ selection[1] }, "", false, true) - end) - return true - end, - }) - :find() -end - -return function() - local row, col = unpack(vim.api.nvim_win_get_cursor(0)) - local member = team_picker() - - vim.api.nvim_buf_set_text(0, row - 1, col, row - 1, col, { member }) -end diff --git a/hostconfig/thinkpad-nixos/work.nix b/hostconfig/thinkpad-nixos/work.nix deleted file mode 100644 index bcdc17a..0000000 --- a/hostconfig/thinkpad-nixos/work.nix +++ /dev/null @@ -1,120 +0,0 @@ -{ - pkgs, - lib, - config, - ... -}: -let - rhelVersion = "9"; - bxiImageVersion = "0.7.1"; - inherit (import ../../str-obf.nix lib) decode; - workDomain = "lenmlx.ziy"; - oldWorkDomain = "hsid.xls"; - scmDomain = "gnsgrzwlsgmdjf.jdz.hsid-dlfenzld.xls"; -in -{ - options = { - workAddr = lib.mkOption { type = lib.types.str; }; - }; - - config = { - workAddr = "quentin.boyer@${decode workDomain}"; - - programs.nixvim = - { lib, ... }: - { - extraConfigLuaPre = '' - team_picker = dofile("${./telescope-team.lua}") - ''; - keymaps = [ - { - key = "R"; - mode = [ "n" ]; - action = lib.nixvim.mkRaw "team_picker"; - } - ]; - commands = { - Review = "lua team_picker()"; - }; - }; - - home.packages = [ - (pkgs.writeShellScriptBin "nwadminSendmail" '' - #!/usr/bin/env sh - # shellcheck disable=SC2029 - - ssh nwadmin "/usr/sbin/sendmail -r ${config.workAddr} $*" - exit $? - '') - (pkgs.writeShellScriptBin "mgit" '' - #!/usr/bin/env bash - - if [[ -z $BUILD_DIR ]]; then - BUILD_DIR=build - fi - - cd "$(git rev-parse --show-toplevel)" || { - echo "can't cd to toplevel" - exit 255 - } - - if [[ ! -d $BUILD_DIR ]]; then - echo "build directory '$BUILD_DIR' not found" - exit 1 - fi - - meson compile -C "$BUILD_DIR" "$@" - '') - (pkgs.writeShellScriptBin "podman-bxilint" '' - #!/usr/bin/env bash - - cd "$(git rev-parse --show-toplevel)" || { - echo "can't cd to toplevel" - exit 255 - } - - kernel_path=$(meson introspect build --buildoptions | jq -r '.[] | select(.name == "kernel_path") | .value') - - if [[ -z $kernel_path ]]; then - kernel_path=/usr/src/kernels/$(uname -r) - fi - - kernel_path=$(realpath "$kernel_path") - curdir=$(realpath .) - - podman run -it --rm -v "$curdir:$curdir" -v "$kernel_path:$kernel_path" -w "$curdir" \ - registry.sf.bds.${decode oldWorkDomain}/bril-docker-release/bxi-rhel${rhelVersion}:${bxiImageVersion} \ - bxilint "$@" - '') - pkgs.python3.pkgs.tappy - ]; - - home.sessionVariables = { - WORK_DOMAIN = decode workDomain; - }; - - programs.git-series-manager = { - enable = true; - settings = { - sendmail_args = [ - # Davmail - # "--from=${config.workAddr}" - # "--smtp-server=127.0.0.1" - # "--smtp-user=${config.workAddr}" - # "--smtp-pass=aaaa" - # "--smtp-encryption=plain" - # "--smtp-server-port=1025" - "--sendmail-cmd=nwadminSendmail" - "--to=dl-bxi-sw-ll-patches@${decode workDomain}" - ]; - repo_url_base = "https://${decode scmDomain}/scm/bril/"; - ci_url = "https://sf.bds.${decode oldWorkDomain}/jenkins/job/BRIL/job/\${component}/job/\${branch}/\${ci_job}"; - editor = "nvim"; - }; - }; - - programs.fish.shellAliases = { - gemail = ''git send-email --sendmail-cmd="nwadminSendmail" --to="dl-bxi-sw-ll-patches@${decode workDomain}"''; - }; - }; -} diff --git a/neovim/config/lsp.nix b/neovim/config/lsp.nix index 2f41fca..fabcc42 100644 --- a/neovim/config/lsp.nix +++ b/neovim/config/lsp.nix @@ -167,7 +167,7 @@ { nixos.expr = ''${getFlake}.nixosConfigurations.ZeNixComputa.options''; nixvim.expr = ''${getFlake}.packages.${pkgs.stdenv.hostPlatform.system}.neovimTraxys.options''; - home-manager.expr = ''${getFlake}.homeConfigurations."boyerq@thinkpad-nixos".options''; + home-manager.expr = ''${getFlake}.homeConfigurations."boyerq@fabrial".options''; }; }; };