1132 lines
28 KiB
Nix
1132 lines
28 KiB
Nix
# Edit this configuration file to define what should be installed on
|
||
# your system. Help is available in the configuration.nix(5) man page
|
||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||
|
||
{ config, pkgs, ... }:
|
||
let
|
||
BORDER_WIDTH = "2";
|
||
BORDER_WIDTH_INT = 2;
|
||
|
||
CORNER_RADIUS = "0";
|
||
CORNER_RADIUS_INT = 0;
|
||
# Curves of 2px and 10px radius fits into a curve of 12px radius do border_width+ corner_radius
|
||
RECEIVING_CORNER_RADIUS = "0";
|
||
|
||
GAPS_IN = "3";
|
||
GAPS_OUT = "6";
|
||
HALF_OF_GAPS_OUT = "3";
|
||
|
||
BAR_WIDTH_INT = 15;
|
||
|
||
WALLPAPER = "$HOME/Pictures/wallpapers/forest.jpg";
|
||
|
||
# Colours
|
||
BG = "282828";
|
||
BG0_H = "1d2021";
|
||
BG0_S = "32302f";
|
||
BG0 = "282828";
|
||
BG1 = "3c3836";
|
||
BG2 = "504945";
|
||
BG3 = "665c54";
|
||
BG4 = "7c6f64";
|
||
DARK_GRAY = "928374";
|
||
|
||
FG = "ebdbb2";
|
||
FG0 = "fbf1c7";
|
||
FG1 = "ebdbb2";
|
||
FG2 = "d5c4a1";
|
||
FG3 = "bdae93";
|
||
FG4 = "a89984";
|
||
GRAY = "a89984";
|
||
|
||
DARK_RED = "cc241d";
|
||
DARK_GREEN = "98971a";
|
||
DARK_YELLOW = "d79921";
|
||
DARK_BLUE = "458588";
|
||
DARK_PURPLE = "b16286";
|
||
DARK_AQUA = "689d6a";
|
||
DARK_ORANGE = "d65d0e";
|
||
RED = "db4934";
|
||
GREEN = "b8bb26";
|
||
YELLOW = "dabd2f";
|
||
BLUE = "83a598";
|
||
PURPLE = "d3869b";
|
||
AQUA = "8ec07c";
|
||
ORANGE = "fe8019";
|
||
|
||
in
|
||
{
|
||
imports =
|
||
[ # Include the results of the hardware scan.
|
||
./hardware-configuration.nix
|
||
<home-manager/nixos>
|
||
];
|
||
|
||
# Bootloader.
|
||
boot.loader.systemd-boot.enable = true;
|
||
boot.loader.efi.canTouchEfiVariables = true;
|
||
|
||
networking.hostName = "nixos"; # Define your hostname.
|
||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||
|
||
# Configure network proxy if necessary
|
||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||
|
||
# Enable networking
|
||
networking.networkmanager.enable = true;
|
||
|
||
# Set your time zone.
|
||
time.timeZone = "Europe/London";
|
||
|
||
# Select internationalisation properties.
|
||
i18n.defaultLocale = "en_GB.UTF-8";
|
||
|
||
i18n.extraLocaleSettings = {
|
||
LC_ADDRESS = "en_GB.UTF-8";
|
||
LC_IDENTIFICATION = "en_GB.UTF-8";
|
||
LC_MEASUREMENT = "en_GB.UTF-8";
|
||
LC_MONETARY = "en_GB.UTF-8";
|
||
LC_NAME = "en_GB.UTF-8";
|
||
LC_NUMERIC = "en_GB.UTF-8";
|
||
LC_PAPER = "en_GB.UTF-8";
|
||
LC_TELEPHONE = "en_GB.UTF-8";
|
||
LC_TIME = "en_GB.UTF-8";
|
||
};
|
||
|
||
services.xserver = {
|
||
enable = true;
|
||
desktopManager = {
|
||
xterm.enable = false;
|
||
xfce.enable = true;
|
||
};
|
||
};
|
||
services.displayManager.defaultSession = "xfce";
|
||
|
||
# Configure keymap in X11
|
||
services.xserver = {
|
||
xkb.layout = "gb";
|
||
xkb.variant = "";
|
||
};
|
||
|
||
programs.ydotool.enable = true;
|
||
|
||
# Configure console keymap
|
||
console.keyMap = "uk";
|
||
|
||
# Enable CUPS to print documents.
|
||
services.printing.enable = true;
|
||
services.avahi = {
|
||
enable = true;
|
||
nssmdns4 = true;
|
||
openFirewall = true;
|
||
};
|
||
|
||
|
||
# Enable sound with pipewire.
|
||
sound.enable = true;
|
||
hardware.pulseaudio.enable = false;
|
||
security.rtkit.enable = true;
|
||
services.pipewire = {
|
||
enable = true;
|
||
alsa.enable = true;
|
||
alsa.support32Bit = true;
|
||
pulse.enable = true;
|
||
# If you want to use JACK applications, uncomment this
|
||
#jack.enable = true;
|
||
|
||
# use the example session manager (no others are packaged yet so this is enabled by default,
|
||
# no need to redefine it in your config for now)
|
||
#media-session.enable = true;
|
||
};
|
||
|
||
# Enable touchpad support (enabled default in most desktopManager).
|
||
# services.xserver.libinput.enable = true;
|
||
|
||
services.gpm.enable = true; # Mouse support in tty
|
||
|
||
# Enable dconf
|
||
programs.dconf.enable = true;
|
||
|
||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||
users.users.deadvey = {
|
||
isNormalUser = true;
|
||
description = "Dave Smith";
|
||
extraGroups = [ "networkmanager" "wheel" "ydotool" ];
|
||
};
|
||
home-manager.users.deadvey = { pkgs, ... }: {
|
||
home.packages = with pkgs; [
|
||
thunderbird
|
||
gramps
|
||
graphviz
|
||
qutebrowser
|
||
libreoffice
|
||
gimp
|
||
freetube
|
||
ace-of-penguins
|
||
okular
|
||
xonotic
|
||
keepassxc
|
||
tor-browser
|
||
gruvbox-plus-icons
|
||
gruvbox-gtk-theme
|
||
cinny-desktop
|
||
];
|
||
|
||
wayland.windowManager.hyprland.enable = true;
|
||
|
||
|
||
home.stateVersion = "24.05";
|
||
|
||
|
||
|
||
gtk = {
|
||
gtk2 = {
|
||
extraConfig = "gtk-application-prefer-dark-theme=0";
|
||
};
|
||
gtk3 = {
|
||
extraConfig = {
|
||
gtk-application-prefer-dark-theme=0;
|
||
};
|
||
};
|
||
gtk4 = {
|
||
extraConfig = {
|
||
gtk-application-prefer-dark-theme=0;
|
||
};
|
||
};
|
||
enable = true;
|
||
font.name = "Victor Mono SemiBold 12";
|
||
theme = {
|
||
name = "gruvbox-gtk-theme";
|
||
package = pkgs.gruvbox-gtk-theme;
|
||
};
|
||
iconTheme = {
|
||
name = "gruvbox-plus-icons";
|
||
package = pkgs.gruvbox-plus-icons;
|
||
};
|
||
cursorTheme = {
|
||
name = "Adwaita";
|
||
package = pkgs.gnome.adwaita-icon-theme;
|
||
size = 16;
|
||
};
|
||
};
|
||
|
||
xdg.mimeApps = {
|
||
enable = true;
|
||
defaultApplications = {
|
||
# Browser stuff
|
||
"text/html" = "qutebrowser.desktop";
|
||
"x-scheme-handler/http" = "qutebrowser.desktop";
|
||
"x-scheme-handler/https" = "qutebrowser.desktop";
|
||
"x-scheme-handler/about" = "qutebrowser.desktop";
|
||
"x-scheme-handler/unknown" = "qutebrowser.desktop";
|
||
|
||
# Image
|
||
"image/png" = "com.interversehq.qView.desktop";
|
||
"image/jpg" = "com.interversehq.qView.desktop";
|
||
"image/jpeg" = "com.interversehq.qView.desktop";
|
||
|
||
# Text
|
||
"text/plain" = "emacs.desktop";
|
||
|
||
# Audio
|
||
"audio/mpeg" = "mpv.desktop";
|
||
"audio/x-mp3" = "mpv.desktop";
|
||
"audio/x-wav" = "mpv.desktop";
|
||
|
||
# Video
|
||
"video/mp4" = "mpv.desktop";
|
||
"video/x-matroska" = "mpv.desktop";
|
||
"video/x-msvideo" = "mpv.desktop";
|
||
"video/x-flv" = "mpv.desktop";
|
||
"video/x-mpeg" = "mpv.desktop";
|
||
"video/x-ms-wmv" = "mpv.desktop";
|
||
};
|
||
};
|
||
|
||
programs.bash = {
|
||
enable = true;
|
||
shellAliases= {
|
||
emacs="emacs -nw";
|
||
nixrc="exec $HOME/Code/git/nixos/edit-config.sh";
|
||
ls="eza -l";
|
||
l="lsd";
|
||
};
|
||
bashrcExtra =
|
||
''fastfetch
|
||
XDG_SCREENSHOTS_DIR="$HOME/Pictures/other/Screenshots"
|
||
export XDG_SCREENSHOTS_DIR
|
||
PS1="\n\e[0;35m\$?\n\e[1;31m[\e[0;32m\u\e[0;36m@\e[0;31m\h \e[1;36m\w\e[1;31m]\e[0m\n > "'';
|
||
};
|
||
|
||
programs.qutebrowser = {
|
||
enable = true;
|
||
settings = {
|
||
colors = {
|
||
completion = {
|
||
fg = "#${FG2}";
|
||
odd.bg = "#${BG1}";
|
||
even.bg = "#${BG}";
|
||
category.fg = "#${YELLOW}";
|
||
category.bg = "#${BG}";
|
||
category.border.top = "#${BG}";
|
||
category.border.bottom = "#${BG}";
|
||
item.selected.fg = "#${FG2}";
|
||
item.selected.bg = "#${BG2}";
|
||
item.selected.border.top = "#${BG2}";
|
||
item.selected.border.bottom = "#${BG2}";
|
||
item.selected.match.fg = "#${GREEN}";
|
||
match.fg = "#${GREEN}";
|
||
scrollbar.bg = "#${BG}";
|
||
};
|
||
contextmenu = {
|
||
disabled.bg = "#${BG1}";
|
||
disabled.fg = "#${FG3}";
|
||
menu.bg = "#${BG}";
|
||
menu.fg = "#${FG2}";
|
||
selected.bg = "#${BG2}";
|
||
selected.fg = "#${FG2}";
|
||
};
|
||
downloads = {
|
||
bar.bg = "#${BG}";
|
||
start.fg = "#${BG}";
|
||
start.bg = "#${BLUE}";
|
||
stop.fg = "#${BG}";
|
||
stop.bg = "#${AQUA}";
|
||
error.fg = "#${RED}";
|
||
};
|
||
hints = {
|
||
fg = "#${BG}";
|
||
bg = "#${YELLOW}";
|
||
};
|
||
keyhint = {
|
||
fg = "#${FG2}";
|
||
bg = "#${BG}";
|
||
};
|
||
messages = {
|
||
error.fg = "#${BG}";
|
||
error.bg = "#${RED}";
|
||
error.border = "#${BG}";
|
||
warning.fg = "#${BG}";
|
||
warning.bg = "#${PURPLE}";
|
||
warning.border = "#${PURPLE}";
|
||
};
|
||
prompts = {
|
||
fg = "$#{FG2}";
|
||
border = "#${BG};
|
||
bg = "#${BG}";
|
||
selected.bg = "#${BG}";
|
||
selected.fg = "$#{FG2}";
|
||
};
|
||
statusbar = {
|
||
normal.fg = "#${GREEN}";
|
||
normal.bg = "#${BG}";
|
||
insert.fg = "#${BG}";
|
||
insert.bg = "#${BLUE}";
|
||
passthrough.fg = "#${BG}";
|
||
passthrough.bg = "#${AQUA}";
|
||
private.fg = "#${BG}";
|
||
private.bg = "#${BG1}";
|
||
command.fg = "#${FG2}";
|
||
command.bg = "#${BG}";
|
||
command.private.fg = "#${FG2}";
|
||
command.private.bg = "#${BG}";
|
||
caret.fg = "#${BG}";
|
||
caret.bg = "#${PURPLE}";
|
||
caret.selection.fg = "#${BG}";
|
||
caret.selection.bg = "#${BLUE}";
|
||
progress.bg = "#${BLUE}";
|
||
url.fg = "#${FG2}";
|
||
url.error.fg = "#${RED}";
|
||
url.hover.fg = "#${FG2}";
|
||
url.success.http.fg = "#${AQUA}";
|
||
url.success.https.fg = "#${GREEN}";
|
||
url.warn.fg = "#${PURPLE}";
|
||
};
|
||
};
|
||
};
|
||
};
|
||
|
||
programs.kitty = {
|
||
enable = true;
|
||
settings = {
|
||
cursor_shape = "underline";
|
||
cursor_shape_unfocused = "hollow";
|
||
foreground = "#${FG}";
|
||
background = "#${BG}";
|
||
selection_foreground = "#${BG}";
|
||
selection_background = "#${FG}";
|
||
|
||
color0 = "#${BG1}";
|
||
color8 = "#${BG0}";
|
||
|
||
color1 = "#${RED}";
|
||
color9 = "#${DARK_RED}";
|
||
|
||
color2 = "#${GREEN}";
|
||
color10 = "#${DARK_GREEN}";
|
||
|
||
color3 = "#${YELLOW}";
|
||
color11 = "#${DARK_YELLOW}";
|
||
|
||
color4 = "#${BLUE}";
|
||
color12 = "#${DARK_BLUE}";
|
||
|
||
color5 = "#${PURPLE}";
|
||
color13 = "#${DARK_PURPLE}";
|
||
|
||
color6 = "#${BLUE}";
|
||
color14 = "#${DARK_BLUE}";
|
||
|
||
color7 = "#${FG0}";
|
||
color15 = "#${FG1}";
|
||
};
|
||
};
|
||
|
||
programs.git = {
|
||
enable = true;
|
||
userName = "deadvey";
|
||
userEmail = "deadvey@deadvey.com";
|
||
};
|
||
|
||
services.emacs = {
|
||
enable = true;
|
||
defaultEditor = true;
|
||
};
|
||
|
||
programs.fastfetch = {
|
||
enable = true;
|
||
settings = {
|
||
logo = {
|
||
source = "nixos_small";
|
||
};
|
||
display = {
|
||
binaryPrefix = "si";
|
||
color = "blue";
|
||
separator = " ";
|
||
};
|
||
modules = [
|
||
{
|
||
type = "datetime";
|
||
key = " Date/Time";
|
||
format = "{1}-{3}-{11} {14}:{17}:{20}";
|
||
}
|
||
{
|
||
type = "os";
|
||
key = " Distro ";
|
||
keyColor = "yellow";
|
||
}
|
||
{
|
||
type = "cpu";
|
||
key = " PC ═╦ ";
|
||
keyColor = "green";
|
||
}
|
||
{
|
||
type = "gpu";
|
||
key = " ╠ ";
|
||
keyColor = "green";
|
||
}
|
||
{
|
||
type = "memory";
|
||
key = " ╚ ";
|
||
keyColor = "green";
|
||
}
|
||
"colors"
|
||
];
|
||
};
|
||
};
|
||
|
||
programs.wofi = {
|
||
enable = true;
|
||
settings = {
|
||
location = "center";
|
||
allow_markup = true;
|
||
width = 250;
|
||
height = 500;
|
||
};
|
||
style = ''
|
||
* {
|
||
color: #${FG};
|
||
}
|
||
window {
|
||
border: ${BORDER_WIDTH}px solid #${FG};
|
||
background-color: #${BG};
|
||
border-radius: ${CORNER_RADIUS};
|
||
}
|
||
|
||
#input {
|
||
padding: 4px;
|
||
margin: 4px;
|
||
padding-left: 20px;
|
||
border: none;
|
||
color: #${FG};
|
||
background-color: #${BG};
|
||
outline: none;
|
||
border-radius: ${CORNER_RADIUS};
|
||
}
|
||
|
||
#inner-box {
|
||
margin: 4px;
|
||
border: 10px solid #${BG};
|
||
background-color: #${BG};
|
||
border-radius: ${CORNER_RADIUS};
|
||
}
|
||
|
||
#outer-box {
|
||
margin: 2px;
|
||
border: none;
|
||
background-color: #${BG};
|
||
border-radius: ${CORNER_RADIUS};
|
||
}
|
||
|
||
#scroll {
|
||
margin: 0px;
|
||
border: none;
|
||
border-radius: ${CORNER_RADIUS};
|
||
}
|
||
|
||
#text:selected {
|
||
color: #${BG};
|
||
margin: 0px 0px;
|
||
border: none;
|
||
border-radius: ${CORNER_RADIUS};
|
||
}
|
||
|
||
#entry {
|
||
margin: 0px 0px;
|
||
border: none;
|
||
border-radius: ${CORNER_RADIUS};
|
||
}
|
||
|
||
#entry:selected {
|
||
margin: 0px 0px;
|
||
border: none;
|
||
background-color: #${GREEN};
|
||
border-radius: ${CORNER_RADIUS};
|
||
}
|
||
'';
|
||
};
|
||
|
||
services.dunst = {
|
||
enable = true;
|
||
iconTheme = {
|
||
name = "gruvbox-plus-icons";
|
||
package = pkgs.gruvbox-plus-icons;
|
||
};
|
||
settings = {
|
||
global = {
|
||
width = 300;
|
||
height = 300;
|
||
corner_radius = "${CORNER_RADIUS}";
|
||
offset = "${HALF_OF_GAPS_OUT}x${HALF_OF_GAPS_OUT}";
|
||
origin = "bottom-right";
|
||
transparency = 0;
|
||
font = "Victor Mono SemiBold 12";
|
||
};
|
||
urgency_low = {
|
||
background = "#${GREEN}";
|
||
foreground = "#${BG}";
|
||
frame_color = "#${DARK_GREEN}";
|
||
timout = 3;
|
||
};
|
||
urgency_normal = {
|
||
background = "#${BLUE}";
|
||
foreground = "#${BG}";
|
||
frame_color = "#${DARK_BLUE}";
|
||
timout = 10;
|
||
};
|
||
urgency_critical = {
|
||
background = "#${DARK_RED}";
|
||
foreground = "#${FG}";
|
||
frame_color = "#${RED}";
|
||
timout = 60;
|
||
};
|
||
};
|
||
};
|
||
|
||
services.hyprpaper = {
|
||
enable = true;
|
||
settings = {
|
||
#ipc = "on";
|
||
#splash = false;
|
||
#splash_offset = 2.0;
|
||
|
||
preload =
|
||
[ "${WALLPAPER}" ];
|
||
|
||
wallpaper = [
|
||
"HDMI-A-1,${WALLPAPER}"
|
||
];
|
||
};
|
||
};
|
||
|
||
programs.hyprlock = {
|
||
enable = true;
|
||
extraConfig = ''
|
||
general {
|
||
grace = 10
|
||
}
|
||
|
||
background {
|
||
path = ${WALLPAPER}
|
||
blur_size = 5
|
||
blur_passes = 1 # 0 disables blurring
|
||
noise = 0.0117
|
||
contrast = 1.3000 # Vibrant!!!
|
||
brightness = 0.8000
|
||
vibrancy = 0.2100
|
||
vibrancy_darkness = 0.0
|
||
}
|
||
|
||
input-field {
|
||
size = 250, 50
|
||
outline_thickness = 3
|
||
dots_size = 0.33 # Scale of input-field height, 0.2 - 0.8
|
||
dots_spacing = 0.15 # Scale of dots' absolute size, 0.0 - 1.0
|
||
dots_center = true
|
||
outer_color = "#${BG}"
|
||
inner_color = "#${FG}"
|
||
font_color = "#${BG}"
|
||
#fade_on_empty = true
|
||
placeholder_text = <i>Password...</i> # Text rendered in the input box when it's empty.
|
||
hide_input = false
|
||
|
||
position = 0, 200
|
||
halign = center
|
||
valign = bottom
|
||
}
|
||
# Date
|
||
label {
|
||
text = cmd[update:18000000] echo "<b> "$(date +'%A, %-d %B %Y')" </b>"
|
||
color = "#${FG}"
|
||
font_size = 34
|
||
font_family = JetBrains Mono Nerd Font 10
|
||
position = 0, -150
|
||
halign = center
|
||
valign = top
|
||
}
|
||
|
||
# Week
|
||
label {
|
||
text = cmd[update:18000000] echo "<b> "$(date +'Week %U')" </b>"
|
||
color = "#${FG}"
|
||
font_size = 24
|
||
font_family = JetBrains Mono Nerd Font 10
|
||
position = 0, -250
|
||
halign = center
|
||
valign = top
|
||
}
|
||
|
||
# Time
|
||
label {
|
||
text = cmd[update:1000] echo "<b><big> $(date +"%I:%M:%S %p") </big></b>" # AM/PM
|
||
#text = cmd[update:1000] echo "<b><big> $(date +"%H:%M:%S") </big></b>" # 24H
|
||
color = "#${FG}"
|
||
font_size = 94
|
||
font_family = JetBrains Mono Nerd Font 10
|
||
position = 0, 0
|
||
halign = center
|
||
valign = center
|
||
}
|
||
|
||
# User
|
||
label {
|
||
text = $USER
|
||
color = $color12
|
||
font_size = 18
|
||
font_family = Inter Display Medium
|
||
position = 0, 100
|
||
halign = center
|
||
valign = bottom
|
||
}
|
||
|
||
# uptime
|
||
label {
|
||
text = cmd[update:60000] echo "<b> "$(uptime -p || $Scripts/UptimeNixOS.sh)" </b>"
|
||
color = "#${FG}"
|
||
font_size = 24
|
||
font_family = JetBrains Mono Nerd Font 10
|
||
position = 0, 0
|
||
halign = right
|
||
valign = bottom
|
||
}
|
||
|
||
# weather edit specific location. Note, this cause a 2-4 seconds delay in locking
|
||
label {
|
||
text = cmd[update:3600000] [ -f ~/.cache/.weather_cache ] && cat ~/.cache/.weather_cache
|
||
color = "#${FG}"
|
||
font_size = 24
|
||
font_family = JetBrains Mono Nerd Font 10
|
||
position = 50, 0
|
||
halign = left
|
||
valign = bottom
|
||
}
|
||
|
||
# Put a picture of choice here. Default is the current wallpaper
|
||
image {
|
||
path = $HOME/Pictures/other/steampunk.jpg
|
||
size = 230
|
||
rounding = -1
|
||
border_size = 2
|
||
border_color = "#${FG}"
|
||
rotate = 0
|
||
reload_time = -1
|
||
position = 0, 300
|
||
halign = center
|
||
valign = bottom
|
||
}
|
||
|
||
'';
|
||
};
|
||
|
||
wayland.windowManager.hyprland.settings = {
|
||
|
||
"$mod" = "SUPER";
|
||
bind =
|
||
[
|
||
"$mod, F, exec, librewolf"
|
||
"$mod, Q, exec, kitty"
|
||
"$mod, Space, exec, fuzzel --background-color=${BG}ff --border-color=${DARK_BLUE}ff --border-width=${BORDER_WIDTH} --match-color=${RED}ff --selection-color=${FG}ff --selection-text-color=${BG}ff --text-color=${FG}ff --width 75 --lines 25 --icon-theme=Gruvbox-Plus-Dark --border-radius=${CORNER_RADIUS}"
|
||
"$mod, E, exec, wofi-emoji"
|
||
"$mod, W, killactive"
|
||
"$mod, M, fullscreen, 1"
|
||
"$mod, J, togglesplit,"
|
||
"$mod, V, toggleFloating,"
|
||
"$mod, U, pseudo,"
|
||
"$mod SHIFT, M, fullscreen"
|
||
"$mod SHIFT, Q, exit"
|
||
"$mod, left, movefocus, l"
|
||
"$mod, right, movefocus, r"
|
||
"$mod, up, movefocus, u"
|
||
"$mod, down, movefocus, d"
|
||
"$mod SHIFT, left, movewindow, l"
|
||
"$mod SHIFT, right, movewindow, r"
|
||
"$mod SHIFT, up, movewindow, u"
|
||
"$mod SHIFT, down, movewindow, d"
|
||
",Print, exec, grimshot savecopy area"
|
||
"$mod CONTROL, left, resizeactive, -20 0"
|
||
"$mod CONTROL, right, resizeactive, 20 0"
|
||
"$mod CONTROL, up, resizeactive, 0 -20"
|
||
"$mod CONTROL, down, resizeactive, 0 20"
|
||
",XF86WakeUp, exec, hyprlock"
|
||
"$mod, code:67, exec, cmus-remote -Q | grep 'file' | sed 's/file //' | mpv --playlist=- --no-audio --pause"
|
||
"$mod, code:68, exec, pactl set-sink-volume @DEFAULT_SINK@ -5%"
|
||
"$mod, code:69, exec, pactl set-sink-volume @DEFAULT_SINK@ +5%"
|
||
"$mod, code:70, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle"
|
||
"$mod, code:71, exec, cmus-remote --pause"
|
||
"$mod, code:72, exec, cmus-remote --prev"
|
||
"$mod, code:73, exec, cmus-remote --play"
|
||
"$mod, code:74, exec, cmus-remote --next"
|
||
|
||
# Mouse control with Numpad
|
||
",KP_Down, exec, ydotool mousemove -x 0 -y 10"
|
||
",KP_End, exec, ydotool mousemove -x -10 -y 0"
|
||
",KP_Next, exec, ydotool mousemove -x 10 -y 0"
|
||
",KP_Begin, exec, ydotool mousemove -x 0 -y -10"
|
||
",KP_Left, exec, ydotool click 00"
|
||
",KP_Right, exec, ydotool click 01"
|
||
",KP_Up, exec, ydotool click 02"
|
||
",KP_Home, exec, ydotool click 80"
|
||
",KP_Prior, exec, ydotool click 40"
|
||
]
|
||
++ (
|
||
# workspaces
|
||
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
|
||
builtins.concatLists (builtins.genList (
|
||
x: let
|
||
ws = let
|
||
c = (x + 1) / 10;
|
||
in
|
||
builtins.toString (x + 1 - (c * 10));
|
||
in [
|
||
"$mod, ${ws}, workspace, ${toString (x + 1)}"
|
||
"$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}"
|
||
]
|
||
)
|
||
10)
|
||
);
|
||
|
||
# Input
|
||
input.kb_layout=''gb'';
|
||
|
||
# General
|
||
general.gaps_in=''${GAPS_IN}'';
|
||
general.gaps_out=''${GAPS_OUT}'';
|
||
general.border_size=''${BORDER_WIDTH}'';
|
||
general."col.active_border"=''rgba(${FG}ff)'';
|
||
general."col.inactive_border"=''rgba(${DARK_BLUE}ff)'';
|
||
|
||
# Decoration
|
||
decoration.rounding=''${CORNER_RADIUS}'';
|
||
|
||
};
|
||
wayland.windowManager.hyprland.extraConfig = ''
|
||
exec-once=hyprpaper
|
||
exec-once=waybar
|
||
exec-once=gammastep -O 3000k
|
||
'';
|
||
|
||
programs.waybar = {
|
||
enable = true;
|
||
settings = {
|
||
whiteCornersTop = {
|
||
name = "whiteCornersTop";
|
||
mode = "overlay";
|
||
layer = "bottom";
|
||
position = "top";
|
||
height = 1080; # Height of monitor
|
||
width = 1920; # Width of monitor
|
||
margin-top = 0;
|
||
margin-bottom = 0;
|
||
modules-left = [];
|
||
modules-center = ["custom/empty"];
|
||
modules-right = [];
|
||
"custom/empty" = {
|
||
format = " ";
|
||
interval = 1;
|
||
};
|
||
};
|
||
topBar = {
|
||
name = "topBar";
|
||
layer = "top";
|
||
position = "top";
|
||
mode = "overlay";
|
||
exclusive = "true";
|
||
height = BAR_WIDTH_INT;
|
||
width = 1000;
|
||
margin-top = 0;
|
||
margin-bottom = 0;
|
||
modules-left = ["cpu"];
|
||
modules-center = ["clock"];
|
||
modules-right = ["memory"];
|
||
|
||
"clock" = {
|
||
format = "{:%d/%m/%Y %I:%M:%S} ";
|
||
interval = 1;
|
||
format-alt = "{:%A, %B %d, %Y %I:%M:%S} ";
|
||
tooltip-format = "<tt><small>{calendar}</small></tt>";
|
||
calendar = {
|
||
mode = "year";
|
||
mode-mon-col = 3;
|
||
weeks-pos = "right";
|
||
on-scroll = 1;
|
||
format = {
|
||
months = "<span color='#${FG}'><b>{}</b></span>";
|
||
days = "<span color='#${PURPLE}'><b>{}</b></span>";
|
||
weeks = "<span color='#${BLUE}'><b>W{}</b></span>";
|
||
weekdays = "<span color='#${ORANGE}'><b>{}</b></span>";
|
||
today = "<span color='#${GREEN}'><b><u>{}</u></b></span>";
|
||
};
|
||
};
|
||
};
|
||
memory = {
|
||
interval = 5;
|
||
format = " {}%";
|
||
};
|
||
cpu = {
|
||
interval = 5;
|
||
format = " {usage:2}%";
|
||
tooltip = false;
|
||
};
|
||
pulseaudio = {
|
||
format = "{icon} {volume}%";
|
||
format-bluetooth = "{volume}% {icon} {format_source}";
|
||
format-bluetooth-muted = " {icon} {format_source}";
|
||
format-muted = " {format_source}";
|
||
format-source = " {volume}%";
|
||
format-source-muted = "";
|
||
format-icons = {
|
||
headphone = "";
|
||
hands-free = "";
|
||
headset = "";
|
||
phone = "";
|
||
portable = "";
|
||
car = "";
|
||
default = ["" "" ""];
|
||
};
|
||
on-click = "pavucontrol";
|
||
};
|
||
};
|
||
bottomBar = {
|
||
name = "bottomBar";
|
||
layer = "top";
|
||
position = "bottom";
|
||
mode = "overlay";
|
||
height = BAR_WIDTH_INT;
|
||
width = 1000;
|
||
margin-top = 0;
|
||
margin-bottom = 0;
|
||
modules-left = [];
|
||
modules-center = ["custom/song" "custom/artist"];
|
||
modules-right = [];
|
||
|
||
"custom/artist" = {
|
||
format = "{}";
|
||
exec = "cmus-remote -Q | grep 'tag artist' | sed 's/tag artist //'";
|
||
interval = 1;
|
||
};
|
||
"custom/song" = {
|
||
format = "{}";
|
||
exec = "cmus-remote -Q | grep 'tag title' | sed 's/tag title //'";
|
||
interval = 1;
|
||
};
|
||
|
||
|
||
};
|
||
};
|
||
|
||
|
||
style = ''
|
||
* {
|
||
font-size: 12px;
|
||
font-family: Font Awesome, Ubuntu Nerd Font, sans-serif;
|
||
font-weight: bold;
|
||
min-height: 0;
|
||
}
|
||
window#waybar.topBar {
|
||
background-color: transparent;
|
||
}
|
||
window#waybar.bottomBar {
|
||
background-color: transparent;
|
||
}
|
||
window#waybar.rightBar {
|
||
background-color: transparent;
|
||
}
|
||
#clock.whiteCornersTop
|
||
#clock.whiteCornersBottom {
|
||
background-color: transparent;
|
||
color: transparent;
|
||
}
|
||
window#waybar.whiteCornersTop {
|
||
border: ${BORDER_WIDTH}px solid RGBA(235, 219, 178, 1);
|
||
background-color: transparent;
|
||
box-shadow: 0px 0px 0px 60px black, 0px 0px 0px 0.5px #ebdbb2;
|
||
border-radius: ${RECEIVING_CORNER_RADIUS}px;
|
||
margin: 20px;
|
||
}
|
||
window#waybar.right,
|
||
window#waybar.left {
|
||
background-color: #${FG};
|
||
border-bottom: ${BORDER_WIDTH}px;
|
||
}
|
||
#workspaces {
|
||
background: #${FG};
|
||
margin: 5px 3px 5px 5px;
|
||
padding: 0px 1px;
|
||
border-radius: ${CORNER_RADIUS}px;
|
||
border: 0px;
|
||
font-style: normal;
|
||
color: #${BG};
|
||
}
|
||
|
||
#workspaces button {
|
||
padding: 0px 0px;
|
||
margin: 4px 3px;
|
||
border-radius: ${CORNER_RADIUS}px;
|
||
border: 0px;
|
||
color: #${BG};
|
||
background-color: #${BLUE};
|
||
opacity: 0.5;
|
||
transition: all 0.3s ease-in-out;
|
||
}
|
||
|
||
#workspaces button.active {
|
||
color: #${DARK_BLUE};
|
||
background: #${DARK_BLUE};
|
||
border-radius: ${CORNER_RADIUS}px;
|
||
min-width: 40px;
|
||
transition: all 0.3s ease-in-out;
|
||
opacity: 1.0;
|
||
}
|
||
|
||
#workspaces button:hover {
|
||
color: #${BG};
|
||
background: #${BG};
|
||
border-radius: ${CORNER_RADIUS}px;
|
||
opacity: 1.0;
|
||
}
|
||
|
||
#window {
|
||
color: #${BG};
|
||
background: #c0caf5;
|
||
border-radius: ${CORNER_RADIUS}px;
|
||
margin: 5px;
|
||
padding: 2px 10px;
|
||
}
|
||
|
||
#memory {
|
||
color: #${BG};
|
||
background: #${ORANGE};
|
||
border-radius: 0px 0px ${CORNER_RADIUS}px ${CORNER_RADIUS}px;
|
||
margin: 0px;
|
||
padding: 0px 10px;
|
||
border: 2px solid #${FG};
|
||
}
|
||
|
||
#clock {
|
||
color: #${BG};
|
||
background: #${PURPLE};
|
||
border-radius: 0px 0px ${CORNER_RADIUS}px ${CORNER_RADIUS}px;
|
||
margin: 0px;
|
||
padding: 0px 10px;
|
||
border-right: 2px solid #${FG};
|
||
border-left: 2px solid #${FG};
|
||
border-top: 2px solid #${PURPLE};
|
||
border-bottom: 2px solid #${FG};
|
||
}
|
||
|
||
#cpu {
|
||
color: #${BG};
|
||
background: #${GREEN};
|
||
border-radius: 0px 0px ${CORNER_RADIUS}px ${CORNER_RADIUS}px;
|
||
margin: 0px;
|
||
padding: 0px 10px;
|
||
border: 2px solid #${FG};
|
||
}
|
||
|
||
#network {
|
||
color: #${BG};
|
||
background: #${DARK_YELLOW};
|
||
border-radius: ${CORNER_RADIUS}px;
|
||
margin: 5px;
|
||
padding: 2px 10px;
|
||
}
|
||
|
||
#tray {
|
||
color: #${BG};
|
||
background: #${YELLOW};
|
||
border-radius: ${CORNER_RADIUS}px 0px 0px ${CORNER_RADIUS}px;
|
||
margin: 0px;
|
||
padding: 10px 2px;
|
||
border: 2px solid #${FG};
|
||
}
|
||
|
||
#pulseaudio {
|
||
color: #${BG};
|
||
background: #${YELLOW};
|
||
border-radius: 0px 0px ${CORNER_RADIUS}px ${CORNER_RADIUS}px;
|
||
margin: 0px;
|
||
padding: 0px 10px;
|
||
border: 2px solid #${FG};
|
||
}
|
||
#custom-artist {
|
||
color: #${BG};
|
||
background: #${AQUA};
|
||
border-radius: 0px ${CORNER_RADIUS}px 0px 0px;
|
||
margin: 0px;
|
||
padding: 0px 10px;
|
||
border: 2px solid #${FG};
|
||
border-left: 1px solid #${FG};
|
||
}
|
||
#custom-song {
|
||
color: #${BG};
|
||
background: #${AQUA};
|
||
border-radius: ${CORNER_RADIUS}px 0px 0px 0px;
|
||
margin: 0px;
|
||
padding: 0px 10px;
|
||
border: 2px solid #${FG};
|
||
border-right: 1px solid #${FG};
|
||
}
|
||
'';
|
||
};
|
||
};
|
||
|
||
|
||
# List packages installed in system profile. To search, run:
|
||
# $ nix search wget
|
||
environment.systemPackages = with pkgs; [
|
||
hyprlock
|
||
vim
|
||
cmus
|
||
wget
|
||
emacs
|
||
fastfetch
|
||
gparted
|
||
git
|
||
dunst
|
||
python3
|
||
gcc
|
||
htop
|
||
hyprland
|
||
xorg.xinit
|
||
wine
|
||
waybar
|
||
yazi
|
||
xwayland
|
||
kitty
|
||
lxappearance
|
||
fuzzel
|
||
wtype
|
||
wofi
|
||
sway-contrib.grimshot
|
||
cron
|
||
wofi-emoji
|
||
dmenu
|
||
w3m
|
||
gpm # Mouse support in tty
|
||
grim
|
||
slurp
|
||
wl-clipboard
|
||
gtk3
|
||
dbus
|
||
hyprpaper
|
||
dconf
|
||
qview
|
||
lsd
|
||
mpv
|
||
killall
|
||
zip
|
||
ntfs3g
|
||
ydotool
|
||
gammastep # Filters out blue light
|
||
libnotify
|
||
pulseaudio
|
||
eza
|
||
];
|
||
|
||
fonts.packages = with pkgs; [
|
||
nerdfonts
|
||
noto-fonts
|
||
noto-fonts-cjk
|
||
noto-fonts-emoji
|
||
liberation_ttf
|
||
fira-code
|
||
fira-code-symbols
|
||
mplus-outline-fonts.githubRelease
|
||
dina-font
|
||
proggyfonts
|
||
font-awesome_4
|
||
font-awesome
|
||
victor-mono
|
||
];
|
||
|
||
|
||
# Some programs need SUID wrappers, can be configured further or are
|
||
# started in user sessions.
|
||
# programs.mtr.enable = true;
|
||
# programs.gnupg.agent = {
|
||
# enable = true;
|
||
# enableSSHSupport = true;
|
||
# };
|
||
|
||
# List services that you want to enable:
|
||
|
||
# Enable the OpenSSH daemon.
|
||
# services.openssh.enable = true;
|
||
|
||
# Open ports in the firewall.
|
||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||
# Or disable the firewall altogether.
|
||
# networking.firewall.enable = false;
|
||
|
||
# This value determines the NixOS release from which the default
|
||
# settings for stateful data, like file locations and database versions
|
||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||
# this value at the release version of the first install of this system.
|
||
# Before changing this value read the documentation for this option
|
||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||
system.stateVersion = "24.05"; # Did you read the comment?
|
||
|
||
}
|