mirror of
https://github.com/traxys/Nixfiles.git
synced 2026-03-29 08:27:22 +02:00
hostconfig/thinkpad-nixos: Remove
This commit is contained in:
parent
c7c378501e
commit
9f862d40b3
11 changed files with 2 additions and 876 deletions
|
|
@ -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 = {
|
||||
|
|
|
|||
|
|
@ -59,7 +59,6 @@
|
|||
./ZeNixLaptop
|
||||
./ZeNixComputa
|
||||
./minus
|
||||
./thinkpad-nixos
|
||||
./gandalf
|
||||
./fabrial
|
||||
];
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -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";
|
||||
}
|
||||
|
|
@ -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";
|
||||
}
|
||||
|
|
@ -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 = {
|
||||
"<C-p>" = ":prev-tab<Enter>";
|
||||
"<C-n>" = ":next-tab<Enter>";
|
||||
"<C-t>" = ":term<Enter>";
|
||||
"?" = ":help keys<Enter>";
|
||||
};
|
||||
|
||||
messages = {
|
||||
"q" = ":quit<Enter>";
|
||||
|
||||
"j" = ":next<Enter>";
|
||||
"<Down>" = ":next<Enter>";
|
||||
"<PgDn>" = ":next 100%<Enter>";
|
||||
|
||||
"k" = ":prev<Enter>";
|
||||
"<Up>" = ":prev<Enter>";
|
||||
"<PgUp>" = ":prev 100%<Enter>";
|
||||
|
||||
"g" = ":select 0<Enter>";
|
||||
"G" = ":select -1<Enter>";
|
||||
|
||||
"J" = ":next-folder<Enter>";
|
||||
"K" = ":prev-folder<Enter>";
|
||||
|
||||
"T" = ":toggle-threads<Enter>";
|
||||
|
||||
"<Enter>" = ":view<Enter>";
|
||||
|
||||
"C" = ":compose<Enter>";
|
||||
|
||||
"<C-r>" = ":read<Enter>";
|
||||
|
||||
"rr" = ":reply -a<Enter>";
|
||||
"rq" = ":reply -aq<Enter>";
|
||||
"Rr" = ":reply<Enter>";
|
||||
"Rq" = ":reply -q<Enter>";
|
||||
|
||||
"/" = ":search<space>";
|
||||
"\\" = ":filter<space>";
|
||||
"n" = ":next-result<Enter>";
|
||||
"N" = ":prev-result<Enter>";
|
||||
"<Esc>" = ":clear<Enter>";
|
||||
|
||||
"v" = ":mark -t<Enter>";
|
||||
"V" = ":mark -v<Enter>";
|
||||
|
||||
"tdi" = ":tag -inflight<Enter>:select 0<Enter>";
|
||||
"tdr" = ":tag -review<Enter>:select 0<Enter>";
|
||||
"tdt" = ":tag -todo<Enter>:select 0<Enter>";
|
||||
|
||||
"zI" = ":cf inbox<Enter>";
|
||||
"zi" = ":cf _patches/inflight<Enter>";
|
||||
"zr" = ":cf _patches/review<Enter>";
|
||||
"zu" = ":cf _unread<Enter>";
|
||||
"zt" = ":cf _todo<Enter>";
|
||||
"zT" = ":cf tag:";
|
||||
};
|
||||
|
||||
view = {
|
||||
"/" = ":toggle-key-passthrough<Enter>/";
|
||||
|
||||
"q" = ":close<Enter>";
|
||||
"O" = ":open<Enter>";
|
||||
"S" = ":save<space>";
|
||||
"D" = ":delete<Enter>";
|
||||
"<C-l>" = ":open-link <space>";
|
||||
"f" = ":forward<Enter>";
|
||||
|
||||
"rr" = ":reply -a<Enter>";
|
||||
"rq" = ":reply -aq<Enter>";
|
||||
"Rr" = ":reply<Enter>";
|
||||
"Rq" = ":reply -q<Enter>";
|
||||
|
||||
"H" = ":toggle-headers<Enter>";
|
||||
"<C-k>" = ":prev-part<Enter>";
|
||||
"<C-j>" = ":prev-part<Enter>";
|
||||
"J" = ":next<Enter>";
|
||||
"K" = ":prev<Enter>";
|
||||
};
|
||||
|
||||
"view::passthrough" = {
|
||||
"$noinherit" = "true";
|
||||
"$ex" = "<C-x>";
|
||||
"<Esc>" = ":toggle-key-passthrough<Enter>";
|
||||
};
|
||||
|
||||
compose = {
|
||||
"$noinherit" = true;
|
||||
"$ex" = "<C-x>";
|
||||
|
||||
"<C-k>" = ":prev-field<Enter>";
|
||||
"<C-j>" = ":next-field<Enter>";
|
||||
|
||||
"<tab>" = ":next-field<Enter>";
|
||||
"<backtab>" = ":prev-field<Enter>";
|
||||
|
||||
"<C-p>" = ":prev-tab<Enter>";
|
||||
"<C-n>" = ":next-tab<Enter>";
|
||||
};
|
||||
|
||||
"compose::editor" = {
|
||||
"$noinherit" = true;
|
||||
"$ex" = "<C-x>";
|
||||
|
||||
"<C-k>" = ":prev-field<Enter>";
|
||||
"<C-j>" = ":next-field<Enter>";
|
||||
|
||||
"<C-p>" = ":prev-tab<Enter>";
|
||||
"<C-n>" = ":next-tab<Enter>";
|
||||
};
|
||||
|
||||
"compose::review" = {
|
||||
"y" = ":send<Enter>";
|
||||
"n" = ":abort<Enter>";
|
||||
"v" = ":preview<Enter>";
|
||||
"p" = ":postpone<Enter>";
|
||||
"q" = ":choose -o d discard abort -o p postpone postpone<Enter>";
|
||||
"e" = ":edit<Enter>";
|
||||
"a" = ":attach<space>";
|
||||
"d" = ":detach<space>";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
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";
|
||||
}
|
||||
|
|
@ -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?
|
||||
}
|
||||
|
|
@ -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]
|
||||
|
|
@ -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 "<quentin.boyer@%s>"]],
|
||||
[[Philippe Dutrueux "<philippe.dutrueux@%s>"]],
|
||||
[[Sylvain Goudeau "<sylvain.goudeau@%s>"]],
|
||||
[[Jonathan Espié--Caullet "<jonathan.espiecaullet@%s>"]],
|
||||
[[Damien Bergamini "<damien.bergamini@%s>"]],
|
||||
[[Clément Mathieu--Drif "<clement.mathieu--drif@%s>"]],
|
||||
[[Marie Badaroux "<marie.badaroux@%s>"]],
|
||||
}),
|
||||
}),
|
||||
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
|
||||
|
|
@ -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 = "<leader>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}"'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -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'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue