From ded18f1b40ccccc9265df283556454396307fab2 Mon Sep 17 00:00:00 2001 From: Anish L Date: Tue, 8 Feb 2022 20:03:49 +1000 Subject: [PATCH] who even knows --- flake.nix | 2 +- hosts/curve/default.nix | 80 ++++++++++++++++++++++++++++-- profiles/core/common.nix | 5 ++ profiles/mossnet-hosts/default.nix | 12 +++-- profiles/nvim/nvim.nix | 23 ++++++++- users/profiles/desktop/default.nix | 3 ++ users/profiles/direnv/default.nix | 1 + users/profiles/email/default.nix | 2 +- 8 files changed, 116 insertions(+), 12 deletions(-) diff --git a/flake.nix b/flake.nix index 02a40c2b..f5b81da4 100644 --- a/flake.nix +++ b/flake.nix @@ -121,7 +121,7 @@ sealight = [ base ]; # matrix rsshub backup wireguard website mossnet = [ base ]; # shaarli wallabag nextcloud taskwarrior headphones graphical = [ base users.profiles.firefox users.profiles.desktop bluetooth music sync wireguard ]; - curve = [ graphical ]; + curve = [ graphical users.profiles.email users.profiles.cal]; }; }; }; diff --git a/hosts/curve/default.nix b/hosts/curve/default.nix index c4a23802..319b89f1 100644 --- a/hosts/curve/default.nix +++ b/hosts/curve/default.nix @@ -3,11 +3,6 @@ imports = [ ./configuration.nix profiles.users.anish - #profiles.users.profiles.firefox - #profiles.users.profiles.desktop - profiles.users.profiles.email - profiles.users.profiles.cal - #profiles.wireguard profiles.mossnet-hosts ] ++ suites.curve; @@ -27,6 +22,81 @@ # Qualcomm Memory Debug SUBSYSTEMS=="usb", ATTRS{idVendor}=="05c6", ATTRS{idProduct}=="9006", MODE="0666", GROUP="plugdev" + + # Atmel DFU +### ATmega16U2 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2fef", TAG+="uaccess" +### ATmega32U2 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff0", TAG+="uaccess" +### ATmega16U4 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff3", TAG+="uaccess" +### ATmega32U4 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff4", TAG+="uaccess" +### AT90USB64 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff9", TAG+="uaccess" +### AT90USB162 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ffa", TAG+="uaccess" +### AT90USB128 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ffb", TAG+="uaccess" + +# Input Club +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c11", ATTRS{idProduct}=="b007", TAG+="uaccess" + +# STM32duino +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1eaf", ATTRS{idProduct}=="0003", TAG+="uaccess" +# STM32 DFU +SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", TAG+="uaccess" + +# BootloadHID +SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05df", TAG+="uaccess" + +# USBAspLoader +SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05dc", TAG+="uaccess" + +# ModemManager should ignore the following devices +# Atmel SAM-BA (Massdrop) +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="6124", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" + +# Caterina (Pro Micro) +## pid.codes shared PID +### Keyboardio Atreus 2 Bootloader +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="2302", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +## Spark Fun Electronics +### Pro Micro 3V3/8MHz +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9203", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +### Pro Micro 5V/16MHz +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9205", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +### LilyPad 3V3/8MHz (and some Pro Micro clones) +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9207", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +## Pololu Electronics +### A-Star 32U4 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1ffb", ATTRS{idProduct}=="0101", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +## Arduino SA +### Leonardo +SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0036", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +### Micro +SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0037", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +## Adafruit Industries LLC +### Feather 32U4 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="239a", ATTRS{idProduct}=="000c", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +### ItsyBitsy 32U4 3V3/8MHz +SUBSYSTEMS=="usb", ATTRS{idVendor}=="239a", ATTRS{idProduct}=="000d", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +### ItsyBitsy 32U4 5V/16MHz +SUBSYSTEMS=="usb", ATTRS{idVendor}=="239a", ATTRS{idProduct}=="000e", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +## dog hunter AG +### Leonardo +SUBSYSTEMS=="usb", ATTRS{idVendor}=="2a03", ATTRS{idProduct}=="0036", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +### Micro +SUBSYSTEMS=="usb", ATTRS{idVendor}=="2a03", ATTRS{idProduct}=="0037", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" + +# hid_listen +KERNEL=="hidraw*", MODE="0660", GROUP="plugdev", TAG+="uaccess", TAG+="udev-acl" + +# hid bootloaders +## QMK HID +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2067", TAG+="uaccess" +## PJRC's HalfKay +SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="0478", TAG+="uaccess" ''; boot.blacklistedKernelModules = [ "qcserial" ]; users.users.anish.extraGroups = ["adbusers" "wheel" "plugdev"]; diff --git a/profiles/core/common.nix b/profiles/core/common.nix index cb520006..5b1d64a5 100644 --- a/profiles/core/common.nix +++ b/profiles/core/common.nix @@ -124,4 +124,9 @@ programs.adb.enable = true; users.users.anish.extraGroups = ["adbusers"]; + nix.extraOptions = '' + keep-outputs = true + keep-derivations = true + ''; + } diff --git a/profiles/mossnet-hosts/default.nix b/profiles/mossnet-hosts/default.nix index b5c2b249..2c0d6e3f 100644 --- a/profiles/mossnet-hosts/default.nix +++ b/profiles/mossnet-hosts/default.nix @@ -1,8 +1,12 @@ { networking.extraHosts = '' - 172.16.11.240 mossnet.lan - 172.16.11.240 links.mossnet.lan - 172.16.11.240 read.mossnet.lan - 172.16.11.240 stats.mossnet.lan + 10.0.69.4 mossnet.lan + 10.0.69.4 links.mossnet.lan + 10.0.69.4 read.mossnet.lan + 10.0.69.4 stats.mossnet.lan ''; + #172.16.11.240 mossnet.lan + #172.16.11.240 links.mossnet.lan + #172.16.11.240 read.mossnet.lan + #172.16.11.240 stats.mossnet.lan } diff --git a/profiles/nvim/nvim.nix b/profiles/nvim/nvim.nix index 51adcd1f..5258c05f 100644 --- a/profiles/nvim/nvim.nix +++ b/profiles/nvim/nvim.nix @@ -53,6 +53,7 @@ in environment.systemPackages = with pkgs // customPlugins; [ nodejs python-with-my-packages + clojure-lsp #python3Packages.pynvim #python3Packages.six #python3Packages.tasklib @@ -76,6 +77,7 @@ in vimwiki coc-nvim coc-json + ale coc-pyright coc-pairs coc-emmet @@ -93,6 +95,7 @@ in vim-zettel #vimwiki-sync telescope-nvim + plenary-nvim # Clojure stuff conjure vim-sexp @@ -120,6 +123,9 @@ in let ayucolor="mirage" colorscheme ayu + " set spell + set spelllang=en_gb + " window nmap wh :topleft vnew nmap wl :botright vnew @@ -127,6 +133,7 @@ in nmap wj :botright new let mapleader = "\" + let maplocalleader = "," " lightline colorscheme let g:lightline = { @@ -149,6 +156,14 @@ in :nnoremap "=strftime("%Y-%m-%d %H:%M:") :inoremap =strftime("%Y-%m-%d %H:%M:") + " telescope + " Find files using Telescope command-line sugar. + nnoremap ff Telescope find_files + nnoremap fg Telescope live_grep + nnoremap fb Telescope buffers + nnoremap fh Telescope help_tags + + " exit normal mode in terminal :tnoremap @@ -177,8 +192,14 @@ in " open on directory autocmd StdinReadPre * let s:std_in=1 + " ALE + clj-kondo + let g:ale_linters = {'clojure': ['clj-kondo']} + " coc - " + " + " conjure extension + let g:coc_global_extensions = ['coc-conjure'] + " if hidden is not set, TextEdit might fail. set hidden diff --git a/users/profiles/desktop/default.nix b/users/profiles/desktop/default.nix index c2830d57..da02c8b8 100644 --- a/users/profiles/desktop/default.nix +++ b/users/profiles/desktop/default.nix @@ -54,8 +54,10 @@ in feh mupdf sublime-music + vcv-rack calibre nheko + mpv scrot newsflash zeal @@ -136,6 +138,7 @@ in *.color239: #565761 *.color240: #6272a4 *.color241: #b6b6b2 + xsetroot -cursor_name left_ptr EOF ''; lightdm.enable = true; diff --git a/users/profiles/direnv/default.nix b/users/profiles/direnv/default.nix index 67ff2113..d345e2d3 100644 --- a/users/profiles/direnv/default.nix +++ b/users/profiles/direnv/default.nix @@ -3,6 +3,7 @@ enable = true; nix-direnv = { enable = true; + enableFlakes = true; }; }; } diff --git a/users/profiles/email/default.nix b/users/profiles/email/default.nix index c446da0b..33e73491 100644 --- a/users/profiles/email/default.nix +++ b/users/profiles/email/default.nix @@ -27,7 +27,7 @@ #set virtual_spoolfile=yes set folder="~/Mail/" set mbox_type = Maildir - mailboxes `find ~/Mail/anish/* -maxdepth 0 -type d | grep -v "tmp\|new\|cur" | sed 's|/home/asinha/Mail/|=\"|g' | sed 's|$|\"|g' | tr '\n' ' '` + mailboxes `find ~/Mail/anish/* -maxdepth 0 -type d | grep -v "tmp\|new\|cur" | sed 's|/home/anish/Mail/|=\"|g' | sed 's|$|\"|g' | tr '\n' ' '` ## Folder with emails #set folder = "~/Mail/anish"