Port iogamasters hyprland config

This commit is contained in:
Julian Mutter 2024-06-15 12:17:52 +02:00
parent c97f22254a
commit a9d0e298b3
53 changed files with 986 additions and 154 deletions

View File

@ -117,6 +117,8 @@
permittedInsecurePackages = [ ];
};
systems.modules.nixos = with inputs; [ nix-topology.nixosModules.default ];
topology =
with inputs;
let

View File

@ -34,10 +34,13 @@
neovim.enable = true;
alacritty.enable = true;
emacs.enable = true;
# i3.enable = true;
# rofi.enable = true;
hyprland.enable = true;
nix-helper.enable = true;
desktop.enable = true;
};
home.packages =
@ -61,7 +64,7 @@
# Further tools
cntr # nix debugger
(lib.frajul.my-helper-function lazygit)
lazygit
languagetool
# wireguard-tools

View File

@ -1,18 +0,0 @@
{
# This is the merged library containing your namespaced library as well as all libraries from
# your flake's inputs.
lib,
# Your flake inputs are also available.
inputs,
# Additionally, Snowfall Lib's own inputs are passed. You probably don't need to use this!
snowfall-inputs, }: {
# This will be available as `lib.my-namespace.my-helper-function`.
my-helper-function = x: x;
my-scope = {
# This will be available as `lib.my-namespace.my-scope.my-scoped-helper-function`.
my-scoped-helper-function = x: x;
};
}

15
lib/module/default.nix Normal file
View File

@ -0,0 +1,15 @@
{ lib, ... }:
with lib;
rec {
mkOpt =
type: default: description:
mkOption { inherit type default description; };
mkOpt' = type: default: mkOpt type default null;
mkBoolOpt = mkOpt types.bool;
mkBoolOpt' = mkOpt' types.bool;
mkEnableOpt = mkBoolOpt' false;
}

View File

