added stuff
This commit is contained in:
parent
e8d9044d2b
commit
9d0ebdfbd0
907 changed files with 70990 additions and 0 deletions
|
@ -0,0 +1,117 @@
|
|||
{
|
||||
inputs',
|
||||
osConfig,
|
||||
defaults,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (osConfig) modules;
|
||||
env = modules.usrEnv;
|
||||
|
||||
# nix advantages
|
||||
inherit (import ../packages {inherit inputs' pkgs;}) propaganda;
|
||||
|
||||
terminal =
|
||||
if (defaults.terminal == "foot")
|
||||
then "footclient"
|
||||
else "${defaults.terminal}";
|
||||
|
||||
locker = getExe env.programs.screenlock.package;
|
||||
in {
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
# define the mod key
|
||||
"$MOD" = "SUPER";
|
||||
|
||||
# keyword to toggle "monocle" - a.k.a no_gaps_when_only
|
||||
"$kw" = "dwindle:no_gaps_when_only";
|
||||
"$disable" = ''act_opa=$(hyprctl getoption "decoration:active_opacity" -j | jq -r ".float");inact_opa=$(hyprctl getoption "decoration:inactive_opacity" -j | jq -r ".float");hyprctl --batch "keyword decoration:active_opacity 1;keyword decoration:inactive_opacity 1"'';
|
||||
"$enable" = ''hyprctl --batch "keyword decoration:active_opacity $act_opa;keyword decoration:inactive_opacity $inact_opa"'';
|
||||
#"$screenshotarea" = ''hyprctl keyword animation "fadeOut,0,0,default"; grimblast --notify copysave area; hyprctl keyword animation "fadeOut,1,4,default"''
|
||||
|
||||
bind = [
|
||||
# Misc
|
||||
"$MODSHIFT, Escape, exec, wlogout -p layer-shell" # logout menu
|
||||
"$MODSHIFT, L, exec, ${locker}" # lock the screen with swaylock
|
||||
"$MODSHIFT,E,exit," # exit Hyprland session
|
||||
''$MODSHIFT,H,exec,cat ${propaganda} | ${pkgs.wl-clipboard}/bin/wl-copy && ${pkgs.libnotify}/bin/notify-send "Propaganda" "ready to spread!" && sleep 0.3 && ${lib.getExe pkgs.wtype} -M ctrl -M shift -k v -m shift -m ctrl -s 300 -k Return'' # spread hyprland propaganda
|
||||
|
||||
# Daily Applications
|
||||
"$MOD,F1,exec,firefox" # browser
|
||||
''$MOD,F2,exec,run-as-service "${defaults.fileManager}"'' # file manager
|
||||
''$MOD,RETURN,exec,run-as-service "${terminal}"'' # terminal
|
||||
''$MODSHIFT,RETURN,exec,run-as-service "${terminal}"'' # floating terminal (TODO)
|
||||
''$MOD,D,exec, killall rofi || run-as-service $(rofi -show drun)'' # application launcher
|
||||
"$MOD,equal,exec, killall rofi || rofi -show calc" # calc plugin for rofi
|
||||
"$MOD,period,exec, killall rofi || rofi -show emoji" # emoji plugin for rofi
|
||||
''$MOD,R,exec, killall tofi || run-as-service $(tofi-drun --prompt-text " Run")'' # alternative app launcher
|
||||
''$MODSHIFT,R,exec, killall anyrun || run-as-service $(anyrun)'' # alternative application launcher with more features
|
||||
|
||||
# window operators
|
||||
"$MODSHIFT,Q,killactive," # kill focused window
|
||||
"$MOD,T,togglegroup," # group focused window
|
||||
"$MODSHIFT,G,changegroupactive," # switch within the active group
|
||||
"$MOD,V,togglefloating," # toggle floating for the focused window
|
||||
"$MOD,P,pseudo," # pseudotile focused window
|
||||
"$MOD,F,fullscreen," # fullscreen focused window
|
||||
"$MOD,M,exec,hyprctl keyword $kw $(($(hyprctl getoption $kw -j | jaq -r '.int') ^ 1))" # toggle no_gaps_when_only
|
||||
|
||||
# workspace controls
|
||||
"$MODSHIFT,right,movetoworkspace,+1" # move focused window to the next ws
|
||||
"$MODSHIFT,left,movetoworkspace,-1" # move focused window to the previous ws
|
||||
"$MOD,mouse_down,workspace,e+1" # move to the next ws
|
||||
"$MOD,mouse_up,workspace,e-1" # move to the previous ws
|
||||
|
||||
# focus controls
|
||||
"$MOD, left, movefocus, l" # move focus to the window on the left
|
||||
"$MOD, right, movefocus, r" # move focus to the window on the right
|
||||
"$MOD, up, movefocus, u" # move focus to the window above
|
||||
"$MOD, down, movefocus, d" # move focus to the window below
|
||||
|
||||
# screenshot and receording binds
|
||||
''$MODSHIFT,P,exec,$disable; grim - | wl-copy --type image/png && notify-send "Screenshot" "Screenshot copied to clipboard"; $enable''
|
||||
"$MODSHIFT,S,exec,$disable; hyprshot; $enable" # screenshot and then pipe it to swappy
|
||||
"$MOD, Print, exec, grimblast --notify --cursor copysave output" # copy all active outputs
|
||||
"$ALTSHIFT, S, exec, grimblast --notify --cursor copysave screen" # copy active screen
|
||||
"$ALTSHIFT, R, exec, grimblast --notify --cursor copysave area" # copy selection area
|
||||
|
||||
# OCR
|
||||
"$MODSHIFT,O,exec,ocr"
|
||||
|
||||
# Toggle Statusbar
|
||||
"$MODSHIFT,B,exec, ags -t bar"
|
||||
|
||||
/*
|
||||
, Print, exec, $screenshotarea
|
||||
$ALTSHIFT, S, exec, $screenshotarea
|
||||
*/
|
||||
];
|
||||
|
||||
bindm = [
|
||||
"$MOD,mouse:272,movewindow"
|
||||
"$MOD,mouse:273,resizewindow"
|
||||
];
|
||||
# binds that will be repeated, a.k.a can be held to toggle multiple times
|
||||
binde = [
|
||||
# volume controls
|
||||
",XF86AudioRaiseVolume, exec, wpctl set-volume -l '1.0' @DEFAULT_AUDIO_SINK@ 6%+"
|
||||
",XF86AudioLowerVolume, exec, wpctl set-volume -l '1.0' @DEFAULT_AUDIO_SINK@ 6%-"
|
||||
|
||||
# brightness controls
|
||||
'',XF86MonBrightnessUp,exec,ags --run-js "brightness.screen += 0.05"''
|
||||
'',XF86MonBrightnessDown,exec, ags --run-js "brightness.screen -= 0.05"''
|
||||
];
|
||||
|
||||
# binds that are locked, a.k.a will activate even while an input inhibitor is active
|
||||
bindl = [
|
||||
# media controls
|
||||
",XF86AudioPlay,exec,playerctl play-pause"
|
||||
",XF86AudioPrev,exec,playerctl previous"
|
||||
",XF86AudioNext,exec,playerctl next"
|
||||
|
||||
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
||||
", XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
|
||||
];
|
||||
};
|
||||
}
|
|
@ -0,0 +1,72 @@
|
|||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
decoration = {
|
||||
# fancy corners
|
||||
rounding = 7;
|
||||
|
||||
# blur
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 5;
|
||||
passes = 3;
|
||||
ignore_opacity = true;
|
||||
new_optimizations = 1;
|
||||
xray = true;
|
||||
contrast = 0.7;
|
||||
brightness = 0.8;
|
||||
vibrancy = 0.2;
|
||||
special = true; # expensive, but helps distinguish special workspaces
|
||||
};
|
||||
|
||||
# shadow config
|
||||
drop_shadow = "yes";
|
||||
shadow_range = 10;
|
||||
shadow_render_power = 3;
|
||||
"col.shadow" = "rgba(292c3cee)";
|
||||
};
|
||||
|
||||
group = {
|
||||
# new windows in a group spawn after current or at group tail
|
||||
insert_after_current = true;
|
||||
# focus on the window that has just been moved out of the group
|
||||
focus_removed_window = true;
|
||||
|
||||
"col.border_active" = "rgba(88888888)";
|
||||
"col.border_inactive" = "rgba(00000088)";
|
||||
|
||||
groupbar = {
|
||||
# groupbar stuff
|
||||
# this removes the ugly gradient around grouped windows - which sucks
|
||||
gradients = false;
|
||||
font_size = 14;
|
||||
|
||||
# titles look ugly, and I usually know what I'm looking at
|
||||
render_titles = false;
|
||||
|
||||
# scrolling in the groupbar changes group active window
|
||||
scrolling = true;
|
||||
};
|
||||
};
|
||||
|
||||
animations = {
|
||||
enabled = true; # we want animations, half the reason why we're on Hyprland innit
|
||||
first_launch_animation = true; # fade in on first launch
|
||||
|
||||
bezier = [
|
||||
"smoothOut, 0.36, 0, 0.66, -0.56"
|
||||
"smoothIn, 0.25, 1, 0.5, 1"
|
||||
"overshot, 0.4,0.8,0.2,1.2"
|
||||
];
|
||||
|
||||
animation = [
|
||||
"windows, 1, 4, overshot, slide"
|
||||
"windowsOut, 1, 4, smoothOut, slide"
|
||||
"border,1,10,default"
|
||||
|
||||
"fade, 1, 10, smoothIn"
|
||||
"fadeDim, 1, 10, smoothIn"
|
||||
"workspaces,1,4,overshot,slidevert"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
{osConfig, ...}: let
|
||||
inherit (osConfig) modules;
|
||||
|
||||
# theming
|
||||
inherit (modules.style) pointerCursor;
|
||||
in {
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
exec-once = [
|
||||
# set cursor for HL itself
|
||||
"hyprctl setcursor ${pointerCursor.name} ${toString pointerCursor.size}"
|
||||
];
|
||||
};
|
||||
}
|
|
@ -0,0 +1,81 @@
|
|||
{
|
||||
osConfig,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) imap0;
|
||||
inherit (osConfig) modules;
|
||||
inherit (modules.device) monitors;
|
||||
in {
|
||||
wayland.windowManager.hyprland.extraConfig = let
|
||||
# divide workspaces between monitors
|
||||
mapMonitorsToWs = builtins.concatStringsSep "\n" (
|
||||
builtins.genList (
|
||||
x: ''
|
||||
workspace = ${toString (x + 1)}, monitor:${
|
||||
if (x + 1) <= 5
|
||||
then "${builtins.elemAt monitors 0} ${
|
||||
if (x + 1) == 1
|
||||
then ", default:true"
|
||||
else ""
|
||||
}"
|
||||
else "${builtins.elemAt monitors 1}"
|
||||
}
|
||||
|
||||
''
|
||||
)
|
||||
10
|
||||
);
|
||||
|
||||
# generate monitor config strings
|
||||
mapMonitors = builtins.concatStringsSep "\n" (imap0 (i: monitor: ''monitor=${monitor},${
|
||||
if monitor == "DP-1"
|
||||
then "1920x1080@144"
|
||||
else "preferred"
|
||||
}, ${toString (i * 1920)}x0,1'')
|
||||
monitors);
|
||||
in ''
|
||||
# generate a list of monitors automatically, like so
|
||||
#monitor=HDMI-A-1,preferred,0x0,1
|
||||
# monitor=DP-1,preferred,1920x0,1
|
||||
${mapMonitors}
|
||||
|
||||
# if I have a second monitor, indicated by the element count of the monitors list, divide the workspaces
|
||||
# inbetween two workspaces -> 1-5 on mon1 and 6-10 on mon2
|
||||
# if not, then don't divide workspaces
|
||||
# P.S. I really don't know what I will do if I get a third monitor
|
||||
${lib.optionalString (builtins.length monitors != 1) "${mapMonitorsToWs}"}
|
||||
|
||||
# a submap for resizing windows
|
||||
bind = $MOD, S, submap, resize # enter resize window to resize the active window
|
||||
submap=resize
|
||||
binde=,right,resizeactive,10 0
|
||||
binde=,left,resizeactive,-10 0
|
||||
binde=,up,resizeactive,0 -10
|
||||
binde=,down,resizeactive,0 10
|
||||
bind=,escape,submap,reset
|
||||
submap=reset
|
||||
|
||||
# workspace binds
|
||||
# binds * (asterisk) to special workspace
|
||||
bind = $MOD, KP_Multiply, togglespecialworkspace
|
||||
bind = $MODSHIFT, KP_Multiply, movetoworkspace, special
|
||||
|
||||
# and mod + [shift +] {1..10} to [move to] ws {1..10}
|
||||
${
|
||||
builtins.concatStringsSep "\n"
|
||||
(builtins.genList (
|
||||
x: let
|
||||
ws = let
|
||||
c = (x + 1) / 10;
|
||||
in
|
||||
builtins.toString (x + 1 - (c * 10));
|
||||
in ''
|
||||
bind = $MOD, ${ws}, workspace, ${toString (x + 1)}
|
||||
bind = $MOD SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}
|
||||
''
|
||||
)
|
||||
10)
|
||||
}
|
||||
'';
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
{osConfig, ...}: let
|
||||
inherit (osConfig) modules;
|
||||
|
||||
# theming
|
||||
inherit (modules.style) colorScheme;
|
||||
inherit (colorScheme) colors;
|
||||
in {
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
general = {
|
||||
# sensitivity of the mouse cursor
|
||||
sensitivity = 0.8;
|
||||
|
||||
# gaps
|
||||
gaps_in = 4;
|
||||
gaps_out = 8;
|
||||
|
||||
# border thiccness
|
||||
border_size = 2;
|
||||
|
||||
# active border color
|
||||
"col.active_border" = "0xff${colors.base07}";
|
||||
|
||||
# whether to apply the sensitivity to raw input (e.g. used by games where you aim using your mouse)
|
||||
apply_sens_to_raw = 0;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
gestures = {
|
||||
workspace_swipe = true;
|
||||
workspace_swipe_forever = true;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
input = {
|
||||
# keyboard layout
|
||||
kb_layout = "tr";
|
||||
# self explanatory, I hope?
|
||||
follow_mouse = 1;
|
||||
# do not imitate natural scroll
|
||||
touchpad.natural_scroll = "no";
|
||||
# ez numlock enable
|
||||
numlock_by_default = true;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
dwindle = {
|
||||
pseudotile = false;
|
||||
preserve_split = "yes";
|
||||
no_gaps_when_only = false;
|
||||
special_scale_factor = 0.9; # restore old special workspace behaviour
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
misc = {
|
||||
# disable redundant renders
|
||||
disable_hyprland_logo = true; # wallpaper covers it anyway
|
||||
disable_splash_rendering = true; # "
|
||||
|
||||
# window swallowing
|
||||
enable_swallow = true; # hide windows that spawn other windows
|
||||
swallow_regex = "foot|thunar|nemo|wezterm"; # windows for which swallow is applied
|
||||
|
||||
# dpms
|
||||
mouse_move_enables_dpms = true; # enable dpms on mouse/touchpad action
|
||||
key_press_enables_dpms = true; # enable dpms on keyboard action
|
||||
disable_autoreload = true; # autoreload is unnecessary on nixos, because the config is readonly anyway
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
windowrulev2 = [
|
||||
# only allow shadows for floating windows
|
||||
"noshadow, floating:0"
|
||||
|
||||
"float,class:udiskie"
|
||||
|
||||
# wlogout
|
||||
"fullscreen,class:wlogout"
|
||||
"fullscreen,title:wlogout"
|
||||
"noanim, title:wlogout"
|
||||
|
||||
# spotify
|
||||
"tile, title:Spotify"
|
||||
"tile, class:^(Spotify)$"
|
||||
|
||||
# steam settings window
|
||||
"float, title:^(Steam Settings)$"
|
||||
|
||||
# telegram media viewer
|
||||
"float, title:^(Media viewer)$"
|
||||
|
||||
# bitwarden
|
||||
"float,class:Bitwarden"
|
||||
"size 800 600,class:Bitwarden"
|
||||
|
||||
"idleinhibit focus, class:^(mpv)$"
|
||||
"idleinhibit focus,class:foot"
|
||||
|
||||
# firefox
|
||||
"idleinhibit fullscreen, class:^(firefox)$"
|
||||
"float,title:^(Firefox — Sharing Indicator)$"
|
||||
"move 0 0,title:^(Firefox — Sharing Indicator)$"
|
||||
"float, title:^(Picture-in-Picture)$"
|
||||
"pin, title:^(Picture-in-Picture)$"
|
||||
|
||||
# thunderbird
|
||||
"workspace special silent, title:^(Write.*- Thunderbird)$"
|
||||
|
||||
# pavucontrol
|
||||
"float,class:pavucontrol"
|
||||
"float,title:^(Volume Control)$"
|
||||
"size 800 600,title:^(Volume Control)$"
|
||||
"move 75 44%,title:^(Volume Control)$"
|
||||
"float, class:^(imv)$"
|
||||
|
||||
# Helldivers 2
|
||||
"forceinput,class:^(steam_app_553850)$"
|
||||
|
||||
# throw sharing indicators away
|
||||
"workspace special silent, title:^(Firefox — Sharing Indicator)$"
|
||||
"workspace special silent, title:^(.*is sharing (your screen|a window)\.)$"
|
||||
|
||||
# EA launcher puts a tiny window in the current workspae
|
||||
# throw it away
|
||||
"workspace special silent, title:^(title:Wine System Tray)$"
|
||||
|
||||
"workspace 3 silent, class:^(Spotify)$"
|
||||
"workspace 4, title:^(.*(Disc|WebC)ord.*)$"
|
||||
"workspace 10 silent, class:^(Nextcloud)$"
|
||||
];
|
||||
};
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
inputs',
|
||||
osConfig,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (builtins) filter map toString;
|
||||
inherit (lib.filesystem) listFilesRecursive;
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.strings) hasSuffix;
|
||||
inherit (osConfig) modules;
|
||||
|
||||
inherit (import ./packages {inherit inputs' pkgs;}) grimblast hyprshot dbus-hyprland-env hyprpicker wrapper;
|
||||
|
||||
env = modules.usrEnv;
|
||||
in {
|
||||
imports = filter (hasSuffix ".nix") (
|
||||
map toString (filter (p: p != ./default.nix) (listFilesRecursive ./config))
|
||||
);
|
||||
config = mkIf env.desktops.hyprland.enable {
|
||||
home.packages = [
|
||||
inputs'.hyprland.packages.hyprland
|
||||
hyprshot
|
||||
grimblast
|
||||
hyprpicker
|
||||
dbus-hyprland-env
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
package = wrapper;
|
||||
xwayland.enable = true;
|
||||
systemd = {
|
||||
enable = true;
|
||||
variables = ["--all"];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
{pkgs, ...}:
|
||||
pkgs.writeTextFile {
|
||||
name = "dbus-hyprland-env";
|
||||
destination = "/bin/dbus-hyprland-environment";
|
||||
executable = true;
|
||||
text = ''
|
||||
dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=hyprland
|
||||
systemctl --user stop pipewire pipewire-media-session xdg-desktop-portal xdg-desktop-portal-wlr
|
||||
systemctl --user start pipewire wireplumber pipewire-media-session xdg-desktop-portal xdg-desktop-portal-hyprland
|
||||
'';
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
inputs',
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
packages = {
|
||||
inherit (inputs'.hyprland-contrib.packages) grimblast;
|
||||
inherit (inputs'.hyprpicker.packages) hyprpicker;
|
||||
|
||||
wrapper = pkgs.callPackage ./wrapper {inherit (inputs') hyprland;};
|
||||
hyprshot = pkgs.callPackage ./hyprshot.nix {};
|
||||
dbus-hyprland-env = pkgs.callPackage ./dbus-hyprland-env.nix {};
|
||||
propaganda = pkgs.callPackage ./propaganda.nix {};
|
||||
};
|
||||
in
|
||||
packages
|
|
@ -0,0 +1,10 @@
|
|||
{pkgs, ...}:
|
||||
pkgs.writeShellApplication {
|
||||
name = "hyprshot";
|
||||
runtimeInputs = with pkgs; [grim slurp swappy];
|
||||
text = ''
|
||||
hyprctl keyword animation "fadeOut,0,8,slow" && \
|
||||
grim -g "$(slurp -w 0 -b 5e81acd2)" - | swappy -f -; \
|
||||
hyprctl keyword animation "fadeOut,1,8,slow"
|
||||
'';
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
{pkgs, ...}:
|
||||
pkgs.writeTextFile {
|
||||
name = "propaganda";
|
||||
text = ''
|
||||
## Nix advantages:
|
||||
- Correct and complete packaging
|
||||
- Immutable & reproducible results
|
||||
- Easy to cross and static compile
|
||||
- Source-based (you can alter packages without forking anything)
|
||||
- Single package manager to rule them all! (C, Python, Docker, NodeJS, etc)
|
||||
- Great for development, easily switches between dev envs with direnv
|
||||
- Easy to try out packages without installing using `nix shell` or `nix run`
|
||||
- allows to create scripts that can do and depend on anything, so long as the host has nix, it'll download things automatically for them
|
||||
- Uses binary caches so you almost never need to compile anything
|
||||
- Easy to set up a binary cache
|
||||
- Easy to set up remote building
|
||||
- Distribute your builds accross an unlimited number of machines, without any hassle
|
||||
- Excellent testing infrastructure
|
||||
- Portable - runs on Linux and macOS
|
||||
- Can be built statically and run anywhere without root permissions
|
||||
- Mix and match different package versions without conflicts
|
||||
- Want to have a package with openssl1.1 and another with openssl 3.0? No problem!
|
||||
- Flakes let you pin versions to specific revisions
|
||||
- Various alternatives for Flakes for version pinning, such as npins and niv
|
||||
|
||||
## NixOS advantages:
|
||||
- Declarative configuration
|
||||
- Meaning easier to configure your system(s)
|
||||
- Easier to change, manage and maintain the configuration
|
||||
- Easier to back up and share with people
|
||||
- Easy to deploy machines and their configuration
|
||||
- Out of the box Rollbacks.
|
||||
- Configuration options for many programs & services
|
||||
- Free of side effects - Actually uninstalls packages and their dependencies
|
||||
- Easy to set up VMs
|
||||
- People can test each other's configurations using `nix run` and `nix shell` by just having access to the source
|
||||
'';
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
hyprland,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.meta) getExe';
|
||||
in
|
||||
pkgs.writeShellScriptBin "hyprland" ''
|
||||
${builtins.readFile ./session.sh}
|
||||
${getExe' hyprland.packages.default "Hyprland"} $@
|
||||
''
|
|
@ -0,0 +1,41 @@
|
|||
# disable shellcheck's shell check
|
||||
# it'll be provided by writeShellScript
|
||||
# shellcheck disable=2148
|
||||
|
||||
# session
|
||||
export XDG_SESSION_TYPE=wayland
|
||||
export XDG_SESSION_DESKTOP=hyprland
|
||||
export XDG_CURRENT_DESKTOP=hyprland
|
||||
|
||||
# firefox
|
||||
export MOZ_ENABLE_WAYLAND=1
|
||||
export MOZ_DBUS_REMOTE=1
|
||||
|
||||
# qt
|
||||
export QT_QPA_PLATFORM=wayland
|
||||
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
|
||||
|
||||
# gtk
|
||||
export GDK_BACKEND=wayland
|
||||
|
||||
# sdl
|
||||
export SDL_VIDEODRIVER=wayland
|
||||
|
||||
# java
|
||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||
export JDK_JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel -Dswing.crossplatformlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel"
|
||||
|
||||
# other
|
||||
export CLUTTER_BACKEND=wayland
|
||||
export XCURSOR_SIZE=24
|
||||
export NIXOS_OZONE_WL=1
|
||||
|
||||
# cursed dbus
|
||||
|
||||
dbus-update-activation-environment --systemd MOZ_ENABLE_WAYLAND MOZ_DBUS_REMOTE QT_QPA_PLATFORM QT_QPA_PLATFORMTHEME QT_WAYLAND_DISABLE_WINDOWDECORATION SDL_VIDEODRIVER _JAVA_AWT_WM_NONREPARENTING JDK_JAVA_OPTIONS XCURSOR_SIZE XCURSOR_THEME
|
||||
|
||||
# theme in dbus:
|
||||
# QT_PLUGIN_PATH=<qt5ct>/lib/qt-ver/plugins + breeze will correctly set the theme.
|
||||
# HOWEVER it won't find thumbnailers. For now the easiest way to deal with this, though definitely not
|
||||
# the right one, is to just throw $PATH into dbus.
|
||||
dbus-update-activation-environment --systemd PATH
|
Loading…
Add table
Add a link
Reference in a new issue