Update
This commit is contained in:
4
home/system/default.nix
Normal file
4
home/system/default.nix
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
imports =
|
||||
[ ./git ./dunst ./hyprland ./shell ./sops ./waybar ./wlogout ./sops ];
|
||||
}
|
||||
83
home/system/dunst/default.nix
Normal file
83
home/system/dunst/default.nix
Normal file
@@ -0,0 +1,83 @@
|
||||
{ config, pkgs, ... }: {
|
||||
|
||||
home.packages = with pkgs; [ libnotify ];
|
||||
|
||||
services.dunst = {
|
||||
enable = true;
|
||||
iconTheme = {
|
||||
name = "Adwaita-Dark";
|
||||
package = pkgs.gnome.adwaita-icon-theme;
|
||||
};
|
||||
settings = {
|
||||
global = {
|
||||
rounded = "yes";
|
||||
origin = "top-center";
|
||||
monitor = "0";
|
||||
alignment = "center";
|
||||
vertical_alignment = "center";
|
||||
width = "400";
|
||||
height = "400";
|
||||
scale = 0;
|
||||
gap_size = 0;
|
||||
progress_bar = true;
|
||||
transparency = 0;
|
||||
text_icon_padding = 0;
|
||||
separator_color = "frame";
|
||||
sort = "yes";
|
||||
idle_threshold = 120;
|
||||
line_height = 0;
|
||||
markup = "full";
|
||||
show_age_threshold = 60;
|
||||
ellipsize = "middle";
|
||||
ignore_newline = "no";
|
||||
stack_duplicates = true;
|
||||
sticky_history = "yes";
|
||||
history_length = 20;
|
||||
always_run_script = true;
|
||||
corner_radius = config.theme.rounding;
|
||||
follow = "mouse";
|
||||
font = config.theme.font;
|
||||
format = "<b>%s</b>\\n%b";
|
||||
progress_bar_corner_radius = config.theme.rounding - 10;
|
||||
#format = ''
|
||||
# <span foreground='#${config.theme.colors.primary-bg}'><b>%s %p</b></span>
|
||||
# %b'';
|
||||
frame_color = "#" + config.theme.colors.bg;
|
||||
highlight = "#" + config.theme.colors.primary-bg;
|
||||
foreground = "#" + config.theme.colors.fg;
|
||||
frame_width = 1;
|
||||
offset = "0x10";
|
||||
horizontal_padding = 10;
|
||||
icon_position = "left";
|
||||
indicate_hidden = "yes";
|
||||
min_icon_size = 0;
|
||||
max_icon_size = 64;
|
||||
mouse_left_click = "do_action, close_current";
|
||||
mouse_middle_click = "close_current";
|
||||
mouse_right_click = "close_all";
|
||||
padding = 10;
|
||||
plain_text = "no";
|
||||
separator_height = 2;
|
||||
show_indicators = "yes";
|
||||
shrink = "no";
|
||||
word_wrap = "yes";
|
||||
browser = "${pkgs.qutebrowser}/bin/qutebrowser";
|
||||
};
|
||||
|
||||
fullscreen_delay_everything = { fullscreen = "delay"; };
|
||||
|
||||
urgency_critical = {
|
||||
background = "#" + config.theme.colors.color1;
|
||||
foreground = "#" + config.theme.colors.color0;
|
||||
};
|
||||
urgency_low = {
|
||||
background = "#" + config.theme.colors.alt-bg;
|
||||
foreground = "#" + config.theme.colors.alt-fg;
|
||||
};
|
||||
urgency_normal = {
|
||||
background = "#" + config.theme.colors.alt-bg;
|
||||
foreground = "#" + config.theme.colors.alt-fg;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
12
home/system/git/default.nix
Normal file
12
home/system/git/default.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
let variable = import ../../../variables.nix;
|
||||
in {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = variable.git.username;
|
||||
userEmail = variable.git.email;
|
||||
extraConfig = {
|
||||
init.defaultBranch = "main";
|
||||
push.autoSetupRemote = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
234
home/system/hyprland/default.nix
Normal file
234
home/system/hyprland/default.nix
Normal file
@@ -0,0 +1,234 @@
|
||||
{ self, pkgs, config, hyprland, ... }:
|
||||
let variable = import ../../../variables.nix;
|
||||
in {
|
||||
|
||||
imports = [ ./hyprlock.nix ./hypridle.nix ./hyprpaper.nix ./hyprcursor.nix ];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
hyprshot
|
||||
hyprpicker
|
||||
xdg-desktop-portal-hyprland
|
||||
wlr-randr
|
||||
wl-clipboard
|
||||
brightnessctl
|
||||
gnome.gnome-themes-extra
|
||||
wlsunset
|
||||
xwayland
|
||||
xdg-desktop-portal-gtk
|
||||
wlroots
|
||||
qt5ct
|
||||
libva
|
||||
dconf
|
||||
wayland-utils
|
||||
wayland-protocols
|
||||
meson
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
xwayland.enable = true;
|
||||
package = hyprland.packages."${pkgs.system}".hyprland;
|
||||
|
||||
settings = {
|
||||
"$mod" = "SUPER";
|
||||
"$shiftMod" = "SUPER_SHIFT";
|
||||
|
||||
exec-once = [
|
||||
"startup"
|
||||
"${pkgs.hypridle}/bin/hypridle"
|
||||
"${pkgs.hyprpaper}/bin/hyprpaper"
|
||||
"${pkgs.bitwarden}/bin/bitwarden"
|
||||
];
|
||||
|
||||
monitor =
|
||||
[ "eDP-2,highres,0x0,1" "DP-8,highrr,2560x0,1" ",prefered,auto,1" ];
|
||||
|
||||
bind = [
|
||||
"$mod, RETURN, exec, ${pkgs.kitty}/bin/kitty"
|
||||
"$mod, E, exec, ${pkgs.xfce.thunar}/bin/thunar"
|
||||
"$mod, B, exec, ${pkgs.qutebrowser}/bin/qutebrowser"
|
||||
"$mod, K, exec, ${pkgs.bitwarden}/bin/bitwarden"
|
||||
"$mod, C, exec, ${pkgs.kitty}/bin/kitty --class peaclock peaclock"
|
||||
"$mod, L, exec, ${pkgs.hyprlock}/bin/hyprlock"
|
||||
"$mod, X, exec, powermenu"
|
||||
"$mod, SPACE, exec, menu"
|
||||
# Windows control
|
||||
"$mod, Q, killactive,"
|
||||
"$mod, T, togglefloating,"
|
||||
"$mod, F, fullscreen"
|
||||
"$mod, left, movefocus, l"
|
||||
"$mod, right, movefocus, r"
|
||||
"$mod, up, movefocus, u"
|
||||
"$mod, down, movefocus, d"
|
||||
# Screenshots
|
||||
"$mod, PRINT, exec, screenshot window"
|
||||
", PRINT, exec, screenshot monitor"
|
||||
"$shiftMod, PRINT, exec, screenshot region"
|
||||
"ALT, PRINT, exec, screenshot region swappy"
|
||||
# Night Shift
|
||||
"$mod, F2, exec, night-shift-off"
|
||||
"$mod, F3, exec, night-shift-on"
|
||||
# Sound output
|
||||
"$mod, F5, exec, ${pkgs.kitty}/bin/kitty --class floating zsh -c sound-output"
|
||||
"$mod, F6, exec, ${pkgs.kitty}/bin/kitty --class floating zsh -c sound-output"
|
||||
"$mod, F7, exec, ${pkgs.kitty}/bin/kitty --class floating zsh -c sound-output"
|
||||
] ++ (builtins.concatLists (builtins.genList (i:
|
||||
let ws = i + 1;
|
||||
in [
|
||||
"$mod, code:1${toString i}, workspace, ${toString ws}"
|
||||
"$mod SHIFT, code:1${toString i}, movetoworkspace, ${toString ws}"
|
||||
]) 9));
|
||||
|
||||
bindm = [ "$mod, mouse:272, movewindow" "$mod, R, resizewindow" ];
|
||||
|
||||
bindl = [
|
||||
",XF86AudioMute, exec, sound-toggle"
|
||||
",switch:Lid Switch, exec, ${pkgs.hyprlock}/bin/hyprlock"
|
||||
];
|
||||
|
||||
bindle = [
|
||||
", XF86AudioRaiseVolume, exec, sound-up"
|
||||
", XF86AudioLowerVolume, exec, sound-down"
|
||||
", XF86MonBrightnessUp, exec, brightness-up"
|
||||
", XF86MonBrightnessDown, exec, brightness-down"
|
||||
];
|
||||
|
||||
env = [
|
||||
"LIBVA_DRIVER_NAME,nvidia"
|
||||
"__GLX_VENDOR_LIBRARY_NAME,nvidia"
|
||||
"WLR_NO_HARDWARE_CURSORS,1"
|
||||
"XDG_SESSION_TYPE,wayland"
|
||||
"XDG_CURRENT_DESKTOP,Hyprland"
|
||||
"XDG_SESSION_TYPE,wayland"
|
||||
"XDG_SESSION_DESKTOP,Hyprland"
|
||||
"QT_AUTO_SCREEN_SCALE_FACTOR,1"
|
||||
"QT_QPA_PLATFORM=wayland,xcb"
|
||||
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
|
||||
"GTK_THEME,Flat-Remix-GTK-Violet-Darkest-Solid:dark"
|
||||
# "HYPRCURSOR_THEME,rose-pine"
|
||||
# "HYPRCURSOR_SIZE,16"
|
||||
];
|
||||
|
||||
general = {
|
||||
resize_on_border = true;
|
||||
gaps_in = config.theme.gaps-in;
|
||||
gaps_out = config.theme.gaps-out;
|
||||
border_size = config.theme.border-size;
|
||||
"col.active_border" = "rgba(${config.theme.colors.primary-bg}ff)";
|
||||
"col.inactive_border" = "rgba(00000055)";
|
||||
border_part_of_window = true;
|
||||
layout = "master";
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = config.theme.rounding;
|
||||
drop_shadow = true;
|
||||
shadow_range = 20;
|
||||
shadow_render_power = 3;
|
||||
"col.shadow" = "rgba(00000055)";
|
||||
blur = { enabled = false; };
|
||||
};
|
||||
|
||||
master = {
|
||||
new_is_master = true;
|
||||
new_on_top = true;
|
||||
};
|
||||
|
||||
gestures = { workspace_swipe = true; };
|
||||
|
||||
misc = {
|
||||
disable_hyprland_logo = true;
|
||||
disable_splash_rendering = true;
|
||||
focus_on_activate = true;
|
||||
new_window_takes_over_fullscreen = 2;
|
||||
};
|
||||
|
||||
input = {
|
||||
kb_layout = variable.keyboardLayout;
|
||||
|
||||
kb_options = "caps:escape";
|
||||
follow_mouse = 1;
|
||||
sensitivity = 0.5;
|
||||
repeat_delay = 300;
|
||||
repeat_rate = 50;
|
||||
numlock_by_default = true;
|
||||
|
||||
touchpad = {
|
||||
natural_scroll = true;
|
||||
clickfinger_behavior = true;
|
||||
};
|
||||
};
|
||||
|
||||
windowrulev2 = [
|
||||
"float, class:peaclock"
|
||||
"move 2% 78%, class:peaclock"
|
||||
"size 30% 20%, class:peaclock"
|
||||
|
||||
"float, class:floating"
|
||||
"size 40% 40%, class:floating"
|
||||
"move 30% 30%, class:floating"
|
||||
|
||||
"float, title:Bluetooth Devices"
|
||||
"move 20% 20%, title:Bluetooth Devices"
|
||||
"size 60% 60%, title:Bluetooth Devices"
|
||||
];
|
||||
|
||||
animations = {
|
||||
enabled = true;
|
||||
bezier = [
|
||||
"linear, 0, 0, 1, 1"
|
||||
"md3_standard, 0.2, 0, 0, 1"
|
||||
"md3_decel, 0.05, 0.7, 0.1, 1"
|
||||
"md3_accel, 0.3, 0, 0.8, 0.15"
|
||||
"overshot, 0.05, 0.9, 0.1, 1.1"
|
||||
"crazyshot, 0.1, 1.5, 0.76, 0.92 "
|
||||
"hyprnostretch, 0.05, 0.9, 0.1, 1.0"
|
||||
"fluent_decel, 0.1, 1, 0, 1"
|
||||
"easeInOutCirc, 0.85, 0, 0.15, 1"
|
||||
"easeOutCirc, 0, 0.55, 0.45, 1"
|
||||
"easeOutExpo, 0.16, 1, 0.3, 1"
|
||||
];
|
||||
|
||||
animation = [
|
||||
"windows, 1, 3, md3_decel, popin 60%"
|
||||
"border, 1, 10, default"
|
||||
"fade, 1, 2.5, md3_decel"
|
||||
"workspaces, 1, 3.5, easeOutExpo, slide"
|
||||
"specialWorkspace, 1, 3, md3_decel, slidevert"
|
||||
];
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme.name = "gtk";
|
||||
style.name = "gtk2";
|
||||
};
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
theme = {
|
||||
package = pkgs.flat-remix-gtk;
|
||||
name = "Flat-Remix-GTK-Violet-Darkest-Solid";
|
||||
};
|
||||
|
||||
iconTheme = {
|
||||
package = pkgs.flat-remix-icon-theme;
|
||||
name = "Flat-Remix-Grey-Darkest";
|
||||
};
|
||||
|
||||
font = {
|
||||
name = config.theme.font;
|
||||
size = 11;
|
||||
};
|
||||
};
|
||||
|
||||
home.pointerCursor = {
|
||||
gtk.enable = true;
|
||||
package = pkgs.bibata-cursors;
|
||||
name = "Bibata-Modern-Classic";
|
||||
size = 14;
|
||||
};
|
||||
}
|
||||
9
home/system/hyprland/hyprcursor.nix
Normal file
9
home/system/hyprland/hyprcursor.nix
Normal file
@@ -0,0 +1,9 @@
|
||||
{ pkgs, ... }: {
|
||||
home.packages = with pkgs; [ hyprcursor ];
|
||||
|
||||
# home.file.".local/share/icons/rose-pine-hyprcursor" = {
|
||||
# recursive = true;
|
||||
# source = ./rose-pine;
|
||||
#};
|
||||
|
||||
}
|
||||
23
home/system/hyprland/hypridle.nix
Normal file
23
home/system/hyprland/hypridle.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
{ config, pkgs, ... }: {
|
||||
home.packages = with pkgs; [ hypridle ];
|
||||
|
||||
xdg.configFile."hypr/hypridle.conf".text = ''
|
||||
general {
|
||||
ignore_dbus_inhibit = false
|
||||
}
|
||||
|
||||
# Screenlock
|
||||
listener {
|
||||
timeout = 600
|
||||
on-timeout = ${pkgs.hyprlock}/bin/hyprlock
|
||||
on-resume = ${pkgs.libnotify}/bin/notify-send "Welcome back ${config.home.username}!"
|
||||
}
|
||||
|
||||
# Suspend
|
||||
listener {
|
||||
timeout = 660
|
||||
on-timeout = systemctl suspend
|
||||
# on-resume = ${pkgs.libnotify}/bin/notify-send "Welcome back to your desktop!"
|
||||
}
|
||||
'';
|
||||
}
|
||||
75
home/system/hyprland/hyprlock.nix
Normal file
75
home/system/hyprland/hyprlock.nix
Normal file
@@ -0,0 +1,75 @@
|
||||
{ pkgs, config, ... }: {
|
||||
|
||||
home.packages = with pkgs; [ hyprlock ];
|
||||
|
||||
xdg.configFile."hypr/hyprlock.conf".text = ''
|
||||
background {
|
||||
monitor =
|
||||
path = $HOME/.config/wallpapers/${config.theme.wallpaper}
|
||||
color = rgb(${config.theme.colors.bg})
|
||||
|
||||
blur_size = 4
|
||||
blur_passes = 3
|
||||
noise = 0.0117
|
||||
contrast = 1.3000
|
||||
brightness = 0.8000
|
||||
vibrancy = 0.2100
|
||||
vibrancy_darkness = 0.0
|
||||
}
|
||||
|
||||
input-field {
|
||||
monitor =
|
||||
size = 250, 50
|
||||
outline_thickness = 3
|
||||
dots_size = 0.2 # Scale of input-field height, 0.2 - 0.8
|
||||
dots_spacing = 0.64 # Scale of dots' absolute size, 0.0 - 1.0
|
||||
dots_center = true
|
||||
outer_color = rgb(${config.theme.colors.primary-bg})
|
||||
inner_color = rgb(${config.theme.colors.bg})
|
||||
font_color = rgb(${config.theme.colors.fg})
|
||||
fade_on_empty = true
|
||||
placeholder_text = <i>Password...</i> # Text rendered in the input box when it's empty.
|
||||
hide_input = false
|
||||
position = 0, 50
|
||||
halign = center
|
||||
valign = bottom
|
||||
}
|
||||
|
||||
# Current time
|
||||
label {
|
||||
monitor =
|
||||
text = cmd[update:1000] echo "<b><big> $(date +"%H:%M:%S") </big></b>"
|
||||
color = rgb(${config.theme.colors.fg})
|
||||
font_size = 64
|
||||
font_family = ${config.theme.font}
|
||||
position = 0, 16
|
||||
halign = center
|
||||
valign = center
|
||||
}
|
||||
|
||||
# User label
|
||||
label {
|
||||
monitor =
|
||||
text = Hey <span text_transform="capitalize" size="larger">$USER</span>
|
||||
color = rgb(${config.theme.colors.fg})
|
||||
font_size = 20
|
||||
font_family = ${config.theme.font}
|
||||
position = 0, 0
|
||||
halign = center
|
||||
valign = center
|
||||
}
|
||||
|
||||
|
||||
# Type to unlock
|
||||
label {
|
||||
monitor =
|
||||
text = Type to unlock!
|
||||
color = rgb(${config.theme.colors.fg})
|
||||
font_size = 16
|
||||
font_family = ${config.theme.font}
|
||||
position = 0, 30
|
||||
halign = center
|
||||
valign = bottom
|
||||
}
|
||||
'';
|
||||
}
|
||||
10
home/system/hyprland/hyprpaper.nix
Normal file
10
home/system/hyprland/hyprpaper.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{ pkgs, config, ... }: {
|
||||
home.packages = with pkgs; [ hyprpaper ];
|
||||
|
||||
xdg.configFile."hypr/hyprpaper.conf".text = ''
|
||||
preload = ~/.config/wallpapers/${config.theme.wallpaper}
|
||||
wallpaper = ,~/.config/wallpapers/${config.theme.wallpaper}
|
||||
ipc=true
|
||||
splash=false
|
||||
'';
|
||||
}
|
||||
8
home/system/shell/default.nix
Normal file
8
home/system/shell/default.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
imports = [
|
||||
./fzf.nix
|
||||
./zsh.nix
|
||||
./starship.nix
|
||||
./zoxide.nix
|
||||
];
|
||||
}
|
||||
24
home/system/shell/fzf.nix
Normal file
24
home/system/shell/fzf.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{ config, ... }: {
|
||||
programs.fzf = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
colors = {
|
||||
"fg+" = config.theme.colors.primary-ansi-16;
|
||||
"bg+" = "-1";
|
||||
"fg" = "white";
|
||||
"bg" = "-1";
|
||||
"prompt" = "grey";
|
||||
"pointer" = config.theme.colors.primary-ansi-16;
|
||||
};
|
||||
defaultOptions = [
|
||||
"--margin=1"
|
||||
"--layout=reverse"
|
||||
"--border=rounded"
|
||||
"--info='hidden'"
|
||||
"--header=''"
|
||||
"--prompt='/ '"
|
||||
"-i"
|
||||
"--no-bold"
|
||||
];
|
||||
};
|
||||
}
|
||||
42
home/system/shell/starship.nix
Normal file
42
home/system/shell/starship.nix
Normal file
@@ -0,0 +1,42 @@
|
||||
{ config, lib, ... }: {
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
settings = {
|
||||
add_newline = true;
|
||||
format = lib.concatStrings [
|
||||
"$directory"
|
||||
"$git_branch"
|
||||
"$git_state"
|
||||
"$git_status"
|
||||
"$character"
|
||||
];
|
||||
directory = { style = "#${config.theme.colors.primary-bg}"; };
|
||||
|
||||
character = {
|
||||
success_symbol = "[❯](#${config.theme.colors.primary-bg})";
|
||||
error_symbol = "[❯](red)";
|
||||
vimcmd_symbol = "[❮](cyan)";
|
||||
};
|
||||
|
||||
git_branch = {
|
||||
format = "[$branch]($style)";
|
||||
style = "bright-black";
|
||||
};
|
||||
|
||||
git_status = {
|
||||
format =
|
||||
"[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style)";
|
||||
style = "cyan";
|
||||
conflicted = "";
|
||||
renamed = "";
|
||||
deleted = "";
|
||||
stashed = "≡";
|
||||
};
|
||||
|
||||
git_state = {
|
||||
format = "([$state( $progress_current/$progress_total)]($style)) ";
|
||||
style = "bright-black";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
6
home/system/shell/zoxide.nix
Normal file
6
home/system/shell/zoxide.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
programs.zoxide = {
|
||||
enable= true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
}
|
||||
49
home/system/shell/zsh.nix
Normal file
49
home/system/shell/zsh.nix
Normal file
@@ -0,0 +1,49 @@
|
||||
{ pkgs, lib, config, ... }: {
|
||||
|
||||
home.packages = with pkgs; [ eza bat ripgrep tldr ];
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
historySubstringSearch.enable = true;
|
||||
|
||||
# If the variable config.theme.print-neofetch is set to true, neofetch will be printed
|
||||
initExtraFirst = ''
|
||||
bindkey -e
|
||||
${if config.theme.print-neofetch then
|
||||
pkgs.neofetch + "/bin/neofetch"
|
||||
else
|
||||
""}
|
||||
'';
|
||||
|
||||
history = {
|
||||
ignoreDups = true;
|
||||
save = 1000000;
|
||||
size = 1000000;
|
||||
};
|
||||
|
||||
profileExtra = lib.optionalString (config.home.sessionPath != [ ]) ''
|
||||
export PATH="$PATH''${PATH:+:}${
|
||||
lib.concatStringsSep ":" config.home.sessionPath
|
||||
}"
|
||||
'';
|
||||
|
||||
shellAliases = {
|
||||
vim = "nvim";
|
||||
v = "nvim";
|
||||
c = "clear";
|
||||
clera = "clear";
|
||||
celar = "clear";
|
||||
e = "exit";
|
||||
cd = "z";
|
||||
ls = "${pkgs.eza}/bin/eza --icons=always";
|
||||
sl = "ls";
|
||||
open = "${pkgs.xdg_utils}/bin/xdg-open";
|
||||
icat = "${pkgs.kitty}/bin/kitty +kitten icat";
|
||||
note = "vim ~/Nextcloud/obsidian";
|
||||
obs = "vim ~/Nextcloud/obsidian";
|
||||
};
|
||||
};
|
||||
}
|
||||
17
home/system/sops/default.nix
Normal file
17
home/system/sops/default.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{ sops-nix, ... }: {
|
||||
imports = [ sops-nix.homeManagerModules.sops ];
|
||||
|
||||
sops = {
|
||||
age.keyFile = "/home/hadi/.config/sops/age/keys.txt";
|
||||
defaultSopsFile = ../../../secrets/secrets.yaml;
|
||||
secrets = {
|
||||
sshconfig = { path = "/home/hadi/.ssh/config"; };
|
||||
oxk = { path = "/home/hadi/.ssh/oxserver"; };
|
||||
gk = { path = "/home/hadi/.ssh/github"; };
|
||||
glk = { path = "/home/hadi/.ssh/gitlab"; };
|
||||
silicon = { path = "/home/hadi/.ssh/silicon"; };
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.services.mbsync.Unit.After = [ "sops-nix.service" ];
|
||||
}
|
||||
258
home/system/waybar/default.nix
Normal file
258
home/system/waybar/default.nix
Normal file
@@ -0,0 +1,258 @@
|
||||
{ config, ... }: {
|
||||
services = {
|
||||
blueman-applet.enable = true;
|
||||
network-manager-applet.enable = true;
|
||||
};
|
||||
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
settings = {
|
||||
mainBar = {
|
||||
layer = "top";
|
||||
position = "top";
|
||||
spacing = 0;
|
||||
"margin-top" = config.theme.gaps-out;
|
||||
"margin-left" = config.theme.gaps-out;
|
||||
"margin-right" = config.theme.gaps-out;
|
||||
height = 44;
|
||||
modules-left = [ "custom/logo" "hyprland/window" ];
|
||||
modules-center = [ "hyprland/workspaces" ];
|
||||
modules-right =
|
||||
[ "tray" "backlight" "pulseaudio" "battery" "clock" "custom/power" ];
|
||||
|
||||
"wlr/taskbar" = {
|
||||
format = "{icon}";
|
||||
"on-click" = "activate";
|
||||
"on-click-right" = "fullscreen";
|
||||
|
||||
"icon-size" = 25;
|
||||
"tooltip-format" = "{title}";
|
||||
};
|
||||
"hyprland/window" = {
|
||||
"format" = "{title:30}";
|
||||
"max-length" = 30;
|
||||
"separate-outputs" = true;
|
||||
};
|
||||
|
||||
"hyprland/workspaces" = {
|
||||
"on-click" = "activate";
|
||||
format = "{icon}";
|
||||
"format-icons" = {
|
||||
"default" = "";
|
||||
"1" = "1";
|
||||
"2" = "2";
|
||||
"3" = "3";
|
||||
"4" = "4";
|
||||
"5" = "5";
|
||||
"6" = "6";
|
||||
"7" = "7";
|
||||
"8" = "8";
|
||||
"9" = "9";
|
||||
"active" = "";
|
||||
"urgent" = "";
|
||||
};
|
||||
"persistent-workspaces" = {
|
||||
"1" = [ ];
|
||||
"2" = [ ];
|
||||
"3" = [ ];
|
||||
"4" = [ ];
|
||||
"5" = [ ];
|
||||
};
|
||||
};
|
||||
|
||||
tray = { spacing = 16; };
|
||||
|
||||
clock = {
|
||||
"tooltip-format" = "<tt>{calendar}</tt>";
|
||||
"format-alt" = " {:%a, %d %b %Y}";
|
||||
format = " {:%I:%M %p}";
|
||||
};
|
||||
|
||||
pulseaudio = {
|
||||
format = "{icon}";
|
||||
"format-bluetooth" = "";
|
||||
nospacing = 1;
|
||||
"tooltip-format" = "Volume : {volume}%";
|
||||
"format-muted" = "";
|
||||
"format-icons" = {
|
||||
"headphone" = "";
|
||||
"default" = [ "" "" "" ];
|
||||
};
|
||||
"on-click" = "pamixer -t";
|
||||
"scroll-step" = 1;
|
||||
};
|
||||
|
||||
"custom/logo" = {
|
||||
format = " ";
|
||||
tooltip = false;
|
||||
on-click = "menu";
|
||||
};
|
||||
|
||||
battery = {
|
||||
format = "{capacity}% {icon}";
|
||||
"format-icons" = {
|
||||
"charging" = [ "" "" "" "" "" "" "" "" "" "" ];
|
||||
"default" = [ "" "" "" "" "" "" "" "" "" "" ];
|
||||
};
|
||||
"format-full" = " ";
|
||||
interval = 10;
|
||||
states = {
|
||||
warning = 20;
|
||||
critical = 10;
|
||||
};
|
||||
tooltip = false;
|
||||
};
|
||||
|
||||
"custom/power" = {
|
||||
format = "";
|
||||
tooltip = false;
|
||||
on-click = "powermenu";
|
||||
};
|
||||
|
||||
backlight = {
|
||||
device = "nvidia_0";
|
||||
format = "{icon}";
|
||||
"format-icons" = [ " " " " "" "" "" "" "" "" "" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
style = ''
|
||||
* {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
min-height: 0;
|
||||
font-family: "${config.theme.font}";
|
||||
color: #${config.theme.colors.fg};
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background-color: ${
|
||||
if config.theme.waybar-transparent then
|
||||
"rgba(0, 0, 0, 0)"
|
||||
else
|
||||
"#${config.theme.colors.bg}"
|
||||
};
|
||||
transition-property: background-color;
|
||||
transition-duration: 0.5s;
|
||||
border-radius: ${toString config.theme.rounding}px;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.modules-left, .modules-center, .modules-right {
|
||||
border-radius: ${toString config.theme.rounding}px;
|
||||
background-color: #${config.theme.colors.bg};
|
||||
padding: 2px 6px;
|
||||
}
|
||||
|
||||
window#waybar.hidden {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
#workspaces {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
all: initial; /* Remove GTK theme values (waybar #1351) */
|
||||
min-width: 0; /* Fix weird spacing in materia (waybar #450) */
|
||||
box-shadow: inset 0 -3px transparent; /* Use box-shadow instead of border so the text isn't offset */
|
||||
padding: 6px 18px;
|
||||
margin: 6px 3px;
|
||||
border-radius: 4px;
|
||||
background-color: #${config.theme.colors.alt-bg};
|
||||
color: #${config.theme.colors.alt-fg};
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
color: #${config.theme.colors.primary-fg};
|
||||
background-color: #${config.theme.colors.primary-bg};
|
||||
}
|
||||
|
||||
#workspaces button:hover {
|
||||
box-shadow: inherit;
|
||||
text-shadow: inherit;
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
background-color: #${config.theme.colors.color1};
|
||||
}
|
||||
|
||||
#window > * {
|
||||
font-family: "${config.theme.font-mono}";
|
||||
}
|
||||
|
||||
#memory,
|
||||
#custom-power,
|
||||
#battery,
|
||||
#backlight,
|
||||
#pulseaudio,
|
||||
#network,
|
||||
#clock,
|
||||
#tray,
|
||||
#backlight{
|
||||
border-radius: 9px;
|
||||
margin: 6px 3px;
|
||||
padding: 6px 12px;
|
||||
background-color: #${config.theme.colors.alt-bg};
|
||||
color: #${config.theme.colors.alt-fg};
|
||||
}
|
||||
|
||||
#tray menu {
|
||||
background-color: #${config.theme.colors.alt-bg};
|
||||
color: #${config.theme.colors.alt-fg};
|
||||
}
|
||||
|
||||
#custom-logo {
|
||||
padding-right: 7px;
|
||||
font-size: 15px;
|
||||
color: #${config.theme.colors.primary-bg};
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
to {
|
||||
background-color: #f38ba8;
|
||||
color: #181825;
|
||||
}
|
||||
}
|
||||
|
||||
#battery.warning,
|
||||
#battery.critical,
|
||||
#battery.urgent {
|
||||
background-color: #ff0048;
|
||||
color: #181825;
|
||||
animation-name: blink;
|
||||
animation-duration: 0.5s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
|
||||
#battery.charging {
|
||||
background-color: #${config.theme.colors.alt-bg};
|
||||
color: #${config.theme.colors.alt-fg};
|
||||
animation: none;
|
||||
}
|
||||
|
||||
#custom-power {
|
||||
background-color: #${config.theme.colors.primary-bg};
|
||||
color: #${config.theme.colors.primary-fg};
|
||||
}
|
||||
|
||||
|
||||
tooltip {
|
||||
border-radius: 8px;
|
||||
padding: 15px;
|
||||
background-color: #${config.theme.colors.alt-bg};
|
||||
color: #${config.theme.colors.alt-fg};
|
||||
}
|
||||
|
||||
tooltip label {
|
||||
padding: 5px;
|
||||
background-color: #${config.theme.colors.alt-bg};
|
||||
color: #${config.theme.colors.alt-fg};
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
117
home/system/wlogout/default.nix
Normal file
117
home/system/wlogout/default.nix
Normal file
@@ -0,0 +1,117 @@
|
||||
{ config, pkgs, ... }: {
|
||||
|
||||
programs.wlogout = {
|
||||
enable = true;
|
||||
layout = [
|
||||
{
|
||||
label = "lock";
|
||||
action = "${pkgs.hyprlock}/bin/hyprlock";
|
||||
text = "Lock";
|
||||
keybind = "l";
|
||||
}
|
||||
{
|
||||
label = "hibernate";
|
||||
action = "systemctl hibernate";
|
||||
text = "Hibernate";
|
||||
keybind = "h";
|
||||
}
|
||||
{
|
||||
label = "logout";
|
||||
action = "killall -9 Hyprland sleep 2";
|
||||
text = "Exit";
|
||||
keybind = "e";
|
||||
}
|
||||
{
|
||||
label = "shutdown";
|
||||
action = "systemctl poweroff";
|
||||
text = "Shutdown";
|
||||
keybind = "s";
|
||||
}
|
||||
{
|
||||
label = "suspend";
|
||||
action = "systemctl suspend";
|
||||
text = "Suspend";
|
||||
keybind = "u";
|
||||
}
|
||||
{
|
||||
label = "reboot";
|
||||
action = "systemctl reboot";
|
||||
text = "Reboot";
|
||||
keybind = "r";
|
||||
}
|
||||
];
|
||||
|
||||
style = ''
|
||||
* {
|
||||
font-family: "${config.theme.font}";
|
||||
background-image: none;
|
||||
transition: 20ms;
|
||||
}
|
||||
|
||||
window {
|
||||
background-color: rgba(12,12,12,0.5);
|
||||
}
|
||||
|
||||
button {
|
||||
color: #${config.theme.colors.fg};
|
||||
font-size:20px;
|
||||
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: 25%;
|
||||
|
||||
border: 3px solid #${config.theme.colors.bg};
|
||||
background-color: #${config.theme.colors.bg};
|
||||
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
|
||||
}
|
||||
|
||||
button:focus,
|
||||
button:active {
|
||||
color: #${config.theme.colors.primary-fg};
|
||||
background-color: #${config.theme.colors.primary-bg};
|
||||
border: 3px solid #${config.theme.colors.primary-bg};
|
||||
}
|
||||
|
||||
/*
|
||||
-----------------------------------------------------
|
||||
Buttons
|
||||
-----------------------------------------------------
|
||||
*/
|
||||
|
||||
#lock,#logout,#suspend,#hibernate,#shutdown,#reboot {
|
||||
margin: 10px;
|
||||
border-radius: ${toString config.theme.rounding}px;
|
||||
}
|
||||
|
||||
#lock {
|
||||
background-image: image(url("icons/lock.png"));
|
||||
}
|
||||
|
||||
#logout {
|
||||
background-image: image(url("icons/logout.png"));
|
||||
}
|
||||
|
||||
#suspend {
|
||||
background-image: image(url("icons/suspend.png"));
|
||||
}
|
||||
|
||||
#hibernate {
|
||||
background-image: image(url("icons/hibernate.png"));
|
||||
}
|
||||
|
||||
#shutdown {
|
||||
background-image: image(url("icons/shutdown.png"));
|
||||
}
|
||||
|
||||
#reboot {
|
||||
background-image: image(url("icons/reboot.png"));
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
xdg.configFile."wlogout/icons" = {
|
||||
recursive = false;
|
||||
source = ./icons;
|
||||
};
|
||||
|
||||
}
|
||||
BIN
home/system/wlogout/icons/hibernate.png
Normal file
BIN
home/system/wlogout/icons/hibernate.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.6 KiB |
BIN
home/system/wlogout/icons/lock.png
Normal file
BIN
home/system/wlogout/icons/lock.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.9 KiB |
BIN
home/system/wlogout/icons/logout.png
Normal file
BIN
home/system/wlogout/icons/logout.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.6 KiB |
BIN
home/system/wlogout/icons/reboot.png
Normal file
BIN
home/system/wlogout/icons/reboot.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.9 KiB |
BIN
home/system/wlogout/icons/shutdown.png
Normal file
BIN
home/system/wlogout/icons/shutdown.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.0 KiB |
BIN
home/system/wlogout/icons/suspend.png
Normal file
BIN
home/system/wlogout/icons/suspend.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.4 KiB |
Reference in New Issue
Block a user