@ -0,0 +1,47 @@
{
options,
config,
lib,
pkgs,
inputs,
...
}:
let
inherit (inputs.nix-colors.lib-contrib { inherit pkgs; }) gtkThemeFromScheme;
cfg = config.modules.desktop;
in
{
options.modules.desktop =
with lib.frajul;
with lib.types;
{
colorscheme = mkOpt str "catppuccin-mocha" "Theme to use for the desktop";
enable = mkBoolOpt false "Enable desktop";
};
# Do not make conditional, just toggle things on and off
imports = [
inputs.prism.homeModules.prism
inputs.nix-colors.homeManagerModules.default
];
config = lib.mkIf cfg.enable {
prism = {
enable = true;
wallpapers = ./wallpapers;
colorscheme = inputs.nix-colors.colorschemes.${cfg.colorscheme};
};
gtk = {
enable = true;
theme = {
name = inputs.nix-colors.colorschemes.${cfg.colorscheme}.slug;
package = gtkThemeFromScheme { scheme = inputs.nix-colors.colorschemes.${cfg.colorscheme}; };
};
iconTheme = {
name = "Papirus-Dark";
package = pkgs.papirus-icon-theme;
};
};
};
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 823 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 759 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1024 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 499 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 607 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 719 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 464 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 831 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 354 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 861 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 267 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 239 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 299 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 537 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 261 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 269 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 216 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 342 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 412 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 595 KiB

View File

@ -22,20 +22,30 @@
let
cfg = config.modules.hyprland;
inherit (inputs.nix-colors.colorschemes.${builtins.toString config.modules.desktop.colorscheme})
palette
;
in
{
options.modules.hyprland = {
enable = lib.mkOption { default = false; };
options.modules.hyprland = with lib.frajul; {
enable = mkBoolOpt false "Enable or disable the hyprland window manager.";
};
# imports = [ (ib.mkIf inputs.hyprland.homeManagerModules.default) ];
config = lib.mkIf cfg.enable {
modules.desktop.addons = {
waybar.enable = true;
wofi.enable = true;
mako.enable = true;
gtklock.enable = true;
wlogout.enable = true;
};
services.dunst.enable = true;
# services.dunst.enable = true;
home.packages = with pkgs; [
wofi
# wofi
xfce.thunar
# hyprpicker # TODO
# hyprcursor # TODO
@ -43,116 +53,129 @@ in
grimblast
];
services.copyq.enable = true;
programs.hyprlock.enable = true;
programs.hyprlock.settings = {
general = {
disable_loading_bar = true;
hide_cursor = true;
ignore_empty_input = true;
};
background = [
{
path = "screenshot";
blur_passes = 3;
blur_size = 8;
}
];
input-field = [
{
size = "200, 50";
position = "0, -80";
monitor = "";
dots_center = true;
fade_on_empty = false;
font_color = "rgb(202, 211, 245)";
inner_color = "rgb(91, 96, 120)";
outer_color = "rgb(24, 25, 38)";
outline_thickness = 5;
placeholder_text = "Password...";
shadow_passes = 2;
}
];
};
services.hypridle = {
enable = true;
settings = {
general = {
after_sleep_cmd = "hyprctl dispatch dpms on";
ignore_dbus_inhibit = false;
lock_cmd = "hyprlock";
};
listener = [
{
timeout = 300; # 5min
on-timeout = "brightnessctl -s set 10"; # set monitor backlight to minimum, avoid 0 on OLED monitor.
on-resume = "brightnessctl -r"; # monitor backlight restore.
xdg.configFile = {
"hypr/launch".source = ./launch;
# "hypr/hyprland.conf".source = ./hyprland.conf;
"hypr/colors.conf" = {
text = ''
general {
col.active_border = 0xff${palette.base0C} 0xff${palette.base0D} 270deg
col.inactive_border = 0xff${palette.base00}
}
{
timeout = 360; # 6min
on-timeout = "hyprlock"; # lock screen when timeout has passed
}
{
timeout = 600; # 10min
on-timeout = "hyprctl dispatch dpms off"; # screen off when timeout has passed
on-resume = "hyprctl dispatch dpms on"; # screen on when activity is detected after timeout has fired.
}
];
'';
};
};
programs.waybar = {
enable = true;
systemd.enable = true;
style = builtins.readFile ./style.css;
settings.mainBar = builtins.fromJSON (builtins.readFile ./waybar-config.json);
# settings = {
# mainBar = {
# layer = "top";
# position = "bottom";
# height = 30;
# output = [
# "eDP-1"
# "HDMI-A-1"
# ];
# modules-left = [
# "hyprland/workspaces"
# "hyprland/submap"
# ];
# modules-center = [ "hyprland/window" ];
# modules-right = [
# # "mpd"
# # "idle_inhibitor"
# "pulseaudio"
# # "network"
# "power-profiles-daemon"
# "cpu"
# "memory"
# # "temperature"
# # "backlight"
# # "keyboard-state"
# "battery"
# # "battery#bat2"
# "clock"
# "tray"
# ];
# services.copyq.enable = true;
# # "sway/workspaces" = {
# # disable-scroll = true;
# # all-outputs = true;
# # };
# };
# };
};
# programs.hyprlock.enable = true;
# programs.hyprlock.settings = {
# general = {
# disable_loading_bar = true;
# hide_cursor = true;
# ignore_empty_input = true;
# };
programs.wlogout.enable = true; # can be configured
# background = [
# {
# path = "screenshot";
# blur_passes = 3;
# blur_size = 8;
# }
# ];
# input-field = [
# {
# size = "200, 50";
# position = "0, -80";
# monitor = "";
# dots_center = true;
# fade_on_empty = false;
# font_color = "rgb(202, 211, 245)";
# inner_color = "rgb(91, 96, 120)";
# outer_color = "rgb(24, 25, 38)";
# outline_thickness = 5;
# placeholder_text = "Password...";
# shadow_passes = 2;
# }
# ];
# };
# services.hypridle = {
# enable = true;
# settings = {
# general = {
# after_sleep_cmd = "hyprctl dispatch dpms on";
# ignore_dbus_inhibit = false;
# lock_cmd = "hyprlock";
# };
# listener = [
# {
# timeout = 300; # 5min
# on-timeout = "brightnessctl -s set 10"; # set monitor backlight to minimum, avoid 0 on OLED monitor.
# on-resume = "brightnessctl -r"; # monitor backlight restore.
# }
# {
# timeout = 360; # 6min
# on-timeout = "hyprlock"; # lock screen when timeout has passed
# }
# {
# timeout = 600; # 10min
# on-timeout = "hyprctl dispatch dpms off"; # screen off when timeout has passed
# on-resume = "hyprctl dispatch dpms on"; # screen on when activity is detected after timeout has fired.
# }
# ];
# };
# };
# programs.waybar = {
# enable = true;
# systemd.enable = true;
# style = builtins.readFile ./style.css;
# settings.mainBar = builtins.fromJSON (builtins.readFile ./waybar-config.json);
# # settings = {
# # mainBar = {
# # layer = "top";
# # position = "bottom";
# # height = 30;
# # output = [
# # "eDP-1"
# # "HDMI-A-1"
# # ];
# # modules-left = [
# # "hyprland/workspaces"
# # "hyprland/submap"
# # ];
# # modules-center = [ "hyprland/window" ];
# # modules-right = [
# # # "mpd"
# # # "idle_inhibitor"
# # "pulseaudio"
# # # "network"
# # "power-profiles-daemon"
# # "cpu"
# # "memory"
# # # "temperature"
# # # "backlight"
# # # "keyboard-state"
# # "battery"
# # # "battery#bat2"
# # "clock"
# # "tray"
# # ];
# # # "sway/workspaces" = {
# # # disable-scroll = true;
# # # all-outputs = true;
# # # };
# # };
# # };
# };
# programs.wlogout.enable = true; # can be configured
# services.hypridle.enable = true; # can be configured
services.network-manager-applet.enable = true;
@ -161,7 +184,7 @@ in
# Whether to enable Hyprland wayland compositor
enable = true;
# The hyprland package to use (simplifies use of plugins)
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
# package = inputs.hyprland.packages.${pkgs.system}.hyprland;
# Whether to enable XWayland
xwayland.enable = true;
@ -294,7 +317,7 @@ in
# other commands
"$mod, Escape, exec, wlogout -p layer-shell"
"$mod, TAB, exec, hyprlock"
"$mod, TAB, exec, gtklock"
"$mod SHIFT, R, exec, hyprctl reload"
", Print, exec, grimblast --notify copysave area"

View File

@ -0,0 +1,39 @@
{
options,
config,
lib,
pkgs,
inputs,
...
}:
let
cfg = config.modules.desktop.addons.gtklock;
inherit (inputs.nix-colors.colorschemes.${builtins.toString config.modules.desktop.colorscheme})
palette
;
in
{
options.modules.desktop.addons.gtklock =
with lib.frajul;
with lib.types;
{
enable = mkBoolOpt false "Enable or disable the gtklock screen locker.";
};
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [ gtklock ];
xdg.configFile."gtklock/style.css".text = ''
window {
background-size: cover;
background-repeat: no-repeat;
background-position: center;
background-color: #${palette.base00};
}
clock-label {
color: #${palette.base05};
}
'';
};
}

View File

@ -0,0 +1,140 @@
source = ~/.config/hypr/colors.conf
monitor=,preferred,auto,auto
monitor=Unknown-1,disable # Freaking ghost monitor after update
exec-once = exec ~/.config/hypr/launch
input {
kb_layout = us
follow_mouse = 1
touchpad {
natural_scroll = yes
}
kb_options = caps:escape
sensitivity = -0.5 # -1.0 - 1.0, 0 means no modification.
}
general {
gaps_in = 5
gaps_out = 20
border_size = 3
layout = dwindle
}
decoration {
rounding = 10
drop_shadow = yes
shadow_range = 4
shadow_render_power = 3
col.shadow = rgba(1a1a1aee)
}
animations {
enabled=1
# bezier=overshot,0.05,0.9,0.1,1.1
bezier=overshot,0.13,0.99,0.29,1.1
animation=windows,1,4,overshot,slide
animation=fade,1,10,default
animation=workspaces,1,6,overshot,slide
bezier = linear, 0.0, 0.0, 1.0, 1.iii0
animation = borderangle, 1, 100, linear, loop
}
dwindle {
pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
preserve_split = yes # you probably want this
}
master {
new_is_master = true
}
gestures {
workspace_swipe = on
}
$mainMod = SUPER
bind = $mainMod, RETURN, exec, foot
bind = $mainMod, Q, killactive,
bind = $mainMod, SPACE, togglefloating,
bind = $mainMod, P, exec, wofi --show drun
bind = $mainMod, F, fullscreen
bind = $mainMod, TAB, pseudo
bind = $mainMod_SHIFT, E, exec, wlogout -b 1 -p layer-shell
bind = $mainMod_SHIFT, Q, exec, gtklock
bind = $mainMod_SHIFT, C, exec, wallpaper
bind = , code:107, exec, screenshot
bind = $mainMod, code:107, exec, screenshot-edit
bindl = , code:127, exec, wpctl set-volume @DEFAULT_SOURCE@ 100%
bindrl = , code:127, exec, wpctl set-volume @DEFAULT_SOURCE@ 0%
# Move focus with mainMod + arrow keys
bind = $mainMod, h, movefocus, l
bind = $mainMod, l, movefocus, r
bind = $mainMod, k, movefocus, u
bind = $mainMod, j, movefocus, d
# Move window with mainMod_SHIFT + arrow keys
bind = $mainMod_SHIFT, h, movewindow, l
bind = $mainMod_SHIFT, l, movewindow, r
bind = $mainMod_SHIFT, k, movewindow, u
bind = $mainMod_SHIFT, j, movewindow, d
# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4
bind = $mainMod, 5, workspace, 5
bind = $mainMod, 6, workspace, 6
bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10
# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3
bind = $mainMod SHIFT, 4, movetoworkspace, 4
bind = $mainMod SHIFT, 5, movetoworkspace, 5
bind = $mainMod SHIFT, 6, movetoworkspace, 6
bind = $mainMod SHIFT, 7, movetoworkspace, 7
bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 10
# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow
# Audio binds
binde=, XF86AudioRaiseVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ +5%
binde=, XF86AudioLowerVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ -5%
# Per device settings
# device:elan-touchpad {
# accel_profile = adaptive
# sensitivity = -0.3
# }
# Extra window rules
# Allow hiding xwaylandvideobridge window correctly
windowrulev2 = opacity 0.0 override 0.0 override,class:^(xwaylandvideobridge)$
windowrulev2 = noanim,class:^(xwaylandvideobridge)$
windowrulev2 = noinitialfocus,class:^(xwaylandvideobridge)$
windowrulev2 = maxsize 1 1,class:^(xwaylandvideobridge)$
windowrulev2 = noblur,class:^(xwaylandvideobridge)$

5
modules/home/hyprland/launch Executable file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
rm -rf $XDG_RUNTIME_DIR/swww.socket
swww init & waybar & mako & xwaylandvideobridge

View File

@ -0,0 +1,44 @@
{
options,
config,
lib,
pkgs,
inputs,
...
}:
let
cfg = config.modules.desktop.addons.mako;
inherit (inputs.nix-colors.colorschemes.${builtins.toString config.modules.desktop.colorscheme})
palette
;
in
{
options.modules.desktop.addons.mako =
with lib.frajul;
with lib.types;
{
enable = mkBoolOpt false "Enable or disable mako";
};
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [
mako
libnotify
];
xdg.configFile."mako/config" = {
text = ''
background-color=#${palette.base00}
text-color=#${palette.base05}
border-color=#${palette.base0D}
progress-color=over #${palette.base02}
[urgency=high]
border-color=#${palette.base09}
'';
onChange = ''
${pkgs.busybox}/bin/pkill -SIGUSR2 mako
'';
};
};
}

View File

@ -0,0 +1,80 @@
{
"layer": "top",
"position": "top",
"mod": "dock",
"exclusive": true,
"passtrough": false,
"gtk-layer-shell": true,
"height": 32,
"modules-left": [
"hyprland/workspaces"
],
"modules-center": [],
"modules-right": [
"tray",
"network",
"battery",
"clock"
],
"hyprland/window": {
"format": "{}"
},
"hyprland/workspaces": {
"on-scroll-up": "hyprctl dispatch workspace e+1",
"on-scroll-down": "hyprctl dispatch workspace e-1",
"all-outputs": true,
"on-click": "activate",
"format": "{icon}",
"format-icons": {
"1": "1",
"2": "2",
"3": "3",
"4": "4",
"5": "5",
"6": "6",
"7": "7",
"8": "8",
"9": "9",
"10": "10"
}
},
"tray": {
"icon-size": 12,
"tooltip": false,
"spacing": 10
},
"clock": {
"format": "{:%H:%M}",
},
"pulseaudio": {
"format": " {volume}%",
"tooltip": false,
"format-muted": " N/A",
"on-click": "pavucontrol &",
"scroll-step": 5
},
"network": {
"format-wifi": " {essid} {signalStrength}%",
"format-ethernet": "󰈀",
"format-disconnected": "󰈂"
},
"battery": {
"states": {
"warning": 20,
"critical": 15
},
"format": "󰁹 {capacity}%",
"format-charging": "󰂄 {capacity}%",
"format-plugged": "󰂄 {capacity}%"
}
}

View File

@ -0,0 +1,228 @@
{
options,
config,
pkgs,
lib,
inputs,
...
}:
with lib;
with lib.frajul;
let
cfg = config.modules.desktop.addons.waybar;
inherit (inputs.nix-colors.colorschemes.${builtins.toString config.modules.desktop.colorscheme})
palette
;
in
{
options.modules.desktop.addons.waybar = with types; {
enable = mkBoolOpt false "Enable or disable waybar";
};
config = mkIf cfg.enable {
programs.waybar = {
enable = true;
systemd.enable = true;
};
xdg.configFile."waybar/config.jsonc" = {
source = ./config.jsonc;
onChange = ''
${pkgs.busybox}/bin/pkill -SIGUSR2 waybar
'';
};
xdg.configFile."waybar/style.css" = {
text = ''
* {
/* `otf-font-awesome` is required to be installed for icons */
font-family: JetBrainsMono Nerd Font;
font-size: 13px;
border-radius: 17px;
}
#clock,
#custom-notification,
#custom-launcher,
#custom-power-menu,
/*#custom-colorpicker,*/
#custom-window,
#memory,
#disk,
#network,
#battery,
#custom-spotify,
#pulseaudio,
#window,
#tray {
padding: 5 15px;
border-radius: 12px;
background: #${palette.base00};
color: #${palette.base07};
margin-top: 8px;
margin-bottom: 8px;
margin-right: 2px;
margin-left: 2px;
transition: all 0.3s ease;
}
#window {
background-color: transparent;
box-shadow: none;
}
window#waybar {
background-color: rgba(0, 0, 0, 0.096);
border-radius: 17px;
}
window * {
background-color: transparent;
border-radius: 0px;
}
#workspaces button label {
color: #${palette.base07};
}
#workspaces button.active label {
color: #${palette.base00};
font-weight: bolder;
}
#workspaces button:hover {
box-shadow: #${palette.base07} 0 0 0 1.5px;
background-color: #${palette.base00};
min-width: 50px;
}
#workspaces {
background-color: transparent;
border-radius: 17px;
padding: 5 0px;
margin-top: 3px;
margin-bottom: 3px;
}
#workspaces button {
background-color: #${palette.base00};
border-radius: 12px;
margin-left: 10px;
transition: all 0.3s ease;
}
#workspaces button.active {
min-width: 50px;
box-shadow: rgba(0, 0, 0, 0.288) 2 2 5 2px;
background-color: #${palette.base0F};
background-size: 400% 400%;
transition: all 0.3s ease;
background: linear-gradient(
58deg,
#${palette.base0E},
#${palette.base0E},
#${palette.base0E},
#${palette.base0D},
#${palette.base0D},
#${palette.base0E},
#${palette.base08}
);
background-size: 300% 300%;
animation: colored-gradient 20s ease infinite;
}
@keyframes colored-gradient {
0% {
background-position: 71% 0%;
}
50% {
background-position: 30% 100%;
}
100% {
background-position: 71% 0%;
}
}
#custom-power-menu {
margin-right: 10px;
padding-left: 12px;
padding-right: 15px;
padding-top: 3px;
}
#custom-spotify {
margin-left: 5px;
padding-left: 15px;
padding-right: 15px;
padding-top: 3px;
color: #${palette.base07};
background-color: #${palette.base00};
transition: all 0.3s ease;
}
#custom-spotify.playing {
color: rgb(180, 190, 254);
background: rgba(30, 30, 46, 0.6);
background: linear-gradient(
90deg,
#${palette.base02},
#${palette.base00},
#${palette.base00},
#${palette.base00},
#${palette.base00},
#${palette.base02}
);
background-size: 400% 100%;
animation: grey-gradient 3s linear infinite;
transition: all 0.3s ease;
}
@keyframes grey-gradient {
0% {
background-position: 100% 50%;
}
100% {
background-position: -33% 50%;
}
}
#tray menu {
background-color: #${palette.base00};
opacity: 0.8;
}
#pulseaudio.muted {
color: #${palette.base08};
padding-right: 16px;
}
#custom-notification.collapsed,
#custom-notification.waiting_done {
min-width: 12px;
padding-right: 17px;
}
#custom-notification.waiting_start,
#custom-notification.expanded {
background-color: transparent;
background: linear-gradient(
90deg,
#${palette.base02},
#${palette.base00},
#${palette.base00},
#${palette.base00},
#${palette.base00},
#${palette.base02}
);
background-size: 400% 100%;
animation: grey-gradient 3s linear infinite;
min-width: 500px;
border-radius: 17px;
}
'';
onChange = ''
${pkgs.busybox}/bin/pkill -SIGUSR2 waybar
'';
};
};
}

