Compare commits
9 Commits
f465eef631
...
93b5577d27
Author | SHA1 | Date |
---|---|---|
Oystein Kristoffer Tveit | 93b5577d27 | |
Oystein Kristoffer Tveit | f8bd568bd6 | |
Oystein Kristoffer Tveit | 20296fa754 | |
Oystein Kristoffer Tveit | d7a6ac7c81 | |
Oystein Kristoffer Tveit | dc947a2edc | |
Oystein Kristoffer Tveit | 2d34226781 | |
Oystein Kristoffer Tveit | d7d83da9a6 | |
Oystein Kristoffer Tveit | 0dc4fa7860 | |
Oystein Kristoffer Tveit | f20a9bd89e |
|
@ -101,6 +101,8 @@
|
|||
inherit (nonrecursive-unstable-pkgs) atuin wstunnel;
|
||||
})
|
||||
|
||||
(import ./overlays/wayland-ime-integration.nix)
|
||||
|
||||
# https://github.com/NixOS/nixpkgs/pull/251706
|
||||
(self: super: {
|
||||
mozc = self.qt6Packages.callPackage ./package-overrides/mozc.nix { };
|
||||
|
|
|
@ -18,8 +18,12 @@
|
|||
|
||||
GHCUP_USE_XDG_DIRS = "true";
|
||||
|
||||
__GL_SHADER_DISK_CACHE_PATH = "${cacheHome}/nv";
|
||||
ANDROID_USER_HOME = "${dataHome}/android";
|
||||
AZURE_CONFIG_DIR = "${dataHome}/azure";
|
||||
BZRPATH = "${configHome}/bazaar";
|
||||
BZR_PLUGIN_PATH = "${dataHome}/bazaar";
|
||||
BZR_HOME = "${cacheHome}/bazaar";
|
||||
CARGO_HOME = "${dataHome}/cargo";
|
||||
CUDA_CACHE_PATH = "${cacheHome}/nv";
|
||||
DOCKER_CONFIG = "${configHome}/docker";
|
||||
|
|
|
@ -1,143 +1,121 @@
|
|||
{ lib, ... }:
|
||||
|
||||
let
|
||||
|
||||
# Applications
|
||||
google-chrome = "google-chrome.desktop";
|
||||
firefox = "firefox.desktop";
|
||||
gimp = "gimp.desktop";
|
||||
inkscape = "org.inkscape.Inkscape.desktop";
|
||||
vscode = "code.desktop";
|
||||
mpv = "mpv.desktop";
|
||||
zathura = "org.pwmt.zathura.desktop";
|
||||
sxiv = "sxiv.desktop";
|
||||
font-viewer = "org.gnome.font-viewer.desktop";
|
||||
|
||||
# Formats
|
||||
"3g2-audio" = "audio/3gpp";
|
||||
"3g2-video" = "video/3gpp";
|
||||
"3gp-audio" = "audio/3gpp";
|
||||
"3gp-video" = "video/3gpp";
|
||||
aac = "audio/aac";
|
||||
avi = "video/x-msvideo";
|
||||
mime = {
|
||||
image = {
|
||||
apng = "image/apng";
|
||||
avif = "image/avif";
|
||||
bmp = "image/bmp";
|
||||
gif = "image/gif";
|
||||
ico = "image/vnd.microsoft.icon";
|
||||
icox = "image/x-icon";
|
||||
jpg = "image/jpeg";
|
||||
jxl = "image/jxl";
|
||||
pic = "image/x-pict";
|
||||
png = "image/png";
|
||||
psd = "image/vnd.adobe.photoshop";
|
||||
svg = "image/svg+xml";
|
||||
tif = "image/tif";
|
||||
tiff = "image/tiff";
|
||||
webp = "image/webp";
|
||||
xbm = "image/x-xbitmap";
|
||||
xpm = "image/x-xpixmap";
|
||||
};
|
||||
|
||||
audio = {
|
||||
"3g2-audio" = "audio/3gpp";
|
||||
"3gp-audio" = "audio/3gpp";
|
||||
aac = "audio/aac";
|
||||
aiff = "audio/aiff";
|
||||
flac = "audio/flac";
|
||||
mkv = "audio/x-matroska";
|
||||
mpeg = "audio/mpeg"; # NOTE: this is the real mp3, but the other one also exists
|
||||
mpeg3 = "audio/mpeg3";
|
||||
mp3 = "audio/mp3";
|
||||
mp4 = "audio/mp4";
|
||||
ogg = "audio/ogg";
|
||||
opus = "audio/opus";
|
||||
wav = "audio/wav";
|
||||
wavx = "audio/x-wav";
|
||||
webm-audio = "audio/webm";
|
||||
};
|
||||
|
||||
video = {
|
||||
"3g2-video" = "video/3gpp";
|
||||
"3gp-video" = "video/3gpp";
|
||||
avi = "video/x-msvideo";
|
||||
flv = "video/x-flv";
|
||||
m4v = "video/x-m4v";
|
||||
mkv = "video/x-matroska";
|
||||
mov = "video/quicktime";
|
||||
mp4 = "video/mp4";
|
||||
mpeg = "video/mpeg";
|
||||
ogv = "video/ogg";
|
||||
webm-video = "video/webm";
|
||||
wmv = "video/x-ms-wmv";
|
||||
};
|
||||
|
||||
font = {
|
||||
otf = "font/otf";
|
||||
ttf = "font/ttf";
|
||||
woff = "font/woff";
|
||||
woff2 = "font/woff2";
|
||||
};
|
||||
|
||||
documents = {
|
||||
azv = "application/vnd.amazon.ebook";
|
||||
cbr = "application/vnd.comicbook+rar";
|
||||
cbrx = "application/x-cbr";
|
||||
cbz = "application/vnd.comicbook+zip";
|
||||
cbzx = "application/x-cbz";
|
||||
djvu = "image/vnd.djvu";
|
||||
epub = "application/epub+zip";
|
||||
flv = "video/x-flv";
|
||||
gif = "image/gif";
|
||||
html = "text/html";
|
||||
http = "x-scheme-handler/http";
|
||||
https = "x-scheme-handler/https";
|
||||
ico = "image/vnd.microsoft.icon";
|
||||
icox = "image/x-icon";
|
||||
ini = "application/x-wine-extension-ini";
|
||||
jpg = "image/jpeg";
|
||||
m4v = "video/x-m4v";
|
||||
mkv = "video/x-matroska";
|
||||
mov = "video/quicktime";
|
||||
mp3 = "audio/mpeg";
|
||||
mp4 = "video/mp4";
|
||||
mpeg = "video/mpeg";
|
||||
ogg = "audio/ogg";
|
||||
ogv = "video/ogg";
|
||||
opus = "audio/opus";
|
||||
otf = "font/otf";
|
||||
pdf = "application/pdf";
|
||||
pic = "image/x-pict";
|
||||
png = "image/png";
|
||||
psd = "image/vnd.adobe.photoshop";
|
||||
svg = "image/svg+xml";
|
||||
tiff = "image/tiff";
|
||||
ttf = "font/ttf";
|
||||
};
|
||||
|
||||
code = {
|
||||
css = "text/css";
|
||||
csv = "text/csv";
|
||||
html = "text/html";
|
||||
txt = "text/plain";
|
||||
url = "application/x-mswinurl";
|
||||
wav = "audio/wav";
|
||||
wavx = "audio/x-wav";
|
||||
webm-audio = "audio/webm";
|
||||
webm-video = "video/webm";
|
||||
webp = "image/webp";
|
||||
wmv = "video/x-ms-wmv";
|
||||
woff = "font/woff";
|
||||
woff2 = "font/woff2";
|
||||
xbm = "image/x-xbitmap";
|
||||
xcf = "image/x-xcf";
|
||||
xhtml = "application/xhtml+xml";
|
||||
xml = "text/xml";
|
||||
xpm = "image/x-xpixmap";
|
||||
};
|
||||
|
||||
misc = {
|
||||
http = "x-scheme-handler/http";
|
||||
https = "x-scheme-handler/https";
|
||||
wine-ini = "application/x-wine-extension-ini";
|
||||
ics = "text/calendar";
|
||||
url = "application/x-mswinurl";
|
||||
};
|
||||
};
|
||||
|
||||
# Generalizations
|
||||
audio-player = mpv;
|
||||
gui-text-editor = vscode;
|
||||
image-viewer = sxiv;
|
||||
pdf-viewer = zathura;
|
||||
video-player = mpv;
|
||||
web-browser = firefox;
|
||||
|
||||
# Applications
|
||||
firefox = "firefox.desktop";
|
||||
vscode = "code.desktop";
|
||||
mpv = "mpv.desktop";
|
||||
zathura = "org.pwmt.zathura.desktop";
|
||||
sxiv = "sxiv.desktop";
|
||||
font-viewer = "org.gnome.font-viewer.desktop";
|
||||
in {
|
||||
|
||||
xdg.configFile."mimeapps.list".force = true;
|
||||
xdg.mimeApps = {
|
||||
enable = true;
|
||||
# associations.added = {};
|
||||
# associations.removed = {};
|
||||
defaultApplications = {
|
||||
${"3g2-audio"} = audio-player;
|
||||
${"3g2-video"} = video-player;
|
||||
${"3gp-audio"} = audio-player;
|
||||
${"3gp-video"} = video-player;
|
||||
${aac} = audio-player;
|
||||
${avi} = video-player;
|
||||
${bmp} = image-viewer;
|
||||
${cbrx} = zathura;
|
||||
${cbr} = zathura;
|
||||
${cbzx} = zathura;
|
||||
${cbz} = zathura;
|
||||
${djvu} = pdf-viewer;
|
||||
${epub} = zathura;
|
||||
${flv} = video-player;
|
||||
${gif} = image-viewer;
|
||||
${html} = web-browser;
|
||||
${https} = web-browser;
|
||||
${http} = web-browser;
|
||||
${icox} = image-viewer;
|
||||
${ico} = image-viewer;
|
||||
${jpg} = image-viewer;
|
||||
${m4v} = video-player;
|
||||
${mkv} = video-player;
|
||||
${mov} = video-player;
|
||||
${mp3} = audio-player;
|
||||
${mp4} = video-player;
|
||||
${mpeg} = video-player;
|
||||
${ogg} = audio-player;
|
||||
${ogv} = video-player;
|
||||
${opus} = audio-player;
|
||||
${otf} = font-viewer;
|
||||
${pdf} = pdf-viewer;
|
||||
${pic} = image-viewer;
|
||||
${png} = image-viewer;
|
||||
${psd} = gimp;
|
||||
${svg} = image-viewer;
|
||||
${tiff} = image-viewer;
|
||||
${ttf} = font-viewer;
|
||||
${txt} = gui-text-editor;
|
||||
${url} = web-browser;
|
||||
${wav} = audio-player;
|
||||
${webm-audio} = audio-player;
|
||||
${webm-video} = video-player;
|
||||
${webp} = image-viewer;
|
||||
${wmv} = video-player;
|
||||
${woff2} = font-viewer;
|
||||
${woff} = font-viewer;
|
||||
${xbm} = image-viewer;
|
||||
${xcf} = gimp;
|
||||
${xhtml} = web-browser;
|
||||
${xml} = gui-text-editor;
|
||||
${xpm} = image-viewer;
|
||||
defaultApplications =
|
||||
(lib.mapAttrs' (_: v: lib.nameValuePair v sxiv) mime.image)
|
||||
// (lib.mapAttrs' (_: v: lib.nameValuePair v mpv) mime.audio)
|
||||
// (lib.mapAttrs' (_: v: lib.nameValuePair v mpv) mime.video)
|
||||
// (lib.mapAttrs' (_: v: lib.nameValuePair v font-viewer) mime.font)
|
||||
// (lib.mapAttrs' (_: v: lib.nameValuePair v zathura) mime.documents)
|
||||
// (lib.mapAttrs' (_: v: lib.nameValuePair v vscode) mime.code)
|
||||
// {
|
||||
${mime.misc.http} = firefox;
|
||||
${mime.misc.https} = firefox;
|
||||
${mime.misc.wine-ini} = vscode;
|
||||
${mime.misc.ics} = vscode;
|
||||
${mime.misc.url} = firefox;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -6,9 +6,9 @@ in {
|
|||
./shell.nix
|
||||
./packages.nix
|
||||
|
||||
./config/ssh
|
||||
./config/xdg
|
||||
|
||||
./programs/aria2.nix
|
||||
./programs/atuin.nix
|
||||
./programs/comma.nix
|
||||
./programs/direnv
|
||||
|
@ -19,6 +19,7 @@ in {
|
|||
./programs/less.nix
|
||||
./programs/neovim
|
||||
./programs/nix-index
|
||||
./programs/ssh
|
||||
./programs/tealdeer
|
||||
./programs/tmux.nix
|
||||
./programs/zsh
|
||||
|
@ -34,12 +35,14 @@ in {
|
|||
./programs/alacritty.nix
|
||||
./programs/emacs
|
||||
./programs/firefox.nix
|
||||
./programs/hyprland.nix
|
||||
./programs/ncmpcpp.nix
|
||||
./programs/newsboat
|
||||
./programs/qutebrowser.nix
|
||||
./programs/rofi.nix
|
||||
./programs/taskwarrior.nix
|
||||
./programs/vscode
|
||||
./programs/waybar.nix
|
||||
# ./programs/xmobar
|
||||
./programs/xmonad
|
||||
./programs/zathura.nix
|
||||
|
@ -49,11 +52,11 @@ in {
|
|||
./services/dunst.nix
|
||||
./services/fcitx5.nix
|
||||
./services/mpd.nix
|
||||
./services/picom.nix
|
||||
./services/polybar.nix
|
||||
./services/screen-locker.nix
|
||||
# ./services/picom.nix
|
||||
# ./services/polybar.nix
|
||||
# ./services/screen-locker.nix
|
||||
# ./services/stalonetray.nix
|
||||
./services/sxhkd.nix
|
||||
# ./services/sxhkd.nix
|
||||
./services/tumblerd.nix
|
||||
];
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.aria2.enable = true;
|
||||
}
|
|
@ -0,0 +1,342 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
cfg = config.wayland.windowManager.hyprland;
|
||||
in
|
||||
{
|
||||
home.sessionVariables = {
|
||||
WLR_NO_HARDWARE_CURSORS = "1";
|
||||
WLR_RENDERER_ALLOW_SOFTWARE = "1";
|
||||
XDG_CURRENT_DESKTOP = "Hyprland";
|
||||
XDG_SESSION_DESKTOP = "Hyprland";
|
||||
XDG_SESSION_TYPE = "wayland";
|
||||
GDK_BACKEND = "wayland,x11,*";
|
||||
QT_QPA_PLATFORM = "wayland;xcb";
|
||||
NIXOS_OZONE_WL = "1";
|
||||
MOZ_ENABLE_WAYLAND = "1";
|
||||
SDL_VIDEODRIVER = "wayland";
|
||||
OZONE_PLATFORM = "wayland";
|
||||
CLUTTER_BACKEND = "wayland";
|
||||
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
||||
# QT_QPA_PLATFORMTHEME = "qt6ct";
|
||||
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
|
||||
|
||||
LIBVA_DRIVER_NAME = "nvidia";
|
||||
GBM_BACKEND = "nvidia-drm";
|
||||
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
wl-clipboard-rs
|
||||
];
|
||||
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
disable_loading_bar = true;
|
||||
grace = 300;
|
||||
hide_cursor = true;
|
||||
no_fade_in = false;
|
||||
};
|
||||
|
||||
background = [
|
||||
{
|
||||
path = "screenshot";
|
||||
blur_passes = 3;
|
||||
blur_size = 8;
|
||||
}
|
||||
];
|
||||
|
||||
input-field = [
|
||||
{
|
||||
size = "200, 50";
|
||||
position = "0, -80";
|
||||
monitor = "";
|
||||
dots_center = true;
|
||||
fade_on_empty = false;
|
||||
font_color = "rgb(202, 211, 245)";
|
||||
inner_color = "rgb(91, 96, 120)";
|
||||
outer_color = "rgb(24, 25, 38)";
|
||||
outline_thickness = 5;
|
||||
placeholder_text = ''Password...'';
|
||||
shadow_passes = 2;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
services.hypridle = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
ignore_dbus_inhibit = false;
|
||||
lock_cmd = "pidof hyprlock || hyprlock";
|
||||
before_sleep_cmd = "loginctl lock-session";
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||
};
|
||||
|
||||
listener = [
|
||||
{
|
||||
timeout = 900;
|
||||
on-timeout = "hyprlock";
|
||||
}
|
||||
{
|
||||
timeout = 1200;
|
||||
on-timeout = "hyprctl dispatch dpms off";
|
||||
on-resume = "hyprctl dispatch dpms on";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
|
||||
settings = let
|
||||
scratchpads = [
|
||||
(rec {
|
||||
title = "Floating terminal";
|
||||
class = "floatingTerminal";
|
||||
command = "alacritty --class ${class} -e tmux new-session -A -s f";
|
||||
size = { h = 90; w = 95; };
|
||||
keys = [
|
||||
"$mod, RETURN"
|
||||
"$mod, SPACE"
|
||||
];
|
||||
})
|
||||
(rec {
|
||||
title = "Ncmpcpp";
|
||||
class = "floatingNcmpcpp";
|
||||
command = "alacritty --class ${class} -e ncmpcpp";
|
||||
size = { h = 95; w = 95; };
|
||||
keys = [ "$mod, Q" ];
|
||||
})
|
||||
# "$mod, W, emacs"
|
||||
# "$mod, E, filebrowser"
|
||||
# "$mod, X, taskwarriortui"
|
||||
];
|
||||
in {
|
||||
"$mod" = "SUPER";
|
||||
|
||||
# https://github.com/xkbcommon/libxkbcommon/blob/master/include/xkbcommon/xkbcommon-keysyms.h
|
||||
bind = [
|
||||
"$mod SHIFT, Q, exit"
|
||||
"$mod, R, exec, ${pkgs.rofi}/bin/rofi -show drun"
|
||||
"$mod, T, togglefloating"
|
||||
|
||||
# TODO: fix this for upcoming releases
|
||||
"$mod, F, fullscreen, 2"
|
||||
"$mod, C, exec, hyprctl reload"
|
||||
|
||||
"$mod, BACKSPACE, exec, ${lib.getExe (pkgs.writeShellApplication {
|
||||
name = "hyprland-kill-windows-except-scratchpads";
|
||||
runtimeInputs = [ cfg.package pkgs.jq ];
|
||||
text = ''
|
||||
ACTIVE_WINDOW_CLASS=$(hyprctl activewindow -j | jq -r '.class')
|
||||
|
||||
case "$ACTIVE_WINDOW_CLASS" in
|
||||
${lib.pipe scratchpads [
|
||||
(map ({ class , ... }: ''
|
||||
'${class}')
|
||||
hyprctl dispatch togglespecialworkspace '${class}Ws'
|
||||
;;
|
||||
''))
|
||||
(map (lib.splitString "\n"))
|
||||
(lib.flatten)
|
||||
(map (x: " " + x))
|
||||
(lib.concatStringsSep "\n")
|
||||
]}
|
||||
*)
|
||||
hyprctl dispatch killactive
|
||||
;;
|
||||
esac
|
||||
'';
|
||||
})}"
|
||||
|
||||
"$mod SHIFT, RETURN, exec, alacritty --class termTerminal -e tmux new-session -A -s term"
|
||||
"$mod SHIFT, SPACE, exec, alacritty --class termTerminal -e tmux new-session -A -s term"
|
||||
|
||||
"$mod, j, layoutmsg,cyclenext"
|
||||
"$mod, k, layoutmsg,cycleprev"
|
||||
"$mod SHIFT, j, layoutmsg, swapnext"
|
||||
"$mod SHIFT, k, layoutmsg, swapprev"
|
||||
|
||||
"$mod, 1, focusworkspaceoncurrentmonitor, 1"
|
||||
"$mod, 2, focusworkspaceoncurrentmonitor, 2"
|
||||
"$mod, 3, focusworkspaceoncurrentmonitor, 3"
|
||||
"$mod, 4, focusworkspaceoncurrentmonitor, 4"
|
||||
"$mod, 5, focusworkspaceoncurrentmonitor, 5"
|
||||
"$mod, 6, focusworkspaceoncurrentmonitor, 6"
|
||||
"$mod, 7, focusworkspaceoncurrentmonitor, 7"
|
||||
"$mod, 8, focusworkspaceoncurrentmonitor, 8"
|
||||
"$mod, 9, focusworkspaceoncurrentmonitor, 9"
|
||||
|
||||
"$mod SHIFT, 1, movetoworkspacesilent, 1"
|
||||
"$mod SHIFT, 2, movetoworkspacesilent, 2"
|
||||
"$mod SHIFT, 3, movetoworkspacesilent, 3"
|
||||
"$mod SHIFT, 4, movetoworkspacesilent, 4"
|
||||
"$mod SHIFT, 5, movetoworkspacesilent, 5"
|
||||
"$mod SHIFT, 6, movetoworkspacesilent, 6"
|
||||
"$mod SHIFT, 7, movetoworkspacesilent, 7"
|
||||
"$mod SHIFT, 8, movetoworkspacesilent, 8"
|
||||
"$mod SHIFT, 9, movetoworkspacesilent, 9"
|
||||
|
||||
"$mod, b, exec, ${pkgs.fcitx5}/bin/fcitx5-remote -s mozc"
|
||||
"$mod, n, exec, ${pkgs.fcitx5}/bin/fcitx5-remote -s keyboard-no"
|
||||
"$mod, m, exec, ${pkgs.fcitx5}/bin/fcitx5-remote -s keyboard-us"
|
||||
|
||||
# TODO: ensure exists in environment
|
||||
"$mod, l, exec, loginctl lock-session"
|
||||
|
||||
# TODO: fix
|
||||
# "super + minus" = "${pkgs.xcalib}/bin/xcalib -invert -alter"
|
||||
|
||||
# TODO: fix
|
||||
", Print, exec, ${lib.getExe pkgs.grimblast} copy area"
|
||||
|
||||
# "SHIFT, Print, exec, ${lib.getExe pkgs.grimblast} copy area"
|
||||
# "shift + @Print" = "${pkgs.maim}/bin/maim --hidecursor --nokeyboard $SCREENSHOT_DIR/$(date +%s).png"
|
||||
|
||||
# TODO: Add boomer as package
|
||||
# "super + @Print" = "boomer"
|
||||
]
|
||||
++
|
||||
(lib.pipe scratchpads [
|
||||
(map ({ keys, command, class, ... }:
|
||||
(map (key: let
|
||||
# TODO: rewrite the scratchpad logic to move windows back and forth
|
||||
# from the special workspaces, rather than overlay the workspaces.
|
||||
#
|
||||
# TODO: don't invoke the program upon close toggling the scratchpad
|
||||
#
|
||||
# TODO: ensure program becomes in focus upon open toggling the scratchpad
|
||||
invokeIfNotRunningAndToggleWorkspace = pkgs.writeShellApplication {
|
||||
name = "hyprland-toggle-scratchpad-${class}";
|
||||
runtimeInputs = [ cfg.package pkgs.jq ];
|
||||
text = ''
|
||||
SCRATCHPAD_EXISTS=$(hyprctl clients -j | jq -r '[.[].class]|any(. == "${class}")')
|
||||
|
||||
if [ "$SCRATCHPAD_EXISTS" != "true" ]; then
|
||||
${command} &
|
||||
fi
|
||||
|
||||
hyprctl dispatch togglespecialworkspace '${class}Ws'
|
||||
'';
|
||||
};
|
||||
in "${key}, exec, ${lib.getExe invokeIfNotRunningAndToggleWorkspace}"
|
||||
) keys)
|
||||
))
|
||||
lib.flatten
|
||||
]);
|
||||
|
||||
bindl = [
|
||||
"$mod, p, exec, ${pkgs.mpc_cli}/bin/mpc toggle"
|
||||
",XF86AudioPlay, exec, ${pkgs.mpc_cli}/bin/mpc toggle"
|
||||
",XF86AudioPrev, exec, ${pkgs.mpc_cli}/bin/mpc prev"
|
||||
",XF86AudioNext, exec, ${pkgs.mpc_cli}/bin/mpc next"
|
||||
];
|
||||
|
||||
bindle = [
|
||||
",XF86MonBrightnessUp, exec, ${lib.getExe pkgs.brightnessctl} s +5%"
|
||||
",XF86MonBrightnessDown, exec, ${lib.getExe pkgs.brightnessctl} s 5%-"
|
||||
",XF86AudioLowerVolume, exec, ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%-"
|
||||
",XF86AudioRaiseVolume, exec, ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%+"
|
||||
"$mod ,F7, exec, ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%-"
|
||||
"$mod ,F8, exec, ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%+"
|
||||
];
|
||||
|
||||
windowrulev2 = [
|
||||
"float,class:(Rofi)"
|
||||
|
||||
"workspace 2,class:(firefox)"
|
||||
"workspace 2,class:(google-chrome)"
|
||||
|
||||
"workspace 3,class:(Emacs)"
|
||||
"workspace 3,class:(Code)"
|
||||
"workspace 3,class:(code-url-handler)"
|
||||
|
||||
"workspace 5,class:(discord)"
|
||||
"workspace 5,class:(Element)"
|
||||
]
|
||||
++
|
||||
(lib.pipe scratchpads [
|
||||
(map ({ class, size, ... }: [
|
||||
"workspace special:${class}Ws, class:^${class}$"
|
||||
"float, class:^${class}$"
|
||||
"size ${toString size.w}% ${toString size.h}%, class:^${class}$"
|
||||
"move ${toString ((100 - size.w) / 2)}% ${toString ((100 - size.h) / 2)}%, class:^${class}$"
|
||||
]))
|
||||
lib.flatten
|
||||
]);
|
||||
|
||||
monitor = [
|
||||
"DP-2, 1920x1080@144.00Hz, 0x0, 1"
|
||||
"DVI-D-1, 1920x1080@144.00Hz, 1920x0, 1"
|
||||
",preferred,auto,1"
|
||||
];
|
||||
|
||||
general = {
|
||||
gaps_in = 5;
|
||||
gaps_out = 15;
|
||||
|
||||
border_size = 2;
|
||||
|
||||
"col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg";
|
||||
"col.inactive_border" = "rgba(595959aa)";
|
||||
|
||||
resize_on_border = false;
|
||||
allow_tearing = false;
|
||||
layout = "master";
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = 10;
|
||||
|
||||
# Change transparency of focused and unfocused windows
|
||||
active_opacity = 1.0;
|
||||
inactive_opacity = 1.0;
|
||||
|
||||
drop_shadow = true;
|
||||
shadow_range = 4;
|
||||
shadow_render_power = 3;
|
||||
"col.shadow" = "rgba(1a1a1aee)";
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#blur
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 3;
|
||||
passes = 1;
|
||||
|
||||
vibrancy = 0.1696;
|
||||
};
|
||||
};
|
||||
|
||||
animations.enabled = false;
|
||||
|
||||
master = {
|
||||
new_status = "slave";
|
||||
};
|
||||
|
||||
misc = {
|
||||
force_default_wallpaper = 0; # Set to 0 or 1 to disable the anime mascot wallpapers
|
||||
disable_hyprland_logo = false; # If true disables the random hyprland logo / anime girl background. :(
|
||||
};
|
||||
|
||||
input ={
|
||||
kb_layout = "us";
|
||||
kb_variant = "";
|
||||
kb_model = "";
|
||||
kb_options = "";
|
||||
kb_rules = "";
|
||||
|
||||
follow_mouse = 1;
|
||||
|
||||
sensitivity = 0; # -1.0 - 1.0, 0 means no modification.
|
||||
|
||||
touchpad = {
|
||||
natural_scroll = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -21,6 +21,7 @@
|
|||
vim-surround
|
||||
vim-fugitive
|
||||
vim-css-color
|
||||
vim-wayland-clipboard
|
||||
semshi
|
||||
{
|
||||
plugin = goyo-vim;
|
||||
|
|
|
@ -8,6 +8,7 @@ let
|
|||
{
|
||||
names = [ "hildring" "pvv-login" "pvv" ];
|
||||
proxyJump = lib.mkDefault null;
|
||||
addressFamily = "inet";
|
||||
}
|
||||
"dagali"
|
||||
"drolsum"
|
||||
|
@ -85,6 +86,7 @@ in
|
|||
"pvv-git git.pvv.ntnu.no" = {
|
||||
hostname = "git.pvv.ntnu.no";
|
||||
user = "gitea";
|
||||
addressFamily = "inet";
|
||||
port = 2222;
|
||||
proxyJump = "pvv";
|
||||
};
|
|
@ -296,7 +296,7 @@ in
|
|||
# jock.svg
|
||||
# ms-azuretools.vscode-docker
|
||||
# ms-toolsai.jupyter
|
||||
ms-vscode-remote.remote-ssh
|
||||
# ms-vscode-remote.remote-ssh
|
||||
# ms-vsliveshare.vsliveshare
|
||||
bbenoist.nix
|
||||
christian-kohler.path-intellisense
|
||||
|
@ -318,8 +318,12 @@ in
|
|||
rust-lang.rust-analyzer
|
||||
mkhl.direnv
|
||||
waderyan.gitblame
|
||||
# vs-liveshare
|
||||
vscodevim.vim
|
||||
hbenl.vscode-test-explorer
|
||||
# vitaliymaz.vscode-svg-previewer
|
||||
ms-vscode.test-adapter-converter
|
||||
visualstudioexptteam.vscodeintellicode
|
||||
tamasfe.even-better-toml
|
||||
] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
|
||||
{
|
||||
name = "monokai-st3";
|
||||
|
@ -327,47 +331,17 @@ in
|
|||
version = "0.2.0";
|
||||
sha256 = "1rvz5hlrfshy9laybxzvrdklx328s13j0lb8ljbda9zkadi3wcad";
|
||||
}
|
||||
{
|
||||
name = "vscode-svgviewer";
|
||||
publisher = "cssho";
|
||||
version = "2.0.0";
|
||||
sha256 = "06swlqiv3gc7plcbmzz795y6zwpxsdhg79k1n3jj6qngfwnv2p6z";
|
||||
}
|
||||
{
|
||||
name = "comment-anchors";
|
||||
publisher = "ExodiusStudios";
|
||||
version = "1.10.3";
|
||||
sha256 = "sha256-IyiiS4jpcghwKI0j8s69uGNZlKnZ0o78ZCT0oZeJER0=";
|
||||
}
|
||||
{
|
||||
name = "vscode-test-explorer";
|
||||
publisher = "hbenl";
|
||||
version = "2.21.1";
|
||||
sha256 = "022lnkq278ic0h9ggpqcwb3x3ivpcqjimhgirixznq0zvwyrwz3w";
|
||||
version = "1.10.4";
|
||||
sha256 = "sha256-FvfjPpQsgCsnY1BylhLCM/qDQChf9/iTr3cKkCGfMVI=";
|
||||
}
|
||||
{
|
||||
name = "vscode-gutter-preview";
|
||||
publisher = "kisstkondoros";
|
||||
version = "0.29.0";
|
||||
sha256 = "00vibv9xmhwaqiqzp0y2c246pqiqfjsw4bqx4vcdd67pz1wnqhg1";
|
||||
}
|
||||
{
|
||||
name = "test-adapter-converter";
|
||||
publisher = "ms-vscode";
|
||||
version = "0.1.9";
|
||||
sha256 = "sha256-M53jhAVawk2yCeSrLkWrUit3xbDc0zgCK2snbK+BaSs=";
|
||||
}
|
||||
# {
|
||||
# name = "indent-rainbow";
|
||||
# publisher = "oderwat";
|
||||
# version = "8.2.2";
|
||||
# sha256 = "1xxljwh66f21fzmhw8icrmxxmfww1s67kf5ja65a8qb1x1rhjjgf";
|
||||
# }
|
||||
{
|
||||
name = "vscodeintellicode";
|
||||
publisher = "VisualStudioExptTeam";
|
||||
version = "1.2.30";
|
||||
sha256 = "sha256-f2Gn+W0QHN8jD5aCG+P93Y+JDr/vs2ldGL7uQwBK4lE=";
|
||||
version = "0.31.2";
|
||||
sha256 = "sha256-2/RvDSsVL06UmNG9HchXaJMJ4FYtnpuJ2Bn53JVv1t8=";
|
||||
}
|
||||
{
|
||||
name = "keyboard-quickfix";
|
||||
|
|
|
@ -0,0 +1,239 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
cfg = config.programs.waybar;
|
||||
cfgs = cfg.settings.mainBar;
|
||||
in
|
||||
{
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
|
||||
settings = {
|
||||
mainBar = {
|
||||
layer = "top";
|
||||
position = "top";
|
||||
height = 30;
|
||||
|
||||
# TODO: configure this per machine
|
||||
output = [ "DP-2" ];
|
||||
|
||||
modules-left = [ "hyprland/workspaces" ];
|
||||
modules-center = [ "clock" ];
|
||||
modules-right = [ "mpd" "cpu" "memory" "wireplumber" "pulseaudio/slider" "tray" ];
|
||||
|
||||
"hyprland/workspaces" = {
|
||||
all-outputs = true;
|
||||
disable-scroll = true;
|
||||
persistent-workspaces = {
|
||||
${lib.head cfgs.output} = [ 1 2 3 4 5 6 7 8 ];
|
||||
};
|
||||
};
|
||||
|
||||
"mpd" = {
|
||||
format = "{filename}";
|
||||
};
|
||||
|
||||
"cpu" = {
|
||||
format = "[#] {usage}%";
|
||||
};
|
||||
|
||||
"memory" = {
|
||||
format = "{used}/{total}Gb";
|
||||
};
|
||||
|
||||
"wireplumber" = {
|
||||
format = "{volume}% {icon}";
|
||||
format-muted = "[M]";
|
||||
};
|
||||
|
||||
"pulseaudio/slider" = {
|
||||
orientation = "horizontal";
|
||||
};
|
||||
|
||||
"tray" = {
|
||||
icon-size = 20;
|
||||
spacing = 8;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
style = let
|
||||
c = config.colors.defaultColorSet;
|
||||
in ''
|
||||
* {
|
||||
font-family: FiraCode, FontAwesome, Roboto, Helvetica, Arial, sans-serif;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background-color: ${c.background};
|
||||
color: ${c.foreground};
|
||||
}
|
||||
|
||||
#pulseaudio-slider trough {
|
||||
min-height: 10px;
|
||||
min-width: 100px;
|
||||
}
|
||||
|
||||
/**** DEFAULT ****/
|
||||
|
||||
window#waybar.hidden {
|
||||
opacity: 0.2;
|
||||
}
|
||||
|
||||
button {
|
||||
/* Use box-shadow instead of border so the text isn't offset */
|
||||
box-shadow: inset 0 -3px transparent;
|
||||
/* Avoid rounded borders under each button name */
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
|
||||
button:hover {
|
||||
background: inherit;
|
||||
box-shadow: inset 0 -3px #ffffff;
|
||||
}
|
||||
|
||||
|
||||
#workspaces button.empty {
|
||||
color: ${c.yellow};
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
padding: 0 5px;
|
||||
color: ${c.magenta};
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
#workspaces button.visible {
|
||||
color: ${c.green};
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
background-color: ${c.red};
|
||||
}
|
||||
|
||||
#workspaces button:hover {
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
#mode {
|
||||
background-color: #64727D;
|
||||
box-shadow: inset 0 -3px #ffffff;
|
||||
}
|
||||
|
||||
#clock,
|
||||
#battery,
|
||||
#cpu,
|
||||
#memory,
|
||||
#disk,
|
||||
#temperature,
|
||||
#backlight,
|
||||
#network,
|
||||
#pulseaudio,
|
||||
#wireplumber,
|
||||
#custom-media,
|
||||
#tray,
|
||||
#mode,
|
||||
#idle_inhibitor,
|
||||
#scratchpad,
|
||||
#power-profiles-daemon,
|
||||
#mpd {
|
||||
padding: 0 10px;
|
||||
color: ${c.foreground};
|
||||
}
|
||||
|
||||
#window,
|
||||
#workspaces {
|
||||
margin: 0 4px;
|
||||
}
|
||||
|
||||
/* If workspaces is the leftmost module, omit left margin */
|
||||
.modules-left > widget:first-child > #workspaces {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
/* If workspaces is the rightmost module, omit right margin */
|
||||
.modules-right > widget:last-child > #workspaces {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
#clock {
|
||||
background-color: #64727D;
|
||||
}
|
||||
|
||||
#cpu {
|
||||
background-color: ${c.cyan};
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
#memory {
|
||||
background-color: ${c.yellow};
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
#network {
|
||||
background-color: #2980b9;
|
||||
}
|
||||
|
||||
#network.disconnected {
|
||||
background-color: #f53c3c;
|
||||
}
|
||||
|
||||
#pulseaudio {
|
||||
background-color: #f1c40f;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
#pulseaudio.muted {
|
||||
background-color: #90b1b1;
|
||||
color: #2a5c45;
|
||||
}
|
||||
|
||||
#wireplumber {
|
||||
background-color: #fff0f5;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
#wireplumber.muted {
|
||||
background-color: #f53c3c;
|
||||
}
|
||||
|
||||
#tray {
|
||||
background-color: #2980b9;
|
||||
}
|
||||
|
||||
#tray > .passive {
|
||||
-gtk-icon-effect: dim;
|
||||
}
|
||||
|
||||
#tray > .needs-attention {
|
||||
-gtk-icon-effect: highlight;
|
||||
background-color: #eb4d4b;
|
||||
}
|
||||
|
||||
#mpd {
|
||||
background-color: #66cc99;
|
||||
color: #2a5c45;
|
||||
}
|
||||
|
||||
#mpd.disconnected {
|
||||
background-color: #f53c3c;
|
||||
}
|
||||
|
||||
#mpd.stopped {
|
||||
background-color: #90b1b1;
|
||||
}
|
||||
|
||||
#mpd.paused {
|
||||
background-color: #51a37a;
|
||||
}
|
||||
'';
|
||||
# background-color: rgba(0,0,0,0);
|
||||
# border-bottom: 3px solid rgba(100, 114, 125, 0.5);
|
||||
|
||||
#style = ''
|
||||
#'';
|
||||
};
|
||||
}
|
|
@ -13,9 +13,9 @@
|
|||
class = "Dunst";
|
||||
browser = "${pkgs.xdg-utils}/bin/xdg-open";
|
||||
|
||||
offset = let
|
||||
status-bar-height = config.services.polybar.settings."bar/top".height;
|
||||
in "15x${toString (status-bar-height + 10)}";
|
||||
# offset = let
|
||||
# status-bar-height = config.services.polybar.settings."bar/top".height;
|
||||
# in "15x${toString (status-bar-height + 10)}";
|
||||
|
||||
corner_radius = 0;
|
||||
font = "Droid Sans 9";
|
||||
|
|
|
@ -129,7 +129,7 @@ in {
|
|||
touchpad.disableWhileTyping = true;
|
||||
};
|
||||
|
||||
displayManager.defaultSession = "none+xmonad";
|
||||
irqbalance.enable = true;
|
||||
};
|
||||
|
||||
programs = {
|
||||
|
@ -137,6 +137,7 @@ in {
|
|||
git.enable = true;
|
||||
tmux.enable = true;
|
||||
zsh.enable = true;
|
||||
hyprland.enable = true;
|
||||
};
|
||||
|
||||
system.extraDependencies =
|
||||
|
|
|
@ -1,5 +1,14 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
services.displayManager = {
|
||||
enable = true;
|
||||
defaultSession = "none+xmonad";
|
||||
sddm = {
|
||||
enable = !config.machineVars.headless;
|
||||
wayland.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
services.xserver = {
|
||||
enable = !config.machineVars.headless;
|
||||
|
||||
|
@ -13,13 +22,15 @@
|
|||
# xfce.enable = !config.machineVars.headless;
|
||||
# };
|
||||
|
||||
displayManager.lightdm.enable = !config.machineVars.headless;
|
||||
# displayManager.lightdm.enable = !config.machineVars.headless;
|
||||
|
||||
windowManager.xmonad = {
|
||||
enable = true;
|
||||
enableContribAndExtras = true;
|
||||
enableConfiguredRecompile = true;
|
||||
extraPackages = hPkgs: with hPkgs; [ dbus ];
|
||||
extraPackages = hPkgs: with hPkgs; [
|
||||
dbus
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
{
|
||||
imports = [
|
||||
./services/avahi.nix
|
||||
./services/btrfs.nix
|
||||
./services/docker.nix
|
||||
./services/libvirtd.nix
|
||||
./services/logiops.nix
|
||||
|
@ -12,6 +13,8 @@
|
|||
|
||||
system.stateVersion = "22.05";
|
||||
|
||||
security.pam.services.hyprlock = {};
|
||||
|
||||
boot.binfmt.emulatedSystems = [
|
||||
"x86_64-windows"
|
||||
"aarch64-linux"
|
||||
|
@ -73,7 +76,7 @@
|
|||
services = {
|
||||
openssh = {
|
||||
enable = true;
|
||||
settings.X11Forwarding = true;
|
||||
# settings.X11Forwarding = true;
|
||||
};
|
||||
xserver.videoDrivers = [ "amdgpu" ];
|
||||
tailscale.enable = true;
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
{ ... }:
|
||||
{
|
||||
services.btrfs.autoScrub.enable = true;
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
final: prev: let
|
||||
inherit (prev) lib;
|
||||
|
||||
wrapWithWaylandIMEFlag = pkg: let
|
||||
binaryName = lib.removePrefix "${lib.getBin pkg}/bin/" (lib.getExe pkg);
|
||||
in pkg.overrideAttrs (prev': {
|
||||
postInstall = (prev'.postInstall or "") + ''
|
||||
wrapProgram "$out/bin/${binaryName}" \
|
||||
--add-flags "--enable-wayland-ime"
|
||||
'';
|
||||
});
|
||||
|
||||
programList = [
|
||||
"element-desktop"
|
||||
"vscode"
|
||||
"chromium"
|
||||
"discord"
|
||||
];
|
||||
in
|
||||
lib.genAttrs programList (name: wrapWithWaylandIMEFlag prev.${name})
|
|
@ -1,3 +1,5 @@
|
|||
# Dogfooding of https://github.com/NixOS/nixpkgs/pull/251706
|
||||
|
||||
{ bazel
|
||||
, buildBazelPackage
|
||||
, fcitx5
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# Dogfooding of https://github.com/NixOS/nixpkgs/pull/251706
|
||||
|
||||
{ bazel
|
||||
, buildBazelPackage
|
||||
, fetchFromGitHub
|
||||
|
|
Loading…
Reference in New Issue