Compare commits

...

11 Commits

Author SHA1 Message Date
83bfa9fb82 switch flake to unstable 2023-08-11 16:10:47 +02:00
68bde47d7e change waybar 2023-08-11 14:45:50 +02:00
82ddd5bebb hyprland config 2023-08-08 19:32:15 +02:00
a5208fedba hyperpaper 2023-08-08 14:41:33 +02:00
8e34b7d8f3 add swaylock.nix 2023-08-07 21:22:56 +02:00
718220bc41 add greetd.nix 2023-08-07 21:12:17 +02:00
1741067800 add fonts.nix 2023-08-06 09:35:28 +02:00
19c4f11670 add xcursor.nix 2023-08-06 09:24:27 +02:00
dfbab59b45 enable gtk 2023-08-06 09:17:38 +02:00
683bd41f4f enable nix gc daily 2023-08-05 17:34:22 +02:00
1d539039ae add librewolf 2023-08-05 14:32:04 +02:00
30 changed files with 1910 additions and 18 deletions

BIN
assets/wallpaper_street.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1006 KiB

15
flake.lock generated
View File

@ -7,16 +7,15 @@
]
},
"locked": {
"lastModified": 1687871164,
"narHash": "sha256-bBFlPthuYX322xOlpJvkjUBz0C+MOBjZdDOOJJ+G2jU=",
"lastModified": 1691672736,
"narHash": "sha256-HNPA/dKHerA0p4OsToEcW/DtTSXBcK5gFRsy/yPgV/Y=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "07c347bb50994691d7b0095f45ebd8838cf6bc38",
"rev": "6e1eff9aac0e8d84bda7f2d60ba6108eea9b7e79",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-23.05",
"repo": "home-manager",
"type": "github"
}
@ -81,16 +80,16 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1690927903,
"narHash": "sha256-D5gCaCROnjEKDOel//8TO/pOP87pAEtT0uT8X+0Bj/U=",
"lastModified": 1691654369,
"narHash": "sha256-gSILTEx1jRaJjwZxRlnu3ZwMn1FVNk80qlwiCX8kmpo=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "bd836ac5e5a7358dea73cb74a013ca32864ccb86",
"rev": "ce5e4a6ef2e59d89a971bc434ca8ca222b9c7f5e",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-23.05",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}

View File