View File

@ -0,0 +1,77 @@
{
options,
config,
lib,
pkgs,
inputs,
...
}:
let
cfg = config.modules.desktop.addons.wlogout;
inherit (inputs.nix-colors.colorschemes.${builtins.toString config.modules.desktop.colorscheme})
palette
;
in
{
options.modules.desktop.addons.wlogout =
with lib.frajul;
with lib.types;
{
enable = mkBoolOpt false "Enable or disable wlogout.";
};
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [ wlogout ];
xdg.configFile."wlogout/style.css".text = ''
* {
all: unset;
font-family: JetBrains Mono Nerd Font;
}
window {
background-color: #${palette.base00};
}
button {
color: #${palette.base01};
font-size: 64px;
background-color: rgba(0,0,0,0);
outline-style: none;
margin: 5px;
}
button:focus, button:active, button:hover {
color: #${palette.base0D};
transition: ease 0.4s;
}
'';
xdg.configFile."wlogout/layout".text = ''
{
"label" : "lock",
"action" : "gtklock",
"text" : "󰌾",
"keybind" : ""
}
{
"label" : "logout",
"action" : "loginctl terminate-user $USER",
"text" : "󰗽",
"keybind" : ""
}
{
"label" : "shutdown",
"action" : "systemctl poweroff",
"text" : "󰐥",
"keybind" : ""
}
{
"label" : "reboot",
"action" : "systemctl reboot",
"text" : "󰑓",
"keybind" : ""
}
'';
};
}

