flake-parts: Almost done with yggdrasil

This commit is contained in:
Christoph Hollizeck 2025-10-28 00:17:33 +01:00
parent d579c8ad2c
commit ebc8a545c8
Signed by: Daholli
GPG key ID: 249300664F2AF2C7
43 changed files with 2650 additions and 135 deletions

View file

@ -0,0 +1,9 @@
{
flake.modules.homeManager.desktop =
{ pkgs, ... }:
{
home.packages = with pkgs; [
fuzzel
];
};
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

View file

@ -0,0 +1,28 @@
{
flake.modules.homeManager.cholli =
{ ... }:
{
services.hypridle = {
enable = true;
settings = {
general = {
after_sleep_cmd = "hyprctl dispatch dpms on";
ignore_dbus_inhibit = false;
lock_cmd = "hyprlock-blur";
};
listener = [
{
timeout = 600;
on-timeout = "loginctl lock-session";
}
{
timeout = 1200;
on-timeout = "hyprctl dispatch dpms off";
on-resume = "hyprctl dispatch dpms on";
}
];
};
};
};
}

View file

@ -0,0 +1,118 @@
{
flake.modules = {
nixos.desktop =
{ pkgs, ... }:
let
hyprlock-blur = pkgs.writeShellScriptBin "hyprlock-blur" ''
${pkgs.grim}/bin/grim -o DP-1 -l 0 /tmp/screenshot1.png &
${pkgs.grim}/bin/grim -o HDMI-A-1 -l 0 /tmp/screenshot2.png &
wait &&
hyprlock
'';
in
{
security.pam.services.hyprlock = {
allowNullPassword = false;
startSession = false;
text = ''
auth include login
account include login
'';
};
environment.systemPackages = [ hyprlock-blur ];
};
homeManager.cholli =
{ inputs, pkgs, ... }:
let
hyprlock-package = inputs.hyprlock.packages.${pkgs.system}.hyprlock;
in
{
programs.hyprlock = {
enable = true;
package = hyprlock-package;
settings = {
# inspiration from https://github.com/justinmdickey/publicdots/blob/main/.config/hypr/hyprlock.conf
background = [
{
monitor = "DP-1";
path = "/tmp/screenshot1.png";
blur_passes = 1; # 0 disables blurring
blur_size = 7;
noise = 1.17e-2;
}
{
monitor = "HDMI-A-1";
path = "/tmp/screenshot2.png";
blur_passes = 2; # 0 disables blurring
blur_size = 7;
noise = 1.17e-2;
}
];
label = [
{
monitor = "DP-1";
text = "$TIME";
color = "rgba(242, 243, 244, 0.75)";
font_size = 95;
font_family = "JetBrains Mono";
position = "0, 300";
halign = "center";
valign = "center";
}
{
monitor = "DP-1";
text = ''cmd[update:1000] echo $(date +"%A, %B %d")'';
color = "rgba(242, 243, 244, 0.75)";
font_size = 22;
font_family = "JetBrains Mono";
position = "0, 200";
halign = "center";
valign = "center";
}
];
image = {
monitor = "DP-1";
path = "/home/cholli/Pictures/profile.png";
position = "0, 50";
halign = "center";
valign = "center";
};
input-field = {
monitor = "DP-1";
size = "200,50";
outline_thickness = 2;
dots_size = 0.2; # Scale of input-field height, 0.2 - 0.8
dots_spacing = 0.35; # Scale of dots' absolute size, 0.0 - 1.0
dots_center = true;
outer_color = "rgba(0, 0, 0, 0)";
inner_color = "rgba(0, 0, 0, 0.2)";
font_color = "rgb(111, 45, 104)";
fade_on_empty = false;
rounding = -1;
check_color = "rgb(30, 107, 204)";
placeholder_text = ''<i><span foreground="##cdd6f4">Input Password...</span></i>'';
hide_input = false;
position = "0, -100";
halign = "center";
valign = "center";
};
general = {
auth_method = "pam";
};
};
};
};
};
}

View file

@ -0,0 +1,494 @@
{
flake.modules.homeManager.cholli =
{
lib,
osConfig,
pkgs,
...
}:
{
config = lib.mkIf osConfig.programs.hyprland.enable {
wayland.windowManager.hyprland.settings.exec-once = [
"${pkgs.hyprpanel}/bin/hyprpanel"
];
programs.hyprpanel = {
enable = true;
settings = {
menus.dashboard.powermenu.avatar.image = "/home/cholli/Pictures/profile.png";
bar = {
launcher.autoDetectIcon = true;
workspaces = {
show_icons = false;
show_numbered = true;
};
layouts = {
"0" = {
"left" = [
"dashboard"
"workspaces"
];
"middle" = [
"windowtitle"
];
"right" = [
"volume"
"bluetooth"
"cputemp"
"cpu"
"ram"
"systray"
"clock"
"notifications"
];
};
"1" = {
"left" = [
"workspaces"
];
"right" = [
"clock"
];
};
};
customModules = {
ram = {
icon = " ";
labelType = "used/total";
};
cpu = {
icon = " ";
leftClick = "kitty --hold btop";
};
cpuTemp = {
sensor = "/sys/devices/pci0000:00/0000:00:18.3/hwmon/hwmon2/temp3_input";
unit = "metric";
showUnit = true;
};
};
clock.format = "%a %b %d %H:%M:%S";
notifications = {
show_total = true;
hideCountWhenZero = false;
};
};
layouts = {
"0" = {
left = [
"dashboard"
"workspaces"
];
middle = [ "windowtitle" ];
right = [
"volume"
"bluetooth"
"cputemp"
"cpu"
"ram"
"systray"
"clock"
"notifications"
];
};
"1" = {
left = [ "workspaces" ];
right = [ "clock" ];
};
};
theme = {
bar = {
floating = true;
background = "#11111b";
border.color = "#b4befe";
buttons = {
background = "#242438";
battery.background = "#242438";
battery.border = "#f9e2af";
battery.icon = "#242438";
battery.icon_background = "#f9e2af";
battery.text = "#f9e2af";
bluetooth.background = "#242438";
bluetooth.border = "#89dceb";
bluetooth.icon = "#1e1e2e";
bluetooth.icon_background = "#89dbeb";
bluetooth.text = "#89dceb";
borderColor = "#b4befe";
clock.background = "#242438";
clock.border = "#f5c2e7";
clock.icon = "#232338";
clock.icon_background = "#f5c2e7";
clock.text = "#f5c2e7";
dashboard.background = "#f9e2af";
dashboard.border = "#f9e2af";
dashboard.icon = "#1e1e2e";
hover = "#45475a";
icon = "#242438";
icon_background = "#b4befe";
media.background = "#242438";
media.border = "#b4befe";
media.icon = "#1e1e2e";
media.icon_background = "#b4befe";
media.text = "#b4befe";
modules.cava.background = "#242438";
modules.cava.border = "#94e2d5";
modules.cava.icon = "#242438";
modules.cava.icon_background = "#94e2d5";
modules.cava.text = "#94e2d5";
modules.cpu.background = "#242438";
modules.cpu.border = "#f38ba8";
modules.cpu.icon = "#181825";
modules.cpu.icon_background = "#f38ba8";
modules.cpu.text = "#f38ba8";
modules.hypridle.background = "#242438";
modules.hypridle.border = "#f5c2e7";
modules.hypridle.icon = "#242438";
modules.hypridle.icon_background = "#f5c2e7";
modules.hypridle.text = "#f5c2e7";
modules.hyprsunset.background = "#242438";
modules.hyprsunset.border = "#fab387";
modules.hyprsunset.icon = "#242438";
modules.hyprsunset.icon_background = "#fab387";
modules.hyprsunset.text = "#fab387";
modules.kbLayout.background = "#242438";
modules.kbLayout.border = "#89dceb";
modules.kbLayout.icon = "#181825";
modules.kbLayout.icon_background = "#89dceb";
modules.kbLayout.text = "#89dceb";
modules.microphone.background = "#242438";
modules.microphone.border = "#a6e3a1";
modules.microphone.icon = "#242438";
modules.microphone.icon_background = "#a6e3a1";
modules.microphone.text = "#a6e3a1";
modules.netstat.background = "#242438";
modules.netstat.border = "#a6e3a1";
modules.netstat.icon = "#181825";
modules.netstat.icon_background = "#a6e3a1";
modules.netstat.text = "#a6e3a1";
modules.power.background = "#242438";
modules.power.border = "#f38ba8";
modules.power.icon = "#181825";
modules.power.icon_background = "#f38ba8";
modules.ram.background = "#242438";
modules.ram.border = "#f9e2af";
modules.ram.icon = "#181825";
modules.ram.icon_background = "#f9e2af";
modules.ram.text = "#f9e2af";
modules.storage.background = "#242438";
modules.storage.border = "#f5c2e7";
modules.storage.icon = "#181825";
modules.storage.icon_background = "#f5c2e7";
modules.storage.text = "#f5c2e7";
modules.submap.background = "#242438";
modules.submap.border = "#94e2d5";
modules.submap.icon = "#181825";
modules.submap.icon_background = "#94e2d5";
modules.submap.text = "#94e2d5";
modules.updates.background = "#242438";
modules.updates.border = "#cba6f7";
modules.updates.icon = "#181825";
modules.updates.icon_background = "#cba6f7";
modules.updates.text = "#cba6f7";
modules.weather.background = "#242438";
modules.weather.border = "#b4befe";
modules.weather.icon = "#242438";
modules.weather.icon_background = "#b4befe";
modules.weather.text = "#b4befe";
modules.worldclock.background = "#242438";
modules.worldclock.border = "#f5c2e7";
modules.worldclock.icon = "#242438";
modules.worldclock.icon_background = "#f5c2e7";
modules.worldclock.text = "#f5c2e7";
network.background = "#242438";
network.border = "#cba6f7";
network.icon = "#242438";
network.icon_background = "#caa6f7";
network.text = "#cba6f7";
notifications.background = "#242438";
notifications.border = "#b4befe";
notifications.icon = "#1e1e2e";
notifications.icon_background = "#b4befe";
notifications.total = "#b4befe";
style = "split";
systray.background = "#242438";
systray.border = "#b4befe";
systray.customIcon = "#cdd6f4";
text = "#b4befe";
volume.background = "#242438";
volume.border = "#eba0ac";
volume.icon = "#242438";
volume.icon_background = "#eba0ac";
volume.text = "#eba0ac";
windowtitle.background = "#242438";
windowtitle.border = "#f5c2e7";
windowtitle.icon = "#1e1e2e";
windowtitle.icon_background = "#f5c2e7";
windowtitle.text = "#f5c2e7";
workspaces.active = "#f5c2e7";
workspaces.available = "#89dceb";
workspaces.background = "#242438";
workspaces.border = "#f5c2e7";
workspaces.hover = "#f5c2e7";
workspaces.numbered_active_highlighted_text_color = "#181825";
workspaces.numbered_active_underline_color = "#f5c2e7";
workspaces.occupied = "#f2cdcd";
y_margins = "0.2em";
};
menus = {
background = "#11111b";
border.color = "#313244";
buttons.active = "#f5c2e6";
buttons.default = "#b4befe";
buttons.disabled = "#585b71";
buttons.text = "#181824";
cards = "#1e1e2e";
check_radio_button.active = "#b4beff";
check_radio_button.background = "#45475a";
dimtext = "#585b70";
dropdownmenu.background = "#11111b";
dropdownmenu.divider = "#1e1e2e";
dropdownmenu.text = "#cdd6f4";
feinttext = "#313244";
iconbuttons.active = "#b4beff";
iconbuttons.passive = "#cdd6f3";
icons.active = "#b4befe";
icons.passive = "#585b70";
label = "#b4befe";
listitems.active = "#b4befd";
listitems.passive = "#cdd6f4";
menu = {
battery.background.color = "#11111b";
battery.border.color = "#313244";
battery.card.color = "#1e1e2e";
battery.icons.active = "#f9e2af";
battery.icons.passive = "#9399b2";
battery.label.color = "#f9e2af";
battery.listitems.active = "#f9e2af";
battery.listitems.passive = "#cdd6f3";
battery.slider.background = "#585b71";
battery.slider.backgroundhover = "#45475a";
battery.slider.primary = "#f9e2af";
battery.slider.puck = "#6c7086";
battery.text = "#cdd6f4";
bluetooth.background.color = "#11111b";
bluetooth.border.color = "#313244";
bluetooth.card.color = "#1e1e2e";
bluetooth.iconbutton.active = "#89dceb";
bluetooth.iconbutton.passive = "#cdd6f4";
bluetooth.icons.active = "#89dceb";
bluetooth.icons.passive = "#9399b2";
bluetooth.label.color = "#89dceb";
bluetooth.listitems.active = "#89dcea";
bluetooth.listitems.passive = "#cdd6f4";
bluetooth.scroller.color = "#89dceb";
bluetooth.status = "#6c7086";
bluetooth.switch.disabled = "#313245";
bluetooth.switch.enabled = "#89dceb";
bluetooth.switch.puck = "#454759";
bluetooth.switch_divider = "#45475a";
bluetooth.text = "#cdd6f4";
clock.background.color = "#11111b";
clock.border.color = "#313244";
clock.calendar.contextdays = "#585b70";
clock.calendar.currentday = "#f5c2e7";
clock.calendar.days = "#cdd6f4";
clock.calendar.paginator = "#f5c2e6";
clock.calendar.weekdays = "#f5c2e7";
clock.calendar.yearmonth = "#94e2d5";
clock.card.color = "#1e1e2e";
clock.text = "#cdd6f4";
clock.time.time = "#f5c2e7";
clock.time.timeperiod = "#94e2d5";
clock.weather.hourly.icon = "#f5c2e7";
clock.weather.hourly.temperature = "#f5c2e7";
clock.weather.hourly.time = "#f5c2e7";
clock.weather.icon = "#f5c2e7";
clock.weather.stats = "#f5c2e7";
clock.weather.status = "#94e2d5";
clock.weather.temperature = "#cdd6f4";
clock.weather.thermometer.cold = "#89b4fa";
clock.weather.thermometer.extremelycold = "#89dceb";
clock.weather.thermometer.extremelyhot = "#f38ba8";
clock.weather.thermometer.hot = "#fab387";
clock.weather.thermometer.moderate = "#b4befe";
dashboard.background.color = "#11111b";
dashboard.border.color = "#313244";
dashboard.card.color = "#1e1e2e";
dashboard.controls.bluetooth.background = "#89dceb";
dashboard.controls.bluetooth.text = "#181824";
dashboard.controls.disabled = "#585b70";
dashboard.controls.input.background = "#f5c2e7";
dashboard.controls.input.text = "#181824";
dashboard.controls.notifications.background = "#f9e2af";
dashboard.controls.notifications.text = "#181824";
dashboard.controls.volume.background = "#eba0ac";
dashboard.controls.volume.text = "#181824";
dashboard.controls.wifi.background = "#cba6f7";
dashboard.controls.wifi.text = "#181824";
dashboard.directories.left.bottom.color = "#eba0ac";
dashboard.directories.left.middle.color = "#f9e2af";
dashboard.directories.left.top.color = "#f5c2e7";
dashboard.directories.right.bottom.color = "#b4befe";
dashboard.directories.right.middle.color = "#cba6f7";
dashboard.directories.right.top.color = "#94e2d5";
dashboard.monitors.bar_background = "#45475a";
dashboard.monitors.cpu.bar = "#eba0ad";
dashboard.monitors.cpu.icon = "#eba0ac";
dashboard.monitors.cpu.label = "#eba0ac";
dashboard.monitors.disk.bar = "#f5c2e8";
dashboard.monitors.disk.icon = "#f5c2e7";
dashboard.monitors.disk.label = "#f5c2e7";
dashboard.monitors.gpu.bar = "#a6e3a2";
dashboard.monitors.gpu.icon = "#a6e3a1";
dashboard.monitors.gpu.label = "#a6e3a1";
dashboard.monitors.ram.bar = "#f9e2ae";
dashboard.monitors.ram.icon = "#f9e2af";
dashboard.monitors.ram.label = "#f9e2af";
dashboard.powermenu.confirmation.background = "#11111b";
dashboard.powermenu.confirmation.body = "#cdd6f4";
dashboard.powermenu.confirmation.border = "#313244";
dashboard.powermenu.confirmation.button_text = "#11111a";
dashboard.powermenu.confirmation.card = "#1e1e2e";
dashboard.powermenu.confirmation.confirm = "#a6e3a1";
dashboard.powermenu.confirmation.deny = "#f38ba8";
dashboard.powermenu.confirmation.label = "#b4befe";
dashboard.powermenu.logout = "#a6e3a1";
dashboard.powermenu.restart = "#fab387";
dashboard.powermenu.shutdown = "#f38ba8";
dashboard.powermenu.sleep = "#89dceb";
dashboard.profile.name = "#f5c2e7";
dashboard.shortcuts.background = "#b4befe";
dashboard.shortcuts.recording = "#a6e3a1";
dashboard.shortcuts.text = "#181824";
media.album = "#f5c2e8";
media.artist = "#94e2d6";
media.background.color = "#11111b";
media.border.color = "#313244";
media.buttons.background = "#b4beff";
media.buttons.enabled = "#94e2d4";
media.buttons.inactive = "#585b70";
media.buttons.text = "#11111b";
media.card.color = "#1e1e2e";
media.slider.background = "#585b71";
media.slider.backgroundhover = "#45475a";
media.slider.primary = "#f5c2e7";
media.slider.puck = "#6c7086";
media.song = "#b4beff";
media.timestamp = "#cdd6f4";
network.background.color = "#11111b";
network.border.color = "#313244";
network.card.color = "#1e1e2e";
network.iconbuttons.active = "#cba6f7";
network.iconbuttons.passive = "#cdd6f4";
network.icons.active = "#cba6f7";
network.icons.passive = "#9399b2";
network.label.color = "#cba6f7";
network.listitems.active = "#cba6f6";
network.listitems.passive = "#cdd6f4";
network.scroller.color = "#cba6f7";
network.status.color = "#6c7086";
network.switch.disabled = "#313245";
network.switch.enabled = "#cba6f7";
network.switch.puck = "#454759";
network.text = "#cdd6f4";
notifications.background = "#11111b";
notifications.border = "#313244";
notifications.card = "#1e1e2e";
notifications.clear = "#f38ba8";
notifications.label = "#b4befe";
notifications.no_notifications_label = "#313244";
notifications.pager.background = "#11111b";
notifications.pager.button = "#b4befe";
notifications.pager.label = "#9399b2";
notifications.scrollbar.color = "#b4befe";
notifications.switch.disabled = "#313245";
notifications.switch.enabled = "#b4befe";
notifications.switch.puck = "#454759";
notifications.switch_divider = "#45475a";
power.background.color = "#11111b";
power.border.color = "#313244";
power.buttons.logout.background = "#1e1e2e";
power.buttons.logout.icon = "#181824";
power.buttons.logout.icon_background = "#a6e3a1";
power.buttons.logout.text = "#a6e3a1";
power.buttons.restart.background = "#1e1e2e";
power.buttons.restart.icon = "#181824";
power.buttons.restart.icon_background = "#fab387";
power.buttons.restart.text = "#fab387";
power.buttons.shutdown.background = "#1e1e2e";
power.buttons.shutdown.icon = "#181824";
power.buttons.shutdown.icon_background = "#f38ba7";
power.buttons.shutdown.text = "#f38ba8";
power.buttons.sleep.background = "#1e1e2e";
power.buttons.sleep.icon = "#181824";
power.buttons.sleep.icon_background = "#89dceb";
power.buttons.sleep.text = "#89dceb";
systray.dropdownmenu.background = "#11111b";
systray.dropdownmenu.divider = "#1e1e2e";
systray.dropdownmenu.text = "#cdd6f4";
volume.audio_slider.background = "#585b71";
volume.audio_slider.backgroundhover = "#45475a";
volume.audio_slider.primary = "#eba0ac";
volume.audio_slider.puck = "#585b70";
volume.background.color = "#11111b";
volume.border.color = "#313244";
volume.card.color = "#1e1e2e";
volume.iconbutton.active = "#eba0ac";
volume.iconbutton.passive = "#cdd6f4";
volume.icons.active = "#eba0ac";
volume.icons.passive = "#9399b2";
volume.input_slider.background = "#585b71";
volume.input_slider.backgroundhover = "#45475a";
volume.input_slider.primary = "#eba0ac";
volume.input_slider.puck = "#585b70";
volume.label.color = "#eba0ac";
volume.listitems.active = "#eba0ab";
volume.listitems.passive = "#cdd6f4";
volume.text = "#cdd6f4";
};
popover.background = "#181824";
popover.border = "#181824";
popover.text = "#b4befe";
progressbar.background = "#45475a";
progressbar.foreground = "#b4befe";
slider.background = "#585b71";
slider.backgroundhover = "#45475a";
slider.primary = "#b4befe";
slider.puck = "#6c7086";
switch.disabled = "#313245";
switch.enabled = "#b4befe";
switch.puck = "#454759";
text = "#cdd6f4";
tooltip.background = "#11111b";
tooltip.text = "#cdd6f4";
};
outer_spacing = "0.0em";
transparent = true;
};
notification.actions.background = "#b4befd";
notification.actions.text = "#181825";
notification.background = "#181826";
notification.border = "#313243";
notification.close_button.background = "#f38ba7";
notification.close_button.label = "#11111b";
notification.label = "#b4befe";
notification.labelicon = "#b4befe";
notification.text = "#cdd6f4";
notification.time = "#7f849b";
osd.bar_color = "#b4beff";
osd.bar_container = "#11111b";
osd.bar_empty_color = "#313244";
osd.bar_overflow_color = "#f38ba7";
osd.icon = "#11111b";
osd.icon_container = "#b4beff";
osd.label = "#b4beff";
};
};
};
};
};
}

View file

@ -0,0 +1,26 @@
{
flake.modules.homeManager.cholli =
{ ... }:
let
picture-path = "/home/cholli/Pictures/firewatch.jpg";
in
{
home.file = {
# https://www.reddit.com/r/WidescreenWallpaper/comments/13hib3t/purple_firewatch_3840x1620/
"Pictures/firewatch.jpg".source = ./firewatch.jpg;
};
wayland.windowManager.hyprland.settings.exec-once = [
''hyprctl hyprpaper wallpaper "DP-1,${picture-path}"''
];
services.hyprpaper = {
enable = true;
settings = {
preload = [ picture-path ];
wallpaper = "DP-1,${picture-path}";
};
};
};
}

View file

@ -0,0 +1,3 @@
{
}

View file

@ -0,0 +1,62 @@
{
flake.modules = {
nixos.desktop =
{
config,
inputs,
lib,
pkgs,
...
}:
let
zenbrowser = inputs.zen-browser.packages."${pkgs.system}".default;
in
{
environment = {
systemPackages = [
zenbrowser
];
sessionVariables = {
DEFAULT_BROWSER = "${zenbrowser}/bin/zen-beta";
BROWSER = "zen-beta";
};
etc = lib.mkIf config.programs._1password.enable {
"1password/custom_allowed_browsers" = {
text = ''
zen
'';
mode = "0755";
};
};
};
};
homeManager.cholli =
{ pkgs, osConfig, ... }:
{
dconf = {
settings."org/gnome/desktop/interface".color-scheme = "prefer-dark";
};
gtk = {
enable = true;
theme = {
name = "Adwaita-dark";
package = pkgs.gnome-themes-extra;
};
};
# qt = {
# enable = true;
# platformTheme.name = "gnome";
# style.name = "adwaita-dark";
# };
systemd.user.sessionVariables = osConfig.home-manager.users.cholli.home.sessionVariables;
};
};
}

View file

@ -0,0 +1,345 @@
{
flake.modules = {
nixos.hyprland =
{
config,
inputs,
pkgs,
...
}:
let
hyprland-package = inputs.hyprland.packages.${pkgs.system}.hyprland;
focus-1password = pkgs.writeShellScriptBin "focus-or-open-1pass" ''
running=$(hyprctl -j clients | jq -r '.[] | select(.class == "1password") | .workspace.id')
if [[ $running != "" ]]; then
hyprctl dispatch workspace $running
else
# always open on w/space 4
hyprctl dispatch workspace 9
ELECTRON_OZONE_PLATFORM_HINT=x11 1password&
fi
'';
in
{
environment.systemPackages =
with pkgs;
[
# Auth Agent
hyprpolkitagent
# Notification daemon
libnotify
# Wayland Utilities
wlr-randr
# Clipboard Stuff
wl-clipboard
xclip
clipnotify
# clipsync
# Screenshot Utility
grimblast
# File Manager
xfce.thunar
# clean sddm theme
elegant-sddm
# json cli parser for bash script to focus 1password
jq
hyprpanel
#####
xdg-dbus-proxy
]
++ lib.optional config.programs._1password.enable focus-1password;
programs = {
hyprland = {
enable = true;
package = hyprland-package;
portalPackage = inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland;
withUWSM = true;
};
};
xdg = {
autostart.enable = true;
portal = {
enable = true;
extraPortals = [
pkgs.xdg-desktop-portal
pkgs.xdg-desktop-portal-gtk
];
xdgOpenUsePortal = true;
config = {
common = {
default = [ "*" ];
"org.freedesktop.impl.portal.Secret" = [ "gnome-keyring" ];
};
hyprland = {
default = [
"hyprland"
"gtk"
];
"org.freedesktop.impl.portal.FileChooser" = [ "gtk" ];
"org.freedesktop.impl.portal.OpenURI" = [ "gtk" ];
};
};
};
};
security.pam.services.gdm.enableGnomeKeyring = true;
services.displayManager.gdm = {
enable = true;
wayland = true;
};
environment.sessionVariables = {
NIXOS_OZONE_WL = "1"; # Hint electron apps to use wayland
ELECTRON_OZONE_PLATFORM_HINT = "auto";
XDG_SESSION_TYPE = "wayland";
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
QT_QPA_PLATFORM = "wayland;xcb";
};
};
homeManager.cholli =
{
inputs,
lib,
pkgs,
osConfig,
...
}:
let
hyprland-package = inputs.hyprland.packages.${pkgs.system}.hyprland;
in
{
config = lib.mkIf osConfig.programs.hyprland.enable {
wayland.windowManager.hyprland = {
enable = true;
package = hyprland-package;
plugins = [ inputs.hy3.packages.${pkgs.system}.hy3 ];
systemd.variables = [ "--all" ];
settings = {
"$mod" = "SUPER";
exec-once = [
"systemctl --user start hyprpolkitagent"
"[workspace 1 silent] zen-beta"
"[workspace 2 silent] steam"
"[workspace 7 silent] obsidian"
"[workspace 8 silent] discord"
"[workspace 9 silent] ELECTRON_OZONE_PLATFORM_HINT=x11 1password" # fix for promts not showing up anymore
"${pkgs.xorg.xhost}/bin/xhost +"
"${lib.getExe pkgs.xorg.xrandr} --output DP-1 --primary"
];
windowrulev2 = [
#steam is a bit wierd, since it opens in multiple phases, so just move the last window to the workspace
"workspace 2 silent, class:^(steam)$, title:^(Steam)"
"workspace 7 silent, class:^(com.obsproject.Studio)$"
"workspace 8 silent, class:^(steam)$, title:^(Friends List)"
"workspace 8 silent, class:^(discord)$, title:^(Discord)"
];
monitor = lib.mkIf (osConfig.networking.hostName == "yggdrasil") [
#Ultrawide
"DP-1,3440x1440@144, 0x0, 1"
#Vertical
"HDMI-A-1, 1920x1080@144, auto-right, 1, transform, 1"
];
workspace = lib.mkIf (osConfig.networking.hostName == "yggdrasil") [
"1, monitor:DP-1"
"2, monitor:DP-1"
"3, monitor:DP-1"
"4, monitor:DP-1"
"5, monitor:DP-1"
"6, monitor:DP-1"
"7, monitor:HDMI-A-1"
"8, monitor:HDMI-A-1"
"9, monitor:HDMI-A-1"
];
general = {
layout = "hy3";
gaps_in = 5;
gaps_out = 5;
border_size = 1;
"col.active_border" = "rgba(88888888)";
"col.inactive_border" = "rgba(00000088)";
allow_tearing = true;
resize_on_border = true;
};
misc = {
# hyprchan
force_default_wallpaper = 2;
# focus new windows that want to be focused
focus_on_activate = true;
};
decoration = {
rounding = 16;
blur = {
enabled = true;
brightness = 1.0;
contrast = 1.0;
noise = 1.0e-2;
vibrancy = 0.2;
vibrancy_darkness = 0.5;
passes = 4;
size = 7;
popups = true;
popups_ignorealpha = 0.2;
};
shadow = {
enabled = true;
range = 100;
render_power = 2;
ignore_window = true;
color = "rgba(00000055)";
offset = "0 15";
scale = 0.97;
};
};
animations = {
enabled = true;
animation = [
"border, 1, 2, default"
"fade, 1, 4, default"
"windows, 1, 3, default, popin 80%"
"workspaces, 1, 2, default, slide"
];
};
bind = [
# compositor commands
"$mod SHIFT, R, exec, hyprctl reload"
"$mod SHIFT, Q, killactive,"
"$mod SHIFT, E, exec, pkill Hyprland"
"$mod CTRL, l, exec, hyprlock-blur"
"$mod, F, fullscreen,"
"$mod, G, togglegroup,"
"$mod SHIFT, N, changegroupactive, f"
"$mod SHIFT, P, changegroupactive, b"
"$mod, R, togglesplit,"
"$mod, T, togglefloating,"
"$mod ALT, ,resizeactive,"
"$mod CTRL, left, movecurrentworkspacetomonitor, l"
"$mod CTRL, right, movecurrentworkspacetomonitor, r"
# move focus
"$mod, h, hy3:movefocus, l"
"$mod, j, hy3:movefocus, d"
"$mod, k, hy3:movefocus, u"
"$mod, l, hy3:movefocus, r"
"$mod, left, hy3:movefocus, l"
"$mod, down, hy3:movefocus, d"
"$mod, up, hy3:movefocus, u"
"$mod, right, hy3:movefocus, r"
# move focus
"$mod SHIFT, h, hy3:movewindow, l, once"
"$mod SHIFT, j, hy3:movewindow, d, once"
"$mod SHIFT, k, hy3:movewindow, u, once"
"$mod SHIFT, l, hy3:movewindow, r, once"
"$mod SHIFT, left, hy3:movewindow, l, once"
"$mod SHIFT, down, hy3:movewindow, d, once"
"$mod SHIFT, up, hy3:movewindow, u, once"
"$mod SHIFT, right, hy3:movewindow, r, once"
#run important programs
"$mod, Return, exec, kitty"
"$mod, D, exec, rofi -show drun"
"$mod, P, exec, focus-or-open-1pass"
# "$mod, D, exec, rofi -show combi"
#screenshot
", Print, exec, grimblast copy area"
]
++ (
# workspaces
# binds $mod + [shift +] {1..9} to [move to] workspace {1..9}
builtins.concatLists (
builtins.genList (
i:
let
ws = i + 1;
in
[
"$mod, code:1${toString i}, workspace, ${toString ws}"
"$mod SHIFT, code:1${toString i}, hy3:movetoworkspace, ${toString ws}"
]
) 9
)
);
# mouse movements
bindm = [
"$mod, mouse:272, movewindow"
"$mod, mouse:273, resizewindow"
"$mod ALT, mouse:272, resizewindow"
];
bindl = [
# volume
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
", XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
];
bindle = [
# volume
", XF86AudioRaiseVolume, exec, wpctl set-volume -l '1.0' @DEFAULT_AUDIO_SINK@ 6%+"
", XF86AudioLowerVolume, exec, wpctl set-volume -l '1.0' @DEFAULT_AUDIO_SINK@ 6%-"
];
input = {
kb_layout = "us";
# focus change on cursor move
follow_mouse = 2;
force_no_accel = 1;
accel_profile = "flat";
};
plugin = {
hy3 = {
autotile = {
enable = true;
trigger_width = 800;
trigger_height = 500;
};
};
};
};
};
};
};
};
}

3
modules/desktop/niri.nix Normal file
View file

@ -0,0 +1,3 @@
{
flake.modules.nixos.niri = { ... }: { };
}