@ -2,14 +2,16 @@
description = "NixOS configuration";
inputs = { # All flake references
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05"; # Default stable nix packages
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; # Default stable nix packages
home-manager = { # User package management
url = "github:nix-community/home-manager/release-23.05";
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland.url = "github:hyprwm/Hyprland"; # packages hyprland
# stylix.url = "github:danth/stylix";
};
outputs = attrs @ { self, nixpkgs, home-manager, hyprland, ... }: {

3
home/blueman.nix Normal file
View File

@ -0,0 +1,3 @@
{
services.blueman-applet.enable = true;
}

View File

@ -2,10 +2,19 @@
home-manager.sharedModules = [
./bash.nix
./bat.nix
./blueman.nix
./dunst.nix
./git.nix
./gtk.nix
./hyprland.nix
./joshuto.nix
./kitty.nix
./librewolf.nix
./mpv.nix
./neovim.nix
./swaylock.nix
./waybar.nix
./xcursor.nix
./xresources.nix
];
}

View File

@ -1,10 +1,28 @@
{ pkgs, ... }: {
home.packages = with pkgs; [ libnotify ];
service.dunst = {
services.dunst = {
enable = true;
iconTheme = {
package = pkgs.papirus-icon-theme;
name = "Papirus";
};
settings = {
global = {
geometry = "1870x5-25+45";
width = 350;
separator_height = 5;
padding = 24;
horizontal_padding = 24;
frame_width = 3;
idle_threshold = 120;
alignment = "center";
word_wrap = "yes";
transparency = 5;
format = "<b>%s</b>: %b";
markup = "full";
min_icon_size = 32;
max_icon_size = 128;
};
};
};
}

26
home/gtk.nix Normal file
View File

@ -0,0 +1,26 @@
{ pkgs, ... }: {
gtk = {
enable = true;
cursorTheme = {
package = pkgs.phinger-cursors;
name = "phinger-cursors";
};
gtk3.extraConfig = {
gtk-decoration-layout = "menu";
gtk-xft-antialias = 1;
gtk-xft-hinting = 1;
gtk-xft-hintstyle = "hintfull";
gtk-xft-rgba = "rgb";
# gtk-recent-files-enable = false;
};
gtk4.extraConfig = {
Settings = ''
gtk-application-prefer-dark-theme=1
'';
};
iconTheme = {
package = pkgs.fluent-icon-theme;
name = "Fluent-dark";
};
};
}

View File

@ -2,7 +2,161 @@
modifier = "SUPER";
in {
xdg.configFile."hypr/hyprland.conf".text = ''
$SUPER = ${modifier};
bind = $SUPER, Q, exec, kitty
env = XDG_CURRENT_DESKTOP,Hyprland
env = XDG_SESSION_TYPE,wayland
env = XDG_SESSION_DESKTOP,hyprland
env = GDK_BACKEND,wayland
env = QT_QPA_PLATFORM,wayland
env = WLR_NO_HARDWARE_CURSORS,1
monitor=eDP-1,1920x1080@60.096001,0x0,1
general {
gaps_in = 5
gaps_out = 5
border_size = 2
col.active_border = rgba(002B36ee) 45deg
col.inactive_border = rgba(07364299)
no_border_on_floating = false
layout = dwindle
no_cursor_warps = true
}
input {
kb_layout = de
accel_profile = flat
follow_mouse = 1
mouse_refocus = 0
sensitivity = 0
touchpad {
natural_scroll = yes
disable_while_typing = no
}
repeat_rate = 50
repeat_delay = 300
}
decoration {
rounding = 10
blur = true
blur_size = 6
blur_passes = 3
blur_new_optimizations = true
blur_ignore_opacity = true
drop_shadow = yes
shadow_range = 4
col.shadow = rgba(1a1a1aee)
}
# animations {
# enabled = 1
# bezier = myBezier, 0.05, 0.9, 0.1, 1.05
# animation = windows, 1, 7, myBezier
# animation = windowsOut, 1, 7, default, popin 80%
# animation = workspace, 1, 6, default
# animation = border, 1, 10, default
# animation = borderangle, 1, 8, default
# animation = fade, 1, 7, default
# }
dwindle {
no_gaps_when_only = false
preserve_split = yes
pseudotile = true # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
}
master {
new_is_master = true
new_on_top = no
}
misc {
disable_hyprland_logo = true
disable_splash_rendering = true
}
exec-once = waybar
exec-once = hyprpaper
exec-once = dunst
exec-once = blueman-applet
exec-once = nm-applet --indicator
$SUPER = ${modifier}
$SUPER_SHIFT = ${modifier}_SHIFT
$SUPER_ALT = ${modifier}_ALT
bind = $SUPER, Q, killactive
bind = $SUPER, T, exec, kitty
bind = $SUPER, B, exec, librewolf
bind = $SUPER, L, exec, swaylock
bind = $SUPER, F, fullscreen,1
bind = $SUPER_SHIFT, F, fullscreen,0
bind = $SUPER_SHIFT, H, splitratio, -0.05
bind = $SUPER_SHIFT, L, splitratio, +0.05
bind = $SUPER, V, togglesplit,
bind = $SUPER, 1, exec, hyprland-relative-workspace b
bind = $SUPER, 2, exec, hyprland-relative-workspace f
bind = $SUPER_SHIFT, 1, exec, hyprland-relative-workspace b --with-window
bind = $SUPER_SHIFT, 2, exec, hyprland-relative-workspace f --with-window
bind = $SUPER, left, movefocus, l
bind = $SUPER, right, movefocus, r
bind = $SUPER, up, movefocus, u
bind = $SUPER, down, movefocus, d
bind = $SUPER_SHIFT, left, movewindow, l
bind = $SUPER_SHIFT, right, movewindow, r
bind = $SUPER_SHIFT, up, movewindow, u
bind = $SUPER_SHIFT, down, movewindow, d
bind = ALT, left, resizeactive, -40 0
bind = ALT, down, resizeactive, 0 40
bind = ALT, up, resizeactive, 0 -40
bind = ALT, right, resizeactive, 40 0
bind = ALT, 1, workspace, 1
bind = ALT, 2, workspace, 2
bind = ALT, 3, workspace, 3
bind = ALT, 4, workspace, 4
bind = ALT, 5, workspace, 5
bind = ALT, 6, workspace, 6
bind = ALT, 7, workspace, 7
bind = ALT, 8, workspace, 8
bind = ALT, 9, workspace, 9
bind = ALT, 0, workspace, 0
bind = ALTSHIFT,1,movetoworkspace,1
bind = ALTSHIFT,2,movetoworkspace,2
bind = ALTSHIFT,3,movetoworkspace,3
bind = ALTSHIFT,4,movetoworkspace,4
bind = ALTSHIFT,5,movetoworkspace,5
bind = ALTSHIFT,6,movetoworkspace,6
bind = ALTSHIFT,7,movetoworkspace,7
bind = ALTSHIFT,8,movetoworkspace,8
bind = ALTSHIFT,9,movetoworkspace,9
bind = ALTSHIFT,0,movetoworkspace,0
bind = ALTSHIFT,left,movetoworkspace,-1
bind = ALTSHIFT,right,movetoworkspace,+1
bind = CTRL,right,resizeactive,20 0
bind = CTRL,left,resizeactive,-20 0
bind = CTRL,up,resizeactive,0 -20
bind = CTRL,down,resizeactive,0 20
# Move/resize windows with super + LMB/RMB and dragging
bindm = $SUPER, mouse:272, movewindow
bindm = $SUPER, mouse:273, resizewindow
# Change volume with keys
bindl=, XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && notify-send -t 2000 "Muted" "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)"
bindl=, XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+ && notify-send -t 2000 "Raised volume to" "$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | tail -c 3)%"
bindl=, XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- && notify-send -t 2000 "Lowered volume to" "$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | tail -c 3)%"
bindl=, XF86MonBrightnessDown, exec, brightnessctl set 5%- && notify-send -t 2000 "Decreased brightness to" "$(brightnessctl get)"
bindl=, XF86MonBrightnessUp, exec, brightnessctl set +5% && notify-send -t 2000 "Increased brightness to" "$(brightnessctl get)"
'';
xdg.configFile."hypr/hyprpaper.conf".text = ''
preload = ${../assets/wallpaper_street.jpg}
wallpaper = eDP-1,${../assets/wallpaper_street.jpg}
'';
}

899
home/joshuto.nix Normal file
View File

@ -0,0 +1,899 @@
{ pkgs, ... }:
{
programs.joshuto = {
enable = true;
settings = {
display = {
automatically_count_files = true;
show_borders = false;
show_hidden = true;
show_icons = true;
line_number_style = "absolute";
collapse_preview = false;
};
preview = {
max_preview_size = 10000000000;
preview_script = "~/.config/joshuto/preview.sh";
preview_shown_hook_script = "~/.config/joshuto/kitty-show.sh";
preview_removed_hook_script = "~/.config/joshuto/kitty-remove.sh";
};
};
mimetype = {
class = {
audio_default = [
{ command = "mpv"; args = [ "--" ]; }
{ command = "mediainfo"; confirm_exit = true; }
];
image_default = [
{ command = "pqiv"; args = [ "--" ]; fork = true; silent = true; }
];
video_default = [
{ command = "mpv"; args = [ "--" ]; fork = true; silent = true; }
{ command = "mediainfo"; confirm_exit = true; }
{ command = "mpv"; args = [ "--mute" "on" "--" ]; fork = true; silent = true; }
];
text_default = [
{ command = "nvim"; }
];
reader_default = [
{ command = "zathura"; fork = true; silent = true; }
];
libreoffice_default = [
{ command = "libreoffice"; fork = true; silent = true; }
];
};
extension = {
## image formats
avif."inherit" = "image_default";
bmp."inherit" = "image_default";
gif."inherit" = "image_default";
heic."inherit" = "image_default";
jpeg."inherit" = "image_default";
jpe."inherit" = "image_default";
jpg."inherit" = "image_default";
pgm."inherit" = "image_default";
png."inherit" = "image_default";
ppm."inherit" = "image_default";
webp."inherit" = "image_default";
## audio formats
flac."inherit" = "audio_default";
m4a."inherit" = "audio_default";
mp3."inherit" = "audio_default";
ogg."inherit" = "audio_default";
wav."inherit" = "audio_default";
## video formats
avi."inherit" = "video_default";
av1."inherit" = "video_default";
flv."inherit" = "video_default";
mkv."inherit" = "video_default";
m4v."inherit" = "video_default";
mov."inherit" = "video_default";
mp4."inherit" = "video_default";
ts."inherit" = "video_default";
webm."inherit" = "video_default";
wmv."inherit" = "video_default";
## text formats
build."inherit" = "text_default";
c."inherit" = "text_default";
cmake."inherit" = "text_default";
conf."inherit" = "text_default";
cpp."inherit" = "text_default";
css."inherit" = "text_default";
csv."inherit" = "text_default";
cu."inherit" = "text_default";
ebuild."inherit" = "text_default";
eex."inherit" = "text_default";
env."inherit" = "text_default";
ex."inherit" = "text_default";
exs."inherit" = "text_default";
go."inherit" = "text_default";
h."inherit" = "text_default";
hpp."inherit" = "text_default";
hs."inherit" = "text_default";
html."inherit" = "text_default";
ini."inherit" = "text_default";
java."inherit" = "text_default";
js."inherit" = "text_default";
json."inherit" = "text_default";
kt."inherit" = "text_default";
lock."inherit" = "text_default";
lua."inherit" = "text_default";
log."inherit" = "text_default";
md."inherit" = "text_default";
micro."inherit" = "text_default";
ninja."inherit" = "text_default";
py."inherit" = "text_default";
rkt."inherit" = "text_default";
rs."inherit" = "text_default";
scss."inherit" = "text_default";
sh."inherit" = "text_default";
srt."inherit" = "text_default";
svelte."inherit" = "text_default";
toml."inherit" = "text_default";
tsx."inherit" = "text_default";
txt."inherit" = "text_default";
vim."inherit" = "text_default";
xml."inherit" = "text_default";
yaml."inherit" = "text_default";
yml."inherit" = "text_default";
# archive formats
"7z".app_list = [{ command = "7z"; args = [ "x" ]; confirm_exit = true; }];
rar.app_list = [
{ command = "unar"; confirm_exit = true; }
{ command = "file-roller"; fork = true; silent = true; }
];
zip.app_list = [
{ command = "unzip"; confirm_exit = true; }
{ command = "file-roller"; fork = true; silent = true; }
];
# misc formats
aup.app_list = [
{ command = "audacity"; fork = true; silent = true; }
];
odt."inherit" = "libreoffice_default";
odf."inherit" = "libreoffice_default";
ods."inherit" = "libreoffice_default";
odp."inherit" = "libreoffice_default";
doc."inherit" = "libreoffice_default";
docx."inherit" = "libreoffice_default";
xls."inherit" = "libreoffice_default";
xlsx."inherit" = "libreoffice_default";
ppt."inherit" = "libreoffice_default";
pptx."inherit" = "libreoffice_default";
pdf."inherit" = "reader_default";
kra.app_list = [
{ command = "krita"; fork = true; silent = true; }
];
kdenlive.app_list = [
{ command = "kdenlive"; fork = true; silent = true; }
];
tex.app_list = [
{ command = "micro"; }
{ command = "gedit"; fork = true; silent = true; }
{ command = "bat"; confirm_exit = true; }
{ command = "pdflatex"; }
];
torrent.app_list = [
{ command = "transmission-gtk"; }
];
};
mimetype = {
application.subtype.octet-stream."inherit" = "video_default";
text."inherit" = "text_default";
video."inherit" = "video_default";
};
};
keymap = {
default_view = {
keymap = [
{ keys = [ "escape" ]; command = "escape"; }
{ keys = [ "ctrl+t" ]; command = "new_tab"; }
{ keys = [ "alt+t" ]; command = "new_tab --cursor"; }
{ keys = [ "T" ]; command = "new_tab --current"; }
{ keys = [ "W" ]; command = "close_tab"; }
{ keys = [ "ctrl+w" ]; command = "close_tab"; }
{ keys = [ "q" ]; command = "close_tab"; }
{ keys = [ "ctrl+c" ]; command = "quit"; }
{ keys = [ "o" ]; command = "quit --output-selected-files"; }
{ keys = [ "R" ]; command = "reload_dirlist"; }
{ keys = [ "z" "h" ]; command = "toggle_hidden"; }
{ keys = [ "ctrl+h" ]; command = "toggle_hidden"; }
{ keys = [ "\t" ]; command = "tab_switch 1"; }
{ keys = [ "backtab" ]; command = "tab_switch -1"; }
{ keys = [ "alt+1" ]; command = "tab_switch_index 1"; }
{ keys = [ "alt+2" ]; command = "tab_switch_index 2"; }
{ keys = [ "alt+3" ]; command = "tab_switch_index 3"; }
{ keys = [ "alt+4" ]; command = "tab_switch_index 4"; }
{ keys = [ "alt+5" ]; command = "tab_switch_index 5"; }
{ keys = [ "1" ]; command = "numbered_command 1"; }
{ keys = [ "2" ]; command = "numbered_command 2"; }
{ keys = [ "3" ]; command = "numbered_command 3"; }
{ keys = [ "4" ]; command = "numbered_command 4"; }
{ keys = [ "5" ]; command = "numbered_command 5"; }
{ keys = [ "6" ]; command = "numbered_command 6"; }
{ keys = [ "7" ]; command = "numbered_command 7"; }
{ keys = [ "8" ]; command = "numbered_command 8"; }
{ keys = [ "9" ]; command = "numbered_command 9"; }
# arrow keys
{ keys = [ "arrow_up" ]; command = "cursor_move_up"; }
{ keys = [ "arrow_down" ]; command = "cursor_move_down"; }
{ keys = [ "arrow_left" ]; command = "cd .."; }
{ keys = [ "arrow_right" ]; command = "open"; }
{ keys = [ "\n" ]; command = "open"; }
{ keys = [ "home" ]; command = "cursor_move_home"; }
{ keys = [ "end" ]; command = "cursor_move_end"; }
{ keys = [ "page_up" ]; command = "cursor_move_page_up"; }
{ keys = [ "page_down" ]; command = "cursor_move_page_down"; }
{ keys = [ "ctrl+u" ]; command = "cursor_move_page_up 0.5"; }
{ keys = [ "ctrl+d" ]; command = "cursor_move_page_down 0.5"; }
# vim-like keybindings
{ keys = [ "j" ]; command = "cursor_move_down"; }
{ keys = [ "k" ]; command = "cursor_move_up"; }
{ keys = [ "h" ]; command = "cd .."; }
{ keys = [ "l" ]; command = "open"; }
{ keys = [ "g" "g" ]; command = "cursor_move_home"; }
{ keys = [ "G" ]; command = "cursor_move_end"; }
{ keys = [ "r" ]; command = "open_with"; }
{ keys = [ "H" ]; command = "cursor_move_page_home"; }
{ keys = [ "L" ]; command = "cursor_move_page_middle"; }
{ keys = [ "M" ]; command = "cursor_move_page_end"; }
{ keys = [ "[" ]; command = "parent_cursor_move_up"; }
{ keys = [ "]" ]; command = "parent_cursor_move_down"; }
{ keys = [ "c" "d" ]; command = ":cd "; }
{ keys = [ "d" "d" ]; command = "cut_files"; }
{ keys = [ "y" "y" ]; command = "copy_files"; }
{ keys = [ "y" "n" ]; command = "copy_filename"; }
{ keys = [ "y" "." ]; command = "copy_filename_without_extension"; }
{ keys = [ "y" "p" ]; command = "copy_filepath"; }
{ keys = [ "y" "d" ]; command = "copy_dirpath"; }
{ keys = [ "p" "l" ]; command = "symlink_files --relative=false"; }
{ keys = [ "p" "L" ]; command = "symlink_files --relative=true"; }
{ keys = [ "delete" ]; command = "delete_files"; }
{ keys = [ "d" "D" ]; command = "delete_files"; }
{ keys = [ "D" ]; command = "delete_files"; }
{ keys = [ "p" "p" ]; command = "paste_files"; }
{ keys = [ "p" "o" ]; command = "paste_files --overwrite=true"; }
{ keys = [ "a" ]; command = "rename_append"; }
{ keys = [ "A" ]; command = "rename_prepend"; }
{ keys = [ "f" "t" ]; command = ":touch "; }
{ keys = [ " " ]; command = "select --toggle=true"; }
{ keys = [ "t" ]; command = "select --all=true --toggle=true"; }
{ keys = [ "V" ]; command = "toggle_visual"; }
{ keys = [ "w" ]; command = "show_tasks --exit-key=w"; }
{ keys = [ "b" "b" ]; command = "bulk_rename"; }
{ keys = [ "=" ]; command = "set_mode"; }
{ keys = [ ":" ]; command = ":"; }
{ keys = [ ";" ]; command = ":"; }
{ keys = [ "'" ]; command = ":shell "; }
{ keys = [ "m" "k" ]; command = ":mkdir "; }
{ keys = [ "c" "w" ]; command = ":rename "; }
{ keys = [ "/" ]; command = ":search "; }
{ keys = [ "|" ]; command = ":search_inc "; }
{ keys = [ "\\" ]; command = ":search_glob "; }
{ keys = [ "S" ]; command = "search_fzf"; }
{ keys = [ "C" ]; command = "subdir_fzf"; }
{ keys = [ "n" ]; command = "search_next"; }
{ keys = [ "N" ]; command = "search_prev"; }
{ keys = [ "s" "r" ]; command = "sort reverse"; }
{ keys = [ "s" "l" ]; command = "sort lexical"; }
{ keys = [ "s" "m" ]; command = "sort mtime"; }
{ keys = [ "s" "n" ]; command = "sort natural"; }
{ keys = [ "s" "s" ]; command = "sort size"; }
{ keys = [ "s" "e" ]; command = "sort ext"; }
{ keys = [ "m" "s" ]; command = "linemode size"; }
{ keys = [ "m" "m" ]; command = "linemode mtime"; }
{ keys = [ "m" "M" ]; command = "linemode sizemtime"; }
{ keys = [ "g" "r" ]; command = "cd /"; }
{ keys = [ "g" "c" ]; command = "cd ~/.config"; }
{ keys = [ "g" "d" ]; command = "cd ~/Downloads"; }
{ keys = [ "g" "e" ]; command = "cd /etc"; }
{ keys = [ "g" "h" ]; command = "cd ~/"; }
{ keys = [ "?" ]; command = "help"; }
];
};
task_view = {
keymap = [
# arrow keys
{ keys = [ "arrow_up" ]; command = "cursor_move_up"; }
{ keys = [ "arrow_down" ]; command = "cursor_move_down"; }
{ keys = [ "home" ]; command = "cursor_move_home"; }
{ keys = [ "end" ]; command = "cursor_move_end"; }
# vim-like keybindings
{ keys = [ "j" ]; command = "cursor_move_down"; }
{ keys = [ "k" ]; command = "cursor_move_up"; }
{ keys = [ "g" "g" ]; command = "cursor_move_home"; }
{ keys = [ "G" ]; command = "cursor_move_end"; }
{ keys = [ "w" ]; command = "show_tasks"; }
{ keys = [ "escape" ]; command = "show_tasks"; }
];
};
help_view = {
keymap = [
# arrow keys
{ keys = [ "arrow_up" ]; command = "cursor_move_up"; }
{ keys = [ "arrow_down" ]; command = "cursor_move_down"; }
{ keys = [ "home" ]; command = "cursor_move_home"; }
{ keys = [ "end" ]; command = "cursor_move_end"; }
# vim-like keybindings
{ keys = [ "j" ]; command = "cursor_move_down"; }
{ keys = [ "k" ]; command = "cursor_move_up"; }
{ keys = [ "g" "g" ]; command = "cursor_move_home"; }
{ keys = [ "G" ]; command = "cursor_move_end"; }
{ keys = [ "w" ]; command = "show_tasks"; }
{ keys = [ "escape" ]; command = "show_tasks"; }
];
};
};
theme = {
selection = {
fg = "light_yellow";
bold = true;
};
visual_mode_selection = {
fg = "light_red";
bold = true;
};
selection.prefix = {
prefix = " ";
size = 2;
};
executable = {
fg = "light_green";
bold = true;
};
regular = {
fg = "white";
};
directory = {
fg = "light_blue";
bold = true;
};
link = {
fg = "cyan";
bold = true;
};
link_invalid = {
fg = "red";
bold = true;
};
socket = {
fg = "light_magenta";
bold = true;
};
ext = {
bmp.fg = "yellow";
gif.fg = "yellow";
heic.fg = "yellow";
jpg.fg = "yellow";
jpeg.fg = "yellow";
pgm.fg = "yellow";
png.fg = "yellow";
ppm.fg = "yellow";
svg.fg = "yellow";
wav.fg = "magenta";
flac.fg = "magenta";
mp3.fg = "magenta";
amr.fg = "magenta";
avi.fg = "magenta";
flv.fg = "magenta";
m3u.fg = "magenta";
m4a.fg = "magenta";
m4v.fg = "magenta";
mkv.fg = "magenta";
mov.fg = "magenta";
mp4.fg = "magenta";
mpg.fg = "magenta";
rmvb.fg = "magenta";
webm.fg = "magenta";
wmv.fg = "magenta";
"7z".fg = "red";
bz2.fg = "red";
gz.fg = "red";
rar.fg = "red";
tar.fg = "red";
tgz.fg = "red";
xz.fg = "red";
zip.fg = "red";
};
};
};
xdg.configFile = {
"joshuto/preview.sh" = {
executable = true;
text = /* bash */ ''
#!/usr/bin/env bash
IFS=$'\n'
set -o noclobber -o noglob -o nounset -o pipefail
FILE_PATH=""
PREVIEW_WIDTH=10
PREVIEW_HEIGHT=10
while [ "$#" -gt 0 ]; do
case "$1" in
"--path")
shift
FILE_PATH="$1"
;;
"--preview-width")
shift
PREVIEW_WIDTH="$1"
;;
"--preview-height")
shift
PREVIEW_HEIGHT="$1"
;;
esac
shift
done
realpath=$(realpath "$FILE_PATH")
handle_extension() {
case "''${FILE_EXTENSION_LOWER}" in
lock)
cat "''${FILE_PATH}" && exit 0
exit 1;;
rar)
lsar "''${FILE_PATH}" && exit 0
exit 1;;
7z)
7z l -p -- "''${FILE_PATH}" && exit 0
exit 1;;
pdf)
pdftotext -l 10 -nopgbrk -q -- "''${FILE_PATH}" - | \
fmt -w "''${PREVIEW_WIDTH}" && exit 0
mutool draw -F txt -i -- "''${FILE_PATH}" 1-10 | \
fmt -w "''${PREVIEW_WIDTH}" && exit 0
exiftool "''${FILE_PATH}" && exit 0
exit 1;;
torrent)
transmission-show -- "''${FILE_PATH}" && exit 0
exit 1;;
json)
jq --color-output . "''${FILE_PATH}" && exit 0
;;
esac
}
handle_mime() {
local mimetype="''${1}"
case "''${mimetype}" in
## Text
text/* | */xml)
bat --color=always --paging=never \
--style=plain \
--terminal-width="''${PREVIEW_WIDTH}" \
"''${FILE_PATH}" && exit 0
cat "''${FILE_PATH}" && exit 0
exit 1;;
## Image
image/*)
exit 5;;
## Video and audio
video/* | audio/*)
echo "$realpath"
mediainfo "''${FILE_PATH}" && exit 0
exiftool "''${FILE_PATH}" && exit 0
exit 1;;
esac
}
FILE_EXTENSION="''${FILE_PATH##*.}"
FILE_EXTENSION_LOWER="$(printf "%s" "''${FILE_EXTENSION}" | tr '[:upper:]' '[:lower:]')"
handle_extension
MIMETYPE="$( file --dereference --brief --mime-type -- "''${FILE_PATH}" )"
handle_mime "''${MIMETYPE}"
exit 1
'';
};
"joshuto/kitty-show.sh" = {
executable = true;
text = /* bash */ ''
#!/usr/bin/env bash
FILE_PATH="$1" # Full path of the previewed file
PREVIEW_X_COORD="$2" # x coordinate of upper left cell of preview area
PREVIEW_Y_COORD="$3" # y coordinate of upper left cell of preview area
PREVIEW_WIDTH="$4" # Width of the preview pane (number of fitting characters)
PREVIEW_HEIGHT="$5" # Height of the preview pane (number of fitting characters)
TMP_FILE="$HOME/.cache/joshuto/thumbcache.png"
mimetype=$(file --mime-type -Lb "$FILE_PATH")
function image {
kitty +kitten icat \
--transfer-mode=file \
--clear 2>/dev/null
kitty +kitten icat \
--transfer-mode=file \
--place "''${PREVIEW_WIDTH}x''${PREVIEW_HEIGHT}@''${PREVIEW_X_COORD}x''${PREVIEW_Y_COORD}" \
"$1" 2>/dev/null
}
case "$mimetype" in
image/*)
image "''${FILE_PATH}"
;;
*)
kitty +kitten icat \
--transfer-mode=file \
--clear 2>/dev/null
;;
esac
'';
};
"joshuto/kitty-remove.sh" = {
executable = true;
text = /* bash */ ''
#!/usr/bin/env bash
kitty +kitten icat --transfer-mode=file --clear 2>/dev/null
'';
};
};
xdg.configFile."joshuto/icons.toml".text = /* toml */ ''
# Default fallback icons
[defaults]
file = ""
directory = ""
# Directory exact match icons
[directory_exact]
# English
".git" = ""
"Desktop" = ""
"Documents" = ""
"Downloads" = ""
"Dotfiles" = ""
"Dropbox" = ""
"Music" = ""
"Pictures" = ""
"Public" = ""
"Templates" = ""
"Videos" = ""
# File exact match icons
[file_exact]
".bash_aliases" = ""
".bash_history" = ""
".bash_logout" = ""
".bash_profile" = ""
".bashprofile" = ""
".bashrc" = ""
".dmrc" = ""
".DS_Store" = ""
".fasd" = ""
".fehbg" = ""
".gitattributes" = ""
".gitconfig" = ""
".gitignore" = ""
".gitlab-ci.yml" = ""
".gvimrc" = ""
".inputrc" = ""
".jack-settings" = ""
".mime.types" = ""
".ncmpcpp" = ""
".nvidia-settings-rc" = ""
".pam_environment" = ""
".profile" = ""
".recently-used" = ""
".selected_editor" = ""
".vim" = ""
".viminfo" = ""
".vimrc" = ""
".Xauthority" = ""
".Xdefaults" = ""
".xinitrc" = ""
".xinputrc" = ""
".Xresources" = ""
".zshrc" = ""
"_gvimrc" = ""
"_vimrc" = ""
"a.out" = ""
"authorized_keys" = ""
"bspwmrc" = ""
"cmakelists.txt" = ""
"config" = ""
"config.ac" = ""
"config.m4" = ""
"config.mk" = ""
"config.ru" = ""
"configure" = ""
"docker-compose.yml" = ""
"dockerfile" = ""
"Dockerfile" = ""
"dropbox" = ""
"exact-match-case-sensitive-1.txt" = "X1"
"exact-match-case-sensitive-2" = "X2"
"favicon.ico" = ""
"gemfile" = ""
"gruntfile.coffee" = ""
"gruntfile.js" = ""
"gruntfile.ls" = ""
"gulpfile.coffee" = ""
"gulpfile.js" = ""
"gulpfile.ls" = ""
"ini" = ""
"known_hosts" = ""
"ledger" = ""
"license" = ""
"LICENSE" = ""
"LICENSE.md" = ""
"LICENSE.txt" = ""
"Makefile" = ""
"makefile" = ""
"Makefile.ac" = ""
"Makefile.in" = ""
"mimeapps.list" = ""
"mix.lock" = ""
"node_modules" = ""
"package-lock.json" = ""
"package.json" = ""
"playlists" = ""
"procfile" = ""
"Rakefile" = ""
"rakefile" = ""
"react.jsx" = ""
"README" = ""
"README.markdown" = ""
"README.md" = ""
"README.rst" = ""
"README.txt" = ""
"sxhkdrc" = ""
"user-dirs.dirs" = ""
"webpack.config.js" = ""
# File extension match
[ext]
"7z" = ""
"a" = ""
"ai" = ""
"apk" = ""
"asm" = ""
"asp" = ""
"aup" = ""
"avi" = ""
"awk" = ""
"bash" = ""
"bat" = ""
"bmp" = ""
"bz2" = ""
"c" = ""
"c++" = ""
"cab" = ""
"cbr" = ""
"cbz" = ""
"cc" = ""
"class" = ""
"clj" = ""
"cljc" = ""
"cljs" = ""
"cmake" = ""
"coffee" = ""
"conf" = ""
"cp" = ""
"cpio" = ""
"cpp" = ""
"cs" = ""
"csh" = ""
"css" = ""
"cue" = ""
"cvs" = ""
"cxx" = ""
"d" = ""
"dart" = ""
"db" = ""
"deb" = ""
"diff" = ""
"dll" = ""
"doc" = ""
"docx" = ""
"dump" = ""
"edn" = ""
"eex" = ""
"efi" = ""
"ejs" = ""
"elf" = ""
"elm" = ""
"epub" = ""
"erl" = ""
"ex" = ""
"exe" = ""
"exs" = ""
"f//" = ""
"fifo" = "|"
"fish" = ""
"flac" = ""
"flv" = ""
"fs" = ""
"fsi" = ""
"fsscript" = ""
"fsx" = ""
"gem" = ""
"gemspec" = ""
"gif" = ""
"go" = ""
"gz" = ""
"gzip" = ""
"h" = ""
"haml" = ""
"hbs" = ""
"hh" = ""
"hpp" = ""
"hrl" = ""
"hs" = ""
"htaccess" = ""
"htm" = ""
"html" = ""
"htpasswd" = ""
"hxx" = ""
"ico" = ""
"img" = ""
"ini" = ""
"iso" = ""
"jar" = ""
"java" = ""
"jl" = ""
"jpeg" = ""
"jpg" = ""
"js" = ""
"json" = ""
"jsx" = ""
"key" = ""
"ksh" = ""
"leex" = ""
"less" = ""
"lha" = ""
"lhs" = ""
"log" = ""
"lua" = ""
"lzh" = ""
"lzma" = ""
"m4a" = ""
"m4v" = ""
"markdown" = ""
"md" = ""
"mdx" = ""
"mjs" = ""
"mkv" = ""
"ml" = "λ"
"mli" = "λ"
"mov" = ""
"mp3" = ""
"mp4" = ""
"mpeg" = ""
"mpg" = ""
"msi" = ""
"mustache" = ""
"nix" = ""
"o" = ""
"ogg" = ""
"pdf" = ""
"php" = ""
"pl" = ""
"pm" = ""
"png" = ""
"pp" = ""
"ppt" = ""
"pptx" = ""
"ps1" = ""
"psb" = ""
"psd" = ""
"pub" = ""
"py" = ""
"pyc" = ""
"pyd" = ""
"pyo" = ""
"r" = ""
"rake" = ""
"rar" = ""
"rb" = ""
"rc" = ""
"rlib" = ""
"rmd" = ""
"rom" = ""
"rpm" = ""
"rproj" = ""
"rs" = ""
"rss" = ""
"rtf" = ""
"s" = ""
"sass" = ""
"scala" = ""
"scss" = ""
"sh" = ""
"slim" = ""
"sln" = ""
"so" = ""
"sql" = ""
"styl" = ""
"suo" = ""
"swift" = ""
"t" = ""
"tar" = ""
"tex" = ""
"tgz" = ""
"toml" = ""
"ts" = ""
"tsx" = ""
"twig" = ""
"vim" = ""
"vimrc" = ""
"vue" = ""
"wav" = ""
"webm" = ""
"webmanifest" = ""
"webp" = ""
"xbps" = ""
"xcplayground" = ""
"xhtml" = ""
"xls" = ""
"xlsx" = ""
"xml" = ""
"xul" = ""
"xz" = ""
"yaml" = ""
"yml" = ""
"zip" = ""
"zsh" = ""
'';
}