View File

@ -0,0 +1,15 @@
width=900
height=600
location=center
show=drun
prompt=Search...
filter_rate=100
allow_markup=true
no_actions=true
halign=fill
orientation=vertical
content_halign=fill
insensitive=true
allow_images=true
image_size=35
gtk_dark=true

View File

@ -0,0 +1,97 @@
{
options,
config,
lib,
pkgs,
inputs,
...
}:
let
cfg = config.modules.desktop.addons.wofi;
inherit (inputs.nix-colors.colorschemes.${builtins.toString config.modules.desktop.colorscheme})
palette
;
in
{
options.modules.desktop.addons.wofi =
with lib.frajul;
with lib.types;
{
enable = mkBoolOpt false "Enable or disable the wofi run launcher.";
};
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [ wofi ];
xdg.configFile."wofi/config".source = ./config;
xdg.configFile."wofi/style.css".text = ''
window {
margin: 5px;
border: 5px solid #181926;
background-color: #${palette.base00};
border-radius: 15px;
font-family: "JetBrainsMono";
font-size: 14px;
}
#input {
all: unset;
min-height: 36px;
padding: 4px 10px;
margin: 4px;
border: none;
color: #${palette.base05};
font-weight: bold;
background-color: #${palette.base01};
outline: none;
border-radius: 15px;
margin: 10px;
margin-bottom: 2px;
}
#inner-box {
margin: 4px;
padding: 10px;
font-weight: bold;
border-radius: 15px;
}
#outer-box {
margin: 0px;
padding: 3px;
border: none;
border-radius: 15px;
border: 5px solid #${palette.base01};
}
#scroll {
margin-top: 5px;
border: none;
border-radius: 15px;
margin-bottom: 5px;
}
#text:selected {
color: #${palette.base01};
margin: 0px 0px;
border: none;
border-radius: 15px;
}
#entry {
margin: 0px 0px;
border: none;
border-radius: 15px;
background-color: transparent;
}
#entry:selected {
margin: 0px 0px;
border: none;
border-radius: 15px;
background: #${palette.base0D};
background-size: 400% 400%;
}
'';
};
}

