aboutsummaryrefslogtreecommitdiff
path: root/hosts
diff options
context:
space:
mode:
Diffstat (limited to 'hosts')
-rw-r--r--hosts/myrtle/configuration.nix3
-rw-r--r--hosts/myrtle/home.nix133
-rw-r--r--hosts/olive/configuration.nix147
-rw-r--r--hosts/olive/hardware-configuration.nix36
-rw-r--r--hosts/olive/qmk.rules74
5 files changed, 134 insertions, 259 deletions
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 @@
94 }; 94 };
95 95
96 hardware = { 96 hardware = {
97 opengl.driSupport = true;
98 bluetooth = { 97 bluetooth = {
99 enable = true; 98 enable = true;
100 powerOnBoot = true; 99 powerOnBoot = true;
@@ -128,12 +127,12 @@
128 }; 127 };
129 128
130 services = { 129 services = {
130 libinput.enable = true;
131 xserver = { 131 xserver = {
132 enable = true; 132 enable = true;
133 xkb.layout = "us"; 133 xkb.layout = "us";
134 videoDrivers = [ "nvidia" ]; 134 videoDrivers = [ "nvidia" ];
135 displayManager.startx.enable = true; 135 displayManager.startx.enable = true;
136 libinput.enable = true;
137 dpi = 192; 136 dpi = 192;
138 screenSection = '' 137 screenSection = ''
139 Option "metamodes" "nvidia-auto-select +0+0 {ForceFullCompositionPipeline=On}" 138 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 @@
1{ config
2, pkgs
3, theme
4, self
5, ...
6}:
7
8{
9
10 imports = [
11 ../../programs
12 ../../services
13 ../../x
14 # ./mail.nix
15 ];
16
17 home.stateVersion = "22.11";
18 home.username = "np";
19 home.homeDirectory = "/home/np";
20 home.extraOutputsToInstall = [ "man" ];
21 home.packages = with pkgs; [
22
23 # essentials
24 vim
25 weechat
26 firefox
27 qutebrowser
28 unzip
29 tmux
30 xclip
31 ripgrep
32 miniserve
33 pfetch
34 st
35 cmus
36 tree
37 neomutt
38 w3m
39 noto-fonts-emoji
40 fd
41 du-dust
42 jq
43 libnotify
44 inotify-tools
45 pavucontrol
46 bc
47 signal-desktop
48 killall
49 httpie
50 thunderbird
51 calibre
52 gh
53 sonixd
54
55 # gaming
56 mgba
57
58 # sync
59 rtorrent
60 lftp
61 wget
62 curl
63
64 # graphics
65 krita
66 sxiv
67 imagemagick
68 ffmpeg-full
69 mpv
70 slop
71 maim
72 arandr
73 gimp
74
75 # graphics debug
76 cudatoolkit
77 pciutils
78
79 # monitoring
80 s-tui
81 nvtopPackages.full
82 lshw
83 stress
84 powertop
85
86 # input
87 xinput_calibrator
88 libinput
89
90 # meta
91 nixpkgs-review
92 nixpkgs-fmt
93 nix-prefetch-scripts
94
95 # work
96 slack
97 zoom-us
98 awscli2
99 kubectl
100
101 ] ++ (import ../../scripts { inherit pkgs; });
102
103 home.pointerCursor = {
104 name = "Vanilla-DMZ";
105 package = pkgs.vanilla-dmz;
106 x11.enable = true;
107 };
108
109 xdg = {
110 userDirs = {
111 enable = true;
112 desktop = "\$HOME/desktop";
113 documents = "\$HOME/docs";
114 download = "\$HOME/dloads";
115 music = "\$HOME/music";
116 pictures = "\$HOME/pics";
117 videos = "\$HOME/vids";
118 };
119 };
120
121 xsession = {
122 enable = true;
123 windowManager.command = "2bwm";
124 initExtra = ''
125 ${pkgs.hsetroot}/bin/hsetroot -solid "${theme.base00}"
126 xrdb -load $HOME/.Xresources
127 ${pkgs.picom}/bin/picom &
128 xrandr --setprovideroutputsource modesetting NVIDIA-0
129 xrandr --auto
130 '';
131 };
132
133}
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 @@
1{ config, pkgs, lib, self, ... }:
2
3{
4 imports =
5 [
6 ./hardware-configuration.nix
7 ../../services/suspend.nix
8 ];
9
10 boot.loader.systemd-boot.enable = true;
11 boot.loader.efi.canTouchEfiVariables = true;
12 boot.kernel.sysctl."net.ipv4.ip_forward" = 1;
13
14 networking = {
15 hostName = "olive";
16 wireless = {
17 iwd.enable = true;
18 interfaces = [ "wlan0" ];
19 environmentFile = "/home/np/.wireless.env";
20 networks = {
21 Sanic.psk = "@PSK_SANI@";
22 Gopalan.psk = "@PSK_GOPA@";
23 Srividhya.psk = "@PSK_SRIV@";
24 sage.psk = "@PSK_SAGE@";
25 };
26 extraConfig = ''
27 ctrl_interface=/run/wpa_supplicant
28 ctrl_interface_group=wheel
29 '';
30 };
31 useDHCP = false;
32 interfaces.wlan0.useDHCP = true;
33 };
34
35 networking.nameservers = [ "1.1.1.1" "1.0.0.1" ];
36
37 i18n.defaultLocale = "en_US.UTF-8";
38 time.timeZone = "Asia/Kolkata";
39
40 nixpkgs.config = {
41 "2bwm".patches = [
42 ../../patches/2bwm/nerd-patch.diff
43 ];
44
45 st = {
46 conf = builtins.readFile ../../programs/st/config.h;
47 extraLibs = with pkgs; [ harfbuzz ];
48 patches = [
49 ../../patches/st/xres.diff
50 ../../patches/st/bright.diff
51 ../../patches/st/ligatures.diff
52 ];
53 };
54
55 # for zoom-us
56 allowUnfree = true;
57 };
58
59 nixpkgs.overlays = with self.overlays; [
60 statix
61 prompt
62 ];
63
64 environment.systemPackages = with pkgs; [
65 _2bwm
66 man-pages
67 man-pages-posix
68 (lib.hiPrio pkgs.bashInteractive_5)
69 ];
70
71 documentation = {
72 dev.enable = true;
73 man.generateCaches = true;
74 };
75
76 users.motd = with config; ''
77 Host ${networking.hostName}
78 OS NixOS ${system.nixos.release} (${system.nixos.codeName})
79 Version ${system.nixos.version}
80 Kernel ${boot.kernelPackages.kernel.version}
81 '';
82
83 programs = {
84 light.enable = true;
85 adb.enable = true;
86 };
87
88 sound.enable = true;
89
90 hardware = {
91 pulseaudio = {
92 enable = true;
93 package = pkgs.pulseaudioFull;
94 extraConfig = "load-module module-bluetooth-policy auto_switch=2";
95 };
96 bluetooth = {
97 enable = true;
98 powerOnBoot = true;
99 };
100 };
101
102 # Enable the X11 windowing system.
103 services.xserver = {
104 enable = true;
105 layout = "us";
106 displayManager.startx.enable = true;
107 libinput.enable = true;
108 };
109
110 services.batteryNotifier = {
111 enable = true;
112 notifyCapacity = 20;
113 suspendCapacity = 10;
114 };
115
116 services.udev.extraRules = builtins.readFile ./qmk.rules;
117
118 users.users.np = {
119 isNormalUser = true;
120 home = "/home/np";
121 extraGroups = [ "wheel" "users" "tty" "audio" "video" "input" "adbusers" "docker" ];
122 };
123
124 nix = {
125 package = pkgs.nixUnstable;
126 extraOptions = ''
127 experimental-features = nix-command flakes
128 warn-dirty = false
129 keep-outputs = false
130 keep-derivations = false
131 '';
132 settings = {
133 trusted-users = [
134 "root"
135 "np"
136 ];
137 };
138 };
139
140 # This value determines the NixOS release from which the default
141 # settings for stateful data, like file locations and database versions
142 # on your system were taken. It‘s perfectly fine and recommended to leave
143 # this value at the release version of the first install of this system.
144 # Before changing this value read the documentation for this option
145 # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
146 system.stateVersion = "20.03"; # Did you read the comment?
147}
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 @@
1# Do not modify this file! It was generated by ‘nixos-generate-config’
2# and may be overwritten by future invocations. Please make changes
3# to /etc/nixos/configuration.nix instead.
4{ config, lib, pkgs, modulesPath, ... }:
5
6{
7 imports = [
8 "${modulesPath}/installer/scan/not-detected.nix"
9 ];
10
11 boot.initrd.availableKernelModules = [
12 "xhci_pci"
13 "ahci"
14 "nvme"
15 "usb_storage"
16 "sd_mod"
17 ];
18 boot.initrd.kernelModules = [ ];
19 boot.kernelModules = [ "kvm-intel" ];
20 boot.extraModulePackages = [ ];
21
22 fileSystems."/" = {
23 device = "/dev/disk/by-uuid/27a7c854-e674-411f-9d79-37084922c91d";
24 fsType = "ext4";
25 };
26
27 fileSystems."/boot" = {
28 device = "/dev/disk/by-uuid/882C-54D5";
29 fsType = "vfat";
30 };
31
32 swapDevices = [ ];
33
34 nix.settings.max-jobs = lib.mkDefault 8;
35 powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
36}
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 @@
1# Atmel DFU
2### ATmega16U2
3SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2fef", TAG+="uaccess"
4### ATmega32U2
5SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff0", TAG+="uaccess"
6### ATmega16U4
7SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff3", TAG+="uaccess"
8### ATmega32U4
9SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff4", TAG+="uaccess"
10### AT90USB64
11SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff9", TAG+="uaccess"
12### AT90USB162
13SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ffa", TAG+="uaccess"
14### AT90USB128
15SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ffb", TAG+="uaccess"
16
17# Input Club
18SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c11", ATTRS{idProduct}=="b007", TAG+="uaccess"
19
20# STM32duino
21SUBSYSTEMS=="usb", ATTRS{idVendor}=="1eaf", ATTRS{idProduct}=="0003", TAG+="uaccess"
22# STM32 DFU
23SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", TAG+="uaccess"
24
25# BootloadHID
26SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05df", TAG+="uaccess"
27
28# USBAspLoader
29SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05dc", TAG+="uaccess"
30
31# ModemManager should ignore the following devices
32# Atmel SAM-BA (Massdrop)
33SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="6124", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
34
35# Caterina (Pro Micro)
36## pid.codes shared PID
37### Keyboardio Atreus 2 Bootloader
38SUBSYSTEMS=="usb", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="2302", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
39## Spark Fun Electronics
40### Pro Micro 3V3/8MHz
41SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9203", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
42### Pro Micro 5V/16MHz
43SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9205", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
44### LilyPad 3V3/8MHz (and some Pro Micro clones)
45SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9207", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
46## Pololu Electronics
47### A-Star 32U4
48SUBSYSTEMS=="usb", ATTRS{idVendor}=="1ffb", ATTRS{idProduct}=="0101", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
49## Arduino SA
50### Leonardo
51SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0036", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
52### Micro
53SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0037", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
54## Adafruit Industries LLC
55### Feather 32U4
56SUBSYSTEMS=="usb", ATTRS{idVendor}=="239a", ATTRS{idProduct}=="000c", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
57### ItsyBitsy 32U4 3V3/8MHz
58SUBSYSTEMS=="usb", ATTRS{idVendor}=="239a", ATTRS{idProduct}=="000d", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
59### ItsyBitsy 32U4 5V/16MHz
60SUBSYSTEMS=="usb", ATTRS{idVendor}=="239a", ATTRS{idProduct}=="000e", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
61## dog hunter AG
62### Leonardo
63SUBSYSTEMS=="usb", ATTRS{idVendor}=="2a03", ATTRS{idProduct}=="0036", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
64### Micro
65SUBSYSTEMS=="usb", ATTRS{idVendor}=="2a03", ATTRS{idProduct}=="0037", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
66
67# hid_listen
68KERNEL=="hidraw*", MODE="0660", GROUP="plugdev", TAG+="uaccess", TAG+="udev-acl"
69
70# hid bootloaders
71## QMK HID
72SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2067", TAG+="uaccess"
73## PJRC's HalfKay
74SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="0478", TAG+="uaccess"