View File

@ -1,5 +1,21 @@
{
programs.kitty = {
enable = true;
settings = {
enable_audio_bell = false;
close_on_child_death = true;
cursor_blink_interval = 0;
background_opacity = "0.8";
open_url_with = "librewolf";
wayland_titlebar_color = "background";
allow_remote_control = true;
listen_on = "unix:/tmp/kitty";
dynamic_background_opacity = true;
window_padding_width = 5;
tab_bar_margin_width = 5;
};
};
}

9
home/librewolf.nix Normal file
View File

@ -0,0 +1,9 @@
{
programs.librewolf = {
enable = true;
settings = {
"ui.use_activity_cursor" = true;
};
};
}

45
home/mpv.nix Normal file
View File

@ -0,0 +1,45 @@
{ pkgs, ... }:
{
programs.mpv = {
enable = true;
config = {
profile = "gpu-hq";
scale = "ewa_lanczossharp";
cscale = "ewa_lanczossharp";
video-sync = "display-resample";
interpolation = true;
tscale = "oversample";
sub-auto = "fuzzy";
sub-font = "Noto Sans CJK JP Medium";
sub-blur = 10;
sub-file-paths = "subs:subtitles:";
screenshot-format = "png";
title = "\${filename} - mpv";
script-opts = "osc-title=\${filename},osc-boxalpha=150,osc-visibility=never,osc-boxvideo=yes";
osc = "no";
osd-on-seek = "no";
osd-bar = "no";
osd-bar-w = 30;
osd-bar-h = "0.2";
osd-duration = 750;
really-quiet = "yes";
autofit = "65%";
};
bindings = {
"ctrl+shift+a" = "script-message osc-visibility cycle";
};
scripts = with pkgs.mpvScripts; [
mpris
thumbnail
];
};
}

