From 3099f8b97a5be7b35b2eb03506adf1167270878e Mon Sep 17 00:00:00 2001 From: Akshay Date: Tue, 23 Jul 2024 16:03:05 +0100 Subject: stuff --- hosts/myrtle/configuration.nix | 3 +- hosts/myrtle/home.nix | 133 +++++++++++++++++++++++++++++ hosts/olive/configuration.nix | 147 --------------------------------- hosts/olive/hardware-configuration.nix | 36 -------- hosts/olive/qmk.rules | 74 ----------------- 5 files changed, 134 insertions(+), 259 deletions(-) create mode 100644 hosts/myrtle/home.nix delete mode 100644 hosts/olive/configuration.nix delete mode 100644 hosts/olive/hardware-configuration.nix delete mode 100644 hosts/olive/qmk.rules (limited to 'hosts') diff --git a/hosts/myrtle/configuration.nix b/hosts/myrtle/configuration.nix index 4067b4e..1f9dc21 100644 --- a/hosts/myrtle/configuration.nix +++ b/hosts/myrtle/configuration.nix @@ -94,7 +94,6 @@ }; hardware = { - opengl.driSupport = true; bluetooth = { enable = true; powerOnBoot = true; @@ -128,12 +127,12 @@ }; services = { + libinput.enable = true; xserver = { enable = true; xkb.layout = "us"; videoDrivers = [ "nvidia" ]; displayManager.startx.enable = true; - libinput.enable = true; dpi = 192; screenSection = '' Option "metamodes" "nvidia-auto-select +0+0 {ForceFullCompositionPipeline=On}" diff --git a/hosts/myrtle/home.nix b/hosts/myrtle/home.nix new file mode 100644 index 0000000..2529b3e --- /dev/null +++ b/hosts/myrtle/home.nix @@ -0,0 +1,133 @@ +{ config +, pkgs +, theme +, self +, ... +}: + +{ + + imports = [ + ../../programs + ../../services + ../../x + # ./mail.nix + ]; + + home.stateVersion = "22.11"; + home.username = "np"; + home.homeDirectory = "/home/np"; + home.extraOutputsToInstall = [ "man" ]; + home.packages = with pkgs; [ + + # essentials + vim + weechat + firefox + qutebrowser + unzip + tmux + xclip + ripgrep + miniserve + pfetch + st + cmus + tree + neomutt + w3m + noto-fonts-emoji + fd + du-dust + jq + libnotify + inotify-tools + pavucontrol + bc + signal-desktop + killall + httpie + thunderbird + calibre + gh + sonixd + + # gaming + mgba + + # sync + rtorrent + lftp + wget + curl + + # graphics + krita + sxiv + imagemagick + ffmpeg-full + mpv + slop + maim + arandr + gimp + + # graphics debug + cudatoolkit + pciutils + + # monitoring + s-tui + nvtopPackages.full + lshw + stress + powertop + + # input + xinput_calibrator + libinput + + # meta + nixpkgs-review + nixpkgs-fmt + nix-prefetch-scripts + + # work + slack + zoom-us + awscli2 + kubectl + + ] ++ (import ../../scripts { inherit pkgs; }); + + home.pointerCursor = { + name = "Vanilla-DMZ"; + package = pkgs.vanilla-dmz; + x11.enable = true; + }; + + xdg = { + userDirs = { + enable = true; + desktop = "\$HOME/desktop"; + documents = "\$HOME/docs"; + download = "\$HOME/dloads"; + music = "\$HOME/music"; + pictures = "\$HOME/pics"; + videos = "\$HOME/vids"; + }; + }; + + xsession = { + enable = true; + windowManager.command = "2bwm"; + initExtra = '' + ${pkgs.hsetroot}/bin/hsetroot -solid "${theme.base00}" + xrdb -load $HOME/.Xresources + ${pkgs.picom}/bin/picom & + xrandr --setprovideroutputsource modesetting NVIDIA-0 + xrandr --auto + ''; + }; + +} diff --git a/hosts/olive/configuration.nix b/hosts/olive/configuration.nix deleted file mode 100644 index 3d5d47f..0000000 --- a/hosts/olive/configuration.nix +++ /dev/null @@ -1,147 +0,0 @@ -{ config, pkgs, lib, self, ... }: - -{ - imports = - [ - ./hardware-configuration.nix - ../../services/suspend.nix - ]; - - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - boot.kernel.sysctl."net.ipv4.ip_forward" = 1; - - networking = { - hostName = "olive"; - wireless = { - iwd.enable = true; - interfaces = [ "wlan0" ]; - environmentFile = "/home/np/.wireless.env"; - networks = { - Sanic.psk = "@PSK_SANI@"; - Gopalan.psk = "@PSK_GOPA@"; - Srividhya.psk = "@PSK_SRIV@"; - sage.psk = "@PSK_SAGE@"; - }; - extraConfig = '' - ctrl_interface=/run/wpa_supplicant - ctrl_interface_group=wheel - ''; - }; - useDHCP = false; - interfaces.wlan0.useDHCP = true; - }; - - networking.nameservers = [ "1.1.1.1" "1.0.0.1" ]; - - i18n.defaultLocale = "en_US.UTF-8"; - time.timeZone = "Asia/Kolkata"; - - nixpkgs.config = { - "2bwm".patches = [ - ../../patches/2bwm/nerd-patch.diff - ]; - - st = { - conf = builtins.readFile ../../programs/st/config.h; - extraLibs = with pkgs; [ harfbuzz ]; - patches = [ - ../../patches/st/xres.diff - ../../patches/st/bright.diff - ../../patches/st/ligatures.diff - ]; - }; - - # for zoom-us - allowUnfree = true; - }; - - nixpkgs.overlays = with self.overlays; [ - statix - prompt - ]; - - environment.systemPackages = with pkgs; [ - _2bwm - man-pages - man-pages-posix - (lib.hiPrio pkgs.bashInteractive_5) - ]; - - documentation = { - dev.enable = true; - man.generateCaches = true; - }; - - users.motd = with config; '' - Host ${networking.hostName} - OS NixOS ${system.nixos.release} (${system.nixos.codeName}) - Version ${system.nixos.version} - Kernel ${boot.kernelPackages.kernel.version} - ''; - - programs = { - light.enable = true; - adb.enable = true; - }; - - sound.enable = true; - - hardware = { - pulseaudio = { - enable = true; - package = pkgs.pulseaudioFull; - extraConfig = "load-module module-bluetooth-policy auto_switch=2"; - }; - bluetooth = { - enable = true; - powerOnBoot = true; - }; - }; - - # Enable the X11 windowing system. - services.xserver = { - enable = true; - layout = "us"; - displayManager.startx.enable = true; - libinput.enable = true; - }; - - services.batteryNotifier = { - enable = true; - notifyCapacity = 20; - suspendCapacity = 10; - }; - - services.udev.extraRules = builtins.readFile ./qmk.rules; - - users.users.np = { - isNormalUser = true; - home = "/home/np"; - extraGroups = [ "wheel" "users" "tty" "audio" "video" "input" "adbusers" "docker" ]; - }; - - nix = { - package = pkgs.nixUnstable; - extraOptions = '' - experimental-features = nix-command flakes - warn-dirty = false - keep-outputs = false - keep-derivations = false - ''; - settings = { - trusted-users = [ - "root" - "np" - ]; - }; - }; - - # 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 = "20.03"; # Did you read the comment? -} diff --git a/hosts/olive/hardware-configuration.nix b/hosts/olive/hardware-configuration.nix deleted file mode 100644 index c2bff39..0000000 --- a/hosts/olive/hardware-configuration.nix +++ /dev/null @@ -1,36 +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" - "ahci" - "nvme" - "usb_storage" - "sd_mod" - ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = { - device = "/dev/disk/by-uuid/27a7c854-e674-411f-9d79-37084922c91d"; - fsType = "ext4"; - }; - - fileSystems."/boot" = { - device = "/dev/disk/by-uuid/882C-54D5"; - fsType = "vfat"; - }; - - swapDevices = [ ]; - - nix.settings.max-jobs = lib.mkDefault 8; - powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; -} diff --git a/hosts/olive/qmk.rules b/hosts/olive/qmk.rules deleted file mode 100644 index 57806f9..0000000 --- a/hosts/olive/qmk.rules +++ /dev/null @@ -1,74 +0,0 @@ -# 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" -- cgit v1.2.3