Merge branch 'my-base'

This commit is contained in:
Julian Mutter 2024-06-15 14:23:53 +02:00
commit 6b305a59d7
56 changed files with 914 additions and 184 deletions

View File

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

View File

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

View File

@ -1,6 +1,7 @@
{ pkgs, ... }: { pkgs, ... }:
with pkgs; [ with pkgs;
[
(nerdfonts.override { fonts = [ "FiraCode" ]; }) (nerdfonts.override { fonts = [ "FiraCode" ]; })
font-awesome font-awesome
dejavu_fonts dejavu_fonts

View File

@ -38,7 +38,6 @@ with pkgs;
libnfc libnfc
xournalpp xournalpp
path-of-building
xfce.thunar-archive-plugin xfce.thunar-archive-plugin
zip zip
@ -119,7 +118,6 @@ with pkgs;
fdupes # find and delete duplicate files fdupes # find and delete duplicate files
digikam digikam
dbeaver-bin dbeaver-bin
pavucontrol
sqlite sqlite
nomacs nomacs

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 let
cfg = config.modules.hyprland; cfg = config.modules.hyprland;
inherit (inputs.nix-colors.colorschemes.${builtins.toString config.modules.desktop.colorscheme})
palette
;
in in
{ {
options.modules.hyprland = { options.modules.hyprland = with lib.frajul; {
enable = lib.mkOption { default = false; }; enable = mkBoolOpt false "Enable or disable the hyprland window manager.";
}; };
# imports = [ (ib.mkIf inputs.hyprland.homeManagerModules.default) ]; imports = [ inputs.hyprland.homeManagerModules.default ];
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
modules.desktop.addons = {
waybar.enable = true;
wofi.enable = true;
mako.enable = true;
hyprlock.enable = true;
wlogout.enable = true;
};
services.dunst.enable = true; # services.dunst.enable = true;
home.packages = with pkgs; [ home.packages = with pkgs; [
wofi # wofi
xfce.thunar xfce.thunar
# hyprpicker # TODO # hyprpicker # TODO
# hyprcursor # TODO # hyprcursor # TODO
@ -43,116 +53,51 @@ in
grimblast grimblast
]; ];
services.copyq.enable = true; xdg.configFile = {
"hypr/launch".source = ./launch;
programs.hyprlock.enable = true; # "hypr/hyprland.conf".source = ./hyprland.conf;
programs.hyprlock.settings = { "hypr/colors.conf" = {
general = { text = ''
disable_loading_bar = true; general {
hide_cursor = true; col.active_border = 0xff${palette.base0C} 0xff${palette.base0D} 270deg
ignore_empty_input = true; col.inactive_border = 0xff${palette.base00}
};
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 = { # services.copyq.enable = true;
enable = true;
systemd.enable = true; # services.hypridle = {
style = builtins.readFile ./style.css; # enable = true;
settings.mainBar = builtins.fromJSON (builtins.readFile ./waybar-config.json);
# settings = { # settings = {
# mainBar = { # general = {
# layer = "top"; # after_sleep_cmd = "hyprctl dispatch dpms on";
# position = "bottom"; # ignore_dbus_inhibit = false;
# height = 30; # lock_cmd = "hyprlock";
# 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" = { # listener = [
# # disable-scroll = true; # {
# # all-outputs = true; # 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.wlogout.enable = true; # can be configured
# services.hypridle.enable = true; # can be configured # services.hypridle.enable = true; # can be configured
services.network-manager-applet.enable = true; services.network-manager-applet.enable = true;
@ -161,7 +106,7 @@ in
# Whether to enable Hyprland wayland compositor # Whether to enable Hyprland wayland compositor
enable = true; enable = true;
# The hyprland package to use (simplifies use of plugins) # 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 # Whether to enable XWayland
xwayland.enable = true; xwayland.enable = true;
@ -286,7 +231,7 @@ in
"$mod, P, pseudo," # dwindle "$mod, P, pseudo," # dwindle
# opening applications # opening applications
"$mod, D, exec, wofi --show run" "$mod, D, exec, wofi --show drun,run"
"$mod, E, exec, thunar" "$mod, E, exec, thunar"
"$mod, Return, exec, alacritty" "$mod, Return, exec, alacritty"
"$mod, B, exec, firefox" "$mod, B, exec, firefox"

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)$

View File

@ -0,0 +1,57 @@
{
options,
config,
lib,
pkgs,
inputs,
...
}:
let
cfg = config.modules.desktop.addons.hyprlock;
inherit (inputs.nix-colors.colorschemes.${builtins.toString config.modules.desktop.colorscheme})
palette
;
in
{
options.modules.desktop.addons.hyprlock =
with lib.frajul;
with lib.types;
{
enable = mkBoolOpt false "Enable or disable the hyprlock screen locker.";
};
config = lib.mkIf cfg.enable {
programs.hyprlock.enable = true;
programs.hyprlock.settings = {
general = {
disable_loading_bar = true;
hide_cursor = true;
ignore_empty_input = true;
};
background = [
{
color = "#${palette.base00}";
# 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 = "#${palette.base0B}";
inner_color = "#${palette.base01}";
outer_color = "#${palette.base05}";
outline_thickness = 5;
placeholder_text = "Password...";
}
];
};
};
}

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

@ -1,9 +1,23 @@
{ {
"layer": "top",
"position": "bottom", "position": "bottom",
"height": 10, "mode": "dock",
"exclusive": true,
"passtrough": true,
"height": 32,
"modules-left": [
"hyprland/workspaces"
],
"modules-center": [],
"modules-left": ["hyprland/workspaces"],
"modules-right": ["idle_inhibitor", "disk", "cpu", "memory", "pulseaudio", "battery", "clock", "tray"], "modules-right": ["idle_inhibitor", "disk", "cpu", "memory", "pulseaudio", "battery", "clock", "tray"],
"hyprland/window": {
"format": "{}"
},
"idle_inhibitor": { "idle_inhibitor": {
"format": "{icon}", "format": "{icon}",
"format-icons": { "format-icons": {
@ -13,17 +27,29 @@
}, },
"disk": { "disk": {
"interval": 30, "interval": 30,
"format": "free: {percentage_free}% ({free})", "format": "Free: {percentage_free}% ({free})",
"path": "/", "path": "/",
"unit": "GB" "unit": "GB"
}, },
"tray": {
"spacing": 10 "hyprland/workspaces": {
}, "on-scroll-up": "hyprctl dispatch workspace m+1",
"clock": { "on-scroll-down": "hyprctl dispatch workspace m-1",
"tooltip-format": "{calendar}", "all-outputs": false,
"format": "{:%a %d.%m %H:%M:%S}", "on-click": "activate",
"interval": 1 "format": "{icon}",
"format-icons": {
"1": "1",
"2": "2",
"3": "3",
"4": "4",
"5": "5",
"6": "6",
"7": "7",
"8": "8",
"9": "9",
"10": "10"
}
}, },
"cpu": { "cpu": {
"format": " {usage}%" "format": " {usage}%"
@ -31,9 +57,34 @@
"memory": { "memory": {
"format": " {}%" "format": " {}%"
}, },
"tray": {
"icon-size": 16,
"tooltip": false,
"spacing": 10
},
"clock": {
"tooltip-format": "{calendar}",
"format": "{:%a %d.%m %H:%M:%S}",
"interval": 1
},
"pulseaudio": {
"format": "{icon} {volume}%",
"format-muted": "<big>󰝟</big>",
"format-icons": {
"headphone": "",
"default": ["", "", ""]
},
"scroll-step": 5.0,
"max-volume": 200,
"on-click": "pulseaudio-popup",
"on-click-right": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
},
"battery": { "battery": {
"states": { "states": {
"good": 95,
"warning": 30, "warning": 30,
"critical": 15 "critical": 15
}, },
@ -42,16 +93,5 @@
"format-plugged": " {capacity}% ({time})", "format-plugged": " {capacity}% ({time})",
"format-full": "{icon} ", "format-full": "{icon} ",
"format-icons": ["", "", "", "", ""] "format-icons": ["", "", "", "", ""]
},
"pulseaudio": {
"format": "{icon} {volume}%",
"format-muted": " {format_source}",
"format-icons": {
"headphone": "",
"default": ["", "", ""]
},
"scroll-step": 5.0,
"max-volume": 200,
"on-click": "pulseaudio-popup"
} }
} }

View File

@ -0,0 +1,223 @@
{
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;
settings.mainBar = builtins.fromJSON (builtins.readFile ./config.json);
style = ''
* {
/* `otf-font-awesome` is required to be installed for icons */
font-family: JetBrainsMono Nerd Font;
font-size: 14px;
border-radius: 17px;
}
#clock,
#custom-notification,
#custom-launcher,
#custom-power-menu,
/*#custom-colorpicker,*/
#custom-window,
#memory,
#disk,
#network,
#battery,
#custom-spotify,
#pulseaudio,
#window,
#idle_inhibitor,
#cpu,
#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: 1.0;
}
#battery.warning {
color: #${palette.base08};
}
#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;
}
'';
};
};
}

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,run
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

@ -21,6 +21,9 @@ pkgs.writeShellApplication {
pulseaudio pulseaudio
]; ];
# Do not insert e.g. pipefail
bashOptions = [ ];
text = '' text = ''
HDMI_SINK="alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp_3__sink" HDMI_SINK="alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp_3__sink"
LAPTOP_SINK="alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp__sink" LAPTOP_SINK="alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp__sink"
@ -39,6 +42,6 @@ pkgs.writeShellApplication {
Laptop - $LAPTOP_VOLUME,pactl set-default-sink $LAPTOP_SINK,$LAPTOP_ICON Laptop - $LAPTOP_VOLUME,pactl set-default-sink $LAPTOP_SINK,$LAPTOP_ICON
EOF EOF
echo "$CONF" | jgmenu --simple echo "$CONF" | jgmenu --simple --at-pointer
''; '';
} }

View File

@ -22,33 +22,31 @@
{ {
imports = [ ./hardware-configuration.nix ]; imports = [ ./hardware-configuration.nix ];
nix.buildMachines = [ # nix.buildMachines = [
{ # {
hostName = "192.168.3.118"; # hostName = "192.168.3.118";
system = "x86_64-linux"; # system = "x86_64-linux";
protocol = "ssh"; # protocol = "ssh";
# if the builder supports building for multiple architectures, # # if the builder supports building for multiple architectures,
# replace the previous line by, e.g. # # replace the previous line by, e.g.
# systems = ["x86_64-linux" "aarch64-linux"]; # # systems = ["x86_64-linux" "aarch64-linux"];
maxJobs = 4; # maxJobs = 4;
speedFactor = 3; # speedFactor = 3;
supportedFeatures = [ # supportedFeatures = [
"nixos-test" # "nixos-test"
"benchmark" # "benchmark"
"big-parallel" # "big-parallel"
"kvm" # "kvm"
]; # ];
mandatoryFeatures = [ ]; # mandatoryFeatures = [ ];
} # }
]; # ];
nix.distributedBuilds = true; # nix.distributedBuilds = true;
# optional, useful when the builder has a faster internet connection than yours # # optional, useful when the builder has a faster internet connection than yours
nix.extraOptions = " builders-use-substitutes = true\n"; # nix.extraOptions = " builders-use-substitutes = true\n";
# Bootloader # Bootloader
# Use this for simple nix boot menu, if no dual boot required modules.system.boot-efi.enable = true;
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.supportedFilesystems = [ boot.supportedFilesystems = [
"btrfs" "btrfs"
@ -61,6 +59,10 @@
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
topology.self = {
hardware.info = "ThinkPad L430, 8GB RAM";
};
# Set your time zone. # Set your time zone.
time.timeZone = "Europe/Berlin"; time.timeZone = "Europe/Berlin";
@ -105,6 +107,7 @@
# Enable the XFCE Desktop Environment. # Enable the XFCE Desktop Environment.
services.xserver.displayManager.gdm.enable = true; services.xserver.displayManager.gdm.enable = true;
security.pam.services.gdm.enableGnomeKeyring = true; security.pam.services.gdm.enableGnomeKeyring = true;
security.pam.services.gtklock = { };
# services.displayManager.sddm.wayland.enable = true; # services.displayManager.sddm.wayland.enable = true;
# services.xserver.desktopManager = { # services.xserver.desktopManager = {
@ -248,6 +251,13 @@
services.flatpak.enable = true; 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.enable = true;
xdg.portal.extraPortals = [ xdg.portal.extraPortals = [
pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-gtk
@ -268,6 +278,7 @@
mc mc
xorg.xhost xorg.xhost
kdePackages.qtwayland kdePackages.qtwayland
pavucontrol
frajul.pulseaudio-popup frajul.pulseaudio-popup
gparted-xhost # needs to be installed as system package so it can be actually opened gparted-xhost # needs to be installed as system package so it can be actually opened
]; ];