View File

@ -1,7 +1,7 @@
{ config, pkgs, ...}:
{
home.sessionVariables.Editor = "nvim";
home.sessionVariables.EDITOR = "nvim";
programs = {
neovim = {

11
home/swaylock.nix Normal file
View File

@ -0,0 +1,11 @@
{
xdg.configFile."swaylog/config".text = ''
screenshots
clock
indicator
indicator-radius 100
effect-blur 7x5
fade-in 0.2
'';
}

336
home/waybar.nix Normal file
View File

@ -0,0 +1,336 @@
{
xdg.configFile."waybar/config".text = /* json */ ''
{
"layer": "top",
"position": "top",
"mod": "dock",
"height": 32,
"exclusive": true,
"passthrough": false,
"gtk-layer-shell": true,
"modules-left": ["custom/padd","custom/l_end","custom/power","custom/r_end","custom/l_end","wlr/taskbar","custom/r_end","","custom/padd"],
"modules-center": ["custom/padd","custom/l_end","clock","custom/r_end","custom/padd"],
"modules-right": ["custom/padd","custom/l_end","tray","custom/r_end","custom/l_end","network","bluetooth","pulseaudio","custom/r_end","custom/padd"],
"custom/power": {
"format": "{}",
"exec": "echo ; echo logout",
"on-click": "wlogout -b 2 -c 0 -r 0 -L 930 -R 930 -T 300 -B 300 --protocol layer-shell",
"interval" : 86400, // once every day
"tooltip": true
},
"wlr/taskbar": {
"format": "{icon}",
"icon-size": 18,
"icon-theme": "Tela-circle-dracula",
"spacing": 0,
"tooltip-format": "{title}",
"on-click": "activate",
"on-click-middle": "close",
"ignore-list": [
"Alacritty"
],
"app_ids-mapping": {
"firefoxdeveloperedition": "firefox-developer-edition"
}
},
"clock": {
"format": "{: %I:%M %p 󰃭 %a %d}",
"format-alt": "{:󰥔 %H:%M %b %Y}",
"tooltip-format": "<tt><big>{calendar}</big></tt>"
},
"tray": {
"icon-size": 18,
"spacing": 5
},
"network": {
// "interface": "wlp2*", // (Optional) To force the use of this interface
"format-wifi": "󰤨 {essid}",
"format-ethernet": "󱘖 Wired",
"tooltip-format": "󱘖 {ipaddr} {bandwidthUpBytes} {bandwidthDownBytes}",
"format-linked": "󱘖 {ifname} (No IP)",
"format-disconnected": " Disconnected",
"format-alt": "󰤨 {signalStrength}%",
"interval": 5
},
"bluetooth": {
"format": "",
"format-disabled": "", // an empty format will hide the module
"format-connected": " {num_connections}",
"tooltip-format": " {device_alias}",
"tooltip-format-connected": "{device_enumerate}",
"tooltip-format-enumerate-connected": " {device_alias}"
},
"pulseaudio": {
"format": "{icon} {volume}",
"format-muted": "",
"on-click": "pavucontrol -t 3",
"on-click-middle": "~/.config/hypr/scripts/volumecontrol.sh -o m",
"on-scroll-up": "~/.config/hypr/scripts/volumecontrol.sh -o i",
"on-scroll-down": "~/.config/hypr/scripts/volumecontrol.sh -o d",
"tooltip-format": "{icon} {desc} // {volume}%",
"scroll-step": 5,
"format-icons": {
"headphone": "",
"hands-free": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": ["", "", ""]
}
},
// "pulseaudio#microphone": {
// "format": "{format_source}",
// "format-source": "",
// "format-source-muted": "",
// "on-click": "pavucontrol -t 4",
// "on-click-middle": "~/.config/hypr/scripts/volumecontrol.sh -i m",
// "on-scroll-up": "~/.config/hypr/scripts/volumecontrol.sh -i i",
// "on-scroll-down": "~/.config/hypr/scripts/volumecontrol.sh -i d",
// "tooltip-format": "{format_source} {source_desc} // {source_volume}%",
// "scroll-step": 5
// },
// modules for padding //
"custom/l_end": {
"format": " ",
"interval" : "once",
"tooltip": false
},
"custom/r_end": {
"format": " ",
"interval" : "once",
"tooltip": false
},
"custom/sl_end": {
"format": " ",
"interval" : "once",
"tooltip": false
},
"custom/sr_end": {
"format": " ",
"interval" : "once",
"tooltip": false
},
"custom/rl_end": {
"format": " ",
"interval" : "once",
"tooltip": false
},
"custom/rr_end": {
"format": " ",
"interval" : "once",
"tooltip": false
},
"custom/padd": {
"format": " ",
"interval" : "once",
"tooltip": false
}
}
'';
xdg.configFile."waybar/style.css".text = /* css */ ''
* {
border: none;
border-radius: 0px;
font-family: "JetBrainsMono Nerd Font";
font-weight: bold;
font-size: 11px;
min-height: 10px;
}
@import "themes/Catppuccin-Mocha.css";
window#waybar {
background: @bar-bg;
}
tooltip {
background: @tool-bg;
color: @tool-color;
border-radius: 21px;
border-width: 1px;
border-style: solid;
border-color: @tool-border;
}
#workspaces button {
box-shadow: none;
text-shadow: none;
padding: 0px;
border-radius: 9px;
margin-top: 3px;
margin-bottom: 3px;
padding-left: 3px;
padding-right: 3px;
color: @wb-color;
animation: gradient_f 20s ease-in infinite;
transition: all 0.5s cubic-bezier(.55,-0.68,.48,1.682);
}
#workspaces button.active {
background: @wb-act-bg;
color: @wb-act-color;
margin-left: 3px;
padding-left: 12px;
padding-right: 12px;
margin-right: 3px;
animation: gradient_f 20s ease-in infinite;
transition: all 0.3s cubic-bezier(.55,-0.68,.48,1.682);
}
#workspaces button:hover {
background: @wb-hvr-bg;
color: @wb-hvr-color;
padding-left: 3px;
padding-right: 3px;
animation: gradient_f 20s ease-in infinite;
transition: all 0.3s cubic-bezier(.55,-0.68,.48,1.682);
}
#taskbar button {
box-shadow: none;
text-shadow: none;
padding: 0px;
border-radius: 9px;
margin-top: 3px;
margin-bottom: 3px;
padding-left: 3px;
padding-right: 3px;
color: @wb-color;
animation: gradient_f 20s ease-in infinite;
transition: all 0.5s cubic-bezier(.55,-0.68,.48,1.682);
}
#taskbar button.active {
background: @wb-act-bg;
color: @wb-act-color;
margin-left: 3px;
padding-left: 12px;
padding-right: 12px;
margin-right: 3px;
animation: gradient_f 20s ease-in infinite;
transition: all 0.3s cubic-bezier(.55,-0.68,.48,1.682);
}
#taskbar button:hover {
background: @wb-hvr-bg;
color: @wb-hvr-color;
padding-left: 3px;
padding-right: 3px;
animation: gradient_f 20s ease-in infinite;
transition: all 0.3s cubic-bezier(.55,-0.68,.48,1.682);
}
#cpu,
#memory,
#battery,
#clock,
#workspaces,
#window,
#taskbar,
#network,
#bluetooth,
#pulseaudio,
#mpris,
#custom-updates,
#custom-wallchange,
#custom-mode,
#custom-cliphist,
#custom-power,
#custom-wbar,
#custom-l_end,
#custom-r_end,
#custom-sl_end,
#custom-sr_end,
#custom-rl_end,
#custom-rr_end,
#tray {
color: @main-color;
background: @main-bg;
opacity: 1;
margin: 4px 0px 4px 0px;
padding-left: 4px;
padding-right: 4px;
}
#workspaces,
#taskbar {
padding: 0px;
}
#custom-r_end {
border-radius: 0px 21px 21px 0px;
margin-right: 9px;
padding-right: 3px;
}
#custom-l_end {
border-radius: 21px 0px 0px 21px;
margin-left: 9px;
padding-left: 3px;
}
#custom-sr_end {
border-radius: 0px;
margin-right: 9px;
padding-right: 3px;
}
#custom-sl_end {
border-radius: 0px;
margin-left: 9px;
padding-left: 3px;
}
#custom-rr_end {
border-radius: 0px 7px 7px 0px;
margin-right: 9px;
padding-right: 3px;
}
#custom-rl_end {
border-radius: 7px 0px 0px 7px;
margin-left: 9px;
padding-left: 3px;
}
'';
xdg.configFile."waybar/themes/Catppuccin-Mocha.css".text = ''
@define-color bar-bg rgba(0, 0, 0, 0);
@define-color main-color #cdd6f4;
@define-color main-bg #11111b;
@define-color tool-bg #1e1e2e;
@define-color tool-color #cdd6f4;
@define-color tool-border #11111b;
@define-color wb-color #cdd6f4;
@define-color wb-act-bg #a6adc8;
@define-color wb-act-color #313244;
@define-color wb-hvr-bg #f5c2e7;
@define-color wb-hvr-color #313244;
'';
}

