Initial commit
This commit is contained in:
commit
e5f96ab9b9
0
desktop/gnome/gnome.nix
Normal file
0
desktop/gnome/gnome.nix
Normal file
418
desktop/hyprland/hyprland.nix
Normal file
418
desktop/hyprland/hyprland.nix
Normal file
@ -0,0 +1,418 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
options = {
|
||||
hyprland.enable =
|
||||
lib.mkEnableOption "enable Hyprland module";
|
||||
};
|
||||
|
||||
imports = [
|
||||
./packages.nix
|
||||
./waybar.nix
|
||||
./rofi.nix
|
||||
];
|
||||
|
||||
config = lib.mkIf config.hyprland.enable {
|
||||
|
||||
waybar.enable = lib.mkDefault true;
|
||||
rofi.enable = lib.mkDefault true;
|
||||
services.network-manager-applet.enable = true;
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
monitor = [
|
||||
"eDP-1,1920x1080,0x0,1"
|
||||
",preferred,auto,1,mirror,eDP-1"
|
||||
];
|
||||
|
||||
input = {
|
||||
"kb_layout" = "us, cz, ru";
|
||||
"follow_mouse" = "1";
|
||||
"kb_options" = "caps:swapecase";
|
||||
#"kb_options" = "ctrl:nocaps";
|
||||
|
||||
touchpad = {
|
||||
"natural_scroll" = "no";
|
||||
};
|
||||
|
||||
"sensitivity" = "0";
|
||||
"force_no_accel" = "1";
|
||||
#"numlock_by_default" = "true";
|
||||
};
|
||||
|
||||
gestures = {
|
||||
"workspace_swipe" = "true";
|
||||
"workspace_swipe_fingers" = "3";
|
||||
};
|
||||
|
||||
dwindle = {
|
||||
"pseudotile" = "yes";
|
||||
"preserve_split" = "yes";
|
||||
};
|
||||
|
||||
master = {
|
||||
"new_status" = "master";
|
||||
};
|
||||
|
||||
misc = {
|
||||
"vrr" = "0";
|
||||
"disable_hyprland_logo" = "true";
|
||||
"disable_splash_rendering" = "true";
|
||||
"force_default_wallpaper" = "0";
|
||||
};
|
||||
|
||||
xwayland = {
|
||||
"force_zero_scaling" = "true";
|
||||
};
|
||||
|
||||
env = [
|
||||
"XDG_CURRENT_DESKTOP,Hyprland"
|
||||
"XDG_SESSION_TYPE,wayland"
|
||||
"XDG_SESSION_DESKTOP,Hyprland"
|
||||
"QT_QPA_PLATFORM,wayland;xcb"
|
||||
"QT_QPA_PLATFORMTHEME,qt6ct"
|
||||
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
|
||||
"QT_AUTO_SCREEN_SCALE_FACTOR,1"
|
||||
"MOZ_ENABLE_WAYLAND,1"
|
||||
"GDK_SCALE,1"
|
||||
"LIBVA_DRIVER_NAME,nvidia"
|
||||
"__GLX_VENDOR_LIBRARY_NAME,nvidia"
|
||||
"__GL_VRR_ALLOWED,1"
|
||||
"WLR_DRM_NO_ATOMIC,1"
|
||||
];
|
||||
|
||||
exec-once = [
|
||||
"hyprpm reload -n"
|
||||
"discord --start-minimized"
|
||||
"ferdium --minimized"
|
||||
"kdeconnect-indicator"
|
||||
"swww-daemon --format xrgb"
|
||||
"swww img /home/foglar/Programming/Git/wallpapers/Decay-Green/wallpapers/aurora_borealis.png"
|
||||
"hypridle"
|
||||
"waybar"
|
||||
"swayosd-server"
|
||||
|
||||
"blueman-applet"
|
||||
"udiskie --no-automount --smart-tray"
|
||||
"nm-applet --indicator"
|
||||
"dunst"
|
||||
"wl-paste --type text --watch cliphist store # clipboard store text data"
|
||||
"wl-paste --type image --watch cliphist store # clipboard store image data"
|
||||
"$scrPath/batterynotify.sh # battery notification"
|
||||
|
||||
"$scrPath/resetxdgportal.sh # reset XDPH for screenshare"
|
||||
#"dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP # for XDPH"
|
||||
#"dbus-update-activation-environment --systemd --all # for XDPH"
|
||||
#"systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP # for XDPH"
|
||||
"$scrPath/polkitkdeauth.sh # authentication dialogue for GUI apps"
|
||||
];
|
||||
|
||||
"$mod" = "SUPER";
|
||||
"$term" = "kitty";
|
||||
"$editor" = "code";
|
||||
"$file" = "dolphin";
|
||||
"$browser" = "librewolf";
|
||||
|
||||
animations = {
|
||||
"enabled" = "yes";
|
||||
"bezier" = [
|
||||
"wind, 0.05, 0.9, 0.1, 1.05"
|
||||
"winIn, 0.1, 1.1, 0.1, 1.1"
|
||||
"winOut, 0.3, -0.3, 0, 1"
|
||||
"liner, 1, 1, 1, 1"
|
||||
];
|
||||
"animation" = [
|
||||
"windows, 1, 6, wind, slide"
|
||||
"windowsIn, 1, 6, winIn, slide"
|
||||
"windowsOut, 1, 5, winOut, slide"
|
||||
"windowsMove, 1, 5, wind, slide"
|
||||
"border, 1, 1, liner"
|
||||
"borderangle, 1, 30, liner, loop"
|
||||
"fade, 1, 10, default"
|
||||
"workspaces, 1, 5, wind"
|
||||
];
|
||||
};
|
||||
|
||||
bindr = [
|
||||
"ALTSHIFT, Shift_L, exec, keyboardswitch.sh"
|
||||
"CAPS,Caps_Lock, exec, swayosd-client --caps-lock"
|
||||
];
|
||||
|
||||
#bindsr = [
|
||||
#];
|
||||
|
||||
bindd = [
|
||||
"$mod SHIFT, P, Color Picker, exec, hyprpicker -a"
|
||||
];
|
||||
|
||||
bindl = [
|
||||
# Audio
|
||||
",XF86AudioMute, exec, swayosd-client --output-volume mute-toggle"
|
||||
",XF86AudioMicMute, exec, swayosd-client --input-volume mute-toggle"
|
||||
|
||||
# Media
|
||||
"Alt, P, exec, playerctl play-pause"
|
||||
"Alt, I, exec, playerctl next"
|
||||
"Alt, O, exec, playerctl previous"
|
||||
];
|
||||
|
||||
bindel = [
|
||||
",XF86AudioLowerVolume, exec, swayosd-client --output-volume -5"
|
||||
",XF86AudioRaiseVolume, exec, swayosd-client --output-volume 5"
|
||||
# Brightness
|
||||
",XF86MonBrightnessUp, exec, swayosd-client --brightness raise"
|
||||
",XF86MonBrightnessDown, exec, swayosd-client --brightness lower"
|
||||
];
|
||||
|
||||
binde = [
|
||||
# Resize windows
|
||||
"$mod+Shift, Right, resizeactive, 30 0"
|
||||
"$mod+Shift, Left, resizeactive, -30 0"
|
||||
"$mod+Shift, Up, resizeactive, 0 -30"
|
||||
"$mod+Shift, Down, resizeactive, 0 30"
|
||||
];
|
||||
|
||||
bindm = [
|
||||
# Move/Resize focused window
|
||||
"$mod, mouse:272, movewindow"
|
||||
"$mod, mouse:273, resizewindow"
|
||||
"$mod, Z, movewindow"
|
||||
"$mod, X, resizewindow"
|
||||
];
|
||||
|
||||
bind = [
|
||||
"$mod, Q, exec, dontkillsteam"
|
||||
"$mod, Delete, exit"
|
||||
"$mod, W, togglefloating"
|
||||
"$mod, G, togglegroup"
|
||||
"Alt, Return, fullscreen"
|
||||
"$mod, Escape, exec, hyprlock"
|
||||
#"$mod+Shift,F, exec, windowpin.sh"
|
||||
#"$mod, Backspace, exec, logoutlaunch.sh"
|
||||
"$Ctrl+Alt, W, exec, killall waybar || waybar" # toggle waybar
|
||||
|
||||
"$mod, T, exec, $term"
|
||||
"$mod, F, exec, $browser"
|
||||
"$mod, E, exec, $file"
|
||||
"$mod, C, exec, $editor"
|
||||
#"Ctrl+Shift, Escape, exec, $sysmonlaunch.sh"
|
||||
|
||||
# Rofi
|
||||
"$mod, A, exec, pkill -x rofi || rofi -show drun"
|
||||
#"$mod, A, exec, pkill -x rofi || rofilaunch.sh d"
|
||||
#"$mod, Tab, exec, pkill -x rofi || rofilaunch.sh w"
|
||||
#"$mod+Shift, E, exec, pkill -x rofi || rofilaunch.sh f"
|
||||
|
||||
# Grouped Windows
|
||||
"$mod CTRL, H, changegroupactive, b"
|
||||
"$mod CTRL, L, changegroupactive, f"
|
||||
|
||||
# Screenshot
|
||||
"$mod, P, exec, screenshot s"
|
||||
"$mod+Ctrl, P, exec, screenshot sf"
|
||||
"$mod+Alt, P, exec, screenshot m"
|
||||
", Print, exec, screenshot p" # All monitors screenshot capture
|
||||
|
||||
# Custom scripts
|
||||
"$mod, V, exec, pkill -x rofi || scliphist c"
|
||||
|
||||
# Move/Change window focus
|
||||
"$mod, H, movefocus, l"
|
||||
"$mod, L, movefocus, r"
|
||||
"$mod, K, movefocus, u"
|
||||
"$mod, J, movefocus, d"
|
||||
"Alt, Tab, movefocus, d"
|
||||
|
||||
"$mod Shift, H, movewindow, l"
|
||||
"$mod Shift, L, movewindow, r"
|
||||
"$mod Shift, K, movewindow, u"
|
||||
"$mod Shift, J, movewindow, d"
|
||||
|
||||
"$mod, 1, workspace, 1"
|
||||
"$mod, 2, workspace, 2"
|
||||
"$mod, 3, workspace, 3"
|
||||
"$mod, 4, workspace, 4"
|
||||
"$mod, 5, workspace, 5"
|
||||
"$mod, 6, workspace, 6"
|
||||
"$mod, 7, workspace, 7"
|
||||
"$mod, 8, workspace, 8"
|
||||
"$mod, 9, workspace, 9"
|
||||
"$mod, 0, workspace, 10"
|
||||
|
||||
"$mod+Ctrl, Right, workspace, r+1"
|
||||
"$mod+Ctrl, Left, workspace, r-1"
|
||||
|
||||
"$mod+Ctrl, Down, workspace, empty"
|
||||
|
||||
# Move focused window to a relative workspace
|
||||
"$mod+Shift, 1, movetoworkspace, 1"
|
||||
"$mod+Shift, 2, movetoworkspace, 2"
|
||||
"$mod+Shift, 3, movetoworkspace, 3"
|
||||
"$mod+Shift, 4, movetoworkspace, 4"
|
||||
"$mod+Shift, 5, movetoworkspace, 5"
|
||||
"$mod+Shift, 6, movetoworkspace, 6"
|
||||
"$mod+Shift, 7, movetoworkspace, 7"
|
||||
"$mod+Shift, 8, movetoworkspace, 8"
|
||||
"$mod+Shift, 9, movetoworkspace, 9"
|
||||
"$mod+Shift, 0, movetoworkspace, 10"
|
||||
|
||||
# Move focused window to a relative workspace silently
|
||||
"$mod+Alt, 1, movetoworkspacesilent, 1"
|
||||
"$mod+Alt, 2, movetoworkspacesilent, 2"
|
||||
"$mod+Alt, 3, movetoworkspacesilent, 3"
|
||||
"$mod+Alt, 4, movetoworkspacesilent, 4"
|
||||
"$mod+Alt, 5, movetoworkspacesilent, 5"
|
||||
"$mod+Alt, 6, movetoworkspacesilent, 6"
|
||||
"$mod+Alt, 7, movetoworkspacesilent, 7"
|
||||
"$mod+Alt, 8, movetoworkspacesilent, 8"
|
||||
"$mod+Alt, 9, movetoworkspacesilent, 9"
|
||||
"$mod+Alt, 0, movetoworkspacesilent, 10"
|
||||
|
||||
# Move focused window to a relative workspace
|
||||
"$mod+Ctrl+Alt, Right, movetoworkspace, r+1"
|
||||
"$mod+Ctrl+Alt, Left, movetoworkspace, r-1"
|
||||
|
||||
# Move active window around current workspace with $mod + SHIFT + CTRL
|
||||
|
||||
# Scroll through existing workspaces
|
||||
"$mod, mouse_down, workspace, e+1"
|
||||
"$mod, mouse_up, workspace, e-1"
|
||||
|
||||
# Move/Switch to special workspace
|
||||
"$mod+Alt, S, movetoworkspacesilent, special"
|
||||
"$mod, S, togglespecialworkspace"
|
||||
|
||||
"$mod, U, togglesplit"
|
||||
];
|
||||
|
||||
windowrulev2 = [
|
||||
"opacity 0.90 0.90,class:^(firefox)$"
|
||||
"opacity 0.90 0.90,class:^(Brave-browser)$"
|
||||
"opacity 0.80 0.80,class:^(code-oss)$"
|
||||
"opacity 0.80 0.80,class:^(Code)$"
|
||||
"opacity 0.80 0.80,class:^(code-url-handler)$"
|
||||
"opacity 0.80 0.80,class:^(code-insiders-url-handler)$"
|
||||
"opacity 0.80 0.80,class:^(kitty)$"
|
||||
"opacity 0.80 0.80,class:^(org.kde.dolphin)$"
|
||||
"opacity 0.80 0.80,class:^(org.kde.ark)$"
|
||||
"opacity 0.80 0.80,class:^(nwg-look)$"
|
||||
"opacity 0.80 0.80,class:^(qt5ct)$"
|
||||
"opacity 0.80 0.80,class:^(qt6ct)$"
|
||||
"opacity 0.80 0.80,class:^(kvantummanager)$"
|
||||
"opacity 0.80 0.70,class:^(org.pulseaudio.pavucontrol)$"
|
||||
"opacity 0.80 0.70,class:^(blueman-manager)$"
|
||||
"opacity 0.80 0.70,class:^(nm-applet)$"
|
||||
"opacity 0.80 0.70,class:^(nm-connection-editor)$"
|
||||
"opacity 0.80 0.70,class:^(org.kde.polkit-kde-authentication-agent-1)$"
|
||||
"opacity 0.80 0.70,class:^(polkit-gnome-authentication-agent-1)$"
|
||||
"opacity 0.80 0.70,class:^(org.freedesktop.impl.portal.desktop.gtk)$"
|
||||
"opacity 0.80 0.70,class:^(org.freedesktop.impl.portal.desktop.hyprland)$"
|
||||
"opacity 0.70 0.70,class:^([Ss]team)$"
|
||||
"opacity 0.70 0.70,class:^(steamwebhelper)$"
|
||||
"opacity 0.70 0.70,class:^([Ss]potify)$"
|
||||
"opacity 0.70 0.70,initialTitle:^(Spotify Free)$"
|
||||
"opacity 0.70 0.70,initialTitle:^(Spotify Premium)$"
|
||||
"opacity 0.90 0.90,class:^(com.github.rafostar.Clapper)$"
|
||||
"opacity 0.80 0.80,class:^(com.github.tchx84.Flatseal)$"
|
||||
"opacity 0.80 0.80,class:^(hu.kramo.Cartridges)$"
|
||||
"opacity 0.80 0.80,class:^(com.obsproject.Studio)$"
|
||||
"opacity 0.80 0.80,class:^(gnome-boxes)$"
|
||||
"opacity 0.80 0.80,class:^(vesktop)$"
|
||||
"opacity 0.80 0.80,class:^(discord)$"
|
||||
"opacity 0.80 0.80,class:^(WebCord)$"
|
||||
"opacity 0.80 0.80,class:^(ArmCord)$"
|
||||
"opacity 0.80 0.80,class:^(app.drey.Warp)$"
|
||||
"opacity 0.80 0.80,class:^(net.davidotek.pupgui2)$"
|
||||
"opacity 0.80 0.80,class:^(yad)$"
|
||||
"opacity 0.80 0.80,class:^(Signal)$"
|
||||
"opacity 0.80 0.80,class:^(io.github.alainm23.planify)$"
|
||||
"opacity 0.80 0.80,class:^(io.gitlab.theevilskeleton.Upscaler)$"
|
||||
"opacity 0.80 0.80,class:^(com.github.unrud.VideoDownloader)$"
|
||||
"opacity 0.80 0.80,class:^(io.gitlab.adhami3310.Impression)$"
|
||||
"opacity 0.80 0.80,class:^(io.missioncenter.MissionCenter)$"
|
||||
"opacity 0.80 0.80,class:^(io.github.flattool.Warehouse)$"
|
||||
"float,class:^(org.kde.dolphin)$,title:^(Progress Dialog — Dolphin)$"
|
||||
"float,class:^(org.kde.dolphin)$,title:^(Copying — Dolphin)$"
|
||||
"float,title:^(About Mozilla Firefox)$"
|
||||
"float,class:^(firefox)$,title:^(Picture-in-Picture)$"
|
||||
"float,class:^(firefox)$,title:^(Library)$"
|
||||
"float,class:^(kitty)$,title:^(top)$"
|
||||
"float,class:^(kitty)$,title:^(btop)$"
|
||||
"float,class:^(kitty)$,title:^(htop)$"
|
||||
"float,class:^(vlc)$"
|
||||
"float,class:^(kvantummanager)$"
|
||||
"float,class:^(qt5ct)$"
|
||||
"float,class:^(qt6ct)$"
|
||||
"float,class:^(nwg-look)$"
|
||||
"float,class:^(org.kde.ark)$"
|
||||
"float,class:^(org.pulseaudio.pavucontrol)$"
|
||||
"float,class:^(blueman-manager)$"
|
||||
"float,class:^(nm-applet)$"
|
||||
"float,class:^(nm-connection-editor)$"
|
||||
"float,class:^(org.kde.polkit-kde-authentication-agent-1)$"
|
||||
"float,class:^(Signal)$"
|
||||
"float,class:^(com.github.rafostar.Clapper)$"
|
||||
"float,class:^(app.drey.Warp)$"
|
||||
"float,class:^(net.davidotek.pupgui2)$"
|
||||
"float,class:^(yad)$"
|
||||
"float,class:^(eog)$"
|
||||
"float,class:^(io.github.alainm23.planify)$"
|
||||
"float,class:^(io.gitlab.theevilskeleton.Upscaler)$"
|
||||
"float,class:^(com.github.unrud.VideoDownloader)$"
|
||||
"float,class:^(io.gitlab.adhami3310.Impression)$"
|
||||
"float,class:^(io.missioncenter.MissionCenter)$"
|
||||
"float,title:^(stellarium)$"
|
||||
"float,class:^(localsend_app)$"
|
||||
"float,class:^(1Password)$"
|
||||
"stayfocused,class:^(1Password)$"
|
||||
"float,title:^(Open Folder)$"
|
||||
"float,class:^(org.wireshark.Wireshark)$"
|
||||
"float,class:^(spotube)$"
|
||||
"float,class:^(harmonymusic)$"
|
||||
"opacity 0.70 0.60,class:^(harmonymusic)$"
|
||||
"float,title:^(systemupdate)$"
|
||||
"size 800 450,title:^(systemupdate)$"
|
||||
"workspace special,title:^(systemupdate)$"
|
||||
"float,class:^(Spotify)$"
|
||||
"size 960 600,class:^(Spotify)$"
|
||||
"workspace special,title:^(Spotify)$"
|
||||
"float,class:^(post_processing_gui.py)$"
|
||||
"float,title:^(Picture-in-Picture)$"
|
||||
"pin,title:^(Picture-in-Picture)$"
|
||||
"move 1280 680,title:^(Picture-in-Picture)$"
|
||||
"float,title:^(KDE Connect)$"
|
||||
"opacity 0.80 0.70,title:^(KDE Connect)$"
|
||||
"float,title:^(Welcome to CLion)$"
|
||||
"float,title:^(Welcome to JetBrains Rider)$"
|
||||
"opacity 0.90 0.70,class:^(jetbrains-rider)$"
|
||||
"move 1460 330,title:^(JetBrains Toolbox)$"
|
||||
"opacity 0.80 0.70,title:^(JetBrains Toolbox)$"
|
||||
"opacity 0.70 0.60,class:^(org.wireshark.Wireshark)$"
|
||||
"opacity 0.70 0.60,class:^(install4j-burp-StartBurp)$"
|
||||
"opacity 0.70 0.60,class:^(GitKraken)$"
|
||||
"opacity 0.75 0.65,class:^(Arduino IDE)$"
|
||||
"opacity 0.70 0.60,class:^(virt-manager)$"
|
||||
"float,class:^(org.raspberrypi.rpi-imager)$"
|
||||
"opacity 0.80 0.70,title:^(Cobra Monitor)$"
|
||||
"opacity 0.80 0.70,class:^(chat-simplex-desktop-MainKt)$"
|
||||
];
|
||||
|
||||
layerrule = [
|
||||
"blur,rofi"
|
||||
"ignorezero,rofi"
|
||||
"blur,notifications"
|
||||
"ignorezero,notifications"
|
||||
"blur,swaync-notification-window"
|
||||
"ignorezero,swaync-notification-window"
|
||||
"blur,swaync-control-center"
|
||||
"ignorezero,swaync-control-center"
|
||||
"blur,logout_dialog"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
88
desktop/hyprland/packages.nix
Normal file
88
desktop/hyprland/packages.nix
Normal file
@ -0,0 +1,88 @@
|
||||
{pkgs, ...}: {
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
font.name = "JetBrainsMono Nerd Font";
|
||||
#themeFile = "tokyo_night_night";
|
||||
themeFile = "Catppuccin-Mocha";
|
||||
settings = {
|
||||
font_size = 11.5;
|
||||
confirm_os_window_close = 0;
|
||||
hide_window_decorations = 0;
|
||||
enable_audio_bell = false;
|
||||
window_padding_width = 25;
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
hyprlock
|
||||
hyprpicker
|
||||
hypridle
|
||||
|
||||
rofi
|
||||
waybar
|
||||
swww
|
||||
|
||||
kitty
|
||||
kitty-themes
|
||||
kitty-img
|
||||
|
||||
pavucontrol
|
||||
hyprshade
|
||||
swappy
|
||||
grimblast
|
||||
dunst
|
||||
udiskie
|
||||
wl-clipboard
|
||||
cliphist
|
||||
swayosd
|
||||
|
||||
(writeShellScriptBin "dontkillsteam" ''
|
||||
if [[ $(hyprctl activewindow -j | jq -r ".class") == "Steam" ]]; then
|
||||
xdotool windowunmap $(xdotool getactivewindow)
|
||||
else
|
||||
hyprctl dispatch killactive ""
|
||||
fi
|
||||
'')
|
||||
|
||||
(writeShellScriptBin "screenshot" ''
|
||||
restore_shader() {
|
||||
if [ -n "$shader" ]; then
|
||||
hyprshade on "$shader"
|
||||
fi
|
||||
}
|
||||
|
||||
# Saves the current shader and turns it off
|
||||
save_shader() {
|
||||
shader=$(hyprshade current)
|
||||
hyprshade off
|
||||
trap restore_shader EXIT
|
||||
}
|
||||
|
||||
save_shader
|
||||
|
||||
save_file=$(date +'%y%m%d_%Hh%Mm%Ss_screenshot.png')
|
||||
temp_screenshot="/tmp/screenshot.png"
|
||||
|
||||
case $1 in
|
||||
p) # print all outputs
|
||||
grimblast copysave screen $temp_screenshot && restore_shader && swappy -f $temp_screenshot ;;
|
||||
s) # drag to manually snip an area / click on a window to print it
|
||||
grimblast copysave area $temp_screenshot && restore_shader && swappy -f $temp_screenshot ;;
|
||||
sf) # frozen screen, drag to manually snip an area / click on a window to print it
|
||||
grimblast --freeze copysave area $temp_screenshot && restore_shader && swappy -f $temp_screenshot ;;
|
||||
m) # print focused monitor
|
||||
grimblast copysave output $temp_screenshot && restore_shader && swappy -f $temp_screenshot ;;
|
||||
*) # invalid option
|
||||
print_error ;;
|
||||
esac
|
||||
|
||||
rm "$temp_screenshot"
|
||||
'')
|
||||
|
||||
#(writeShellScriptBin "keyboardswitch")
|
||||
#(writeShellScriptBin "windowpin")
|
||||
#(writeShellScriptBin "logoutlaunch")
|
||||
#(writeShellScriptBin "sysmonlaunch")
|
||||
#(writeShellScriptBin "rofilaunch" '''')
|
||||
];
|
||||
}
|
||||
188
desktop/hyprland/rofi.nix
Normal file
188
desktop/hyprland/rofi.nix
Normal file
@ -0,0 +1,188 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
options = {
|
||||
rofi.enable = lib.mkEnableOption "enable Rofi module";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.rofi.enable {
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
cycle = true;
|
||||
location = "center";
|
||||
pass = {};
|
||||
font = "JetBrainsMono NF 14";
|
||||
theme = let
|
||||
inherit (config.lib.formats.rasi) mkLiteral;
|
||||
in {
|
||||
"*" = {
|
||||
main-bg = mkLiteral "#11111be6";
|
||||
main-fg = mkLiteral "#cdd6f4ff";
|
||||
main-br = mkLiteral "#cba6f7ff";
|
||||
main-ex = mkLiteral "#f5e0dcff";
|
||||
select-bg = mkLiteral "#b4befeff";
|
||||
select-fg = mkLiteral "#11111bff";
|
||||
separatorcolor = mkLiteral "transparent";
|
||||
border-color = mkLiteral "transparent";
|
||||
};
|
||||
|
||||
"configuration" = {
|
||||
modi = "drun,filebrowser,window,run";
|
||||
show-icons = true;
|
||||
display-drun = " ";
|
||||
display-run = " ";
|
||||
display-filebrowser = " ";
|
||||
display-window = " ";
|
||||
drun-display-format = "{name}";
|
||||
window-format = "{w}{t}";
|
||||
font = "JetBrainsMono Nerd Font 10";
|
||||
icon-theme = "Tela-circle-dracula";
|
||||
};
|
||||
|
||||
# Main window settings
|
||||
"window" = {
|
||||
height = mkLiteral "35em";
|
||||
width = mkLiteral "56em";
|
||||
transparency = "real";
|
||||
fullscreen = false;
|
||||
enabled = true;
|
||||
cursor = "default";
|
||||
spacing = mkLiteral "0em";
|
||||
padding = mkLiteral "0em";
|
||||
border-color = mkLiteral "@main-br"; # replace with actual color hex if needed
|
||||
background-color = mkLiteral "@main-bg";
|
||||
};
|
||||
|
||||
# Mainbox settings
|
||||
"mainbox" = {
|
||||
enabled = true;
|
||||
spacing = mkLiteral "0em";
|
||||
padding = mkLiteral "0em";
|
||||
orientation = mkLiteral "vertical";
|
||||
children = ["inputbar" "listbox"];
|
||||
background-color = mkLiteral "transparent";
|
||||
background-image = mkLiteral "url(\"~/.cache/hyde/wall.blur\", height)";
|
||||
};
|
||||
|
||||
# Input bar settings
|
||||
"inputbar" = {
|
||||
enabled = true;
|
||||
spacing = mkLiteral "0em";
|
||||
padding = mkLiteral "5em";
|
||||
children = ["entry"];
|
||||
background-color = mkLiteral "transparent";
|
||||
background-image = mkLiteral "url(\"~/.cache/hyde/wall.thmb\", width)";
|
||||
};
|
||||
|
||||
# Entry field settings
|
||||
"entry" = {
|
||||
border-radius = mkLiteral "2em";
|
||||
enabled = true;
|
||||
spacing = mkLiteral "1em";
|
||||
padding = mkLiteral "1em";
|
||||
text-color = mkLiteral "@main-fg";
|
||||
background-color = mkLiteral "@main-bg";
|
||||
};
|
||||
|
||||
# Listbox settings
|
||||
"listbox" = {
|
||||
padding = mkLiteral "0em";
|
||||
spacing = mkLiteral "0em";
|
||||
orientation = mkLiteral "horizontal";
|
||||
children = ["listview" "mode-switcher"];
|
||||
background-color = mkLiteral "@main-bg";
|
||||
};
|
||||
|
||||
# List view settings
|
||||
"listview" = {
|
||||
padding = mkLiteral "1.5em";
|
||||
spacing = mkLiteral "0.5em";
|
||||
enabled = true;
|
||||
columns = 2;
|
||||
lines = 3;
|
||||
cycle = true;
|
||||
dynamic = true;
|
||||
scrollbar = false;
|
||||
layout = "vertical";
|
||||
reverse = false;
|
||||
fixed-height = true;
|
||||
fixed-columns = true;
|
||||
cursor = "default";
|
||||
background-color = mkLiteral "transparent";
|
||||
text-color = mkLiteral "@main-fg";
|
||||
};
|
||||
|
||||
# Mode switcher settings
|
||||
"mode-switcher" = {
|
||||
orientation = mkLiteral "vertical";
|
||||
width = mkLiteral "6.6em";
|
||||
enabled = true;
|
||||
padding = mkLiteral "1.5em";
|
||||
spacing = mkLiteral "1.5em";
|
||||
background-color = mkLiteral "transparent";
|
||||
};
|
||||
|
||||
# Button settings
|
||||
"button" = {
|
||||
cursor = "pointer";
|
||||
border-radius = mkLiteral "2em";
|
||||
background-color = mkLiteral "@main-bg";
|
||||
text-color = mkLiteral "@main-fg";
|
||||
};
|
||||
"button selected" = {
|
||||
background-color = mkLiteral "@main-fg";
|
||||
text-color = mkLiteral "@main-bg";
|
||||
};
|
||||
|
||||
# Element settings
|
||||
"element" = {
|
||||
enabled = true;
|
||||
spacing = mkLiteral "0em";
|
||||
padding = mkLiteral "0.5em";
|
||||
cursor = "pointer";
|
||||
background-color = mkLiteral "transparent";
|
||||
text-color = mkLiteral "@main-fg";
|
||||
};
|
||||
"element selected.normal" = {
|
||||
background-color = mkLiteral "@select-bg";
|
||||
text-color = mkLiteral "@select-fg";
|
||||
};
|
||||
|
||||
# Icon element settings
|
||||
"element-icon" = {
|
||||
size = mkLiteral "3em";
|
||||
cursor = "inherit";
|
||||
background-color = mkLiteral "transparent";
|
||||
text-color = mkLiteral "inherit";
|
||||
};
|
||||
|
||||
# Text element settings
|
||||
"element-text" = {
|
||||
vertical-align = mkLiteral "0.5";
|
||||
horizontal-align = mkLiteral "0.0";
|
||||
cursor = "inherit";
|
||||
background-color = mkLiteral "transparent";
|
||||
text-color = mkLiteral "inherit";
|
||||
};
|
||||
|
||||
# Error message settings
|
||||
"error-message" = {
|
||||
text-color = mkLiteral "@main-fg";
|
||||
background-color = mkLiteral "@main-bg";
|
||||
text-transform = mkLiteral "capitalize";
|
||||
children = ["textbox"];
|
||||
};
|
||||
|
||||
# Textbox settings
|
||||
"textbox" = {
|
||||
text-color = mkLiteral "inherit";
|
||||
background-color = mkLiteral "inherit";
|
||||
vertical-align = mkLiteral "0.5";
|
||||
horizontal-align = mkLiteral "0.5";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
460
desktop/hyprland/waybar.nix
Normal file
460
desktop/hyprland/waybar.nix
Normal file
@ -0,0 +1,460 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
options = {
|
||||
waybar.enable = lib.mkEnableOption "enable Waybar module";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.waybar.enable {
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
mainBar = {
|
||||
layer = "top";
|
||||
position = "top";
|
||||
height = 36;
|
||||
exclusive = true;
|
||||
passthrough = false;
|
||||
gtk-layer-shell = true;
|
||||
reload_style_on_change = true;
|
||||
output = [
|
||||
"eDP-1"
|
||||
];
|
||||
modules-left = ["custom/padd" "custom/l_end" "cpu" "memory" "custom/r_end" "custom/l_end" "idle_inhibitor" "clock" "custom/r_end" "" "custom/padd"];
|
||||
modules-center = ["custom/padd" "" "custom/l_end" "hyprland/workspaces" "hyprland/window" "custom/r_end" "custom/padd"];
|
||||
modules-right = ["custom/padd" "custom/l_end" "backlight" "network" "bluetooth" "pulseaudio" "pulseaudio#microphone" "custom/r_end" "custom/l_end" "tray" "battery" "custom/r_end" "custom/l_end" "custom/cliphist" "custom/power" "custom/r_end" "custom/padd"];
|
||||
|
||||
"hyprland/workspaces" = {
|
||||
disable-scroll = true;
|
||||
#rotate = ${r_deg};
|
||||
all-outputs = true;
|
||||
active-only = false;
|
||||
on-click = "activate";
|
||||
on-scroll-up = "hyprctl dispatch workspace -1";
|
||||
on-scroll-down = "hyprctl dispatch workspace +1";
|
||||
persistent-workspaces = {};
|
||||
};
|
||||
|
||||
"hyprland/window" = {
|
||||
format = " {}";
|
||||
#rotate = ${r_deg};
|
||||
separate-outputs = true;
|
||||
rewrite = {
|
||||
#"${USER}@${set_sysname}:(.*)" = "$1 ";
|
||||
"(.*) — Mozilla Firefox" = "$1 ";
|
||||
"(.*)Mozilla Firefox" = "Firefox ";
|
||||
"(.*) - Visual Studio Code" = "$1 ";
|
||||
"(.*)Visual Studio Code" = "Code ";
|
||||
"(.*) — Dolphin" = "$1 ";
|
||||
"(.*)Spotify" = "Spotify ";
|
||||
"(.*)Steam" = "Steam ";
|
||||
};
|
||||
max-length = 50;
|
||||
};
|
||||
|
||||
"cpu" = {
|
||||
interval = 10;
|
||||
format = " {usage}%";
|
||||
#rotate = ${r_deg};
|
||||
format-alt = "{icon0}{icon1}{icon2}{icon3}";
|
||||
format-icons = ["▁" "▂" "▃" "▄" "▅" "▆" "▇" "█"];
|
||||
};
|
||||
|
||||
"memory" = {
|
||||
states = {
|
||||
"c" = 90; # critical
|
||||
"h" = 60; # high
|
||||
"m" = 30; # medium
|
||||
};
|
||||
interval = 30;
|
||||
format = " {used}GB";
|
||||
#rotate = ${r_deg};
|
||||
format-m = " {used}GB";
|
||||
format-h = " {used}GB";
|
||||
format-c = " {used}GB";
|
||||
format-alt = " {percentage}%";
|
||||
max-length = 10;
|
||||
tooltip = true;
|
||||
tooltip-format = " {percentage}%\n {used:0.1f}GB/{total:0.1f}GB";
|
||||
};
|
||||
|
||||
"bluetooth" = {
|
||||
format = "";
|
||||
#rotate": ${r_deg},
|
||||
format-disabled = "";
|
||||
format-connected = " {num_connections}";
|
||||
format-connected-battery = "{icon} {num_connections}";
|
||||
# "format-connected-battery" = "{icon} {device_alias}-{device_battery_percentage}%";
|
||||
format-icons = ["" "" "" "" "" "" "" "" "" "" ""];
|
||||
#"format-device-preference": [ "device1", "device2" ], // preference list deciding the displayed device If this config option is not defined or none of the devices in the list are connected, it will fall back to showing the last connected device.
|
||||
tooltip-format = "{controller_alias}\n{num_connections} connected";
|
||||
tooltip-format-connected = "{controller_alias}\n{num_connections} connected\n\n{device_enumerate}";
|
||||
tooltip-format-enumerate-connected = "{device_alias}";
|
||||
tooltip-format-enumerate-connected-battery = "{device_alias}\t{icon} {device_battery_percentage}%";
|
||||
};
|
||||
|
||||
"tray" = {
|
||||
icon-size = 18;
|
||||
rotate = 0;
|
||||
spacing = 5;
|
||||
};
|
||||
|
||||
"idle_inhibitor" = {
|
||||
format = "{icon}";
|
||||
rotate = 0;
|
||||
format-icons = {
|
||||
activated = "";
|
||||
deactivated = "";
|
||||
};
|
||||
};
|
||||
|
||||
"clock" = {
|
||||
format = "{:%H:%M}";
|
||||
rotate = 0;
|
||||
format-alt = "{:%R %d·%m·%y}";
|
||||
tooltip-format = "<span>{calendar}</span>";
|
||||
calendar = {
|
||||
mode = "month";
|
||||
mode-mon-col = 3;
|
||||
on-scroll = 1;
|
||||
on-click-right = "mode";
|
||||
format = {
|
||||
months = "<span color='#ffead3'><b>{}</b></span>";
|
||||
weekdays = "<span color='#ffcc66'><b>{}</b></span>";
|
||||
today = "<span color='#ff6699'><b>{}</b></span>";
|
||||
};
|
||||
};
|
||||
actions = {
|
||||
on-click-right = "mode";
|
||||
on-click-forward = "tz_up";
|
||||
on-click-backward = "tz_down";
|
||||
on-scroll-up = "shift_up";
|
||||
on-scroll-down = "shift_down";
|
||||
};
|
||||
};
|
||||
|
||||
"battery" = {
|
||||
states = {
|
||||
good = 95;
|
||||
warning = 30;
|
||||
critical = 20;
|
||||
};
|
||||
format = "{icon} {capacity}%";
|
||||
rotate = 0;
|
||||
format-charging = " {capacity}%";
|
||||
format-plugged = " {capacity}%";
|
||||
format-alt = "{time} {icon}";
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
};
|
||||
|
||||
"backlight" = {
|
||||
device = "intel_backlight";
|
||||
rotate = 0;
|
||||
format = "{icon} {percent}%";
|
||||
format-icons = ["" "" "" "" "" "" "" "" ""];
|
||||
on-scroll-up = "brightnessctl set 1%+";
|
||||
on-scroll-down = "brightnessctl set 1%-";
|
||||
min-length = 6;
|
||||
};
|
||||
|
||||
"network" = {
|
||||
tooltip = true;
|
||||
format-wifi = " ";
|
||||
rotate = 0;
|
||||
format-ethernet = " ";
|
||||
tooltip-format = "Network: <big><b>{essid}</b></big>\nSignal strength: <b>{signaldBm}dBm ({signalStrength}%)</b>\nFrequency: <b>{frequency}MHz</b>\nInterface: <b>{ifname}</b>\nIP: <b>{ipaddr}/{cidr}</b>\nGateway: <b>{gwaddr}</b>\nNetmask: <b>{netmask}</b>";
|
||||
format-linked = " {ifname} (No IP)";
|
||||
format-disconnected = " ";
|
||||
tooltip-format-disconnected = "Disconnected";
|
||||
format-alt = "<span foreground='#99ffdd'> {bandwidthDownBytes}</span> <span foreground='#ffcc66'> {bandwidthUpBytes}</span>";
|
||||
interval = 2;
|
||||
};
|
||||
|
||||
"pulseaudio" = {
|
||||
format = "{icon} {volume}";
|
||||
rotate = 0;
|
||||
format-muted = "婢";
|
||||
on-click = "pavucontrol -t 3";
|
||||
on-click-middle = "volumecontrol.sh -o m";
|
||||
on-scroll-up = "volumecontrol.sh -o i";
|
||||
on-scroll-down = "volumecontrol.sh -o d";
|
||||
tooltip-format = "{icon} {desc} // {volume}%";
|
||||
scroll-step = 5;
|
||||
format-icons = {
|
||||
headphone = "";
|
||||
hands-free = "";
|
||||
headset = "";
|
||||
phone = "";
|
||||
portable = "";
|
||||
car = "";
|
||||
default = ["" "" ""];
|
||||
};
|
||||
};
|
||||
|
||||
"pulseaudio#microphone" = {
|
||||
format = "{format_source}";
|
||||
rotate = 0;
|
||||
format-source = "";
|
||||
format-source-muted = "";
|
||||
on-click = "pavucontrol -t 4";
|
||||
on-click-middle = "volumecontrol.sh -i m";
|
||||
on-scroll-up = "volumecontrol.sh -i i";
|
||||
on-scroll-down = "volumecontrol.sh -i d";
|
||||
tooltip-format = "{format_source} {source_desc} // {source_volume}%";
|
||||
scroll-step = 5;
|
||||
};
|
||||
|
||||
"custom/cliphist" = {
|
||||
format = "{}";
|
||||
rotate = 0;
|
||||
exec = "echo ; echo clipboard history";
|
||||
on-click = "sleep 0.1 && cliphist.sh c";
|
||||
on-click-right = "sleep 0.1 && cliphist.sh d";
|
||||
on-click-middle = "sleep 0.1 && cliphist.sh w";
|
||||
interval = 86400; # once every day;
|
||||
tooltip = true;
|
||||
};
|
||||
|
||||
"custom/power" = {
|
||||
format = "{}";
|
||||
rotate = 0;
|
||||
exec = "echo ; echo logout";
|
||||
on-click = "logoutlaunch.sh 2";
|
||||
on-click-right = "logoutlaunch.sh 1";
|
||||
interval = 86400; # once every day
|
||||
tooltip = true;
|
||||
};
|
||||
|
||||
"custom/l_end" = {
|
||||
format = " ";
|
||||
interval = "once";
|
||||
tooltip = false;
|
||||
};
|
||||
|
||||
"custom/r_end" = {
|
||||
format = " ";
|
||||
interval = "once";
|
||||
tooltip = false;
|
||||
};
|
||||
|
||||
"custom/sl_end" = {
|
||||
format = " ";
|
||||
interval = "once";
|
||||
tooltip = false;
|
||||
};
|
||||
|
||||
"custom/sr_end" = {
|
||||
format = " ";
|
||||
interval = "once";
|
||||
tooltip = false;
|
||||
};
|
||||
|
||||
"custom/rl_end" = {
|
||||
format = " ";
|
||||
interval = "once";
|
||||
tooltip = false;
|
||||
};
|
||||
|
||||
"custom/rr_end" = {
|
||||
format = " ";
|
||||
interval = "once";
|
||||
tooltip = false;
|
||||
};
|
||||
|
||||
"custom/padd" = {
|
||||
format = " ";
|
||||
interval = "once";
|
||||
tooltip = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
style = ''
|
||||
@define-color bar-bg rgba(0, 0, 0, 0);
|
||||
@define-color main-bg #11111b;
|
||||
@define-color main-fg #cdd6f4;
|
||||
@define-color wb-act-bg #a6adc8;
|
||||
@define-color wb-act-fg #313244;
|
||||
@define-color wb-hvr-bg #f5c2e7;
|
||||
@define-color wb-hvr-fg #313;
|
||||
* {
|
||||
border: none;
|
||||
border-radius: 0px;
|
||||
font-family: "JetBrainsMono Nerd Font";
|
||||
font-weight: bold;
|
||||
font-size: 10px;
|
||||
min-height: 10px;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background: @bar-bg;
|
||||
}
|
||||
|
||||
tooltip {
|
||||
background: @main-bg;
|
||||
color: @main-fg;
|
||||
border-radius: 7px;
|
||||
border-width: 0px;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
box-shadow: none;
|
||||
text-shadow: none;
|
||||
padding: 0px;
|
||||
border-radius: 9px;
|
||||
margin-top: 3px;
|
||||
margin-bottom: 3px;
|
||||
margin-left: 0px;
|
||||
padding-left: 3px;
|
||||
padding-right: 3px;
|
||||
margin-right: 0px;
|
||||
color: @main-fg;
|
||||
animation: ws_normal 20s ease-in-out 1;
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
background: @wb-act-bg;
|
||||
color: @wb-act-fg;
|
||||
margin-left: 3px;
|
||||
padding-left: 12px;
|
||||
padding-right: 12px;
|
||||
margin-right: 3px;
|
||||
animation: ws_active 20s ease-in-out 1;
|
||||
transition: all 0.4s cubic-bezier(.55,-0.68,.48,1.682);
|
||||
}
|
||||
|
||||
#workspaces button:hover {
|
||||
background: @wb-hvr-bg;
|
||||
color: @wb-hvr-fg;
|
||||
animation: ws_hover 20s ease-in-out 1;
|
||||
transition: all 0.3s cubic-bezier(.55,-0.68,.48,1.682);
|
||||
}
|
||||
#taskbar button {
|
||||
box-shadow: none;
|
||||
text-shadow: none;
|
||||
padding: 0px;
|
||||
border-radius: 9px;
|
||||
margin-top: 3px;
|
||||
margin-bottom: 3px;
|
||||
margin-left: 0px;
|
||||
padding-left: 3px;
|
||||
padding-right: 3px;
|
||||
margin-right: 0px;
|
||||
color: @wb-color;
|
||||
animation: tb_normal 20s ease-in-out 1;
|
||||
}
|
||||
#taskbar button.active {
|
||||
background: @wb-act-bg;
|
||||
color: @wb-act-color;
|
||||
margin-left: 3px;
|
||||
padding-left: 12px;
|
||||
padding-right: 12px;
|
||||
margin-right: 3px;
|
||||
animation: tb_active 20s ease-in-out 1;
|
||||
transition: all 0.4s cubic-bezier(.55,-0.68,.48,1.682);
|
||||
}
|
||||
#taskbar button:hover {
|
||||
background: @wb-hvr-bg;
|
||||
color: @wb-hvr-color;
|
||||
animation: tb_hover 20s ease-in-out 1;
|
||||
transition: all 0.3s cubic-bezier(.55,-0.68,.48,1.682);
|
||||
}
|
||||
#tray menu * {
|
||||
min-height: 16px;
|
||||
}
|
||||
#tray menu separator {
|
||||
min-height: 10px;
|
||||
}
|
||||
#backlight,
|
||||
#battery,
|
||||
#bluetooth,
|
||||
#custom-cliphist,
|
||||
#clock,
|
||||
#custom-cpuinfo,
|
||||
#cpu,
|
||||
#custom-gpuinfo,
|
||||
#idle_inhibitor,
|
||||
#custom-keybindhint,
|
||||
#language,
|
||||
#memory,
|
||||
#mpris,
|
||||
#network,
|
||||
#custom-notifications,
|
||||
#custom-power,
|
||||
#pulseaudio,
|
||||
#custom-spotify,
|
||||
#taskbar,
|
||||
#custom-theme,
|
||||
#tray,
|
||||
#custom-updates,
|
||||
#custom-wallchange,
|
||||
#custom-wbar,
|
||||
#window,
|
||||
#workspaces,
|
||||
#custom-l_end,
|
||||
#custom-r_end,
|
||||
#custom-sl_end,
|
||||
#custom-sr_end,
|
||||
#custom-rl_end,
|
||||
#custom-rr_end {
|
||||
color: @main-fg;
|
||||
background: @main-bg;
|
||||
opacity: 1;
|
||||
margin: 4px 0px 4px 0px;
|
||||
padding-left: 4px;
|
||||
padding-right: 4px;
|
||||
}
|
||||
#workspaces,
|
||||
#taskbar {
|
||||
padding: 0px;
|
||||
}
|
||||
#custom-r_end {
|
||||
border-radius: 0px 21px 21px 0px;
|
||||
margin-right: 9px;
|
||||
padding-right: 3px;
|
||||
}
|
||||
#custom-l_end {
|
||||
border-radius: 21px 0px 0px 21px;
|
||||
margin-left: 9px;
|
||||
padding-left: 3px;
|
||||
}
|
||||
|
||||
#custom-sr_end {
|
||||
border-radius: 0px;
|
||||
margin-right: 9px;
|
||||
padding-right: 3px;
|
||||
}
|
||||
#custom-sl_end {
|
||||
border-radius: 0px;
|
||||
margin-left: 9px;
|
||||
padding-left: 3px;
|
||||
}
|
||||
#custom-rr_end {
|
||||
border-radius: 0px 7px 7px 0px;
|
||||
margin-right: 9px;
|
||||
padding-right: 3px;
|
||||
}
|
||||
#custom-rl_end {
|
||||
border-radius: 7px 0px 0px 7px;
|
||||
margin-left: 9px;
|
||||
padding-left: 3px;
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
0
desktop/kde/kde.nix
Normal file
0
desktop/kde/kde.nix
Normal file
6
desktops.nix
Normal file
6
desktops.nix
Normal file
@ -0,0 +1,6 @@
|
||||
{...}:
|
||||
{
|
||||
imports = [
|
||||
./desktop/hyprland/hyprland.nix
|
||||
];
|
||||
}
|
||||
48
flake.lock
Normal file
48
flake.lock
Normal file
@ -0,0 +1,48 @@
|
||||
{
|
||||
"nodes": {
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1730016908,
|
||||
"narHash": "sha256-bFCxJco7d8IgmjfNExNz9knP8wvwbXU4s/d53KOK6U0=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "e83414058edd339148dc142a8437edb9450574c8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1729880355,
|
||||
"narHash": "sha256-RP+OQ6koQQLX5nw0NmcDrzvGL8HDLnyXt/jHhL1jwjM=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "18536bf04cd71abd345f9579158841376fdd0c5a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
37
flake.nix
Normal file
37
flake.nix
Normal file
@ -0,0 +1,37 @@
|
||||
{
|
||||
description = "A very basic flake";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
...
|
||||
} @ inputs: let
|
||||
system = "x86_64-linux";
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
};
|
||||
};
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
laptop = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs system;};
|
||||
|
||||
modules = [
|
||||
./nixos/configuration.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
111
home.nix
Normal file
111
home.nix
Normal file
@ -0,0 +1,111 @@
|
||||
{lib, ...}: {
|
||||
# Home Manager needs a bit of information about you and the paths it should
|
||||
# manage.
|
||||
home.username = "foglar";
|
||||
home.homeDirectory = "/home/foglar";
|
||||
|
||||
# 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 should not change this value, even if you update Home Manager. If you do
|
||||
# want to update the value, then make sure to first check the Home Manager
|
||||
# release notes.
|
||||
home.stateVersion = "24.05"; # Please read the comment before changing.
|
||||
|
||||
imports = [
|
||||
./packages.nix
|
||||
./desktops.nix
|
||||
];
|
||||
|
||||
hyprland.enable = true;
|
||||
programming.enable = true;
|
||||
games.enable = true;
|
||||
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
|
||||
shellAliases = {
|
||||
vim = "nvim";
|
||||
ls = "exa --icons";
|
||||
ll = "exa -alh --icons";
|
||||
tree = "exa --tree --icons";
|
||||
open = "rifle";
|
||||
ip = "ip -c";
|
||||
s = "kitten ssh";
|
||||
diff = "diff --color";
|
||||
cd = "z";
|
||||
arduino-cli = "arduino-ports-enable ; arduino-cli";
|
||||
respawn = "clear; pfetch";
|
||||
l = "eza -lh --icons=auto";
|
||||
mkdir = "mkdir -p";
|
||||
cat = "bat --style plain";
|
||||
rasp = "s foglar@192.168.8.140";
|
||||
hist = "history | awk '{for (i=2; i<=NF; i++) printf \$i\" \"; print \"\"}' | fzf | wl-copy";
|
||||
packages = "paru -Qe | fzf | wl-copy";
|
||||
cdx = "zoxide query --interactive";
|
||||
};
|
||||
|
||||
bashrcExtra = ''
|
||||
pfetch'';
|
||||
};
|
||||
|
||||
programs.oh-my-posh = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
#settings = '''';
|
||||
#useTheme = "catppuccin_mocha";
|
||||
useTheme = "kali";
|
||||
};
|
||||
|
||||
programs.zoxide = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
};
|
||||
|
||||
# Home Manager is pretty good at managing dotfiles. The primary way to manage
|
||||
# plain files is through 'home.file'.
|
||||
home.file = {
|
||||
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
|
||||
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
|
||||
# # symlink to the Nix store copy.
|
||||
# ".screenrc".source = dotfiles/screenrc;
|
||||
|
||||
# # You can also set the file content immediately.
|
||||
# ".gradle/gradle.properties".text = ''
|
||||
# org.gradle.console=verbose
|
||||
# org.gradle.daemon.idletimeout=3600000
|
||||
# '';
|
||||
};
|
||||
|
||||
# Home Manager can also manage your environment variables through
|
||||
# 'home.sessionVariables'. These will be explicitly sourced when using a
|
||||
# shell provided by Home Manager. If you don't want to manage your shell
|
||||
# through Home Manager then you have to manually source 'hm-session-vars.sh'
|
||||
# located at either
|
||||
#
|
||||
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
|
||||
#
|
||||
# or
|
||||
#
|
||||
# ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
|
||||
#
|
||||
# or
|
||||
#
|
||||
# /etc/profiles/per-user/foglar/etc/profile.d/hm-session-vars.sh
|
||||
#
|
||||
home.sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
FLAKE = "/home/foglar/mysystem";
|
||||
XDG_DATA_HOME = "$HOME/.local/share";
|
||||
XDG_PICTURES_DIR = "$HOME/Pictures/Screenshots/";
|
||||
FZF_DEFAULT_OPTS = " \
|
||||
--color=bg+:#313244,bg:#1e1e2e,spinner:#f5e0dc,hl:#f38ba8 \
|
||||
--color=fg:#cdd6f4,header:#f38ba8,info:#cba6f7,pointer:#f5e0dc \
|
||||
--color=marker:#f5e0dc,fg+:#cdd6f4,prompt:#cba6f7,hl+:#f38ba8";
|
||||
};
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
}
|
||||
247
nixos/configuration.nix
Normal file
247
nixos/configuration.nix
Normal file
@ -0,0 +1,247 @@
|
||||
# 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, config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
];
|
||||
|
||||
home-manager = {
|
||||
extraSpecialArgs = {inherit inputs; };
|
||||
users = {
|
||||
foglar = import ./home.nix;
|
||||
};
|
||||
};
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
networking.hostName = "laptop"; # 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;
|
||||
hardware.bluetooth.enable = true; # enables support for Bluetooth
|
||||
hardware.bluetooth.powerOnBoot = true; # powers up the default Bluetooth controller on boot
|
||||
services.blueman.enable = true;
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Prague";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "cs_CZ.UTF-8";
|
||||
LC_IDENTIFICATION = "cs_CZ.UTF-8";
|
||||
LC_MEASUREMENT = "cs_CZ.UTF-8";
|
||||
LC_MONETARY = "cs_CZ.UTF-8";
|
||||
LC_NAME = "cs_CZ.UTF-8";
|
||||
LC_NUMERIC = "cs_CZ.UTF-8";
|
||||
LC_PAPER = "cs_CZ.UTF-8";
|
||||
LC_TELEPHONE = "cs_CZ.UTF-8";
|
||||
LC_TIME = "cs_CZ.UTF-8";
|
||||
};
|
||||
|
||||
fonts.packages = with pkgs; [
|
||||
noto-fonts
|
||||
noto-fonts-emoji
|
||||
(nerdfonts.override { fonts = [ "JetBrainsMono" ]; })
|
||||
];
|
||||
|
||||
#services.xserver.enable = true;
|
||||
services.displayManager.sddm.enable = true;
|
||||
services.displayManager.sddm.wayland.enable = true;
|
||||
services.desktopManager.plasma6.enable = true;
|
||||
services.xserver.desktopManager.gnome.enable = true;
|
||||
environment.gnome.excludePackages = with pkgs; [
|
||||
gnome-tour
|
||||
gnome-connections
|
||||
epiphany # web browser
|
||||
geary # email reader. Up to 24.05. Starting from 24.11 the package name is just geary.
|
||||
#evince # document viewer
|
||||
gnome-weather
|
||||
gnome-contacts
|
||||
gnome-maps
|
||||
gnome-logs
|
||||
gnome-music
|
||||
gnome-system-monitor
|
||||
gnome-text-editor
|
||||
yelp
|
||||
totem
|
||||
snapshot
|
||||
seahorse
|
||||
];
|
||||
|
||||
environment.plasma6.excludePackages = with pkgs.kdePackages; [
|
||||
ark
|
||||
plasma-browser-integration
|
||||
konsole
|
||||
oxygen
|
||||
gwenview
|
||||
okular
|
||||
elisa
|
||||
kate
|
||||
krdp
|
||||
khelpcenter
|
||||
];
|
||||
|
||||
# qt = {
|
||||
# enable = true;
|
||||
# platformTheme = "gnome";
|
||||
# style = "adwaita-dark";
|
||||
# };
|
||||
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
xwayland.enable = true;
|
||||
};
|
||||
|
||||
virtualisation.libvirtd.enable = true;
|
||||
programs.virt-manager.enable = true;
|
||||
|
||||
environment.sessionVariables = {
|
||||
WLR_NO_HARDWARE_CURSORS = "1";
|
||||
NIXOS_OZONE_WL = "1";
|
||||
EDITOR = "nvim";
|
||||
FLAKE = "/home/foglar/mysystem";
|
||||
};
|
||||
|
||||
hardware = {
|
||||
graphics.enable = true;
|
||||
};
|
||||
|
||||
services.xserver.videoDrivers = ["nvidia"];
|
||||
|
||||
hardware.nvidia = {
|
||||
|
||||
# Modesetting is required.
|
||||
modesetting.enable = true;
|
||||
|
||||
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
|
||||
# Enable this if you have graphical corruption issues or application crashes after waking
|
||||
# up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
|
||||
# of just the bare essentials.
|
||||
powerManagement.enable = false;
|
||||
|
||||
# Fine-grained power management. Turns off GPU when not in use.
|
||||
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
|
||||
powerManagement.finegrained = false;
|
||||
|
||||
# Use the NVidia open source kernel module (not to be confused with the
|
||||
# independent third-party "nouveau" open source driver).
|
||||
# Support is limited to the Turing and later architectures. Full list of
|
||||
# supported GPUs is at:
|
||||
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
|
||||
# Only available from driver 515.43.04+
|
||||
# Currently alpha-quality/buggy, so false is currently the recommended setting.
|
||||
open = false;
|
||||
|
||||
# Enable the Nvidia settings menu,
|
||||
# accessible via `nvidia-settings`.
|
||||
nvidiaSettings = true;
|
||||
prime.amdgpuBusId = "pci@000:04:0";
|
||||
prime.nvidiaBusId = "pci@000:01:0";
|
||||
|
||||
prime.offload = {
|
||||
enable = true;
|
||||
enableOffloadCmd = true;
|
||||
};
|
||||
|
||||
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
};
|
||||
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver.xkb = {
|
||||
layout = "us";
|
||||
variant = "";
|
||||
};
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
# Enable sound with pipewire.
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
# If you want to use JACK applications, uncomment this
|
||||
#jack.enable = true;
|
||||
|
||||
# use the example session manager (no others are packaged yet so this is enabled by default,
|
||||
# no need to redefine it in your config for now)
|
||||
#media-session.enable = true;
|
||||
};
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.xserver.libinput.enable = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.foglar = {
|
||||
isNormalUser = true;
|
||||
description = "foglar";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
packages = with pkgs; [
|
||||
# thunderbird
|
||||
];
|
||||
};
|
||||
|
||||
programs.kdeconnect.enable = true;
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
|
||||
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
|
||||
localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
|
||||
};
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# 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
|
||||
];
|
||||
|
||||
# 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 = "24.05"; # Did you read the comment?
|
||||
|
||||
}
|
||||
38
nixos/hardware-configuration.nix
Normal file
38
nixos/hardware-configuration.nix
Normal file
@ -0,0 +1,38 @@
|
||||
# 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" "ahci" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/dbb68bbb-0468-4e0d-be75-547b5f146c34";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/C550-8CDA";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
# 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.wlp3s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
120
packages.nix
Normal file
120
packages.nix
Normal file
@ -0,0 +1,120 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./packages/programming/programming.nix
|
||||
./packages/games.nix
|
||||
#./packages/applications.nix
|
||||
#./packages/terminal_tools.nix
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
firefox
|
||||
librewolf
|
||||
discord
|
||||
|
||||
pfetch
|
||||
zoxide
|
||||
bat
|
||||
btop
|
||||
cmatrix
|
||||
entr
|
||||
figlet
|
||||
jp2a
|
||||
yt-dlp
|
||||
oh-my-posh
|
||||
eza
|
||||
nvtopPackages.full
|
||||
neofetch
|
||||
wget
|
||||
curl
|
||||
|
||||
fzf
|
||||
tldr
|
||||
|
||||
alejandra
|
||||
nh
|
||||
nixd
|
||||
|
||||
wine
|
||||
|
||||
stellarium
|
||||
libreoffice
|
||||
localsend
|
||||
plasma5Packages.kdeconnect-kde
|
||||
qbittorrent
|
||||
vlc
|
||||
#tor-browser
|
||||
openrocket
|
||||
spotify
|
||||
|
||||
ranger
|
||||
|
||||
#zed-editor
|
||||
#gtk3
|
||||
#(python3.withPackages (subpkgs: with subpkgs; [
|
||||
#pygobject3
|
||||
#gobject-introspection
|
||||
#astropy
|
||||
#tomli
|
||||
#tomli-w
|
||||
#matplotlib
|
||||
#basemap
|
||||
#opencv4
|
||||
#requests
|
||||
#]))
|
||||
|
||||
# # It is sometimes useful to fine-tune packages, for example, by applying
|
||||
# # overrides. You can do that directly here, just don't forget the
|
||||
# # parentheses. Maybe you want to install Nerd Fonts with a limited number of
|
||||
# # fonts?
|
||||
# (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
|
||||
];
|
||||
|
||||
nixpkgs.config.allowUnfreePredicate = pkg:
|
||||
builtins.elem (lib.getName pkg) [
|
||||
"discord"
|
||||
"spotify"
|
||||
"steam"
|
||||
"steam-unwrapped"
|
||||
|
||||
"gitkraken"
|
||||
# VSCODE
|
||||
"vscode"
|
||||
"vscode-extension-github-codespaces"
|
||||
"vscode-extension-ms-vscode-remote-remote-ssh"
|
||||
"vscode-extension-ms-vscode-remote-remote-ssh-edit"
|
||||
"vscode-extension-github-copilot"
|
||||
"vscode-extension-github-copilot-chat"
|
||||
"vscode-extension-MS-python-vscode-pylance"
|
||||
"vscode-extension-ms-dotnettools-csdevkit"
|
||||
"vscode-extension-ms-dotnettools-vscodeintellicode-csharp"
|
||||
|
||||
# NVTOP
|
||||
"nvtopPackages.full"
|
||||
"cuda-merged"
|
||||
"cuda_cuobjdump"
|
||||
"cuda_gdb"
|
||||
"cuda_nvcc"
|
||||
"cuda_nvdisasm"
|
||||
"cuda_nvprune"
|
||||
"cuda_cccl"
|
||||
"cuda_cudart"
|
||||
"cuda_cupti"
|
||||
"cuda_cuxxfilt"
|
||||
"cuda_nvml_dev"
|
||||
"cuda_nvrtc"
|
||||
"cuda_nvtx"
|
||||
"cuda_profiler_api"
|
||||
"cuda_sanitizer_api"
|
||||
"libcublas"
|
||||
"libcusolver"
|
||||
"libnvjitlink"
|
||||
"libcusparse"
|
||||
"libnpp"
|
||||
"libcufft"
|
||||
"libcurand"
|
||||
];
|
||||
}
|
||||
0
packages/applications.nix
Normal file
0
packages/applications.nix
Normal file
29
packages/games.nix
Normal file
29
packages/games.nix
Normal file
@ -0,0 +1,29 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
options = {
|
||||
games.enable =
|
||||
lib.mkEnableOption "enables games";
|
||||
};
|
||||
config = lib.mkIf config.games.enable {
|
||||
home.packages = with pkgs; [
|
||||
vitetris
|
||||
steam
|
||||
|
||||
(writeShellScriptBin "nvidia-offload" ''
|
||||
export __NV_PRIME_RENDER_OFFLOAD=1
|
||||
export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0
|
||||
export __GLX_VENDOR_LIBRARY_NAME=nvidia
|
||||
export __VK_LAYER_NV_optimus=NVIDIA_only
|
||||
exec "$@"
|
||||
'')
|
||||
];
|
||||
|
||||
nixpkgs.config.allowUnfreePredicate = pkg:
|
||||
builtins.elem (lib.getName pkg) [
|
||||
];
|
||||
};
|
||||
}
|
||||
88
packages/programming/code.nix
Normal file
88
packages/programming/code.nix
Normal file
@ -0,0 +1,88 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
options = {
|
||||
vscode.enable = lib.mkEnableOption "enable vscode";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.vscode.enable {
|
||||
home.packages = with pkgs; [
|
||||
vscode
|
||||
];
|
||||
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
extensions = with pkgs.vscode-extensions; [
|
||||
ms-azuretools.vscode-docker
|
||||
|
||||
# Mardown
|
||||
yzhang.markdown-all-in-one
|
||||
davidanson.vscode-markdownlint
|
||||
|
||||
foxundermoon.shell-format
|
||||
tamasfe.even-better-toml
|
||||
aaron-bond.better-comments
|
||||
christian-kohler.path-intellisense
|
||||
jnoortheen.nix-ide
|
||||
|
||||
github.vscode-pull-request-github
|
||||
github.vscode-github-actions
|
||||
github.codespaces
|
||||
|
||||
# Remote
|
||||
ms-vscode-remote.remote-ssh
|
||||
ms-vscode-remote.remote-ssh-edit
|
||||
|
||||
# Webdev
|
||||
ritwickdey.liveserver
|
||||
esbenp.prettier-vscode
|
||||
ecmel.vscode-html-css
|
||||
ms-vscode.live-server
|
||||
formulahendry.auto-rename-tag
|
||||
|
||||
# Ai
|
||||
github.copilot
|
||||
github.copilot-chat
|
||||
|
||||
# Git
|
||||
donjayamanne.githistory
|
||||
eamodio.gitlens
|
||||
|
||||
# Python
|
||||
ms-python.python
|
||||
ms-python.vscode-pylance
|
||||
ms-python.black-formatter
|
||||
ms-python.debugpy
|
||||
njpwerner.autodocstring
|
||||
ms-toolsai.jupyter
|
||||
ms-toolsai.jupyter-keymap
|
||||
ms-toolsai.jupyter-renderers
|
||||
|
||||
# Theme
|
||||
catppuccin.catppuccin-vsc
|
||||
catppuccin.catppuccin-vsc-icons
|
||||
zhuangtongfa.material-theme
|
||||
oderwat.indent-rainbow
|
||||
enkia.tokyo-night
|
||||
pkief.material-product-icons
|
||||
pkief.material-icon-theme
|
||||
|
||||
# C/C++
|
||||
twxs.cmake
|
||||
ms-vscode.cmake-tools
|
||||
|
||||
# C#
|
||||
ms-dotnettools.csharp
|
||||
ms-dotnettools.csdevkit
|
||||
ms-dotnettools.vscodeintellicode-csharp
|
||||
ms-dotnettools.vscode-dotnet-runtime
|
||||
|
||||
# Go
|
||||
golang.go
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
36
packages/programming/programming.nix
Normal file
36
packages/programming/programming.nix
Normal file
@ -0,0 +1,36 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./code.nix
|
||||
];
|
||||
|
||||
options = {
|
||||
programming.enable =
|
||||
lib.mkEnableOption "enable programming toolset";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.programming.enable {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "foglar";
|
||||
userEmail = "kohout.fi.2023@skola.ssps.cz";
|
||||
};
|
||||
|
||||
vscode.enable = true;
|
||||
|
||||
home.packages = with pkgs; [
|
||||
git
|
||||
neovim
|
||||
gitkraken
|
||||
arduino-ide
|
||||
github-cli
|
||||
go
|
||||
dotnet-sdk_8
|
||||
jq
|
||||
];
|
||||
};
|
||||
}
|
||||
0
packages/terminal_tools.nix
Normal file
0
packages/terminal_tools.nix
Normal file
Loading…
Reference in New Issue
Block a user