View File

@ -0,0 +1,25 @@
{
options,
config,
lib,
...
}:
with lib;
with lib.frajul;
let
cfg = config.modules.system.boot-efi;
in
{
options.modules.system.boot-efi = with types; {
enable = mkBoolOpt false "Whether or not to enable efi booting.";
};
config = mkIf cfg.enable {
boot.loader.systemd-boot.enable = true;
boot.loader.systemd-boot.configurationLimit = 5;
boot.loader.efi.canTouchEfiVariables = true;
# https://github.com/NixOS/nixpkgs/blob/c32c39d6f3b1fe6514598fa40ad2cf9ce22c3fb7/nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix#L66
boot.loader.systemd-boot.editor = false;
};
}

View File

@ -22,33 +22,31 @@
{
imports = [ ./hardware-configuration.nix ];
nix.buildMachines = [
{
hostName = "192.168.3.118";
system = "x86_64-linux";
protocol = "ssh";
# if the builder supports building for multiple architectures,
# replace the previous line by, e.g.
# systems = ["x86_64-linux" "aarch64-linux"];
maxJobs = 4;
speedFactor = 3;
supportedFeatures = [
"nixos-test"
"benchmark"
"big-parallel"
"kvm"
];
mandatoryFeatures = [ ];
}
];
nix.distributedBuilds = true;
# optional, useful when the builder has a faster internet connection than yours
nix.extraOptions = " builders-use-substitutes = true\n";
# nix.buildMachines = [
# {
# hostName = "192.168.3.118";
# system = "x86_64-linux";
# protocol = "ssh";
# # if the builder supports building for multiple architectures,
# # replace the previous line by, e.g.
# # systems = ["x86_64-linux" "aarch64-linux"];
# maxJobs = 4;
# speedFactor = 3;
# supportedFeatures = [
# "nixos-test"
# "benchmark"
# "big-parallel"
# "kvm"
# ];
# mandatoryFeatures = [ ];
# }
# ];
# nix.distributedBuilds = true;
# # optional, useful when the builder has a faster internet connection than yours
# nix.extraOptions = " builders-use-substitutes = true\n";
# Bootloader
# Use this for simple nix boot menu, if no dual boot required
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
modules.system.boot-efi.enable = true;
boot.supportedFilesystems = [
"btrfs"
@ -61,6 +59,10 @@
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
networking.networkmanager.enable = true;
topology.self = {
hardware.info = "ThinkPad L430, 8GB RAM";
};
# Set your time zone.
time.timeZone = "Europe/Berlin";
@ -105,6 +107,7 @@
# Enable the XFCE Desktop Environment.
services.xserver.displayManager.gdm.enable = true;
security.pam.services.gdm.enableGnomeKeyring = true;
security.pam.services.gtklock = { };
# services.displayManager.sddm.wayland.enable = true;
# services.xserver.desktopManager = {
@ -248,6 +251,13 @@
services.flatpak.enable = true;
environment.sessionVariables.NIXOS_OZONE_WL = "1"; # Hint electron apps to use wayland
# TODO: connect with desktop home manager module
environment.variables = {
GTK_THEME = "Catppuccin-Mocha-Compact-Blue-dark";
};
xdg.portal.enable = true;
xdg.portal.extraPortals = [
pkgs.xdg-desktop-portal-gtk