6
home/xcursor.nix Normal file
View File

@ -0,0 +1,6 @@
{
home.file.".icons/default/index.theme".text = /* ini */ ''
[icon theme]
Inherits=phinger-cursors
'';
}

10
home/xresources.nix Normal file
View File

@ -0,0 +1,10 @@
{
xresources.properties = {
"Xft.hinting" = true;
"Xft.antialias" = true;
"Xft.autohint" = false;
"Xft.lcdfilter" = "lcddefault";
"Xft.hintstyle" = "hintfull";
"Xft.rgba" = "rgb";
};
}

3
modules/bluetooth.nix Normal file
View File

@ -0,0 +1,3 @@
{
hardware.bluetooth.enable = true;
}

View File

@ -2,6 +2,7 @@
boot.loader = {
systemd-boot = {
enable = true;
configurationLimit = 10;
};
efi.canTouchEfiVariables = true;
};

View File

@ -1,6 +1,9 @@
{
imports = [
./bluetooth.nix
./boot.nix
./fonts.nix
./greetd.nix
./home-manager.nix
./locale.nix
./hyprland.nix
@ -9,8 +12,11 @@
./packages.nix
./pipewire.nix
./security.nix
./starship.nix
./system.nix
./systemd.nix
./user.nix
./timezone.nix
./waybar.nix
];
}

