summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flake.lock188
-rw-r--r--flake.nix23
-rw-r--r--hosts/base.nix2
-rw-r--r--hosts/local/gui.nix5
-rw-r--r--hosts/local/keyboards/thinkpad-numpad.kbd102
-rw-r--r--hosts/local/keyboards/thinkpad-usb.kbd101
-rw-r--r--hosts/local/niri.nix49
-rw-r--r--hosts/local/p16/configuration.nix70
-rw-r--r--hosts/local/p16/default.nix13
-rw-r--r--hosts/local/p16/hardware-configuration.nix41
-rw-r--r--hosts/local/p16/home.nix61
-rw-r--r--hosts/local/p16/keyboard.nix42
-rw-r--r--hosts/local/p16/oldconf.nix107
-rw-r--r--hosts/local/p16/swayconfig290
-rw-r--r--hosts/local/p16/waybarconfig135
-rw-r--r--hosts/local/p16/waybarstyle.css103
-rw-r--r--hosts/local/sway.nix3
-rw-r--r--hosts/local/syncthing.nix54
-rw-r--r--hosts/nixos.nix1
-rw-r--r--hosts/pkgs.nix12
-rw-r--r--hosts/unfree.nix4
21 files changed, 1368 insertions, 38 deletions
diff --git a/flake.lock b/flake.lock
index 83253ea..e837868 100644
--- a/flake.lock
+++ b/flake.lock
@@ -86,6 +86,26 @@
"type": "github"
}
},
+ "dgop": {
+ "inputs": {
+ "nixpkgs": [
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1760238269,
+ "narHash": "sha256-7CeGZM/Z/5Qt3AYByCRohGYGR1MRuXYzTTbkV/JxyAs=",
+ "owner": "AvengeMedia",
+ "repo": "dgop",
+ "rev": "95acdfce2d323e28fa8f5a4f345160962034f2b5",
+ "type": "github"
+ },
+ "original": {
+ "owner": "AvengeMedia",
+ "repo": "dgop",
+ "type": "github"
+ }
+ },
"disko": {
"inputs": {
"nixpkgs": [
@@ -106,6 +126,27 @@
"type": "github"
}
},
+ "dms-cli": {
+ "inputs": {
+ "gomod2nix": "gomod2nix",
+ "nixpkgs": [
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1761107165,
+ "narHash": "sha256-mYC+2YQKjxAIiuO9PLAu27P4AFUoinEy1s4MSnU35+o=",
+ "owner": "AvengeMedia",
+ "repo": "danklinux",
+ "rev": "942f89c393ea63bbb7ce3bb86121f512129c847f",
+ "type": "github"
+ },
+ "original": {
+ "owner": "AvengeMedia",
+ "repo": "danklinux",
+ "type": "github"
+ }
+ },
"flake-compat": {
"flake": false,
"locked": {
@@ -410,7 +451,7 @@
]
},
"locked": {
- "lastModified": 1753566031,
+ "lastModified": 1761115047,
"narHash": "sha256-ypEepJDaIjQx2Ou813++x5c1Kt11DR8vAWITBlmlgKU=",
"path": "/home/y/nixconf/derivations/gemini",
"type": "path"
@@ -601,6 +642,29 @@
"type": "github"
}
},
+ "gomod2nix": {
+ "inputs": {
+ "flake-utils": "flake-utils",
+ "nixpkgs": [
+ "dms-cli",
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1756047880,
+ "narHash": "sha256-JeuGh9kA1SPL70fnvpLxkIkCWpTjtoPaus3jzvdna0k=",
+ "owner": "nix-community",
+ "repo": "gomod2nix",
+ "rev": "47d628dc3b506bd28632e47280c6b89d3496909d",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-community",
+ "ref": "v1.7.0",
+ "repo": "gomod2nix",
+ "type": "github"
+ }
+ },
"helix": {
"inputs": {
"nixpkgs": "nixpkgs_3",
@@ -737,6 +801,64 @@
"type": "github"
}
},
+ "niri": {
+ "inputs": {
+ "niri-stable": "niri-stable",
+ "niri-unstable": "niri-unstable",
+ "nixpkgs": [
+ "nixpkgs"
+ ],
+ "nixpkgs-stable": "nixpkgs-stable",
+ "xwayland-satellite-stable": "xwayland-satellite-stable",
+ "xwayland-satellite-unstable": "xwayland-satellite-unstable"
+ },
+ "locked": {
+ "lastModified": 1760950171,
+ "narHash": "sha256-E2ySTu/oK7cYBdAI3tlGP9zVjF4mZgWJ1OZInBCMb00=",
+ "owner": "sodiboo",
+ "repo": "niri-flake",
+ "rev": "f851a923137c0a54719412146fd63d24b3214e60",
+ "type": "github"
+ },
+ "original": {
+ "owner": "sodiboo",
+ "repo": "niri-flake",
+ "type": "github"
+ }
+ },
+ "niri-stable": {
+ "flake": false,
+ "locked": {
+ "lastModified": 1756556321,
+ "narHash": "sha256-RLD89dfjN0RVO86C/Mot0T7aduCygPGaYbog566F0Qo=",
+ "owner": "YaLTeR",
+ "repo": "niri",
+ "rev": "01be0e65f4eb91a9cd624ac0b76aaeab765c7294",
+ "type": "github"
+ },
+ "original": {
+ "owner": "YaLTeR",
+ "ref": "v25.08",
+ "repo": "niri",
+ "type": "github"
+ }
+ },
+ "niri-unstable": {
+ "flake": false,
+ "locked": {
+ "lastModified": 1760940149,
+ "narHash": "sha256-KbM47vD6E0cx+v4jYQZ8mD5N186AKm2CQlyh34TW58U=",
+ "owner": "YaLTeR",
+ "repo": "niri",
+ "rev": "b3245b81a6ed8edfaf5388a74d2e0a23c24941e5",
+ "type": "github"
+ },
+ "original": {
+ "owner": "YaLTeR",
+ "repo": "niri",
+ "type": "github"
+ }
+ },
"nix": {
"inputs": {
"flake-compat": [
@@ -1445,20 +1567,45 @@
"type": "github"
}
},
+ "quickshell": {
+ "inputs": {
+ "nixpkgs": [
+ "dankMaterialShell",
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1760228179,
+ "narHash": "sha256-4Z6k7lv3Zcgk3K+4h60LpqB9wCkR+utkYERU735U068=",
+ "ref": "refs/heads/master",
+ "rev": "c9d3ffb6043c5bf3f3009202bad7e0e5132c4a25",
+ "revCount": 693,
+ "type": "git",
+ "url": "https://git.outfoxxed.me/quickshell/quickshell"
+ },
+ "original": {
+ "type": "git",
+ "url": "https://git.outfoxxed.me/quickshell/quickshell"
+ }
+ },
"root": {
"inputs": {
"devenv": "devenv",
+ "dgop": "dgop",
"disko": "disko",
+ "dms-cli": "dms-cli",
"flake-parts": "flake-parts_2",
"flake-utils": "flake-utils",
"gemini-cli": "gemini-cli",
"git-hooks": "git-hooks_2",
"helix": "helix",
+ "home-manager": "home-manager",
"homix": "homix",
"impermanence": "impermanence",
"kmonad": "kmonad",
"lanzaboote": "lanzaboote",
"microvm": "microvm",
+ "niri": "niri",
"nix-darwin": "nix-darwin",
"nix-gaming": "nix-gaming",
"nixos-cn": "nixos-cn",
@@ -1470,7 +1617,7 @@
"nixpkgs": "nixpkgs_10",
"nixpkgs-darwin": "nixpkgs-darwin",
"nixpkgs-old": "nixpkgs-old",
- "nixpkgs-stable": "nixpkgs-stable",
+ "nixpkgs-stable": "nixpkgs-stable_2",
"nixpkgs-unfree": "nixpkgs-unfree",
"nixpkgs-wayland": "nixpkgs-wayland",
"nur": "nur",
@@ -1629,7 +1776,7 @@
]
},
"locked": {
- "lastModified": 1740186345,
+ "lastModified": 1761115047,
"narHash": "sha256-Qox5x+FI4OhCs/7T/v4hZlR9Rm7ZfpXP7ISy+OrHCyw=",
"path": "/home/y/nixconf/derivations/windsurf",
"type": "path"
@@ -1654,6 +1801,39 @@
"type": "github"
}
},
+ "xwayland-satellite-stable": {
+ "flake": false,
+ "locked": {
+ "lastModified": 1755491097,
+ "narHash": "sha256-m+9tUfsmBeF2Gn4HWa6vSITZ4Gz1eA1F5Kh62B0N4oE=",
+ "owner": "Supreeeme",
+ "repo": "xwayland-satellite",
+ "rev": "388d291e82ffbc73be18169d39470f340707edaa",
+ "type": "github"
+ },
+ "original": {
+ "owner": "Supreeeme",
+ "ref": "v0.7",
+ "repo": "xwayland-satellite",
+ "type": "github"
+ }
+ },
+ "xwayland-satellite-unstable": {
+ "flake": false,
+ "locked": {
+ "lastModified": 1759707084,
+ "narHash": "sha256-0pkftKs6/LReNvxw7DVTN2AJEheZVgyeK0Aarbagi70=",
+ "owner": "Supreeeme",
+ "repo": "xwayland-satellite",
+ "rev": "a9188e70bd748118b4d56a529871b9de5adb9988",
+ "type": "github"
+ },
+ "original": {
+ "owner": "Supreeeme",
+ "repo": "xwayland-satellite",
+ "type": "github"
+ }
+ },
"yek": {
"inputs": {
"nixpkgs": [
@@ -1661,7 +1841,7 @@
]
},
"locked": {
- "lastModified": 1740469068,
+ "lastModified": 1761115047,
"narHash": "sha256-uoitiN9zrv9QaGf8mKIXhRxXtsNi6MupZVK+Zy3jOoA=",
"path": "/home/y/nixconf/derivations/yek",
"type": "path"
diff --git a/flake.nix b/flake.nix
index 85a7535..1a1a8bd 100644
--- a/flake.nix
+++ b/flake.nix
@@ -12,7 +12,10 @@
inputs.nixpkgs.follows = "nixpkgs";
};
flake-utils.url = "github:numtide/flake-utils";
-
+ home-manager = {
+ url = "github:nix-community/home-manager";
+ inputs.nixpkgs.follows = "nixpkgs";
+ };
nixos-wsl.url = "github:nix-community/NixOS-WSL/main";
nixos-hardware.url = "github:nixos/nixos-hardware/master";
#secure book
@@ -28,6 +31,24 @@
inputs.nixpkgs.follows = "nixpkgs";
};
+ niri = {
+ url = "github:sodiboo/niri-flake";
+ inputs.nixpkgs.follows = "nixpkgs";
+ };
+ dgop = {
+ url = "github:AvengeMedia/dgop";
+ inputs.nixpkgs.follows = "nixpkgs";
+ };
+ dms-cli = {
+ url = "github:AvengeMedia/danklinux";
+ inputs.nixpkgs.follows = "nixpkgs";
+ };
+ dankMaterialShell = {
+ url = "github:AvengeMedia/DankMaterialShell";
+ inputs.nixpkgs.follows = "nixpkgs";
+ inputs.dgop.follows = "dgop";
+ inputs.dms-cli.follows = "dms-cli";
+ };
# claude-desktop = {
# url = "git:file:/home/y/code/nix/claude-desktop-linux-flake";
# inputs.nixpkgs.follows = "nixpkgs";
diff --git a/hosts/base.nix b/hosts/base.nix
index 054a967..0f574ea 100644
--- a/hosts/base.nix
+++ b/hosts/base.nix
@@ -28,12 +28,14 @@
"https://polwex.cachix.org"
"https://nix-community.cachix.org"
"https://nix-gaming.cachix.org"
+ "https://nixpkgs-wayland.cachix.org"
];
trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"polwex.cachix.org-1:6Qk8lW0wZ9omwmURpPQUEDUHAb6Nsb+f+pdH2hppBZY="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="
+ "nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA="
];
keep-outputs = true;
diff --git a/hosts/local/gui.nix b/hosts/local/gui.nix
index 7f023d4..1532013 100644
--- a/hosts/local/gui.nix
+++ b/hosts/local/gui.nix
@@ -18,8 +18,6 @@
ffmpeg-full
nv-codec-headers
#
- obsidian
- #
smplayer
#browsers
brave
@@ -55,6 +53,9 @@
# xdg whatever bs
glib # gio
desktop-file-utils
+ #
+ xorg.xhost
+ gparted
];
i18n.inputMethod = {
diff --git a/hosts/local/keyboards/thinkpad-numpad.kbd b/hosts/local/keyboards/thinkpad-numpad.kbd
new file mode 100644
index 0000000..ed4bf8b
--- /dev/null
+++ b/hosts/local/keyboards/thinkpad-numpad.kbd
@@ -0,0 +1,102 @@
+;; 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_ThinkPad_Compact_USB_Keyboard_with_TrackPoint-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 home end insert del f13 f14 f15 f16
+ ` 1 2 3 4 5 6 7 8 9 0 - = bspc nlck kp/ kp* kp-
+ tab q w e r t y u i o p [ ] \ kp7 kp8 kp9 kp+
+ caps a s d f g h j k l ; ' ret kp4 kp5 kp6
+ lsft z x c v b n m , . / rsft kp1 kp2 kp3 kprt
+ lctl lmet lalt spc ralt ssrq rctl pgup up pgdn kp0 kp.
+ left down rght
+);; 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
+ esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 home end insert del = \( \) bspc
+ ` 1 2 3 4 5 6 7 8 9 0 - = bspc nlck kp/ kp* kp-
+ tab q w e r t y u i o p [ ] \ kp7 kp8 kp9 kp+
+ esc a s d f g h j k l ; ' ret kp4 kp5 kp6
+ @sym z x c v b n m , . / rsft kp1 kp2 kp3 kprt
+ lctl lmet lalt spc @cords ssrq @hrt pgup up pgdn kp0 kp.
+ left down rght
+)
+(deflayer homerowmods
+ esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 home end insert del = \( \) bspc
+ ` 1 2 3 4 5 6 7 8 9 0 - = bspc nlck kp/ kp* kp-
+ tab q w e r t y u i o p [ ] \ kp7 kp8 kp9 kp+
+ esc @a @s @d @f g h @j @k @l @semi ' ret kp4 kp5 kp6
+ @sym z x c v b n m , . / rsft kp1 kp2 kp3 kprt
+ caps lmet @sym spc lalt ssrq @back pgup up pgdn kp0 kp.
+ left down rght
+)
+(deflayer mods
+ esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 home end insert del = \( \) bspc
+ ` 1 2 3 4 5 6 7 8 9 0 - = bspc nlck kp/ kp* kp-
+ tab q w e r t y u i o p [ ] \ kp7 kp8 kp9 kp+
+ esc lctl lalt lmet lsft g h rsft rmet ralt rctl ' ret kp4 kp5 kp6
+ @sym z x c v b n m , . / rsft kp1 kp2 kp3 kprt
+ caps lmet @sym spc lalt ssrq @back pgup up pgdn kp0 kp.
+ left down rght
+)
+;; A layer dedicated to symbols
+(deflayer syms
+ esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 home end insert del = \( \) bspc
+ ` 1 2 3 4 5 6 7 8 9 0 - = bspc nlck kp/ kp* kp-
+ tab q up e r t ! @ # $ % [ ] \ kp7 kp8 kp9 kp+
+ esc left down right @sym2 g ' ^ & - = ' ret kp4 kp5 kp6
+ @sym z x c v b \( [ { < \ rsft kp1 kp2 kp3 kprt
+ caps lmet @sym spc lalt ssrq @back pgup up pgdn kp0 kp.
+ left down rght
+)
+(deflayer syms2
+ esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 home end insert del = \( \) bspc
+ ` 1 2 3 4 5 6 7 8 9 0 - = bspc nlck kp/ kp* kp-
+ tab q up e r t ! @ # $ % [ ] \ kp7 kp8 kp9 kp+
+ esc left down right @sym2 g ` ~ * \_ + ' ret kp4 kp5 kp6
+ @sym z x c v b \) ] } > | rsft kp1 kp2 kp3 kprt
+ caps lmet @sym spc lalt ssrq @back pgup up pgdn kp0 kp.
+ left down rght
+)
diff --git a/hosts/local/keyboards/thinkpad-usb.kbd b/hosts/local/keyboards/thinkpad-usb.kbd
new file mode 100644
index 0000000..7fb53d2
--- /dev/null
+++ b/hosts/local/keyboards/thinkpad-usb.kbd
@@ -0,0 +1,101 @@
+;; 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_ThinkPad_Compact_USB_Keyboard_with_TrackPoint-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 up
+ lctl lmet lalt spc ralt rctl 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 up
+ lctl lmet @sym spc @cords @hrt 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 up
+ lctl lmet @sym spc lalt @back 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 up
+ lctl lmet @sym spc lalt @back 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/niri.nix b/hosts/local/niri.nix
index 7db141e..be92df0 100644
--- a/hosts/local/niri.nix
+++ b/hosts/local/niri.nix
@@ -3,6 +3,9 @@
pkgs,
...
}: {
+ # nixpkgs.overlays = [
+ # inputs.nixpkgs-wayland.overlay
+ # ];
nixpkgs.config.packageOVerrides = pkgs: {
intel-vaapi-driver = pkgs.intel-vaapi-driver.override {enableHybridCodec = true;};
vaapiIntel = pkgs.vaapiIntel.override {enableHybridCodec = true;};
@@ -64,23 +67,28 @@
};
};
environment.systemPackages = with pkgs; [
- quickshell
- cosmic-panel
+ # niri specific
+ # xwayland
+ xwayland-satellite
+ # not used if using dank
+ # quickshell
fuzzel
+ # hypridle
+ # hyprlock
+ # cliphist
#
- cliphist
- hypridle
- hyprlock
- networkmanagerapplet
- playerctl
- qalculate-gtk
- swaynotificationcenter
- swayosd
- syncthingtray
- wl-clipboard
- wl-clip-persist
- wl-color-picker
- wofi-power-menu
+ # networkmanagerapplet
+ # playerctl
+ # qalculate-gtk
+ # swaynotificationcenter
+ # swayosd
+ # syncthingtray
+ # wl-clipboard
+ # wl-clip-persist
+ # wl-color-picker
+ # wofi-power-menu
+ #
+ # cosmic-panel
# xdg-utils
# xdg-desktop-portal
@@ -118,8 +126,8 @@
# gtk_engines
# gsettings-desktop-schemas
# lxappearance
- # adwaita-qt
- # adwaita-icon-theme
+ adwaita-qt
+ adwaita-icon-theme
# libcamera # pipewire seems to want this
# easyeffects
# tigervnc
@@ -132,9 +140,9 @@
# # speechd
# # espeak-ng
# # espeak-ng-data
- # wineWowPackages.waylandFull
- # libcamera # pipewire seems to want this
- # tracy # cool system watcher
+ wineWowPackages.waylandFull
+ libcamera # pipewire seems to want this
+ # tracy # colinuxol system watcher
];
services.speechd.enable = true;
@@ -152,6 +160,7 @@
fcitx5-configtool
fcitx5-chinese-addons
fcitx5-gtk
+ libsForQt5.fcitx5-qt
];
waylandFrontend = true;
};
diff --git a/hosts/local/p16/configuration.nix b/hosts/local/p16/configuration.nix
new file mode 100644
index 0000000..47d7aaa
--- /dev/null
+++ b/hosts/local/p16/configuration.nix
@@ -0,0 +1,70 @@
+# Edit this configuration file to define what should be installed on
+# your system. Help is available in the configuration.nix(5) man page
+# and in the NixOS manual (accessible by running ‘nixos-help’).
+{
+ inputs,
+ pkgs,
+ ...
+}: {
+ imports = [
+ # Include the results of the hardware scan.
+ ../../base.nix
+ ../../linux.nix
+ # ../../syncthing.nix
+ ../../unfree.nix
+ ../niri.nix
+ ../gui.nix
+ ./keyboard.nix
+ ../syncthing.nix
+ # ../android.nix
+ ];
+
+ # Use the systemd-boot EFI boot loader.
+ boot.loader.systemd-boot.enable = true;
+ boot.loader.efi.canTouchEfiVariables = true;
+ # boot.supportedFilesystems = ["ntfs"];
+ # boot.kernelPackages = lib.mkForce unfreePkgs.linuxKernel.packages.linux_xanmod_latest;
+ boot.kernelPackages = pkgs.linuxPackages_latest;
+
+ networking = {
+ hostName = "p16"; # Define your hostname.
+ # firewall = {
+ # allowedTCPPorts = [80 443];
+ # allowedUDPPortRanges = [
+ # {
+ # from = 4000;
+ # to = 4007;
+ # }
+ # {
+ # from = 8000;
+ # to = 8010;
+ # }
+ # ];
+ # };
+ };
+ nix.settings.trusted-users = ["root" "y"];
+
+ # Set your time zone.
+ time.timeZone = "Asia/Bangkok";
+ # time.timeZone = "Europe/Madrid";
+
+ services.fwupd.enable = true;
+ # environment.systemPackages = [pkgs.linuxKernel.packages.linux_6_17.tp_smapi];
+ services.fprintd.enable = true;
+
+ services.openssh.enable = true;
+ services.openssh.ports = [5555];
+
+ services.tailscale = {
+ enable = true;
+ useRoutingFeatures = "client";
+ };
+ # 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 = "25.05"; # Did you read the comment?
+}
diff --git a/hosts/local/p16/default.nix b/hosts/local/p16/default.nix
new file mode 100644
index 0000000..2ce8fd6
--- /dev/null
+++ b/hosts/local/p16/default.nix
@@ -0,0 +1,13 @@
+inputs: [
+ inputs.kmonad.nixosModules.default
+ inputs.nixos-hardware.nixosModules.lenovo-thinkpad-p16s-amd-gen4
+ ./hardware-configuration.nix
+ ./configuration.nix
+ inputs.home-manager.nixosModules.home-manager
+ {
+ home-manager.useGlobalPkgs = true;
+ home-manager.useUserPackages = true;
+ home-manager.extraSpecialArgs = {inputs = inputs;};
+ home-manager.users.y = ./home.nix;
+ }
+]
diff --git a/hosts/local/p16/hardware-configuration.nix b/hosts/local/p16/hardware-configuration.nix
new file mode 100644
index 0000000..a585bb9
--- /dev/null
+++ b/hosts/local/p16/hardware-configuration.nix
@@ -0,0 +1,41 @@
+# 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 = [ "nvme" "xhci_pci" "thunderbolt" "uas" "sd_mod" ];
+ boot.initrd.kernelModules = [ ];
+ boot.kernelModules = [ "kvm-amd" ];
+ boot.extraModulePackages = [ ];
+
+ fileSystems."/" =
+ { device = "/dev/disk/by-uuid/707586ec-e92a-4cc4-ac53-19630f27f09c";
+ fsType = "ext4";
+ };
+
+ fileSystems."/boot" =
+ { device = "/dev/disk/by-uuid/89FB-484A";
+ fsType = "vfat";
+ options = [ "fmask=0077" "dmask=0077" ];
+ };
+
+ swapDevices =
+ [ { device = "/dev/disk/by-uuid/0a0a5bc3-df1d-4b0f-aaea-04be51d102b0"; }
+ ];
+
+ # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
+ # (the default) this is the recommended approach. When using systemd-networkd it's
+ # still possible to use this option, but it's recommended to use it in conjunction
+ # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
+ networking.useDHCP = lib.mkDefault true;
+ # networking.interfaces.enp195s0f0.useDHCP = lib.mkDefault true;
+ # networking.interfaces.wlp194s0.useDHCP = lib.mkDefault true;
+
+ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
+ hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
+}
diff --git a/hosts/local/p16/home.nix b/hosts/local/p16/home.nix
new file mode 100644
index 0000000..99be68a
--- /dev/null
+++ b/hosts/local/p16/home.nix
@@ -0,0 +1,61 @@
+{
+ inputs,
+ config,
+ pkgs,
+ lib,
+ ...
+}: {
+ imports = [
+ inputs.niri.homeModules.niri
+ inputs.dankMaterialShell.homeModules.dankMaterialShell.default
+ inputs.dankMaterialShell.homeModules.dankMaterialShell.niri
+ ];
+ # Home Manager needs a bit of information about you and the
+ # paths it should manage.
+ home.username = "y";
+ home.homeDirectory = "/home/y";
+ # xdg = {
+ # enable = true;
+ # autostart.enable = true;
+ # userDirs = {
+ # enable = true;
+ # createDirectories = true;
+ # };
+ # portal = {
+ # enable = true;
+ # };
+ # };
+
+ programs.dankMaterialShell = {
+ enable = true;
+
+ enableClipboard = true;
+ enableSystemd = true;
+ enableSystemMonitoring = true;
+ enableVPN = true;
+ enableBrightnessControl = true;
+ # enableNightMode = true;
+ enableAudioWavelength = true;
+ enableCalendarEvents = true;
+ enableDynamicTheming = true;
+ };
+
+ # gtk.theme.package = pkgs.colloid-gtk-theme;
+ # gtk.theme.name = "Colloid";
+ # gtk.iconTheme = {
+ # package = lib.mkForce pkgs.colloid-icon-theme;
+ # name = lib.mkForce "Colloid";
+ # };
+ # This value determines the Home Manager release that your
+ # configuration is compatible with. This helps avoid breakage
+ # when a new Home Manager release introduces backwards
+ # incompatible changes.
+ #
+ # You can update Home Manager without changing this value. See
+ # the Home Manager release notes for a list of state version
+ # changes in each release.
+ home.stateVersion = "25.05";
+
+ # Let Home Manager install and manage itself.
+ programs.home-manager.enable = true;
+}
diff --git a/hosts/local/p16/keyboard.nix b/hosts/local/p16/keyboard.nix
new file mode 100644
index 0000000..f6cfa8c
--- /dev/null
+++ b/hosts/local/p16/keyboard.nix
@@ -0,0 +1,42 @@
+{_pkgs, ...}: {
+ services.logind.settings.Login = {
+ # don’t shutdown when power button is short-pressed
+ HandlePowerKey = "ignore";
+ };
+
+ # config file keeps getting rewritten but I don't know by who
+ # i18n.inputMethod = {
+ # enable = true;
+ # type = "fcitx5";
+ # fcitx5.addons = with pkgs; [
+ # fcitx5-mozc
+ # # mozc-ut is better, wat do
+ # fcitx5-gtk
+ # libsForQt5.fcitx5-qt
+ # fcitx5-lua
+ # fcitx5-configtool
+ # fcitx5-rime
+ # ];
+ # };
+ environment.variables = {
+ QT_IM_MODULE = "fcitx";
+ XMODIFIERS = "@im=fcitx";
+ FCITX_SOCKET = "default";
+ };
+
+ #kmonad
+ services.kmonad = {
+ enable = true;
+ keyboards = {
+ myKmonadOutput = {
+ device = "/dev/input/by-path/platform-i8042-serio-0-event-kbd";
+ config = builtins.readFile ../keyboards/thinkpad-numpad.kbd;
+ };
+ usbThinkpad = {
+ # device = "/dev/input/by-id/usb-Lenovo_ThinkPad_Compact_USB_Keyboard_with_TrackPoint-event-kbd";
+ device = "/dev/input/by-id/usb-Lenovo_TrackPoint_Keyboard_II-event-kbd";
+ config = builtins.readFile ../keyboards/thinkpad-usb.kbd;
+ };
+ };
+ };
+}
diff --git a/hosts/local/p16/oldconf.nix b/hosts/local/p16/oldconf.nix
new file mode 100644
index 0000000..c7b0465
--- /dev/null
+++ b/hosts/local/p16/oldconf.nix
@@ -0,0 +1,107 @@
+# Edit this configuration file to define what should be installed on
+# your system. Help is available in the configuration.nix(5) man page
+# and in the NixOS manual (accessible by running ‘nixos-help’).
+
+{ config, pkgs, ... }:
+
+{
+ imports =
+ [ # Include the results of the hardware scan.
+ ./hardware-configuration.nix
+ ];
+
+ # Bootloader.
+ boot.loader.systemd-boot.enable = true;
+ boot.loader.efi.canTouchEfiVariables = true;
+
+ # Use latest kernel.
+ boot.kernelPackages = pkgs.linuxPackages_latest;
+
+ networking.hostName = "nixos"; # Define your hostname.
+ # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
+
+ # Configure network proxy if necessary
+ # networking.proxy.default = "http://user:password@proxy:port/";
+ # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
+
+ # Enable networking
+ networking.networkmanager.enable = true;
+
+ # Set your time zone.
+ time.timeZone = "Asia/Bangkok";
+
+ # Select internationalisation properties.
+ i18n.defaultLocale = "en_US.UTF-8";
+
+ i18n.extraLocaleSettings = {
+ LC_ADDRESS = "en_GB.UTF-8";
+ LC_IDENTIFICATION = "en_GB.UTF-8";
+ LC_MEASUREMENT = "en_GB.UTF-8";
+ LC_MONETARY = "en_GB.UTF-8";
+ LC_NAME = "en_GB.UTF-8";
+ LC_NUMERIC = "en_GB.UTF-8";
+ LC_PAPER = "en_GB.UTF-8";
+ LC_TELEPHONE = "en_GB.UTF-8";
+ LC_TIME = "en_GB.UTF-8";
+ };
+
+ # Configure keymap in X11
+ services.xserver.xkb = {
+ layout = "us";
+ variant = "";
+ };
+
+ # Define a user account. Don't forget to set a password with ‘passwd’.
+ users.users.y = {
+ isNormalUser = true;
+ description = "y";
+ extraGroups = [ "networkmanager" "wheel" ];
+ packages = with pkgs; [];
+ };
+
+ # Enable automatic login for the user.
+ services.getty.autologinUser = "y";
+services.openssh.enable = true;
+
+nix.extraOptions = ''
+ experimental-features = nix-command flakes
+ '';
+
+ # List packages installed in system profile. To search, run:
+ # $ nix search wget
+ environment.systemPackages = with pkgs; [
+ # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
+ # wget
+ git
+ helix
+ wget
+ ];
+
+ # Some programs need SUID wrappers, can be configured further or are
+ # started in user sessions.
+ # programs.mtr.enable = true;
+ # programs.gnupg.agent = {
+ # enable = true;
+ # enableSSHSupport = true;
+ # };
+
+ # List services that you want to enable:
+
+ # Enable the OpenSSH daemon.
+ # services.openssh.enable = true;
+
+ # Open ports in the firewall.
+ # networking.firewall.allowedTCPPorts = [ ... ];
+ # networking.firewall.allowedUDPPorts = [ ... ];
+ # Or disable the firewall altogether.
+ # networking.firewall.enable = false;
+
+ # 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 = "25.05"; # Did you read the comment?
+
+}
diff --git a/hosts/local/p16/swayconfig b/hosts/local/p16/swayconfig
new file mode 100644
index 0000000..09745dc
--- /dev/null
+++ b/hosts/local/p16/swayconfig
@@ -0,0 +1,290 @@
+# Default config for sway
+#
+# Copy this to ~/.config/sway/config and edit it to your liking.
+#
+# Read `man 5 sway` for a complete reference.
+
+### Variables
+#
+# Logo key. Use Mod1 for Alt.
+set $mod Mod4
+# Home row direction keys, like vim
+set $left h
+set $down j
+set $up k
+set $right l
+# Your preferred terminal emulator
+set $term alacritty
+# Your preferred application launcher
+# Note: pass the final command to swaymsg so that the resulting window can be opened
+# on the original workspace that the command was run on.
+##y set $menu dmenu_path | dmenu | xargs swaymsg exec --
+set $menu wofi -S run -G -Q
+### Output configuration
+#
+# Default wallpaper (more resolutions are available in /run/current-system/sw/share/backgrounds/sway/)
+set $wallpapers_path $HOME/wallpapers/4k
+output * bg `find $wallpapers_path -type f | shuf -n 1` fill
+# output * bg /run/current-system/sw/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
+#
+# Example configuration:
+#
+# output HDMI-A-1 resolution 3840 × 2160 position 1920,0
+#
+# You can get the names of your outputs by running: swaymsg -t get_outputs
+
+### Idle configuration
+#
+# Example configuration:
+#
+ exec swayidle -w \
+ timeout 3000 'swaylock -f -c 000000' \
+ timeout 6000 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
+ before-sleep 'swaylock -f -c 000000'
+#
+#
+# start IME
+exec fcitx5
+# This will lock your screen after 300 seconds of inactivity, then turn off
+# your displays after another 300 seconds, and turn your screens back on when
+# resumed. It will also lock your screen before your computer goes to sleep.
+
+### Input configuration
+#
+# Example configuration:
+#
+# input "2:14:SynPS/2_Synaptics_TouchPad" {
+# dwt enabled
+# tap enabled
+# natural_scroll enabled
+# middle_emulation enabled
+# }
+#
+# You can get the names of your inputs by running: swaymsg -t get_inputs
+# Read `man 5 sway-input` for more information about this section.
+input * xkb_numlock enabled
+### Key bindings
+#
+# Basics:
+#
+ # Start a terminal
+ bindsym $mod+Return exec $term
+
+ # Kill focused window
+ bindsym $mod+Shift+q kill
+
+ # Start your launcher
+ bindsym $mod+d exec $menu
+
+ # Drag floating windows by holding down $mod and left mouse button.
+ # Resize them with right mouse button + $mod.
+ # Despite the name, also works for non-floating windows.
+ # Change normal to inverse to use left mouse button for resizing and right
+ # mouse button for dragging.
+ floating_modifier $mod normal
+
+ # Reload the configuration file
+ bindsym $mod+Shift+c reload
+
+ # Exit sway (logs you out of your Wayland session)
+ bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
+#
+# Moving around:
+#
+ # Move your focus around
+ bindsym $mod+$left focus left
+ bindsym $mod+$down focus down
+ bindsym $mod+$up focus up
+ bindsym $mod+$right focus right
+ # Or use $mod+[up|down|left|right]
+ bindsym $mod+Left focus left
+ bindsym $mod+Down focus down
+ bindsym $mod+Up focus up
+ bindsym $mod+Right focus right
+
+ # Move the focused window with the same, but add Shift
+ bindsym $mod+Shift+$left move left
+ bindsym $mod+Shift+$down move down
+ bindsym $mod+Shift+$up move up
+ bindsym $mod+Shift+$right move right
+ bindsym $mod+Shift+Left move left
+ bindsym $mod+Shift+Down move down
+ bindsym $mod+Shift+Up move up
+ bindsym $mod+Shift+Right move right
+
+
+ # Workspaces:
+#
+ # Switch to workspace
+ bindsym $mod+n workspace prev
+ bindsym $mod+m workspace next
+ bindsym $mod+Shift+n move container to workspace prev
+ bindsym $mod+Shift+m move container to workspace next
+ #move workspace to current output
+ set $cycle node ~/dotfiles/shell/swaycycle.mjs
+ bindsym $mod+comma exec $cycle
+ bindsym $mod+Shift+comma move workspace to output down
+#
+ bindsym $mod+1 workspace number 1
+ bindsym $mod+2 workspace number 2
+ bindsym $mod+3 workspace number 3
+ bindsym $mod+4 workspace number 4
+ bindsym $mod+5 workspace number 5
+ bindsym $mod+6 workspace number 6
+ bindsym $mod+7 workspace number 7
+ bindsym $mod+8 workspace number 8
+ bindsym $mod+9 workspace number 9
+ bindsym $mod+0 workspace number 10
+ # Move focused container to workspace
+ bindsym $mod+Shift+1 move container to workspace number 1
+ bindsym $mod+Shift+2 move container to workspace number 2
+ bindsym $mod+Shift+3 move container to workspace number 3
+ bindsym $mod+Shift+4 move container to workspace number 4
+ bindsym $mod+Shift+5 move container to workspace number 5
+ bindsym $mod+Shift+6 move container to workspace number 6
+ bindsym $mod+Shift+7 move container to workspace number 7
+ bindsym $mod+Shift+8 move container to workspace number 8
+ bindsym $mod+Shift+9 move container to workspace number 9
+ bindsym $mod+Shift+0 move container to workspace number 10
+ # Note: workspaces can have any name you want, not just numbers.
+ # We just use 1-10 as the default.
+#
+# Layout stuff:
+#
+ # You can "split" the current object of your focus with
+ # $mod+b or $mod+v, for horizontal and vertical splits
+ # respectively.
+ bindsym $mod+b splith
+ bindsym $mod+v splitv
+
+ # Switch the current container between different layout styles
+ bindsym $mod+s layout stacking
+ bindsym $mod+w layout tabbed
+ bindsym $mod+e layout toggle split
+
+ # Make the current focus fullscreen
+ bindsym $mod+f fullscreen
+
+ # Toggle the current focus between tiling and floating mode
+ bindsym $mod+Shift+space floating toggle
+
+ # Swap focus between the tiling area and the floating area
+ bindsym $mod+space focus mode_toggle
+
+ # Move focus to the parent container
+ bindsym $mod+a focus parent
+#
+# Scratchpad:
+#
+ # Sway has a "scratchpad", which is a bag of holding for windows.
+ # You can send windows there and get them back later.
+
+ # Move the currently focused window to the scratchpad
+ bindsym $mod+Shift+minus move scratchpad
+
+ # Show the next scratchpad window or hide the focused scratchpad window.
+ # If there are multiple scratchpad windows, this command cycles through them.
+ bindsym $mod+minus scratchpad show
+#
+# Resizing containers:
+#
+mode "resize" {
+ # left will shrink the containers width
+ # right will grow the containers width
+ # up will shrink the containers height
+ # down will grow the containers height
+ bindsym $left resize shrink width 10px
+ bindsym $down resize grow height 10px
+ bindsym $up resize shrink height 10px
+ bindsym $right resize grow width 10px
+
+ # Ditto, with arrow keys
+ bindsym Left resize shrink width 10px
+ bindsym Down resize grow height 10px
+ bindsym Up resize shrink height 10px
+ bindsym Right resize grow width 10px
+
+ # Return to default mode
+ bindsym Return mode "default"
+ bindsym Escape mode "default"
+}
+bindsym $mod+r mode "resize"
+
+## function keys
+bindsym XF86AudioMute exec pactl set-sink-mute 0 toggle
+bindsym XF86AudioLowerVolume exec pactl set-sink-volume 0 -5%
+bindsym XF86AudioRaiseVolume exec pactl set-sink-volume 0 +5%
+bindsym XF86AudioPrev exec playerctl previous
+bindsym XF86AudioPlay exec playerctl play-pause
+bindsym XF86AudioNext exec playerctl next
+bindsym XF86MonBrightnessDown exec brigthnessctl -c backlight set 5%-
+bindsym XF86MonBrightnessUp exec brightnessctl -c backlight set +5%
+# bindsym Super_L exec
+# bindsym XF86RFKill exec
+# bindsym Print exec $smallshot
+# bindsym XF86AudioMedia exec
+
+
+#
+# Status Bar:
+#
+# Read `man 5 sway-bar` for more information about this section.
+#bar {
+# position top
+
+ # When the status_command prints a new line to stdout, swaybar updates.
+ # The default just shows the current date and time.
+# status_command while date +'%Y-%m-%d %I:%M:%S %p'; do sleep 1; done
+
+ # colors {
+ # statusline #ffffff
+ # background #323232
+ # inactive_workspace #32323200 #32323200 #5c5c5c
+ # }
+#}
+bar {
+ swaybar_command waybar
+}
+input type:touchpad {
+ click_method clickfinger
+ tap enabled
+ dwt enabled
+ pointer_accel 0.3
+ accel_profile adaptive
+}
+
+
+# Screenshosts
+set $screenshot grim -o $(swaymsg -t get_outputs | jq -r '.[] | select(.focused) | .name') ~/Screenshots/scrn-$(date +"%Y-%m-%d-%H-%M-%S").png
+bindsym $mod+p exec $screenshot
+set $smallshot grim -t jpeg -g "$(slurp)" ~/Screenshots/$(date +%Y-%m-%d_%H-%m-%s).jpg
+bindsym $mod+Alt+p exec $smallshot
+set $smallcopy grim -g "$(slurp)" -t png - | wl-copy -t image/png
+bindsym $mod+Shift+p exec $smallcopy
+# bindsym $mod+Shift+p exec grim -t jpeg -g "$(slurp)" ~/Screenshots/$(date +%Y-%m-%d_%H-%m-%s).jpg
+
+# Res scaling
+output eDP-1 scale 1.7
+# monitor layout
+output DP-3 transform 270
+# position depends on scaled resolution! if you changed the scale be careful
+# output DP-3 pos 0 0
+#output eDP-1 pos 0 1920
+#output DP-3 resolution 3440x1400 pos 1080 300 scale 1.2
+# thanks claude
+
+# Titlebars
+#
+# default_border none
+# default_floating_border none
+font pango:monospace 0.001
+#titlebar_padding 1
+#titlebar_border_thickness 0
+# hide_edge_borders smart
+
+# mouse cursors
+seat * xcursor_theme hicolor 48
+# this stops screen sharing from working wtf
+# output * render_bit_depth 10
+include /etc/sway/config.d/*
+
diff --git a/hosts/local/p16/waybarconfig b/hosts/local/p16/waybarconfig
new file mode 100644
index 0000000..20cea00
--- /dev/null
+++ b/hosts/local/p16/waybarconfig
@@ -0,0 +1,135 @@
+{
+ // "layer": "top", // Waybar at top layer
+ "position": "bottom", // Waybar position (top|bottom|left|right)
+ // "output": "DP-1",
+ "height": 30, // Waybar height (to be removed for auto height)
+ // "width": 1280, // Waybar width
+ "spacing": 4, // Gaps between modules (4px)
+ // Choose the order of the modules
+ "modules-left": ["sway/mode", "sway/window"],
+ "modules-center": ["sway/workspaces"],
+ "modules-right": ["pulseaudio", "network", "bluetooth", "idle_inhibitor", "cpu", "backlight", "battery", "clock", "tray"],
+ // Modules configuration
+ "sway/workspaces": {
+ "disable-scroll": true,
+ "all-outputs": true,
+ "format": "{name}: {icon}",
+ "format-icons": {
+ "1": "",
+ "2": "",
+ "3": "",
+ "4": "",
+ "5": "",
+ "urgent": "",
+ "focused": "",
+ "default": ""
+ }
+ },
+ // "keyboard-state": {
+ // "numlock": true,
+ // "capslock": true,
+ // "format": " {icon} {name}",
+ // "format-icons": {
+ // "locked": "",
+ // "unlocked": ""
+ // }
+ // },
+ "sway/mode": {
+ "format": "<span style=\"italic\">{}</span>"
+ },
+ "tray": {
+ // "icon-size": 21,
+ "spacing": 10
+ },
+ "idle_inhibitor": {
+ "format": "{icon}",
+ "format-icons": {
+ "activated": "",
+ "deactivated": ""
+ }
+ },
+ "clock": {
+ "timezone": "Asia/Bangkok",
+ "tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
+ "format-alt": "{:%Y-%m-%d}"
+ },
+ "cpu": {
+ "format": "",
+ },
+ "memory": {
+ "format": ""
+ },
+ "temperature": {
+ // "thermal-zone": 2,
+ // "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input",
+ "critical-threshold": 80,
+ // "format-critical": "{temperatureC}°C {icon}",
+ "format": "{icon}",
+ "format-icons": ["", "", ""]
+ },
+ "backlight": {
+ "format": "{icon}",
+ "format-icons": ["", "", "", "", "", "", "", "", ""],
+ "on-scroll-up": "brightnessctl -c backlight set +1%",
+ "on-scroll-down": "brightnessctl -c backlight set 1%-"
+ },
+ "battery": {
+ "states": {
+ "good": 95,
+ "warning": 15,
+ "critical": 7
+ },
+ "format": "{icon} {capacity}%",
+ // "format-charging": " {capacity}%",
+ "format-charging": " {capacity}%",
+ "format-plugged": "",
+ "format-alt": "{icon} {time}",
+ // "format-good": "", // An empty format will hide the module
+ // "format-full": "",
+ "format-icons": ["", "", "", "", ""]
+ },
+ "network": {
+ // "interface": "wlp2*", // (Optional) To force the use of this interface
+ "format-wifi": "",
+ "format-ethernet": "",
+ "tooltip-format": "{ifname} via {gwaddr} ",
+ "format-linked": "{ifname} (No IP) ",
+ "format-disconnected": "⚠",
+ "format-alt": "{ifname}: {ipaddr}/{cidr}"
+ },
+ "pulseaudio": {
+ // "scroll-step": 1, // %, can be a float
+ "format": "{icon}",
+ "format-bluetooth": "{icon} {volume}% {format_source}",
+ "format-bluetooth-muted": " {icon} {format_source}",
+ "format-muted": " {format_source}",
+ "format-source": "",
+ "format-source-muted": "",
+ // "format-source-muted": "",
+ "format-icons": {
+ "headphone": "",
+ "hands-free": "",
+ "headset": "",
+ "phone": "",
+ "portable": "",
+ "car": "",
+ "default": ["", "", ""]
+ },
+ "on-click": "pavucontrol"
+ },
+ "custom/fcitx5": {
+ "format": "{}",
+ "return-type": "json",
+ "exec": "~/dotfiles/waybar/fcitx5-status.sh",
+ "interval": 1
+ },
+ "bluetooth": {
+ "format": "{icon}",
+ "format-icons": {
+ "enabled": "",
+ "disabled": ""
+ },
+ "tooltip-format": "{}",
+ "on-click": "blueman-manager"
+ }
+}
diff --git a/hosts/local/p16/waybarstyle.css b/hosts/local/p16/waybarstyle.css
new file mode 100644
index 0000000..97e65e2
--- /dev/null
+++ b/hosts/local/p16/waybarstyle.css
@@ -0,0 +1,103 @@
+* {
+ border: none;
+ border-radius: 0;
+ font-family: "Ubuntu Nerd Font";
+ font-size: 13px;
+ min-height: 0;
+}
+
+window#waybar {
+ background: transparent;
+ color: white;
+}
+
+#window {
+ margin-left: 1rem;
+ font-weight: bold;
+ font-family: "Ubuntu";
+}
+/*
+#workspaces {
+ padding: 0 5px;
+}
+*/
+
+#workspaces button {
+ padding: 0 5px;
+ background: transparent;
+ color: white;
+ border-top: 2px solid transparent;
+}
+
+#workspaces button.focused {
+ color: #c9545d;
+ border-top: 2px solid #c9545d;
+}
+
+#mode {
+ background: #64727D;
+ border-bottom: 3px solid white;
+}
+
+#bluetooth, #idle_inhibitor, #temperature, #backlight, #clock, #battery, #cpu, #memory, #network, #pulseaudio, #custom-spotify, #tray, #mode {
+ padding: 5px;
+ margin: 2px;
+ border-radius: 3rem;
+ background-color: rgb(10, 10, 10);
+}
+
+#clock {
+ font-weight: bold;
+}
+
+#battery {
+}
+
+#battery icon {
+ color: red;
+}
+
+#battery.charging {
+}
+
+@keyframes blink {
+ to {
+ background-color: #ffffff;
+ color: black;
+ }
+}
+
+#battery.warning:not(.charging) {
+ color: white;
+ animation-name: blink;
+ animation-duration: 0.5s;
+ animation-timing-function: linear;
+ animation-iteration-count: infinite;
+ animation-direction: alternate;
+}
+
+#cpu {
+}
+
+#memory {
+}
+
+#network {
+}
+
+#network.disconnected {
+ background: #f53c3c;
+}
+
+#pulseaudio {
+}
+
+#pulseaudio.muted {
+}
+
+#custom-spotify {
+ color: rgb(102, 220, 105);
+}
+
+#tray {
+}
diff --git a/hosts/local/sway.nix b/hosts/local/sway.nix
index e881fec..0fb8020 100644
--- a/hosts/local/sway.nix
+++ b/hosts/local/sway.nix
@@ -43,7 +43,8 @@
playerctl
blueman
wdisplays
- inputs.waybar.packages.x86_64-linux.default
+ # inputs.waybar.packages.x86_64-linux.default
+ waybar
glxinfo
vulkan-tools
glmark2
diff --git a/hosts/local/syncthing.nix b/hosts/local/syncthing.nix
new file mode 100644
index 0000000..5497bc9
--- /dev/null
+++ b/hosts/local/syncthing.nix
@@ -0,0 +1,54 @@
+{
+ inputs,
+ pkgs,
+ ...
+}: {
+ services.syncthing = {
+ enable = true;
+ openDefaultPorts = true;
+ user = "y";
+ dataDir = "/home/y/sync"; # default location for new folders
+ # configDir = "/home/myusername/.config/syncthing";
+ key = "/home/y/sync/key.pem";
+ cert = "/home/y/sync/cert.pem";
+ settings = {
+ devices = {
+ "phone" = {id = "TOBQJTK-QWVMMCN-7SJWXTL-FUKM4FB-ZTLGEL7-KEBTTB3-PC3WZOO-FLBW5A2 ";};
+ "laptop" = {id = "INHTOYO-WNCIVPD-M27N2DY-2PJWVCV-FWYOCTQ-AWHBVIJ-4PRVAWR-E7PUTQ4";};
+ # "desktop" = {id = "DEVICE-ID-GOES-HERE";};
+ };
+ folders = {
+ "memes" = {
+ path = "/home/y/sync/memes";
+ devices = ["phone" "laptop"];
+ };
+ "creds" = {
+ path = "/home/y/sync/creds";
+ devices = ["phone" "laptop"];
+ # By default, Syncthing doesn't sync file permissions. This line enables it for this folder.
+ # ignorePerms = false;
+ };
+ "docs" = {
+ path = "/home/y/sync/docs";
+ devices = ["phone" "laptop"];
+ };
+ # "Sensitive" = {
+ # path = "/home/myusername/Sensitive";
+ # devices = [
+ # # We trust this device to have access
+ # # to the decrypted contents of this folder.
+ # "device1"
+ # # We do not trust this device, but we want to have another
+ # # (encrypted) copy of the data for redundancy/backup/sync purposes.
+ # {
+ # name = "device2";
+ # # encryptionPasswordFile is a path to a file containing the encryption password.
+ # # See below for information about managing secrets on NixOS.
+ # encryptionPasswordFile = "/run/secrets/st-sensitive-password";
+ # }
+ # ];
+ # };
+ };
+ };
+ };
+}
diff --git a/hosts/nixos.nix b/hosts/nixos.nix
index 9ebe253..cbb77a3 100644
--- a/hosts/nixos.nix
+++ b/hosts/nixos.nix
@@ -10,6 +10,7 @@
in {
s15 = mkNixosSystem "aarch64-linux" "local/s15";
fw11 = mkNixosSystem "x86_64-linux" "local/fw11";
+ p16 = mkNixosSystem "x86_64-linux" "local/p16";
master = mkNixosSystem "x86_64-linux" "local/master";
# vivo2025 = mkNixosSystem "x86_64-linux" "local/vivo2025";
ohira = mkNixosSystem "x86_64-linux" "local/ohira";
diff --git a/hosts/pkgs.nix b/hosts/pkgs.nix
index a6023f5..17a90b9 100644
--- a/hosts/pkgs.nix
+++ b/hosts/pkgs.nix
@@ -69,28 +69,22 @@
# electrum
# yacreader
- # ai stuff!
- # aider-chat
# inputs.yek.packages.x86_64-linux.default
- # python312Packages.google-generativeai
bun
- claude-code
- codex
nushell
ast-grep
diffsitter
- # inputs.gemini-cli.packages.x86_64-linux.default
#
- # ai
- lmstudio
]
++ lib.optionals pkgs.stdenv.isLinux [
# linuxKernel.packages.linux_latest_libre.cpupower
- gparted
+ parted
moreutils
busybox
usbutils
xdg-utils
+ exfat
+ exfatprogs
#hardware problems
lm_sensors
linuxKernel.packages.linux_hardened.cpupower
diff --git a/hosts/unfree.nix b/hosts/unfree.nix
index 30c4a62..9614aa8 100644
--- a/hosts/unfree.nix
+++ b/hosts/unfree.nix
@@ -13,8 +13,9 @@
# https://stackoverflow.com/questions/77585228/how-to-allow-unfree-packages-in-nix-for-each-situation-nixos-nix-nix-wit
environment.systemPackages = with pkgs; [
# opera
+ obsidian
spotify
- vscode
+ # vscode
# fonts
corefonts
# symbola
@@ -32,6 +33,7 @@
# fucking vscode requires this for github copilot
services.gnome.gnome-keyring.enable = true;
+
programs.steam = {
enable = true;
# package = pkgs.steam.override {