Initial commit of NixOS configuration
This commit is contained in:
7
components/default.nix
Normal file
7
components/default.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{lib, ...}: {
|
||||
imports = [
|
||||
./hyprland
|
||||
./utils.nix
|
||||
./waybar.nix
|
||||
];
|
||||
}
|
||||
8
components/hyprland/default.nix
Normal file
8
components/hyprland/default.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{lib, ...}: {
|
||||
imports = [
|
||||
./hyprland.nix
|
||||
./hypridle.nix
|
||||
./hyprlock.nix
|
||||
./hyprpaper.nix
|
||||
];
|
||||
}
|
||||
8
components/hyprland/hypridle.nix
Normal file
8
components/hyprland/hypridle.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{pkgs, ...}: {
|
||||
services.hypridle = {
|
||||
enable = true;
|
||||
settings = {
|
||||
before_sleep_cmd = "hyprlock";
|
||||
};
|
||||
};
|
||||
}
|
||||
163
components/hyprland/hyprland.nix
Normal file
163
components/hyprland/hyprland.nix
Normal file
@@ -0,0 +1,163 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg=config.hyprland;
|
||||
in {
|
||||
options = {
|
||||
hyprland = {
|
||||
primaryModifier = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "SUPER";
|
||||
};
|
||||
secondaryModifier = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "Control_L";
|
||||
};
|
||||
terminal = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "kitty";
|
||||
};
|
||||
fileManager = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "dolphin";
|
||||
};
|
||||
};
|
||||
};
|
||||
config = {
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
settings = {
|
||||
monitor = [
|
||||
"eDP-1, 2256x1504@60, 0x0, 1"
|
||||
"desc:HAT Kamvas 12 l56051794302, 1920x1080@60, 0x1504, 1"
|
||||
];
|
||||
|
||||
"$mod1" = cfg.primaryModifier;
|
||||
"$mod2" = cfg.secondaryModifier;
|
||||
|
||||
exec-once = [
|
||||
"waybar"
|
||||
"hyprpaper"
|
||||
"nm-applet"
|
||||
"hypridle"
|
||||
"wl-paste --watch cliphist store"
|
||||
"XDG_MENU_PREFIX=arch- kbuildsycoca6"
|
||||
];
|
||||
|
||||
env = [
|
||||
"XCURSOR_SIZE,24"
|
||||
"HYPRCURSOR_SIZE,24"
|
||||
"XDG_SESSION_TYPE,wayland"
|
||||
"QT_QPA_PLATFORMTHEME,qt6ct"
|
||||
"QT_QPA_PLATFORM,wayland"
|
||||
"GTK_THEME, Adwaita:dark"
|
||||
"XDG_MENU_PREFIX,plasma-"
|
||||
];
|
||||
|
||||
misc = {
|
||||
force_default_wallpaper = 1;
|
||||
};
|
||||
|
||||
general = {
|
||||
gaps_in = 5;
|
||||
gaps_out = 10;
|
||||
border_size = 2;
|
||||
"col.active_border" = "rgba(463155ff)";
|
||||
"col.inactive_border" = "rgba(251b31aa)";
|
||||
resize_on_border = false;
|
||||
allow_tearing = false;
|
||||
layout = "dwindle";
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = 12;
|
||||
rounding_power = 2;
|
||||
active_opacity = 1.0;
|
||||
inactive_opacity = 0.95;
|
||||
|
||||
shadow = {
|
||||
enabled = true;
|
||||
range = 4;
|
||||
render_power = 3;
|
||||
color = "rgba(1a1a1aee)";
|
||||
};
|
||||
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 5;
|
||||
passes = 2;
|
||||
noise = 0.06;
|
||||
new_optimizations = true;
|
||||
vibrancy = 0.1696;
|
||||
};
|
||||
};
|
||||
|
||||
input = {
|
||||
kb_layout = "gb";
|
||||
follow_mouse = 1;
|
||||
sensitivity = 0;
|
||||
touchpad = {
|
||||
natural_scroll = true;
|
||||
};
|
||||
|
||||
gesture = [
|
||||
"3, horizontal, workspace"
|
||||
];
|
||||
|
||||
bind = [
|
||||
"$mod1, Q, exec, ${cfg.terminal}"
|
||||
"$mod2&Shift_L, Q, killactive"
|
||||
"$mod2&alt, Q, forcekillactive"
|
||||
"$mod1, L, exec, hyprlock"
|
||||
"$mod1&alt, L, exit"
|
||||
"$mod1, F, exec, ${cfg.fileManager}"
|
||||
"$mod1&Shift_L, V, togglefloating"
|
||||
"$mod1, R, exec, rofi -show run"
|
||||
"alt, space, exec, rofi -show drun"
|
||||
"$mod1, P, pseudo, "
|
||||
"$mod1, J, togglesplit, "
|
||||
"$mod2&Shift_L, F, fullscreen"
|
||||
"$mod1, left, movefocus, l"
|
||||
"$mod1, right, movefocus, r"
|
||||
"$mod1, up, movefocus, u"
|
||||
"$mod1, down, movefocus, d"
|
||||
"$mod1&$mod2, right, workspace, +1"
|
||||
"$mod1&$mod2, left, workspace, -1"
|
||||
"$mod1&$mod2&Shift_L, right, movetoworkspace, +1"
|
||||
"$mod1&$mod2&Shift_L, left, movetoworkspace, -1"
|
||||
"$mod1, mouse_down, workspace, e+1"
|
||||
"$mod1, mouse_up, workspace, e-1"
|
||||
", PRINT, exec, hyprshot -m region --clipboard-only"
|
||||
"Shift_L, PRINT, exec, hyprshot -m region"
|
||||
"$mod1, T, exec, hyprctl setprop active opaque toggle"
|
||||
"$mod1, V, exec, cliphist list | rofi -dmenu | cliphist decode | wl-copy"
|
||||
];
|
||||
|
||||
bindm = [
|
||||
"$mod1, mouse:272, movewindow"
|
||||
"$mod1, mouse:273, resizewindow"
|
||||
];
|
||||
|
||||
bindel = [
|
||||
",XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"
|
||||
",XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
|
||||
",XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
||||
",XF86MonBrightnessUp, exec, brightnessctl s 10%+"
|
||||
",XF86MonBrightnessDown, exec, brightnessctl s 10%-"
|
||||
];
|
||||
|
||||
bindl = [
|
||||
", XF86AudioNext, exec, playerctl next"
|
||||
", XF86AudioPause, exec, playerctl play-pause"
|
||||
", XF86AudioPlay, exec, playerctl play-pause"
|
||||
", XF86AudioPrev, exec, playerctl previous"
|
||||
", switch:Lid Switch, exec, hyprlock"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
67
components/hyprland/hyprlock.nix
Normal file
67
components/hyprland/hyprlock.nix
Normal file
@@ -0,0 +1,67 @@
|
||||
{pkgs, ...}: {
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
background = {
|
||||
path = "~/.nixos/components/hyprland/wallpaper.png";
|
||||
blur_passes = 2;
|
||||
contrast = 1;
|
||||
brightness = 0.5;
|
||||
vibrancy = 0.2;
|
||||
vibrancy_darkness = 0.2;
|
||||
};
|
||||
|
||||
general = {
|
||||
no_fade_in = true;
|
||||
no_fade_out = true;
|
||||
hide_cursor = false;
|
||||
grace = 0;
|
||||
disable_loading_bar = true;
|
||||
};
|
||||
|
||||
input-field = {
|
||||
size = "250, 60";
|
||||
outline_thickness = 2;
|
||||
dots_size = 0.2;
|
||||
dots_spacing = 0.35;
|
||||
dots_center = true;
|
||||
outer_color = "rgba(0, 0, 0, 0)";
|
||||
inner_color = "rgba(0, 0, 0, 0.2)";
|
||||
font_color = "rgba(142, 243, 244, 0.75)";
|
||||
fade_on_empty = false;
|
||||
rounding = -1;
|
||||
check_color = "rgb(204, 136, 34)";
|
||||
placeholder_text = ''<i><span foreground="##cdd6f4">Input Password...</span></i>'';
|
||||
hide_input = false;
|
||||
position = "0, -200";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
};
|
||||
|
||||
label = [
|
||||
{
|
||||
text = ''cmd[update:1000] echo "$(date +"%-I:%M")"'';
|
||||
color = "rgba(242, 243, 244, 0.75)";
|
||||
font_size = 95;
|
||||
font_familly = "JetBrains Mono Extrabold";
|
||||
position = "0, 200";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
}
|
||||
{
|
||||
text = ''cmd[update:1000] echo "$(date +"%A, %B %d")"'';
|
||||
color = "rgba(242, 243, 244, 0.75)";
|
||||
font_size = 22;
|
||||
font_familly = "JetBrains Mono";
|
||||
position = "0, 300";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
}
|
||||
];
|
||||
|
||||
auth = {
|
||||
"fingerprint:enabled" = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
13
components/hyprland/hyprpaper.nix
Normal file
13
components/hyprland/hyprpaper.nix
Normal file
@@ -0,0 +1,13 @@
|
||||
{pkgs, ...}: {
|
||||
services.hyprpaper = {
|
||||
enable = true;
|
||||
settings = {
|
||||
preload = [
|
||||
"~/.nixos/components/hyprland/wallpaper.png"
|
||||
];
|
||||
wallpaper = [
|
||||
", ~/.nixos/components/hyprland/wallpaper.png"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
BIN
components/hyprland/wallpaper.png
Normal file
BIN
components/hyprland/wallpaper.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 MiB |
25
components/utils.nix
Normal file
25
components/utils.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{pkgs, ...}: {
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
package = pkgs.rofi.override {
|
||||
plugins = with pkgs; [
|
||||
rofi-calc
|
||||
];
|
||||
};
|
||||
extraConfig = {
|
||||
modi = "drun,calc,run";
|
||||
show-icons = true;
|
||||
drun-display-format = "{icon} {name}";
|
||||
disable-history = false;
|
||||
hide-scrollbar = true;
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
hyprshot
|
||||
wl-clipboard
|
||||
networkmanagerapplet
|
||||
];
|
||||
|
||||
services.hyprpolkitagent.enable = true;
|
||||
}
|
||||
134
components/waybar.nix
Normal file
134
components/waybar.nix
Normal file
@@ -0,0 +1,134 @@
|
||||
{pkgs, ...}: {
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
settings = {
|
||||
mainBar = {
|
||||
"layer" = "top";
|
||||
"position" = "top";
|
||||
"mode" = "dock";
|
||||
"reload_style_on_change" = true;
|
||||
"gtk-layer-shell" = true;
|
||||
|
||||
"modules-left" = [
|
||||
"hyprland/workspaces"
|
||||
];
|
||||
|
||||
"modules-center" = [
|
||||
"clock"
|
||||
];
|
||||
|
||||
"modules-right" = [
|
||||
"tray"
|
||||
"battery"
|
||||
];
|
||||
|
||||
"tray" = {
|
||||
"icon-size" = 12;
|
||||
"spacing" = 4;
|
||||
};
|
||||
|
||||
"hyprland/workspaces" = {
|
||||
"persistent-workspaces" = {
|
||||
"1" = [];
|
||||
"2" = [];
|
||||
"3" = [];
|
||||
"4" = [];
|
||||
"5" = [];
|
||||
};
|
||||
};
|
||||
|
||||
# "clock" = {
|
||||
# "format" = "{ =%m-%d %H =%M}";
|
||||
# };
|
||||
|
||||
"battery" = {
|
||||
"states" = {
|
||||
"warning" = 30;
|
||||
"critical" = 15;
|
||||
};
|
||||
|
||||
"format" = "{icon} {capacity}%";
|
||||
"format-icons" = ["" "" "" "" "" "" ""];
|
||||
"format-warning" = " {capacity}%";
|
||||
"format-critical" = " {capacity}%";
|
||||
"format-charging" = " {capacity}%";
|
||||
|
||||
"interval" = 1;
|
||||
"min-length" = 6;
|
||||
"max-length" = 6;
|
||||
};
|
||||
};
|
||||
};
|
||||
style = "
|
||||
* {
|
||||
font-family: \"JetBrainsMono Nerd Font\";
|
||||
font-weight: bold;
|
||||
font-size: 12px;
|
||||
min-height: 0;
|
||||
padding: 0;
|
||||
border: none;
|
||||
margin: 2px;
|
||||
}
|
||||
|
||||
/* === Main Background === */
|
||||
|
||||
window#waybar {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
/* === Workspace Buttons === */
|
||||
|
||||
#workspaces button {
|
||||
border-radius: 8px;
|
||||
box-shadow: none;
|
||||
margin: 2px 0;
|
||||
padding: 0 2px;
|
||||
transition: none;
|
||||
}
|
||||
#workspaces button:hover {
|
||||
color: #11111b;
|
||||
background: #c7a4de;
|
||||
text-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
#workspaces button.active {
|
||||
color: #11111b;
|
||||
background: #885ab0;
|
||||
margin: 3px 0;
|
||||
padding: 0 6px;
|
||||
}
|
||||
|
||||
/* == Workspaces == */
|
||||
|
||||
#workspaces {
|
||||
background: #11111b;
|
||||
padding: 0 4px;
|
||||
border-radius: 7px;
|
||||
}
|
||||
|
||||
/* == Time == */
|
||||
|
||||
#clock {
|
||||
background: #11111b;
|
||||
padding: 0 8px;
|
||||
border-radius: 7px;
|
||||
}
|
||||
|
||||
/* == Battery == */
|
||||
|
||||
#battery {
|
||||
background: #11111b;
|
||||
padding: 0 8px;
|
||||
border-radius: 7px;
|
||||
}
|
||||
|
||||
/* == Tray == */
|
||||
|
||||
#tray {
|
||||
background: #11111b;
|
||||
padding: 0 4px;
|
||||
border-radius: 7px;
|
||||
}
|
||||
";
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user