29
modules/fonts.nix Normal file
View File

@ -0,0 +1,29 @@
{ pkgs, ... }:
{
fonts = {
enableDefaultFonts = false;
fonts = with pkgs; [
noto-fonts
noto-fonts-cjk-sans
noto-fonts-cjk-serif
noto-fonts-emoji
maple-mono
font-awesome
nerdfonts
kanji-stroke-order-font
liberation_ttf
];
fontconfig = {
defaultFonts = {
serif = [ "Noto Serif" ];
sansSerif = [ "Noto Sans" ];
monospace = [ "Noto Mono" ];
};
allowBitmaps = false;
};
};
}

21
modules/greetd.nix Normal file
View File

@ -0,0 +1,21 @@
{ pkgs, ... }:
{
services.greetd = {
enable = true;
restart = false;
settings = {
default_session = {
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd Hyprland";
user = "greeter";
};
initial_session = {
command = "${pkgs.hyprland}/bin/Hyprland";
user = "stefan";
};
};
};
}

View File

@ -1,8 +1,27 @@
{ inputs, pkgs, ... }: {
programs.hyprland = {
enable = true;
xwayland = {
enable = true;
hidpi = true;
};
};
environment.systemPackages = with pkgs; [
xdg-desktop-portal-hyprland
# hyprland-protocols
# xdg-desktop-portal
# xdg-desktop-portal-gtk
rofi-wayland # launcher
wl-clipboard # wayland clipboard support
swaylock-effects # screenlocker
swayidle # idle daemon (screen time out)
hyprpaper # Wallpaper daemon
];
security.pam.services.swaylock = { };
services.xserver = {
enable = true;
excludePackages = [ pkgs.xterm ];

View File

@ -1,7 +1,14 @@
{
nix.settings = {
experimental-features = "nix-command flakes"; # enable flakes
substituters = [ "https://hyprland.cachix.org" ]; # pre compiled hyprland packages
trusted-public-keys = [ "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" ];
nix = {
settings = {
experimental-features = "nix-command flakes"; # enable flakes
substituters = [ "https://hyprland.cachix.org" ]; # pre compiled hyprland packages
trusted-public-keys = [ "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" ];
};
gc = {
automatic= true;
dates = "daily";
options = "--delete-older-than 2d";
};
};
}

View File

@ -1,6 +1,20 @@
{ config, pkgs, ... }: {
environment.systemPackages = with pkgs; [
brightnessctl
dig
file
git
jq
mediainfo
neofetch
networkmanagerapplet
p7zip
pqiv
python3
ripgrep # rg in home/hyprland.nix
tree
wget
wlogout
wl-clipboard
];
}

74
modules/starship.nix Normal file
View File

@ -0,0 +1,74 @@
{
programs.starship = {
enable = true;
settings = {
add_newline = false;
directory = {
style = "purple";
read_only = " ro";
};
git_branch = {
style = "yellow";
symbol = "";
};
character = {
success_symbol = "[>](red)[>](green)[>](blue)";
error_symbol = "[>](cyan)[>](purple)[>](yellow)";
vicmd_symbol = "[<](bold green)";
};
line_break.disabled = true;
nodejs = {
format = "with [$symbol($version )]($style)";
symbol = "node ";
version_format = "\${major}";
disabled = true;
};
git_commit.tag_symbol = " tag ";
git_status = {
ahead = ">";
behind = "<";
diverged = "<>";
renamed = "r";
deleted = "x";
};
aws.symbol = "aws ";
cobol.symbol = "cobol ";
conda.symbol = "conda ";
crystal.symbol = "cr ";
cmake.symbol = "cmake ";
dart.symbol = "dart ";
deno.symbol = "deno ";
dotnet.symbol = ".NET ";
docker_context.symbol = "docker ";
elixir.symbol = "exs ";
elm.symbol = "elm ";
golang.symbol = "go ";
hg_branch.symbol = "hg ";
java.symbol = "java ";
julia.symbol = "jl ";
kotlin.symbol = "kt ";
memory_usage.symbol = "memory ";
nim.symbol = "nim ";
nix_shell.symbol = "nix ";
ocaml.symbol = "ml ";
package.symbol = "pkg ";
perl.symbol = "pl ";
php.symbol = "php ";
purescript.symbol = "purs ";
python.symbol = "python ";
ruby.symbol = "ruby ";
rust.symbol = "rust ";
scala.symbol = "scala ";
swift.symbol = "swift ";
};
};
}

46
modules/stylix.nix Normal file
View File

@ -0,0 +1,46 @@
{ pkgs, ... }:
let
theme = "monokai";
opacity = 0.95;
font-size = 11;
in
{
stylix.image = ../assets/wallpaper.png;
stylix.polarity = "dark";
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/${theme}.yaml";
stylix.opacity = {
terminal = opacity;
popups = opacity;
};
stylix.fonts = {
serif = {
package = pkgs.noto-fonts-cjk-sans;
name = "Noto Sans CJK JP";
};
sansSerif = {
package = pkgs.noto-fonts-cjk-sans;
name = "Noto Sans CJK JP";
};
monospace = {
package = pkgs.maple-mono;
name = "Maple Mono";
};
emoji = {
package = pkgs.noto-fonts-emoji;
name = "Noto Color Emoji";
};
sizes = {
applications = font-size;
desktop = font-size;
popups = font-size;
terminal = font-size;
};
};
}

6
modules/systemd.nix Normal file
View File

@ -0,0 +1,6 @@
{
systemd = {
extraConfig = "DefaultTimeoutStopSec = 10s";
services.NetworkManager-wait-online.enable = false;
};
}

3
modules/waybar.nix Normal file
View File

@ -0,0 +1,3 @@
{
programs.waybar.enable = true;
}

120
scripts/waybar-wttr.py Normal file
View File

@ -0,0 +1,120 @@
#!/usr/bin/env python
import json
import requests
from datetime import datetime
WEATHER_CODES = {
'113': '☀️ ',
'116': '',
'119': '☁️ ',
'122': '☁️ ',
'143': '☁️ ',
'176': '🌧️',
'179': '🌧️',
'182': '🌧️',
'185': '🌧️',
'200': '⛈️ ',
'227': '🌨️',
'230': '🌨️',
'248': '☁️ ',
'260': '☁️ ',
'263': '🌧️',
'266': '🌧️',
'281': '🌧️',
'284': '🌧️',
'293': '🌧️',
'296': '🌧️',
'299': '🌧️',
'302': '🌧️',
'305': '🌧️',
'308': '🌧️',
'311': '🌧️',
'314': '🌧️',
'317': '🌧️',
'320': '🌨️',
'323': '🌨️',
'326': '🌨️',
'329': '❄️ ',
'332': '❄️ ',
'335': '❄️ ',
'338': '❄️ ',
'350': '🌧️',
'353': '🌧️',
'356': '🌧️',
'359': '🌧️',
'362': '🌧️',
'365': '🌧️',
'368': '🌧️',
'371': '❄️',
'374': '🌨️',
'377': '🌨️',
'386': '🌨️',
'389': '🌨️',
'392': '🌧️',
'395': '❄️ '
}
data = {}
weather = requests.get("https://wttr.in/?format=j1").json()
def format_time(time):
return time.replace("00", "").zfill(2)
def format_temp(temp):
return (hour['FeelsLikeF']+"°").ljust(3)
def format_chances(hour):
chances = {
"chanceoffog": "Fog",
"chanceoffrost": "Frost",
"chanceofovercast": "Overcast",
"chanceofrain": "Rain",
"chanceofsnow": "Snow",
"chanceofsunshine": "Sunshine",
"chanceofthunder": "Thunder",
"chanceofwindy": "Wind"
}
conditions = []
for event in chances.keys():
if int(hour[event]) > 0:
conditions.append(chances[event]+" "+hour[event]+"%")
return ", ".join(conditions)
tempint = int(weather['current_condition'][0]['FeelsLikeF'])
extrachar = ''
if tempint > 0 and tempint < 10:
extrachar = '+'
data['text'] = ''+WEATHER_CODES[weather['current_condition'][0]['weatherCode']] + \
" "+extrachar+weather['current_condition'][0]['FeelsLikeF']+"°"
data['tooltip'] = f"<b>{weather['current_condition'][0]['weatherDesc'][0]['value']} {weather['current_condition'][0]['temp_C']}°</b>\n"
data['tooltip'] += f"Feels like: {weather['current_condition'][0]['FeelsLikeF']}°\n"
data['tooltip'] += f"Wind: {weather['current_condition'][0]['windspeedKmph']}Km/h\n"
data['tooltip'] += f"Humidity: {weather['current_condition'][0]['humidity']}%\n"
for i, day in enumerate(weather['weather']):
data['tooltip'] += f"\n<b>"
if i == 0:
data['tooltip'] += "Today, "
if i == 1:
data['tooltip'] += "Tomorrow, "
data['tooltip'] += f"{day['date']}</b>\n"
data['tooltip'] += f"⬆️ {day['maxtempF']}° ⬇️ {day['mintempF']}° "
data['tooltip'] += f"🌅 {day['astronomy'][0]['sunrise']} 🌇 {day['astronomy'][0]['sunset']}\n"
for hour in day['hourly']:
if i == 0:
if int(format_time(hour['time'])) < datetime.now().hour-2:
continue
data['tooltip'] += f"{format_time(hour['time'])} {WEATHER_CODES[hour['weatherCode']]} {format_temp(hour['FeelsLikeF'])} {hour['weatherDesc'][0]['value']}, {format_chances(hour)}\n"
print(json.dumps(data))