Last active
June 11, 2024 01:48
-
-
Save DrSensor/4e0187813a9511b6e879570a1dd31aca to your computer and use it in GitHub Desktop.
My plan for full migration into NixOS and Wayland
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs ? import <nixpkgs> | |
, lib ? pkgs.lib | |
, desktopEnvironment | |
}: with pkgs; | |
desktopEnvironment { | |
session-manager = emptty; | |
window-manager = [ sway labwc ]; | |
screen-display = { | |
use = kanshi; # autorandr | |
gui = wlay; | |
}; | |
screen-brightness = wlsunset; | |
screen-lock.timer = swayidle; | |
screen-lock.use = mkShell { | |
packages = [ swaylock grim sox ]; | |
shellHook = '' | |
# 1. screencapture using grim | |
# 2. databender/mosaic using sox | |
# 3. set swaylock --image from sox | |
''; | |
}; | |
wallpaper = { | |
static = swaybg; | |
animated.gif = oguri; | |
animated.video = mpvpaper; | |
gui = wallutils; | |
}; | |
notification = fnott; | |
systray = yambar; | |
launcher = fuzzel; # or rofi-wlc | |
terminal = mkShell { | |
packages = [ foot zellij ]; | |
shellHook = '' | |
# run zellij multiplexer inside foot terminal | |
''; | |
}; | |
screen-captures = mkShell { | |
packages = [ grim wf-recorder slurp ]; | |
shellHook = '' | |
# 1. ask if you want to capture whole desktop, specific monitor, or just a region | |
# 2. slurp to get the region | |
# 3. grim to screenshots the region | |
# 3. or wf-record to screencasts the region | |
''; | |
}; | |
system-gui = [ gtk4 lxappearance-gtk4 ]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
general = [ | |
auto-cpufreq # https://github.com/AdnanHodzic/auto-cpufreq | |
]; | |
laptop = general ++ [ | |
tlp # https://linrunner.de/tlp/ | |
]; | |
handheld = general ++ [ | |
xsuspender # https://kernc.github.io/xsuspender | |
]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
case $context in | |
nvidia) | |
prime-run $@ | |
;; | |
windows) | |
proton-call -r $@ | |
;; | |
*) | |
$@ | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hi there. if you have a chance, can you please explain the desktop.nix file? I'm not sure how it works and I haven't found anything like it out there. is this basically a module you can import into a config (homemanager or regular) and it will build everything defined in desktopEnvironment?
thanks for posting this/any extra info you may give!