summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpolwex <polwex@sortug.com>2025-03-06 14:24:52 +0700
committerpolwex <polwex@sortug.com>2025-03-06 14:24:52 +0700
commit6dcb4af2623174c4c52202c7ea064f40a35091ed (patch)
tree751d6a89a4a2e1d1f300fa00d3bf829413fb965f
parent3af8fa41d6299c6b88038911cc091a152f189e12 (diff)
m
-rw-r--r--hosts/local/gnome.nix34
-rw-r--r--hosts/local/gui.nix50
-rw-r--r--hosts/local/i3.nix47
-rw-r--r--hosts/local/master/configuration.nix3
-rw-r--r--hosts/local/master/keyboard.nix2
-rw-r--r--hosts/local/master/rgb.nix30
-rw-r--r--hosts/local/master/thinkpad2.kbd105
-rw-r--r--hosts/local/master/xorg.conf63
-rw-r--r--hosts/local/wayland.nix19
-rw-r--r--hosts/pkgs.nix2
10 files changed, 260 insertions, 95 deletions
diff --git a/hosts/local/gnome.nix b/hosts/local/gnome.nix
index 782004c..63243f3 100644
--- a/hosts/local/gnome.nix
+++ b/hosts/local/gnome.nix
@@ -34,43 +34,9 @@
};
environment.systemPackages = with pkgs; [
- polybar
- rofi
# screenshots
flameshot
shutter
- maim
-
- kitty
- alacritty
- signal-desktop
- tdesktop
- brave
- gimp
- vlc
- thunderbird
- kmail
- firefox
- chromium
- pavucontrol
- # icons
- polkit_gnome
- gnome-themes-extra
- gtk-engine-murrine
- gtk_engines
- gsettings-desktop-schemas
- lxappearance
- adwaita-qt
- adwaita-icon-theme
- xfce.thunar
- libreoffice
- qbittorrent
- zathura
- #
- libcamera # pipewire seems to want this
- easyeffects
- # games!
- ryujinx
];
services.flatpak.enable = true;
# Enable CUPS to print documents.
diff --git a/hosts/local/gui.nix b/hosts/local/gui.nix
new file mode 100644
index 0000000..82d78b1
--- /dev/null
+++ b/hosts/local/gui.nix
@@ -0,0 +1,50 @@
+{pkgs, ...}: {
+ environment.systemPackages = with pkgs; [
+ obsidian
+ imv
+ # keyboard stuff
+ xorg.xev
+
+ # terminals
+ kitty
+ alacritty
+ ghostty
+ foot
+
+ # messaging
+ signal-desktop
+ tdesktop
+ # video
+ mpv
+ vlc
+ celluloid
+ ffmpeg-full
+ nv-codec-headers
+ #
+ smplayer
+ #browsers
+ brave
+ firefox
+ librewolf
+ vivaldi
+ chromium
+ # mail
+ thunderbird
+
+ #files
+ nautilus
+ xfce.thunar
+ #
+ libreoffice
+ digikam
+ gimp
+ qbittorrent
+ zathura # pdf
+ #
+ easyeffects # audio, cool stuff
+ # games!
+ ryujinx
+ wineWowPackages.staging
+ dosbox
+ ];
+}
diff --git a/hosts/local/i3.nix b/hosts/local/i3.nix
index 210c0d0..f955c56 100644
--- a/hosts/local/i3.nix
+++ b/hosts/local/i3.nix
@@ -4,8 +4,9 @@
xkb.layout = "us";
xkb.variant = "";
enable = true;
+ autorun = false;
desktopManager = {
- xterm.enable = true;
+ xterm.enable = false;
};
windowManager.i3 = {
enable = true;
@@ -18,8 +19,10 @@
];
};
};
- # TODO check autotiling
- services.displayManager.defaultSession = "none+i3";
+ # Boot to terminal
+ services.displayManager = {
+ defaultSession = "none+i3";
+ };
environment.sessionVariables = {
GTK_IM_MODULE = "fcitx";
@@ -37,40 +40,12 @@
environment.systemPackages = with pkgs; [
#notifications
dunst
- # gnome stuff
- nautilus
polybar
rofi
- xorg.xev
- imv
- #
- digikam
# screenshots
flameshot
shutter
xclip
- maim
-
- kitty
- alacritty
- ghostty
- signal-desktop
- tdesktop
- brave
- gimp
- vlc
- #
- mpv
- celluloid
- ffmpeg-full
- nv-codec-headers
- #
- smplayer
- thunderbird
- kmail
- firefox
- vivaldi
- chromium
pavucontrol
# icons
polkit_gnome
@@ -81,16 +56,6 @@
lxappearance
adwaita-qt
adwaita-icon-theme
- xfce.thunar
- libreoffice
- qbittorrent
- zathura
- #
- libcamera # pipewire seems to want this
- easyeffects
- # games!
- ryujinx
- wineWowPackages.staging
];
services.flatpak.enable = true;
diff --git a/hosts/local/master/configuration.nix b/hosts/local/master/configuration.nix
index e228246..375c10b 100644
--- a/hosts/local/master/configuration.nix
+++ b/hosts/local/master/configuration.nix
@@ -8,11 +8,13 @@
../../linux.nix
../../unfree.nix
#../../android.nix
+ ../gui.nix
../i3.nix
# ../gnome.nix
# ../wayland.nix
../nvidia.nix
./keyboard.nix
+ ./rgb.nix
];
# Use the systemd-boot EFI boot loader.
@@ -46,6 +48,7 @@
environment.systemPackages = [
pkgs.nodejs
pkgs.python312
+ # pkgs.openrgb-with-all-plugins
];
system.stateVersion = "23.11"; # Did you read the comment?
diff --git a/hosts/local/master/keyboard.nix b/hosts/local/master/keyboard.nix
index 852f084..d6ba135 100644
--- a/hosts/local/master/keyboard.nix
+++ b/hosts/local/master/keyboard.nix
@@ -31,7 +31,7 @@
keyboards = {
wirelessThinkpad = {
device = "/dev/input/by-id/usb-Lenovo_TrackPoint_Keyboard_II-event-kbd";
- config = builtins.readFile ./thinkpad.kbd;
+ config = builtins.readFile ./thinkpad2.kbd;
};
wiredThinkpad = {
device = "/dev/input/by-id/usb-Lenovo_ThinkPad_Compact_USB_Keyboard_with_TrackPoint-event-kbd";
diff --git a/hosts/local/master/rgb.nix b/hosts/local/master/rgb.nix
new file mode 100644
index 0000000..66dbbfb
--- /dev/null
+++ b/hosts/local/master/rgb.nix
@@ -0,0 +1,30 @@
+{
+ pkgs,
+ lib,
+ ...
+}: let
+ no-rgb = pkgs.writeScriptBin "no-rgb" ''
+ #!/bin/sh
+ NUM_DEVICES=$(${pkgs.openrgb}/bin/openrgb --noautoconnect --list-devices | grep -E '^[0-9]+: ' | wc -l)
+
+ for i in $(seq 0 $(($NUM_DEVICES - 1))); do
+ ${pkgs.openrgb}/bin/openrgb --noautoconnect --device $i --mode static --color 000000
+ done
+ '';
+in {
+ # config = {
+ # services.udev.packages = [pkgs.openrgb];
+ services.hardware.openrgb.enable = true;
+ # boot.kernelModules = ["i2c-dev"];
+ # hardware.i2c.enable = true;
+
+ # systemd.services.no-rgb = {
+ # description = "no-rgb";
+ # serviceConfig = {
+ # ExecStart = "${no-rgb}/bin/no-rgb";
+ # Type = "oneshot";
+ # };
+ # wantedBy = ["multi-user.target"];
+ # };
+ # };
+}
diff --git a/hosts/local/master/thinkpad2.kbd b/hosts/local/master/thinkpad2.kbd
new file mode 100644
index 0000000..c407475
--- /dev/null
+++ b/hosts/local/master/thinkpad2.kbd
@@ -0,0 +1,105 @@
+;; one liner comments ';;'
+#| Multiline
+ comments |#
+
+(defcfg ;; For linux & by-id lists pluggable devices
+;; If a key is not bound/left_empty(_) then it will fall back to the previous
+;; layer's binding if not then default.
+fallthrough true
+;; To run system commands. You MIGHT face issues with tiling window managers due to command helpers.
+;; allow-cmd true
+;; use 'ls /dev/input/by-id/' for detachable keyboards and
+;; 'ls /dev/input/by-path/' for builtin keyboards location'
+input (device-file "/dev/input/by-id/usb-Lenovo_TrackPoint_Keyboard_II-event-kbd")
+;; Not sure what this does. Please check the docs.
+output (uinput-sink "My KMonad output")
+)
+
+;; This is the real representation of your actual keyboard. We haven't started
+;; customizing layouts yet.
+(defsrc
+ esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 del
+ ` 1 2 3 4 5 6 7 8 9 0 - = bspc
+ tab q w e r t y u i o p [ ] \
+ caps a s d f g h j k l ; ' ret
+ lsft z x c v b n m , . / rsft
+ lctl lmet lalt spc ralt rctl pgup up pgdn
+ left down right
+)
+;; Aliases
+
+(defalias
+;; Layer toggles
+sym (layer-toggle syms)
+sym2 (layer-toggle syms2)
+cords (sticky-key 1000 (layer-toggle mods))
+;;
+hrt (layer-switch homerowmods)
+back (layer-switch qwerty)
+
+;; Homerow keys
+a (tap-hold-next-release 280 a lctl)
+s (tap-hold-next-release 280 s lalt)
+d (tap-hold-next-release 280 d lmet)
+f (tap-hold-next-release 280 f lsft)
+;;
+j (tap-hold-next-release 280 j rsft)
+k (tap-hold-next-release 280 k lmet)
+l (tap-hold-next-release 280 l lalt)
+semi (tap-hold-next-release 280 ; rctl)
+
+;; button to launch brave browser
+;; veeb (cmd-button "brave")
+;; ssf (sticky-key 500 (layer-toggle rshift))
+;; rsf (layer-toggle rshift)
+)
+
+;; The first custom layer is the one that gets activated when kmonad is started
+(deflayer qwerty ;; The default layer that'd be read when you launch kmonad
+ esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 del
+ ` 1 2 3 4 5 6 7 8 9 0 - = bspc
+ tab q w e r t y u i o p [ ] \
+ esc a s d f g h j k l ; ' ret
+ @sym z x c v b n m , . / rsft
+ lctl lmet @sym spc @cords @hrt left up right
+ left down right
+)
+(deflayer homerowmods
+ esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 del
+ ` 1 2 3 4 5 6 7 8 9 0 - = bspc
+ tab q w e r t y u i o p [ ] \
+ esc @a @s @d @f g h @j @k @l @semi ' ret
+ @sym z x c v b n m , . / rsft
+ lctl lmet @sym spc lalt @back left up right
+ left down right
+)
+(deflayer mods
+ esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 del
+ ` 1 2 3 4 5 6 7 8 9 0 - = bspc
+ tab q w e r t y u i o p [ ] h
+ esc lctl lalt lmet lsft g h rsft rmet ralt rctl ' ret
+ @sym z x c v b n m , . / rsft
+ lctl lmet @sym spc lalt @back left up right
+ left down right
+)
+
+;; A layer dedicated to symbols
+(deflayer syms
+ _ _ _ _ _ _ _ _ _ _ _ _ _ _
+ _ _ _ _ _ _ _ _ _ _ _ _ _ _
+ _ _ _ up _ _ ! @ # $ % _ _ _
+ _ _ left down right @sym2 ' ^ & - = _ ret
+ _ _ _ _ _ _ \( [ { < \ _ _
+ _ _ _ _ _ _ _ _ _ _ _
+)
+
+
+;; More symbols
+(deflayer syms2
+ _ _ _ _ _ _ _ _ _ _ _ _ _ _
+ _ _ _ _ _ _ _ _ _ _ _ _ _ _
+ _ _ _ _ _ _ _ _ _ _ _ _ _ _
+ _ _ _ _ _ _ ` ~ * \_ + _ ret
+ _ _ _ _ _ _ \) ] } > | _ _
+ _ _ _ _ _ _ _ _ _ _ _
+)
diff --git a/hosts/local/master/xorg.conf b/hosts/local/master/xorg.conf
new file mode 100644
index 0000000..cc521a6
--- /dev/null
+++ b/hosts/local/master/xorg.conf
@@ -0,0 +1,63 @@
+# nvidia-settings: X configuration file generated by nvidia-settings
+# nvidia-settings: version 570.86.16
+
+Section "ServerLayout"
+ Identifier "Layout0"
+ Screen 0 "Screen0" 0 0
+ InputDevice "Keyboard0" "CoreKeyboard"
+ InputDevice "Mouse0" "CorePointer"
+ Option "Xinerama" "0"
+EndSection
+
+Section "Files"
+EndSection
+
+Section "InputDevice"
+ # generated from default
+ Identifier "Mouse0"
+ Driver "mouse"
+ Option "Protocol" "auto"
+ Option "Device" "/dev/input/mice"
+ Option "Emulate3Buttons" "no"
+ Option "ZAxisMapping" "4 5"
+EndSection
+
+Section "InputDevice"
+ # generated from default
+ Identifier "Keyboard0"
+ Driver "kbd"
+EndSection
+
+Section "Monitor"
+ # HorizSync source: edid, VertRefresh source: edid
+ Identifier "Monitor0"
+ VendorName "Unknown"
+ ModelName "Microstep MSI MP2412"
+ HorizSync 93.0 - 93.0
+ VertRefresh 48.0 - 100.0
+ Option "DPMS"
+EndSection
+
+Section "Device"
+ Identifier "Device0"
+ Driver "nvidia"
+ VendorName "NVIDIA Corporation"
+ BoardName "NVIDIA GeForce RTX 4090"
+EndSection
+
+Section "Screen"
+ Identifier "Screen0"
+ Device "Device0"
+ Monitor "Monitor0"
+ DefaultDepth 24
+ Option "Stereo" "0"
+ Option "nvidiaXineramaInfoOrder" "HDMI-0"
+ Option "metamodes" "DP-0: 1920x1080_100 +0+240 {rotation=left}, HDMI-0: 3840x2160_60 +1080+0 {ForceCompositionPipeline=On, ForceFullCompositionPipeline=On}"
+ Option "SLI" "Off"
+ Option "MultiGPU" "Off"
+ Option "BaseMosaic" "off"
+ SubSection "Display"
+ Depth 24
+ EndSubSection
+EndSection
+
diff --git a/hosts/local/wayland.nix b/hosts/local/wayland.nix
index b56967c..5c191fe 100644
--- a/hosts/local/wayland.nix
+++ b/hosts/local/wayland.nix
@@ -81,16 +81,6 @@
environment.systemPackages = with pkgs; [
intel-media-driver
intel-vaapi-driver
- obsidian
- signal-desktop
- tdesktop
- gimp
- vlc
- mpv
- celluloid
- thunderbird
- kmail
- firefox
pavucontrol
# icons
polkit_gnome
@@ -101,11 +91,6 @@
lxappearance
adwaita-qt
adwaita-icon-theme
- xfce.thunar
- libreoffice
- qbittorrent
- zathura
- #
libcamera # pipewire seems to want this
easyeffects
tigervnc
@@ -114,14 +99,12 @@
kompare
meld
# tmp
- dosbox
# browser TTS
# speechd
# espeak-ng
# espeak-ng-data
- ghostty
- wineWowPackages.staging
wineWowPackages.waylandFull
+ libcamera # pipewire seems to want this
];
services.speechd.enable = true;
diff --git a/hosts/pkgs.nix b/hosts/pkgs.nix
index 4753c36..36584b7 100644
--- a/hosts/pkgs.nix
+++ b/hosts/pkgs.nix
@@ -67,7 +67,7 @@
# ai stuff!
# aider-chat
- inputs.yek.packages.x86_64-linux.default
+ # inputs.yek.packages.x86_64-linux.default
# python312Packages.google-generativeai
]
++ lib.optionals pkgs.stdenv.isLinux [