1
0
forked from extern/nix-config

nix: Format with alejandra

Alejandra is written in Rust, has more tests than nixfmt, and handles
non-trivial code examples in Nix better.
This commit is contained in:
Donovan Glover 2023-06-05 20:37:52 -04:00
parent 1077200205
commit 3119b789f8
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65
41 changed files with 1773 additions and 1698 deletions

View File

@ -1,6 +1,12 @@
{ pkgs, lib, hypr-contrib, nix-gaming, ... }: {
pkgs,
let VARIABLES = import ./variables.nix; in { lib,
hypr-contrib,
nix-gaming,
...
}: let
VARIABLES = import ./variables.nix;
in {
imports = [ imports = [
./modules ./modules
./containers/rar.nix ./containers/rar.nix
@ -9,12 +15,11 @@ let VARIABLES = import ./variables.nix; in {
# locale # locale
i18n.defaultLocale = "ja_JP.UTF-8"; i18n.defaultLocale = "ja_JP.UTF-8";
i18n.supportedLocales = i18n.supportedLocales = ["ja_JP.UTF-8/UTF-8" "en_US.UTF-8/UTF-8" "fr_FR.UTF-8/UTF-8"];
[ "ja_JP.UTF-8/UTF-8" "en_US.UTF-8/UTF-8" "fr_FR.UTF-8/UTF-8" ];
# nix # nix
nix.package = pkgs.nixFlakes; nix.package = pkgs.nixFlakes;
nix.settings.experimental-features = [ "nix-command" "flakes" "repl-flake" ]; nix.settings.experimental-features = ["nix-command" "flakes" "repl-flake"];
hardware.opengl.driSupport32Bit = true; hardware.opengl.driSupport32Bit = true;
@ -36,8 +41,8 @@ let VARIABLES = import ./variables.nix; in {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
hypr-contrib.packages."${VARIABLES.system}".grimblast hypr-contrib.packages."${VARIABLES.system}".grimblast
nix-gaming.packages."${VARIABLES.system}".osu-stable nix-gaming.packages."${VARIABLES.system}".osu-stable
(pkgs.callPackage ./packages/waycorner { }) (pkgs.callPackage ./packages/waycorner {})
(pkgs.callPackage ./packages/srb2 { }) (pkgs.callPackage ./packages/srb2 {})
slade slade
typespeed typespeed
osu-lazer-bin osu-lazer-bin
@ -72,10 +77,11 @@ let VARIABLES = import ./variables.nix; in {
bacon bacon
]; ];
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ nixpkgs.config.allowUnfreePredicate = pkg:
"osu-lazer-bin" builtins.elem (lib.getName pkg) [
"vmware-workstation" "osu-lazer-bin"
]; "vmware-workstation"
];
environment.sessionVariables = { environment.sessionVariables = {
EDITOR = "nvim"; EDITOR = "nvim";
@ -85,7 +91,7 @@ let VARIABLES = import ./variables.nix; in {
NODE_OPTIONS = "--max_old_space_size=16384"; NODE_OPTIONS = "--max_old_space_size=16384";
}; };
environment.defaultPackages = [ ]; environment.defaultPackages = [];
system.stateVersion = "22.11"; system.stateVersion = "22.11";
# home-manager # home-manager
@ -93,41 +99,43 @@ let VARIABLES = import ./variables.nix; in {
useGlobalPkgs = true; useGlobalPkgs = true;
useUserPackages = true; useUserPackages = true;
sharedModules = [{ sharedModules = [
home.stateVersion = "22.11"; {
home.stateVersion = "22.11";
editorconfig = { editorconfig = {
enable = true; enable = true;
settings = { settings = {
"*" = { "*" = {
charset = "utf-8"; charset = "utf-8";
end_of_line = "lf"; end_of_line = "lf";
insert_final_newline = true; insert_final_newline = true;
indent_size = 2; indent_size = 2;
indent_style = "space"; indent_style = "space";
trim_trailing_whitespace = true; trim_trailing_whitespace = true;
}; };
"*.md".indent_style = "tab"; "*.md".indent_style = "tab";
"Makefile" = { "Makefile" = {
indent_style = "tab"; indent_style = "tab";
indent_size = 4; indent_size = 4;
}; };
"*.html" = { "*.html" = {
indent_style = "tab"; indent_style = "tab";
indent_size = 4; indent_size = 4;
}; };
"*.go" = { "*.go" = {
indent_style = "tab"; indent_style = "tab";
indent_size = 4; indent_size = 4;
};
}; };
}; };
}; }
}]; ];
}; };
# systemd # systemd
@ -149,7 +157,7 @@ let VARIABLES = import ./variables.nix; in {
isNormalUser = true; isNormalUser = true;
uid = 1000; uid = 1000;
password = "user"; password = "user";
extraGroups = [ "wheel" "networkmanager" ]; extraGroups = ["wheel" "networkmanager"];
}; };
}; };
@ -171,7 +179,7 @@ let VARIABLES = import ./variables.nix; in {
wifi.macAddress = "random"; wifi.macAddress = "random";
ethernet.macAddress = "random"; ethernet.macAddress = "random";
unmanaged = [ "interface-name:ve-*" ]; unmanaged = ["interface-name:ve-*"];
}; };
useHostResolvConf = true; useHostResolvConf = true;
@ -189,8 +197,7 @@ let VARIABLES = import ./variables.nix; in {
restrictNetwork = true; restrictNetwork = true;
}; };
virtualisation.qemu.options = virtualisation.qemu.options = ["-device virtio-vga-gl" "-display sdl,gl=on,show-cursor=off" "-full-screen"];
[ "-device virtio-vga-gl" "-display sdl,gl=on,show-cursor=off" "-full-screen" ];
environment.sessionVariables = { environment.sessionVariables = {
WLR_NO_HARDWARE_CURSORS = "1"; WLR_NO_HARDWARE_CURSORS = "1";
@ -203,12 +210,12 @@ let VARIABLES = import ./variables.nix; in {
enableExcludeWrapper = false; enableExcludeWrapper = false;
}; };
networking.firewall.allowedTCPPorts = [ 11918 ]; networking.firewall.allowedTCPPorts = [11918];
networking = { networking = {
nat = { nat = {
enable = true; enable = true;
internalInterfaces = [ "ve-+" ]; internalInterfaces = ["ve-+"];
externalInterface = "wg-mullvad"; externalInterface = "wg-mullvad";
forwardPorts = [ forwardPorts = [

View File

@ -9,7 +9,11 @@
}; };
}; };
config = { pkgs, lib, ... }: { config = {
pkgs,
lib,
...
}: {
programs = { programs = {
fish.enable = true; fish.enable = true;
neovim.enable = true; neovim.enable = true;
@ -28,13 +32,13 @@
}; };
environment = { environment = {
shells = with pkgs; [ fish ]; shells = with pkgs; [fish];
variables = { variables = {
TERM = "xterm-kitty"; TERM = "xterm-kitty";
}; };
defaultPackages = [ ]; defaultPackages = [];
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
@ -43,10 +47,11 @@
unrar unrar
]; ];
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ nixpkgs.config.allowUnfreePredicate = pkg:
"rar" builtins.elem (lib.getName pkg) [
"unrar" "rar"
]; "unrar"
];
system.stateVersion = "22.11"; system.stateVersion = "22.11";
}; };

View File

@ -1,8 +1,6 @@
{ config, ... }: {config, ...}: let
hostCfg = config;
let hostCfg = config; in in {
{
containers.wine = { containers.wine = {
privateNetwork = true; privateNetwork = true;
@ -24,7 +22,11 @@ let hostCfg = config; in
}; };
}; };
config = { pkgs, lib, ... }: { config = {
pkgs,
lib,
...
}: {
programs = { programs = {
fish.enable = true; fish.enable = true;
neovim.enable = true; neovim.enable = true;
@ -43,13 +45,13 @@ let hostCfg = config; in
}; };
environment = { environment = {
shells = with pkgs; [ fish ]; shells = with pkgs; [fish];
variables = { variables = {
TERM = "xterm-kitty"; TERM = "xterm-kitty";
}; };
defaultPackages = [ ]; defaultPackages = [];
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View File

@ -1,5 +1,13 @@
{ {
outputs = { self, nixpkgs, home-manager, hyprland, stylix, nix-gaming, ... }@attrs: let outputs = {
self,
nixpkgs,
home-manager,
hyprland,
stylix,
nix-gaming,
...
} @ attrs: let
VARIABLES = import ./variables.nix; VARIABLES = import ./variables.nix;
in { in {
formatter."${VARIABLES.system}" = nixpkgs.legacyPackages."${VARIABLES.system}".alejandra; formatter."${VARIABLES.system}" = nixpkgs.legacyPackages."${VARIABLES.system}".alejandra;

View File

@ -1,28 +1,32 @@
{ config, lib, pkgs, modulesPath, ... }:
{ {
imports = config,
[ (modulesPath + "/installer/scan/not-detected.nix") lib,
]; pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "sd_mod" ]; boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "usb_storage" "sd_mod"];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [];
boot.kernelModules = [ "kvm-amd" ]; boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-label/nixos"; device = "/dev/disk/by-label/nixos";
fsType = "btrfs"; fsType = "btrfs";
}; };
boot.initrd.luks.devices."root".device = "/dev/disk/by-label/nixos-luks"; boot.initrd.luks.devices."root".device = "/dev/disk/by-label/nixos-luks";
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-label/boot"; device = "/dev/disk/by-label/boot";
fsType = "vfat"; fsType = "vfat";
}; };
swapDevices = [ ]; swapDevices = [];
networking.useDHCP = lib.mkDefault true; networking.useDHCP = lib.mkDefault true;

View File

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
imports = [ imports = [
./feh ./feh
./kitty ./kitty
@ -126,18 +124,20 @@
swww swww
kickoff kickoff
greetd.tuigreet greetd.tuigreet
(pkgs.callPackage ../packages/nwg-dock { }) (pkgs.callPackage ../packages/nwg-dock {})
(pkgs.callPackage ../packages/hyprland-autorename-workspaces { }) (pkgs.callPackage ../packages/hyprland-autorename-workspaces {})
]; ];
home-manager.sharedModules = [{ home-manager.sharedModules = [
programs.bat.enable = true; {
}]; programs.bat.enable = true;
}
];
programs.htop = { programs.htop = {
enable = true; enable = true;
package = pkgs."htop-vim"; package = pkgs."htop-vim";
settings = { tree_view = 1; }; settings = {tree_view = 1;};
}; };
services.greetd = { services.greetd = {

View File

@ -1,9 +1,7 @@
{ pkgs, ... }: {pkgs, ...}: {
{
services.interception-tools = { services.interception-tools = {
enable = true; enable = true;
plugins = [ pkgs.interception-tools-plugins.dual-function-keys ]; plugins = [pkgs.interception-tools-plugins.dual-function-keys];
udevmonConfig = '' udevmonConfig = ''
- JOB: "${pkgs.interception-tools}/bin/intercept -g $DEVNODE | ${pkgs.interception-tools-plugins.dual-function-keys}/bin/dual-function-keys -c /etc/dual-function-keys.yaml | ${pkgs.interception-tools}/bin/uinput -d $DEVNODE" - JOB: "${pkgs.interception-tools}/bin/intercept -g $DEVNODE | ${pkgs.interception-tools-plugins.dual-function-keys}/bin/dual-function-keys -c /etc/dual-function-keys.yaml | ${pkgs.interception-tools}/bin/uinput -d $DEVNODE"
DEVICE: DEVICE:

View File

@ -1,30 +1,30 @@
{ pkgs, ... }: {pkgs, ...}: {
environment.systemPackages = [pkgs.libnotify];
{ home-manager.sharedModules = [
environment.systemPackages = [ pkgs.libnotify ]; {
services.dunst = {
enable = true;
home-manager.sharedModules = [{ settings = {
services.dunst = { global = {
enable = true; geometry = "1870x5-25+45";
width = 350;
settings = { separator_height = 5;
global = { padding = 24;
geometry = "1870x5-25+45"; horizontal_padding = 24;
width = 350; frame_width = 3;
separator_height = 5; idle_threshold = 120;
padding = 24; alignment = "center";
horizontal_padding = 24; word_wrap = "yes";
frame_width = 3; transparency = 5;
idle_threshold = 120; format = "<b>%s</b>: %b";
alignment = "center"; markup = "full";
word_wrap = "yes"; min_icon_size = 128;
transparency = 5; max_icon_size = 128;
format = "<b>%s</b>: %b"; };
markup = "full";
min_icon_size = 128;
max_icon_size = 128;
}; };
}; };
}; }
}]; ];
} }

View File

@ -1,173 +1,173 @@
{ pkgs, ... }: {pkgs, ...}: {
{
i18n.inputMethod.enabled = "fcitx5"; i18n.inputMethod.enabled = "fcitx5";
i18n.inputMethod.fcitx5.addons = [ pkgs.fcitx5-mozc ]; i18n.inputMethod.fcitx5.addons = [pkgs.fcitx5-mozc];
home-manager.sharedModules = [{ home-manager.sharedModules = [
xdg.configFile."mozc/ibus_config.textproto".force = true; {
xdg.configFile."mozc/ibus_config.textproto".text = '' xdg.configFile."mozc/ibus_config.textproto".force = true;
engines { xdg.configFile."mozc/ibus_config.textproto".text = ''
name : "mozc-jp" engines {
longname : "Mozc" name : "mozc-jp"
layout : "default" longname : "Mozc"
layout_variant : "" layout : "default"
layout_option : "" layout_variant : ""
rank : 80 layout_option : ""
} rank : 80
active_on_launch: True }
''; active_on_launch: True
xdg.configFile."fcitx5/config".force = true; '';
xdg.configFile."fcitx5/config".text = '' xdg.configFile."fcitx5/config".force = true;
[Hotkey] xdg.configFile."fcitx5/config".text = ''
# Enumerate when press trigger key repeatedly [Hotkey]
EnumerateWithTriggerKeys=True # Enumerate when press trigger key repeatedly
# Temporally switch between first and current Input Method EnumerateWithTriggerKeys=True
AltTriggerKeys= # Temporally switch between first and current Input Method
# Enumerate Input Method Forward AltTriggerKeys=
EnumerateForwardKeys= # Enumerate Input Method Forward
# Enumerate Input Method Backward EnumerateForwardKeys=
EnumerateBackwardKeys= # Enumerate Input Method Backward
# Skip first input method while enumerating EnumerateBackwardKeys=
EnumerateSkipFirst=False # Skip first input method while enumerating
# Enumerate Input Method Group Forward EnumerateSkipFirst=False
EnumerateGroupForwardKeys= # Enumerate Input Method Group Forward
# Enumerate Input Method Group Backward EnumerateGroupForwardKeys=
EnumerateGroupBackwardKeys= # Enumerate Input Method Group Backward
# Activate Input Method EnumerateGroupBackwardKeys=
ActivateKeys= # Activate Input Method
# Deactivate Input Method ActivateKeys=
DeactivateKeys= # Deactivate Input Method
DeactivateKeys=
[Hotkey/TriggerKeys] [Hotkey/TriggerKeys]
0=Super+space 0=Super+space
[Hotkey/PrevPage] [Hotkey/PrevPage]
0=Up 0=Up
[Hotkey/NextPage] [Hotkey/NextPage]
0=Down 0=Down
[Hotkey/PrevCandidate] [Hotkey/PrevCandidate]
0=Shift+Tab 0=Shift+Tab
[Hotkey/NextCandidate] [Hotkey/NextCandidate]
0=Tab 0=Tab
[Hotkey/TogglePreedit] [Hotkey/TogglePreedit]
0=Control+Alt+P 0=Control+Alt+P
[Behavior] [Behavior]
# Active By Default # Active By Default
ActiveByDefault=False ActiveByDefault=False
# Share Input State # Share Input State
ShareInputState=No ShareInputState=No
# Show preedit in application # Show preedit in application
PreeditEnabledByDefault=True PreeditEnabledByDefault=True
# Show Input Method Information when switch input method # Show Input Method Information when switch input method
ShowInputMethodInformation=True ShowInputMethodInformation=True
# Show Input Method Information when changing focus # Show Input Method Information when changing focus
showInputMethodInformationWhenFocusIn=False showInputMethodInformationWhenFocusIn=False
# Show compact input method information # Show compact input method information
CompactInputMethodInformation=True CompactInputMethodInformation=True
# Show first input method information # Show first input method information
ShowFirstInputMethodInformation=True ShowFirstInputMethodInformation=True
# Default page size # Default page size
DefaultPageSize=5 DefaultPageSize=5
# Override Xkb Option # Override Xkb Option
OverrideXkbOption=False OverrideXkbOption=False
# Custom Xkb Option # Custom Xkb Option
CustomXkbOption= CustomXkbOption=
# Force Enabled Addons # Force Enabled Addons
EnabledAddons= EnabledAddons=
# Force Disabled Addons # Force Disabled Addons
DisabledAddons= DisabledAddons=
# Preload input method to be used by default # Preload input method to be used by default
PreloadInputMethod=True PreloadInputMethod=True
''; '';
xdg.configFile."fcitx5/profile".force = true; xdg.configFile."fcitx5/profile".force = true;
xdg.configFile."fcitx5/profile".text = '' xdg.configFile."fcitx5/profile".text = ''
[Groups/0] [Groups/0]
# Group Name # Group Name
Name="Group 1" Name="Group 1"
# Layout # Layout
Default Layout=us Default Layout=us
# Default Input Method # Default Input Method
DefaultIM=mozc DefaultIM=mozc
[Groups/0/Items/0] [Groups/0/Items/0]
# Name # Name
Name=keyboard-us Name=keyboard-us
# Layout # Layout
Layout= Layout=
[Groups/0/Items/1] [Groups/0/Items/1]
# Name # Name
Name=mozc Name=mozc
# Layout # Layout
Layout= Layout=
[GroupOrder] [GroupOrder]
0="Group 1" 0="Group 1"
''; '';
xdg.configFile."fcitx5/conf/classicui.conf".force = true; xdg.configFile."fcitx5/conf/classicui.conf".force = true;
xdg.configFile."fcitx5/conf/classicui.conf".text = '' xdg.configFile."fcitx5/conf/classicui.conf".text = ''
# Vertical Candidate List # Vertical Candidate List
Vertical Candidate List=False Vertical Candidate List=False
# Use Per Screen DPI # Use Per Screen DPI
PerScreenDPI=True PerScreenDPI=True
# Use mouse wheel to go to prev or next page # Use mouse wheel to go to prev or next page
WheelForPaging=True WheelForPaging=True
# Font # Font
Font="Noto Sans CJK JP 11" Font="Noto Sans CJK JP 11"
# Menu Font # Menu Font
MenuFont="Noto Sans CJK JP 11" MenuFont="Noto Sans CJK JP 11"
# Tray Font # Tray Font
TrayFont="Noto Sans CJK JP Medium 11" TrayFont="Noto Sans CJK JP Medium 11"
# Tray Label Outline Color # Tray Label Outline Color
TrayOutlineColor=#49483e TrayOutlineColor=#49483e
# Tray Label Text Color # Tray Label Text Color
TrayTextColor=#f8f8f2 TrayTextColor=#f8f8f2
# Prefer Text Icon # Prefer Text Icon
PreferTextIcon=True PreferTextIcon=True
# Show Layout Name In Icon # Show Layout Name In Icon
ShowLayoutNameInIcon=True ShowLayoutNameInIcon=True
# Use input method language to display text # Use input method language to display text
UseInputMethodLangaugeToDisplayText=True UseInputMethodLangaugeToDisplayText=True
# Theme # Theme
Theme=default Theme=default
''; '';
xdg.configFile."fcitx5/conf/clipboard.conf".force = true; xdg.configFile."fcitx5/conf/clipboard.conf".force = true;
xdg.configFile."fcitx5/conf/clipboard.conf".text = '' xdg.configFile."fcitx5/conf/clipboard.conf".text = ''
# Trigger Key # Trigger Key
TriggerKey= TriggerKey=
# Paste Primary # Paste Primary
PastePrimaryKey= PastePrimaryKey=
# Number of entries # Number of entries
Number of entries=5 Number of entries=5
''; '';
xdg.configFile."fcitx5/conf/mozc.conf".force = true; xdg.configFile."fcitx5/conf/mozc.conf".force = true;
xdg.configFile."fcitx5/conf/mozc.conf".text = '' xdg.configFile."fcitx5/conf/mozc.conf".text = ''
# Initial Mode # Initial Mode
InitialMode=Hiragana InitialMode=Hiragana
# Vertical candidate list # Vertical candidate list
Vertical=True Vertical=True
# Expand Usage (Requires vertical candidate list) # Expand Usage (Requires vertical candidate list)
ExpandMode="On Focus" ExpandMode="On Focus"
# Fix embedded preedit cursor at the beginning of the preedit # Fix embedded preedit cursor at the beginning of the preedit
PreeditCursorPositionAtBeginning=False PreeditCursorPositionAtBeginning=False
# Hotkey to expand usage # Hotkey to expand usage
ExpandKey=Control+Alt+H ExpandKey=Control+Alt+H
''; '';
xdg.configFile."fcitx5/conf/notifications.conf".force = true; xdg.configFile."fcitx5/conf/notifications.conf".force = true;
xdg.configFile."fcitx5/conf/notifications.conf".text = '' xdg.configFile."fcitx5/conf/notifications.conf".text = ''
# Hidden Notifications # Hidden Notifications
HiddenNotifications= HiddenNotifications=
''; '';
xdg.configFile."fcitx5/conf/unicode.conf".force = true; xdg.configFile."fcitx5/conf/unicode.conf".force = true;
xdg.configFile."fcitx5/conf/unicode.conf".text = '' xdg.configFile."fcitx5/conf/unicode.conf".text = ''
# Trigger Key # Trigger Key
TriggerKey= TriggerKey=
''; '';
}]; }
];
} }

View File

@ -1,79 +1,81 @@
{ {
home-manager.sharedModules = [{ home-manager.sharedModules = [
programs.feh = { {
enable = true; programs.feh = {
enable = true;
keybindings = { keybindings = {
next_img = [ "k" "Right" ]; next_img = ["k" "Right"];
prev_img = [ "j" "Left" ]; prev_img = ["j" "Left"];
quit = "q"; quit = "q";
toggle_fullscreen = "f"; toggle_fullscreen = "f";
zoom_in = "h"; zoom_in = "h";
zoom_out = "l"; zoom_out = "l";
toggle_filenames = "d"; toggle_filenames = "d";
toggle_fixed_geometry = "g"; toggle_fixed_geometry = "g";
toggle_pause = "h"; toggle_pause = "h";
toggle_pointer = "a"; toggle_pointer = "a";
size_to_image = "w"; size_to_image = "w";
jump_random = "z"; jump_random = "z";
jump_first = "J"; jump_first = "J";
jump_last = "K"; jump_last = "K";
jump_fwd = "H"; jump_fwd = "H";
jump_back = "L"; jump_back = "L";
scroll_left = "b"; scroll_left = "b";
scroll_right = "n"; scroll_right = "n";
scroll_up = [ "u" "Up" ]; scroll_up = ["u" "Up"];
scroll_down = [ "d" "Down" ]; scroll_down = ["d" "Down"];
zoom_default = "o"; zoom_default = "o";
zoom_fill = "p"; zoom_fill = "p";
toggle_auto_zoom = "m"; toggle_auto_zoom = "m";
toggle_actions = null; toggle_actions = null;
toggle_aliasing = null; toggle_aliasing = null;
toggle_caption = null; toggle_caption = null;
toggle_exif = null; toggle_exif = null;
save_filelist = null; save_filelist = null;
toggle_info = null; toggle_info = null;
toggle_keep_vp = null; toggle_keep_vp = null;
toggle_menu = null; toggle_menu = null;
reload_image = null; reload_image = null;
save_image = null; save_image = null;
prev_dir = null; prev_dir = null;
next_dir = null; next_dir = null;
orient_3 = null; orient_3 = null;
orient_1 = null; orient_1 = null;
flip = null; flip = null;
mirror = null; mirror = null;
action_0 = null; action_0 = null;
action_1 = null; action_1 = null;
action_2 = null; action_2 = null;
action_3 = null; action_3 = null;
action_4 = null; action_4 = null;
action_5 = null; action_5 = null;
action_6 = null; action_6 = null;
action_7 = null; action_7 = null;
action_8 = null; action_8 = null;
action_9 = null; action_9 = null;
close = null; close = null;
reload_plus = null; reload_plus = null;
reload_minus = null; reload_minus = null;
remove = null; remove = null;
delete = null; delete = null;
scroll_left_page = null; scroll_left_page = null;
scroll_right_page = null; scroll_right_page = null;
scroll_up_page = null; scroll_up_page = null;
scroll_down_page = null; scroll_down_page = null;
render = null; render = null;
zoom_fit = null; zoom_fit = null;
menu_close = null; menu_close = null;
menu_up = null; menu_up = null;
menu_down = null; menu_down = null;
menu_parent = null; menu_parent = null;
menu_child = null; menu_child = null;
menu_select = null; menu_select = null;
};
}; };
}; }
}]; ];
} }

View File

@ -1,16 +1,13 @@
{ pkgs, ... }: {pkgs, ...}: {
{
users.defaultUserShell = pkgs.fish; users.defaultUserShell = pkgs.fish;
environment.shells = [ pkgs.fish ]; environment.shells = [pkgs.fish];
programs.fish = { programs.fish = {
enable = true; enable = true;
shellAliases = { shellAliases = {
ls = "exa --group-directories-first -I 'lost+found'"; ls = "exa --group-directories-first -I 'lost+found'";
tree = tree = "exa --group-directories-first --all --long --tree -I 'node_modules|.git|public|lost+found'";
"exa --group-directories-first --all --long --tree -I 'node_modules|.git|public|lost+found'";
mv = "mv -i"; mv = "mv -i";
cp = "cp -ia"; cp = "cp -ia";
rg = "rg --max-columns=2000"; rg = "rg --max-columns=2000";
@ -37,8 +34,7 @@
gra = "git remote add"; gra = "git remote add";
gre = "git remote --verbose"; # List all remotes gre = "git remote --verbose"; # List all remotes
grh = "git reset HEAD"; grh = "git reset HEAD";
grr = grr = "git reset --hard HEAD~"; # Remove the last commit and all changes with it
"git reset --hard HEAD~"; # Remove the last commit and all changes with it
gs = "git status"; gs = "git status";
gst = "git stash"; gst = "git stash";
gstp = "git stash pop"; gstp = "git stash pop";
@ -53,15 +49,12 @@
yu = "yarn upgrade-interactive"; yu = "yarn upgrade-interactive";
dl = "yt-dlp"; dl = "yt-dlp";
vol = vol = "wpctl set-volume '@DEFAULT_AUDIO_SINK@'"; # Change the volume, e.g. vol 10%+, vol 10%-, vol 100%
"wpctl set-volume '@DEFAULT_AUDIO_SINK@'"; # Change the volume, e.g. vol 10%+, vol 10%-, vol 100%
nf = "tput reset; and neofetch --size 56%"; nf = "tput reset; and neofetch --size 56%";
df = "df --human-readable --type=ext4 --total"; df = "df --human-readable --type=ext4 --total";
du = "du --human-readable --summarize"; du = "du --human-readable --summarize";
jis = jis = "recode shift_jis..utf8"; # Easily convert shift_jis-encoded files to utf8
"recode shift_jis..utf8"; # Easily convert shift_jis-encoded files to utf8 utf16 = "recode utf16..utf8"; # Rarely, some files from Japan are utf16 instead
utf16 =
"recode utf16..utf8"; # Rarely, some files from Japan are utf16 instead
jp = "LANG=ja_JP.UTF-8 LC_ALL=ja_JP.UTF-8"; jp = "LANG=ja_JP.UTF-8 LC_ALL=ja_JP.UTF-8";
c = "tput reset"; # Clear the terminal completely c = "tput reset"; # Clear the terminal completely
@ -74,65 +67,67 @@
}; };
}; };
home-manager.sharedModules = [{ home-manager.sharedModules = [
xdg.configFile."fish/config.fish".text = '' {
set -U fish_greeting "" xdg.configFile."fish/config.fish".text = ''
set -U fish_greeting ""
export PATH="$HOME/.deno/bin:$HOME/.cargo/bin:$HOME/.yarn/bin:$HOME/.local/bin:$HOME/.go/bin:$PATH" export PATH="$HOME/.deno/bin:$HOME/.cargo/bin:$HOME/.yarn/bin:$HOME/.local/bin:$HOME/.go/bin:$PATH"
export GOPATH="$HOME/.go" export GOPATH="$HOME/.go"
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket" export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"
export TERMCMD="kitty --single-instance" export TERMCMD="kitty --single-instance"
# Required to make gpg-agent work in cases like git commit # Required to make gpg-agent work in cases like git commit
export GPG_TTY=(tty) export GPG_TTY=(tty)
# Add color to man pages # Add color to man pages
set -x -U LESS_TERMCAP_md (printf "\e[01;31m") set -x -U LESS_TERMCAP_md (printf "\e[01;31m")
set -x -U LESS_TERMCAP_me (printf "\e[0m") set -x -U LESS_TERMCAP_me (printf "\e[0m")
set -x -U LESS_TERMCAP_se (printf "\e[0m") set -x -U LESS_TERMCAP_se (printf "\e[0m")
set -x -U LESS_TERMCAP_so (printf "\e[01;44;30m") set -x -U LESS_TERMCAP_so (printf "\e[01;44;30m")
set -x -U LESS_TERMCAP_ue (printf "\e[0m") set -x -U LESS_TERMCAP_ue (printf "\e[0m")
set -x -U LESS_TERMCAP_us (printf "\e[01;32m") set -x -U LESS_TERMCAP_us (printf "\e[01;32m")
# Always use the default keybindings in fish # Always use the default keybindings in fish
fish_default_key_bindings fish_default_key_bindings
# Convert unnecessarily large wav files to flac # Convert unnecessarily large wav files to flac
function wav2flac function wav2flac
set ORIGINAL_SIZE (du -hs | cut -f1) set ORIGINAL_SIZE (du -hs | cut -f1)
fd -e wav -x ffmpeg -i "{}" -loglevel quiet -stats "{.}.flac" fd -e wav -x ffmpeg -i "{}" -loglevel quiet -stats "{.}.flac"
fd -e wav -X trash fd -e wav -X trash
set NEW_SIZE (du -hs | cut -f1) set NEW_SIZE (du -hs | cut -f1)
echo "Done. Reduced file size from $ORIGINAL_SIZE to $NEW_SIZE" echo "Done. Reduced file size from $ORIGINAL_SIZE to $NEW_SIZE"
end end
# Convert wav/flac to opus # Convert wav/flac to opus
function opus function opus
set ORIGINAL_SIZE (du -hs | cut -f1) set ORIGINAL_SIZE (du -hs | cut -f1)
fd -e wav -e flac -x ffmpeg -i "{}" -c:a libopus -b:a 128K -loglevel quiet -stats "{.}.opus" fd -e wav -e flac -x ffmpeg -i "{}" -c:a libopus -b:a 128K -loglevel quiet -stats "{.}.opus"
fd -e wav -e flac -X rm -I fd -e wav -e flac -X rm -I
set NEW_SIZE (du -hs | cut -f1) set NEW_SIZE (du -hs | cut -f1)
echo "Done. Reduced file size from $ORIGINAL_SIZE to $NEW_SIZE" echo "Done. Reduced file size from $ORIGINAL_SIZE to $NEW_SIZE"
end end
# Always use kitty ssh since it's our default terminal # Always use kitty ssh since it's our default terminal
if string match -qe -- "/dev/pts/" (tty) if string match -qe -- "/dev/pts/" (tty)
alias ssh="kitty +kitten ssh" alias ssh="kitty +kitten ssh"
end end
if status is-login if status is-login
if test -z "$DISPLAY" -a "$XDG_VTNR" = 1 if test -z "$DISPLAY" -a "$XDG_VTNR" = 1
exec Hyprland exec Hyprland
end end
end end
''; '';
}]; }
];
programs.starship = { programs.starship = {
enable = true; enable = true;

View File

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
fonts = { fonts = {
enableDefaultFonts = true; enableDefaultFonts = true;
fonts = with pkgs; [ fonts = with pkgs; [
@ -15,12 +13,12 @@
]; ];
fontconfig = { fontconfig = {
defaultFonts = { defaultFonts = {
serif = [ "Noto Serif CJK JP" "Noto Serif" ]; serif = ["Noto Serif CJK JP" "Noto Serif"];
sansSerif = [ "Noto Sans CJK JP" "Noto Sans" ]; sansSerif = ["Noto Sans CJK JP" "Noto Sans"];
monospace = [ "Noto Mono CJK JP" "Noto Mono" ]; monospace = ["Noto Mono CJK JP" "Noto Mono"];
}; };
allowBitmaps = false; allowBitmaps = false;
hinting = { style = "hintfull"; }; hinting = {style = "hintfull";};
}; };
}; };
} }

View File

@ -1,61 +1,60 @@
{ pkgs, ... }: {pkgs, ...}: {
environment.systemPackages = with pkgs; [tig git];
{ home-manager.sharedModules = [
{
xdg.configFile."tig/config".text = ''
color cursor black green bold
color title-focus black blue bold
color title-blur black blue bold
'';
environment.systemPackages = with pkgs; [ tig git ]; programs.git = {
enable = true;
home-manager.sharedModules = [{ extraConfig = {
xdg.configFile."tig/config".text = '' include.path = "~/.gituser";
color cursor black green bold commit.gpgsign = true;
color title-focus black blue bold
color title-blur black blue bold
'';
programs.git = { core = {
enable = true; editor = "nvim";
autocrlf = false;
quotePath = false;
};
extraConfig = { web.browser = "librewolf";
include.path = "~/.gituser"; push.default = "simple";
commit.gpgsign = true; branch.autosetuprebase = "always";
init.defaultBranch = "master";
rerere.enabled = true;
color.ui = true;
core = { alias = {
editor = "nvim"; contrib = "shortlog -n -s";
autocrlf = false; remotes = "remote -v";
quotePath = false; praise = "blame";
verify = "log --show-signature";
};
"color \"diff-highlight\"" = {
oldNormal = "red bold";
oldHighlight = "red bold";
newNormal = "green bold";
newHighlight = "green bold";
};
"color \"diff\"" = {
meta = "yellow";
frag = "magenta bold";
commit = "yellow bold";
old = "red bold";
new = "green bold";
whitespace = "red reverse";
};
}; };
web.browser = "librewolf"; diff-so-fancy.enable = true;
push.default = "simple";
branch.autosetuprebase = "always";
init.defaultBranch = "master";
rerere.enabled = true;
color.ui = true;
alias = {
contrib = "shortlog -n -s";
remotes = "remote -v";
praise = "blame";
verify = "log --show-signature";
};
"color \"diff-highlight\"" = {
oldNormal = "red bold";
oldHighlight = "red bold";
newNormal = "green bold";
newHighlight = "green bold";
};
"color \"diff\"" = {
meta = "yellow";
frag = "magenta bold";
commit = "yellow bold";
old = "red bold";
new = "green bold";
whitespace = "red reverse";
};
}; };
}
diff-so-fancy.enable = true; ];
};
}];
} }

View File

@ -1,25 +1,27 @@
{ {
home-manager.sharedModules = [{ home-manager.sharedModules = [
programs.gpg = { {
enable = true; programs.gpg = {
# homedir = "${config.xdg.dataHome}/gnupg" enable = true;
settings = { # homedir = "${config.xdg.dataHome}/gnupg"
personal-digest-preferences = "SHA512"; settings = {
cert-digest-algo = "SHA512"; personal-digest-preferences = "SHA512";
cipher-algo = "AES256"; cert-digest-algo = "SHA512";
default-preference-list = "SHA512 SHA384 SHA256 SHA224 AES256 AES192 AES CAST5 ZLIB BZIP2 ZIP Uncompressed"; cipher-algo = "AES256";
personal-cipher-preferences = "TWOFISH CAMELLIA256 AES 3DES"; default-preference-list = "SHA512 SHA384 SHA256 SHA224 AES256 AES192 AES CAST5 ZLIB BZIP2 ZIP Uncompressed";
throw-keyids = true; personal-cipher-preferences = "TWOFISH CAMELLIA256 AES 3DES";
keyid-format = "0xlong"; throw-keyids = true;
with-fingerprint = true; keyid-format = "0xlong";
with-fingerprint = true;
};
}; };
};
services.gpg-agent = { services.gpg-agent = {
enable = true; enable = true;
pinentryFlavor = "curses"; pinentryFlavor = "curses";
defaultCacheTtl = 43200; defaultCacheTtl = 43200;
maxCacheTtl = 43200; maxCacheTtl = 43200;
}; };
}]; }
];
} }

View File

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
programs.hyprland.enable = true; programs.hyprland.enable = true;
services.udisks2 = { services.udisks2 = {
enable = true; enable = true;
@ -14,238 +12,240 @@
services.xserver = { services.xserver = {
enable = true; enable = true;
displayManager.lightdm.enable = false; displayManager.lightdm.enable = false;
excludePackages = [ pkgs.xterm ]; excludePackages = [pkgs.xterm];
}; };
home-manager.sharedModules = [{ home-manager.sharedModules = [
xdg.configFile."hypr/hyprland.conf".text = '' {
env=XCURSOR_SIZE,24 xdg.configFile."hypr/hyprland.conf".text = ''
env=BROWSER,librewolf env=XCURSOR_SIZE,24
env=GTK_IM_MODULE,fcitx env=BROWSER,librewolf
env=QT_IM_MODULE,fcitx env=GTK_IM_MODULE,fcitx
env=XMODIFIERS,@im=fcitx env=QT_IM_MODULE,fcitx
env=SDL_IM_MODULE,fcitx env=XMODIFIERS,@im=fcitx
env=GLFW_IM_MODULE,ibus env=SDL_IM_MODULE,fcitx
monitor=,preferred,auto,1 env=GLFW_IM_MODULE,ibus
monitor=,preferred,auto,1
exec-once = swww init exec-once = swww init
exec-once = wpctl set-volume @DEFAULT_AUDIO_SINK@ 20% exec-once = wpctl set-volume @DEFAULT_AUDIO_SINK@ 20%
exec-once = sleep 0.5 && waybar exec-once = sleep 0.5 && waybar
exec-once = fcitx5 # Japanese input support exec-once = fcitx5 # Japanese input support
exec-once = mullvad-vpn exec-once = mullvad-vpn
exec-once = wl-paste -p --watch wl-copy -pc # Disable middle click paste exec-once = wl-paste -p --watch wl-copy -pc # Disable middle click paste
exec-once = ${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1 exec-once = ${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1
input { input {
kb_layout = us kb_layout = us
accel_profile = flat accel_profile = flat
follow_mouse = 1 follow_mouse = 1
mouse_refocus = 0 mouse_refocus = 0
sensitivity = 0 sensitivity = 0
touchpad { touchpad {
natural_scroll = yes
disable_while_typing = no
}
}
general {
gaps_in = 0
gaps_out = -1
border_size = 0
col.active_border = rgba(f4bf75ee) rgba(fd971fee) 45deg
col.inactive_border = rgba(49483eaa)
layout = master
}
decoration {
rounding = 0
blur = yes
blur_size = 3
blur_passes = 1
blur_new_optimizations = yes
drop_shadow = yes
shadow_range = 4
shadow_render_power = 3
col.shadow = rgba(1a1a1aee)
}
animations {
enabled = yes
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
animation = windows, 1, 7, myBezier
animation = windowsOut, 1, 7, default, popin 80%
animation = border, 1, 10, default
animation = borderangle, 1, 8, default
animation = fade, 1, 7, default
animation = workspaces, 1, 6, default, slidevert
animation = specialWorkspace, 1, 6, default, fade
}
dwindle {
preserve_split = yes
no_gaps_when_only = yes
special_scale_factor = 1
}
master {
new_is_master = yes
new_on_top = yes
mfact = 0.65
special_scale_factor = 1
no_gaps_when_only = yes
}
gestures {
workspace_swipe = yes
}
device:synps/2-synaptics-touchpad {
sensitivity = 0.75
accel_profile = flat
natural_scroll = yes natural_scroll = yes
disable_while_typing = no disable_while_typing = no
} }
}
general { device:tpps/2-elan-trackpoint {
gaps_in = 0 sensitivity = 0.5
gaps_out = -1 accel_profile = flat
border_size = 0 }
col.active_border = rgba(f4bf75ee) rgba(fd971fee) 45deg
col.inactive_border = rgba(49483eaa)
layout = master
}
decoration { binds {
rounding = 0 allow_workspace_cycles = yes
blur = yes }
blur_size = 3
blur_passes = 1
blur_new_optimizations = yes
drop_shadow = yes
shadow_range = 4
shadow_render_power = 3
col.shadow = rgba(1a1a1aee)
}
animations { bind = SUPER_SHIFT, Return, exec, kitty
enabled = yes bind = SUPER, Q, killactive,
bezier = myBezier, 0.05, 0.9, 0.1, 1.05 bind = SUPER, P, exec, grim && dunstify Screenshot Captured.
animation = windows, 1, 7, myBezier bind = , Print, exec, grimblast copy area
animation = windowsOut, 1, 7, default, popin 80% bind = SUPER_ALT, delete, exit
animation = border, 1, 10, default bind = SUPER, V, togglefloating,
animation = borderangle, 1, 8, default bind = SUPER, V, centerwindow,
animation = fade, 1, 7, default bind = SUPER, O, exec, killall .waybar-wrapped || waybar
animation = workspaces, 1, 6, default, slidevert bind = SUPER, X, pin
animation = specialWorkspace, 1, 6, default, fade bind = SUPER, F, fullscreen, 1
} bind = SUPER_SHIFT, F, fullscreen
bind = SUPER, bracketright, changegroupactive, f
bind = SUPER, bracketleft, changegroupactive, b
bind = SUPER, S, togglespecialworkspace
bind = SUPER_SHIFT, S, movetoworkspace, special
bind = SUPER_SHIFT, S, focuscurrentorlast
bind = SUPER, F1, exec, killall rofi || rofi -show drun
bind = SUPER, F2, togglespecialworkspace
dwindle { bind = SUPER, Return, layoutmsg, swapwithmaster master
preserve_split = yes bind = SUPER, J, layoutmsg, cyclenext
no_gaps_when_only = yes bind = SUPER, K, layoutmsg, cycleprev
special_scale_factor = 1 bind = SUPER_SHIFT, J, layoutmsg, swapnext
} bind = SUPER_SHIFT, K, layoutmsg, swapprev
bind = SUPER, C, layoutmsg, orientationtop
bind = SUPER_SHIFT, C, layoutmsg, orientationleft
bind = SUPER, H, layoutmsg, addmaster
bind = SUPER, L, layoutmsg, removemaster
bind = SUPER_SHIFT, H, splitratio, -0.05
bind = SUPER_SHIFT, L, splitratio, +0.05
master { bind = SUPER, grave, workspace, previous
new_is_master = yes bind = SUPER, 1, workspace, 1
new_on_top = yes bind = SUPER, 2, workspace, 2
mfact = 0.65 bind = SUPER, 3, workspace, 3
special_scale_factor = 1 bind = SUPER, 4, workspace, 4
no_gaps_when_only = yes bind = SUPER, 5, workspace, 5
} bind = SUPER, 6, workspace, 6
bind = SUPER, 7, workspace, 7
bind = SUPER, 8, workspace, 8
bind = SUPER, 9, workspace, 9
bind = SUPER, 0, workspace, 10
bind = SUPER_SHIFT, 1, movetoworkspace, 1
bind = SUPER_SHIFT, 2, movetoworkspace, 2
bind = SUPER_SHIFT, 3, movetoworkspace, 3
bind = SUPER_SHIFT, 4, movetoworkspace, 4
bind = SUPER_SHIFT, 5, movetoworkspace, 5
bind = SUPER_SHIFT, 6, movetoworkspace, 6
bind = SUPER_SHIFT, 7, movetoworkspace, 7
bind = SUPER_SHIFT, 8, movetoworkspace, 8
bind = SUPER_SHIFT, 9, movetoworkspace, 9
bind = SUPER_SHIFT, 0, movetoworkspace, 10
bind = SUPER_CTRL, 1, exec, ~/.config/hypr/tags.sh 1
bind = SUPER_CTRL, 2, exec, ~/.config/hypr/tags.sh 2
bind = SUPER_CTRL, 3, exec, ~/.config/hypr/tags.sh 3
bind = SUPER_CTRL, 4, exec, ~/.config/hypr/tags.sh 4
bind = SUPER_CTRL, 5, exec, ~/.config/hypr/tags.sh 5
bind = SUPER_CTRL, 6, exec, ~/.config/hypr/tags.sh 6
bind = SUPER_CTRL, 7, exec, ~/.config/hypr/tags.sh 7
bind = SUPER_CTRL, 8, exec, ~/.config/hypr/tags.sh 8
bind = SUPER_CTRL, 9, exec, ~/.config/hypr/tags.sh 9
bind = SUPER_CTRL, 0, exec, ~/.config/hypr/tags.sh 10
gestures { layerrule = blur,waybar
workspace_swipe = yes layerrule = blur,rofi
}
device:synps/2-synaptics-touchpad { windowrulev2 = nomaxsize,class:^(winecfg\.exe)$
sensitivity = 0.75 windowrulev2 = opaque,class:^(kitty)$
accel_profile = flat
natural_scroll = yes
disable_while_typing = no
}
device:tpps/2-elan-trackpoint { # Scroll through existing workspaces with super + scroll
sensitivity = 0.5 bind = SUPER, mouse_down, workspace, e+1
accel_profile = flat bind = SUPER, mouse_up, workspace, e-1
}
binds { # Move/resize windows with super + LMB/RMB and dragging
allow_workspace_cycles = yes bindm = SUPER, mouse:272, movewindow
} bindm = SUPER, mouse:273, resizewindow
bind = SUPER_SHIFT, Return, exec, kitty # Change volume with keys
bind = SUPER, Q, killactive, # TODO: Change notification once at 0/100%
bind = SUPER, P, exec, grim && dunstify Screenshot Captured. bindl=, XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && notify-send -t 2000 "Muted" "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)"
bind = , Print, exec, grimblast copy area 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)%"
bind = SUPER_ALT, delete, exit 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)%"
bind = SUPER, V, togglefloating, bindl=, XF86MonBrightnessDown, exec, brightnessctl set 5%- && notify-send -t 2000 "Decreased brightness to" "$(brightnessctl get)"
bind = SUPER, V, centerwindow, bindl=, XF86MonBrightnessUp, exec, brightnessctl set +5% && notify-send -t 2000 "Increased brightness to" "$(brightnessctl get)"
bind = SUPER, O, exec, killall .waybar-wrapped || waybar
bind = SUPER, X, pin
bind = SUPER, F, fullscreen, 1
bind = SUPER_SHIFT, F, fullscreen
bind = SUPER, bracketright, changegroupactive, f
bind = SUPER, bracketleft, changegroupactive, b
bind = SUPER, S, togglespecialworkspace
bind = SUPER_SHIFT, S, movetoworkspace, special
bind = SUPER_SHIFT, S, focuscurrentorlast
bind = SUPER, F1, exec, killall rofi || rofi -show drun
bind = SUPER, F2, togglespecialworkspace
bind = SUPER, Return, layoutmsg, swapwithmaster master misc {
bind = SUPER, J, layoutmsg, cyclenext disable_hyprland_logo = yes
bind = SUPER, K, layoutmsg, cycleprev animate_manual_resizes = yes
bind = SUPER_SHIFT, J, layoutmsg, swapnext animate_mouse_windowdragging = yes
bind = SUPER_SHIFT, K, layoutmsg, swapprev focus_on_activate = yes
bind = SUPER, C, layoutmsg, orientationtop }
bind = SUPER_SHIFT, C, layoutmsg, orientationleft '';
bind = SUPER, H, layoutmsg, addmaster xdg.configFile."hypr/tags.sh".source = ./tags.sh;
bind = SUPER, L, layoutmsg, removemaster
bind = SUPER_SHIFT, H, splitratio, -0.05
bind = SUPER_SHIFT, L, splitratio, +0.05
bind = SUPER, grave, workspace, previous home.file.".icons/default/index.theme".text = ''
bind = SUPER, 1, workspace, 1 [icon theme]
bind = SUPER, 2, workspace, 2 Inherits=phinger-cursors
bind = SUPER, 3, workspace, 3 '';
bind = SUPER, 4, workspace, 4
bind = SUPER, 5, workspace, 5
bind = SUPER, 6, workspace, 6
bind = SUPER, 7, workspace, 7
bind = SUPER, 8, workspace, 8
bind = SUPER, 9, workspace, 9
bind = SUPER, 0, workspace, 10
bind = SUPER_SHIFT, 1, movetoworkspace, 1
bind = SUPER_SHIFT, 2, movetoworkspace, 2
bind = SUPER_SHIFT, 3, movetoworkspace, 3
bind = SUPER_SHIFT, 4, movetoworkspace, 4
bind = SUPER_SHIFT, 5, movetoworkspace, 5
bind = SUPER_SHIFT, 6, movetoworkspace, 6
bind = SUPER_SHIFT, 7, movetoworkspace, 7
bind = SUPER_SHIFT, 8, movetoworkspace, 8
bind = SUPER_SHIFT, 9, movetoworkspace, 9
bind = SUPER_SHIFT, 0, movetoworkspace, 10
bind = SUPER_CTRL, 1, exec, ~/.config/hypr/tags.sh 1
bind = SUPER_CTRL, 2, exec, ~/.config/hypr/tags.sh 2
bind = SUPER_CTRL, 3, exec, ~/.config/hypr/tags.sh 3
bind = SUPER_CTRL, 4, exec, ~/.config/hypr/tags.sh 4
bind = SUPER_CTRL, 5, exec, ~/.config/hypr/tags.sh 5
bind = SUPER_CTRL, 6, exec, ~/.config/hypr/tags.sh 6
bind = SUPER_CTRL, 7, exec, ~/.config/hypr/tags.sh 7
bind = SUPER_CTRL, 8, exec, ~/.config/hypr/tags.sh 8
bind = SUPER_CTRL, 9, exec, ~/.config/hypr/tags.sh 9
bind = SUPER_CTRL, 0, exec, ~/.config/hypr/tags.sh 10
layerrule = blur,waybar xresources.properties = {
layerrule = blur,rofi "Xft.hinting" = true;
"Xft.antialias" = true;
windowrulev2 = nomaxsize,class:^(winecfg\.exe)$ "Xft.autohint" = false;
windowrulev2 = opaque,class:^(kitty)$ "Xft.lcdfilter" = "lcddefault";
"Xft.hintstyle" = "hintfull";
# Scroll through existing workspaces with super + scroll "Xft.rgba" = "rgb";
bind = SUPER, mouse_down, workspace, e+1
bind = SUPER, mouse_up, workspace, e-1
# Move/resize windows with super + LMB/RMB and dragging
bindm = SUPER, mouse:272, movewindow
bindm = SUPER, mouse:273, resizewindow
# Change volume with keys
# TODO: Change notification once at 0/100%
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)"
misc {
disable_hyprland_logo = yes
animate_manual_resizes = yes
animate_mouse_windowdragging = yes
focus_on_activate = yes
}
'';
xdg.configFile."hypr/tags.sh".source = ./tags.sh;
home.file.".icons/default/index.theme".text = ''
[icon theme]
Inherits=phinger-cursors
'';
xresources.properties = {
"Xft.hinting" = true;
"Xft.antialias" = true;
"Xft.autohint" = false;
"Xft.lcdfilter" = "lcddefault";
"Xft.hintstyle" = "hintfull";
"Xft.rgba" = "rgb";
};
gtk = {
enable = true;
cursorTheme = {
package = pkgs.phinger-cursors;
name = "phinger-cursors";
}; };
gtk3.extraConfig = { gtk = {
gtk-decoration-layout = "menu:"; enable = true;
gtk-xft-antialias = 1;
gtk-xft-hinting = 1; cursorTheme = {
gtk-xft-hintstyle = "hintfull"; package = pkgs.phinger-cursors;
gtk-xft-rgba = "rgb"; name = "phinger-cursors";
gtk-recent-files-enabled = false; };
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-enabled = false;
};
iconTheme = {
package = pkgs.fluent-icon-theme;
name = "Fluent-dark";
};
}; };
iconTheme = { services.udiskie.enable = true;
package = pkgs.fluent-icon-theme; }
name = "Fluent-dark"; ];
};
};
services.udiskie.enable = true;
}];
} }

View File

@ -1,28 +1,28 @@
{ pkgs, ... }: {pkgs, ...}: {
{
environment.systemPackages = [ environment.systemPackages = [
(pkgs.callPackage ../../packages/joshuto { }) (pkgs.callPackage ../../packages/joshuto {})
]; ];
home-manager.sharedModules = [{ home-manager.sharedModules = [
xdg.configFile."joshuto/joshuto.toml".text = '' {
[display] xdg.configFile."joshuto/joshuto.toml".text = ''
automatically_count_files = true [display]
show_borders = false automatically_count_files = true
show_hidden = true show_borders = false
line_number_style = "absolute" show_hidden = true
collapse_preview = false line_number_style = "absolute"
collapse_preview = false
[preview] [preview]
max_preview_size = 10000000000 max_preview_size = 10000000000
preview_script = "~/.config/joshuto/preview.sh" preview_script = "~/.config/joshuto/preview.sh"
preview_shown_hook_script = "~/.config/joshuto/kitty-show.sh" preview_shown_hook_script = "~/.config/joshuto/kitty-show.sh"
preview_removed_hook_script = "~/.config/joshuto/kitty-remove.sh" preview_removed_hook_script = "~/.config/joshuto/kitty-remove.sh"
''; '';
xdg.configFile."joshuto/preview.sh".source = ./preview.sh; xdg.configFile."joshuto/preview.sh".source = ./preview.sh;
xdg.configFile."joshuto/kitty-show.sh".source = ./kitty-show.sh; xdg.configFile."joshuto/kitty-show.sh".source = ./kitty-show.sh;
xdg.configFile."joshuto/kitty-remove.sh".source = ./kitty-remove.sh; xdg.configFile."joshuto/kitty-remove.sh".source = ./kitty-remove.sh;
}]; }
];
} }

View File

@ -1,30 +1,32 @@
{ {
home-manager.sharedModules = [{ home-manager.sharedModules = [
programs.kitty = { {
enable = true; programs.kitty = {
enable = true;
settings = { settings = {
enable_audio_bell = false; enable_audio_bell = false;
close_on_child_death = true; close_on_child_death = true;
cursor_blink_interval = 0; cursor_blink_interval = 0;
open_url_with = "librewolf"; open_url_with = "librewolf";
wayland_titlebar_color = "background"; wayland_titlebar_color = "background";
allow_remote_control = true; allow_remote_control = true;
listen_on = "unix:/tmp/kitty"; listen_on = "unix:/tmp/kitty";
dynamic_background_opacity = true; dynamic_background_opacity = true;
window_padding_width = 5; window_padding_width = 5;
tab_bar_margin_width = 5; tab_bar_margin_width = 5;
};
}; };
};
xdg.configFile."kitty/diff.conf".text = '' xdg.configFile."kitty/diff.conf".text = ''
map d scroll_to next-page map d scroll_to next-page
map u scroll_to prev-page map u scroll_to prev-page
map g scroll_to start map g scroll_to start
map G scroll_to end map G scroll_to end
''; '';
}]; }
];
} }

View File

@ -1,21 +1,23 @@
{ {
home-manager.sharedModules = [{ home-manager.sharedModules = [
programs.librewolf = { {
enable = true; programs.librewolf = {
enable = true;
settings = { settings = {
"middlemouse.paste" = false; "middlemouse.paste" = false;
"ui.use_activity_cursor" = true; "ui.use_activity_cursor" = true;
"privacy.resistFingerprinting.letterboxing" = true; "privacy.resistFingerprinting.letterboxing" = true;
"browser.download.useDownloadDir" = true; "browser.download.useDownloadDir" = true;
"browser.tabs.insertAfterCurrent" = true; "browser.tabs.insertAfterCurrent" = true;
"browser.toolbars.bookmarks.visibility" = "never"; "browser.toolbars.bookmarks.visibility" = "never";
"sidebar.position_start" = false; "sidebar.position_start" = false;
};
}; };
}; }
}]; ];
} }

View File

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

View File

@ -1,151 +1,151 @@
{ pkgs, ... }: {pkgs, ...}: {
home-manager.sharedModules = [
{ {
home-manager.sharedModules = [{ services.mpd = {
services.mpd = { enable = true;
enable = true; musicDirectory = "/home/user/Music";
musicDirectory = "/home/user/Music";
};
xdg.configFile."mpd/mpd.conf".text = ''
auto_update "yes"
'';
xdg.configFile."ncmpcpp/on-song-change.sh".source = ./on-song-change.sh;
programs.ncmpcpp = {
enable = true;
bindings = [
{
key = "mouse";
command = "dummy";
}
{
key = "h";
command = [ "previous_column" "jump_to_parent_directory" ];
}
{
key = "j";
command = "scroll_down";
}
{
key = "k";
command = "scroll_up";
}
{
key = "l";
command = [ "next_column" "enter_directory" "play_item" ];
}
{
key = "H";
command = [ "select_item" "scroll_down" ];
}
{
key = "J";
command = [ "move_sort_order_down" "move_selected_items_down" ];
}
{
key = "K";
command = [ "move_sort_order_up" "move_selected_items_up" ];
}
{
key = "L";
command = [ "select_item" "scroll_up" ];
}
{
key = "'";
command = "remove_selection";
}
{
key = "ctrl-u";
command = "page_up";
}
{
key = "ctrl-d";
command = "page_down";
}
{
key = "u";
command = "page_up";
}
{
key = "d";
command = "page_down";
}
{
key = "n";
command = "next_found_item";
}
{
key = "N";
command = "previous_found_item";
}
{
key = "t";
command = "next_screen";
}
{
key = "g";
command = "move_home";
}
{
key = "G";
command = "move_end";
}
{
key = "w";
command = "next";
}
{
key = "b";
command = "previous";
}
{
key = ";";
command = "seek_forward";
}
{
key = ",";
command = "seek_backward";
}
{
key = "f";
command = "apply_filter";
}
{
key = "i";
command = "select_item";
}
{
key = "x";
command = [
"delete_playlist_items"
"delete_browser_items"
"delete_stored_playlist"
];
}
{
key = "U";
command = "update_database";
}
{
key = "m";
command = "add_random_items";
}
];
settings = {
ncmpcpp_directory = "~/.config/ncmpcpp";
user_interface = "alternative";
autocenter_mode = "yes";
allow_for_physical_item_deletion = "no";
mouse_support = "no";
execute_on_song_change = "~/.config/ncmpcpp/on-song-change.sh";
mpd_crossfade_time = 3;
}; };
};
}];
environment.systemPackages = with pkgs; [ mpc-cli ]; xdg.configFile."mpd/mpd.conf".text = ''
auto_update "yes"
'';
xdg.configFile."ncmpcpp/on-song-change.sh".source = ./on-song-change.sh;
programs.ncmpcpp = {
enable = true;
bindings = [
{
key = "mouse";
command = "dummy";
}
{
key = "h";
command = ["previous_column" "jump_to_parent_directory"];
}
{
key = "j";
command = "scroll_down";
}
{
key = "k";
command = "scroll_up";
}
{
key = "l";
command = ["next_column" "enter_directory" "play_item"];
}
{
key = "H";
command = ["select_item" "scroll_down"];
}
{
key = "J";
command = ["move_sort_order_down" "move_selected_items_down"];
}
{
key = "K";
command = ["move_sort_order_up" "move_selected_items_up"];
}
{
key = "L";
command = ["select_item" "scroll_up"];
}
{
key = "'";
command = "remove_selection";
}
{
key = "ctrl-u";
command = "page_up";
}
{
key = "ctrl-d";
command = "page_down";
}
{
key = "u";
command = "page_up";
}
{
key = "d";
command = "page_down";
}
{
key = "n";
command = "next_found_item";
}
{
key = "N";
command = "previous_found_item";
}
{
key = "t";
command = "next_screen";
}
{
key = "g";
command = "move_home";
}
{
key = "G";
command = "move_end";
}
{
key = "w";
command = "next";
}
{
key = "b";
command = "previous";
}
{
key = ";";
command = "seek_forward";
}
{
key = ",";
command = "seek_backward";
}
{
key = "f";
command = "apply_filter";
}
{
key = "i";
command = "select_item";
}
{
key = "x";
command = [
"delete_playlist_items"
"delete_browser_items"
"delete_stored_playlist"
];
}
{
key = "U";
command = "update_database";
}
{
key = "m";
command = "add_random_items";
}
];
settings = {
ncmpcpp_directory = "~/.config/ncmpcpp";
user_interface = "alternative";
autocenter_mode = "yes";
allow_for_physical_item_deletion = "no";
mouse_support = "no";
execute_on_song_change = "~/.config/ncmpcpp/on-song-change.sh";
mpd_crossfade_time = 3;
};
};
}
];
environment.systemPackages = with pkgs; [mpc-cli];
} }

View File

@ -1,90 +1,89 @@
{ pkgs, ... }: {pkgs, ...}: {
{
programs.neovim.enable = true; programs.neovim.enable = true;
home-manager.sharedModules = [{ home-manager.sharedModules = [
programs.neovim = { {
enable = true; programs.neovim = {
extraConfig = '' enable = true;
filetype plugin indent on extraConfig = ''
set undofile filetype plugin indent on
set spell set undofile
set number set spell
set linebreak set number
set clipboard=unnamedplus set linebreak
set fileencoding=utf-8 " Ensure that we always save files as utf-8 set clipboard=unnamedplus
set fileencodings=utf-8,sjis " Automatically open shiftjis files with their proper encoding set fileencoding=utf-8 " Ensure that we always save files as utf-8
set spelllang=en_us,cjk " Don't show errors for CJK characters set fileencodings=utf-8,sjis " Automatically open shiftjis files with their proper encoding
set noshowmode " Disable the --MODE-- text (enable if not using the status line) set spelllang=en_us,cjk " Don't show errors for CJK characters
set mouse=a set noshowmode " Disable the --MODE-- text (enable if not using the status line)
set ignorecase " By default use case-insensitive search (combine with smartcase) set mouse=a
set smartcase " Make search case-sensitive when using capital letters set ignorecase " By default use case-insensitive search (combine with smartcase)
set scrolloff=1 " The minimal number of rows to show when scrolling up/down set smartcase " Make search case-sensitive when using capital letters
set sidescrolloff=5 " The minimal number of columns to show when scrolling left/right set scrolloff=1 " The minimal number of rows to show when scrolling up/down
set tabstop=4 " Show a tab character as 4 spaces set sidescrolloff=5 " The minimal number of columns to show when scrolling left/right
set softtabstop=0 " Edit soft tabs as if they're regular spaces set tabstop=4 " Show a tab character as 4 spaces
set shiftwidth=4 " Make autoindent appear as 4 spaces set softtabstop=0 " Edit soft tabs as if they're regular spaces
set shiftwidth=4 " Make autoindent appear as 4 spaces
set foldmethod=indent set foldmethod=indent
set foldlevelstart=99 set foldlevelstart=99
map <MiddleMouse> <Nop> map <MiddleMouse> <Nop>
imap <MiddleMouse> <Nop> imap <MiddleMouse> <Nop>
map <2-MiddleMouse> <Nop> map <2-MiddleMouse> <Nop>
imap <2-MiddleMouse> <Nop> imap <2-MiddleMouse> <Nop>
map <3-MiddleMouse> <Nop> map <3-MiddleMouse> <Nop>
imap <3-MiddleMouse> <Nop> imap <3-MiddleMouse> <Nop>
map <4-MiddleMouse> <Nop> map <4-MiddleMouse> <Nop>
imap <4-MiddleMouse> <Nop> imap <4-MiddleMouse> <Nop>
highlight Search ctermbg=240 ctermfg=255 highlight Search ctermbg=240 ctermfg=255
highlight IncSearch ctermbg=255 ctermfg=240 highlight IncSearch ctermbg=255 ctermfg=240
let mapleader = ' ' let mapleader = ' '
nnoremap <silent> <leader>e :set nu!<CR> nnoremap <silent> <leader>e :set nu!<CR>
nnoremap <silent> <leader>t :OverCommandLine<CR>%s/ nnoremap <silent> <leader>t :OverCommandLine<CR>%s/
nnoremap <silent> <leader>a :NvimTreeFocus<CR> nnoremap <silent> <leader>a :NvimTreeFocus<CR>
nnoremap <silent> <leader>f :Files<CR> nnoremap <silent> <leader>f :Files<CR>
nnoremap <silent> <leader>g :set hlsearch!<CR> nnoremap <silent> <leader>g :set hlsearch!<CR>
nnoremap <silent> <leader>j :Buffers<CR> nnoremap <silent> <leader>j :Buffers<CR>
nnoremap <silent> <leader>l :Rg<CR> nnoremap <silent> <leader>l :Rg<CR>
nnoremap <silent> <leader>; <C-w>w nnoremap <silent> <leader>; <C-w>w
vnoremap <C-s> y:silent !notify-send -t 4000 "" "$(tango '<C-r>0')"<CR>:<Esc> vnoremap <C-s> y:silent !notify-send -t 4000 "" "$(tango '<C-r>0')"<CR>:<Esc>
autocmd BufNewFile,BufRead *.ecr setlocal syntax=html autocmd BufNewFile,BufRead *.ecr setlocal syntax=html
autocmd BufWritePre,FileWritePre * silent! call mkdir(expand('<afile>:p:h'), 'p') autocmd BufWritePre,FileWritePre * silent! call mkdir(expand('<afile>:p:h'), 'p')
''; '';
plugins = with pkgs.vimPlugins; [ plugins = with pkgs.vimPlugins; [
{ {
plugin = nvim-tree-lua; plugin = nvim-tree-lua;
type = "lua"; type = "lua";
config = '' config = ''
require("nvim-tree").setup() require("nvim-tree").setup()
''; '';
} }
{ {
plugin = indent-blankline-nvim; plugin = indent-blankline-nvim;
type = "lua"; type = "lua";
config = '' config = ''
require("indent_blankline").setup() require("indent_blankline").setup()
''; '';
} }
{ {
plugin = gitsigns-nvim; plugin = gitsigns-nvim;
type = "lua"; type = "lua";
config = '' config = ''
require('gitsigns').setup() require('gitsigns').setup()
''; '';
} }
{ {
plugin = nvim-web-devicons; plugin = nvim-web-devicons;
type = "lua"; type = "lua";
} }
{ {
plugin = nvim-lspconfig; plugin = nvim-lspconfig;
type = "lua"; type = "lua";
config = " config = "
local lspconfig = require('lspconfig') local lspconfig = require('lspconfig')
lspconfig.nil_ls.setup {} lspconfig.nil_ls.setup {}
lspconfig.rust_analyzer.setup {} lspconfig.rust_analyzer.setup {}
@ -113,68 +112,69 @@
end, end,
}) })
"; ";
} }
{ {
plugin = nvim-base16; plugin = nvim-base16;
type = "lua"; type = "lua";
config = "vim.cmd('colorscheme base16-monokai')"; config = "vim.cmd('colorscheme base16-monokai')";
} }
{ {
plugin = lualine-nvim; plugin = lualine-nvim;
type = "lua"; type = "lua";
config = '' config = ''
require('lualine').setup { require('lualine').setup {
sections = { lualine_c = {'%f'} } sections = { lualine_c = {'%f'} }
} }
''; '';
} }
{ {
plugin = git-blame-nvim; plugin = git-blame-nvim;
type = "lua"; type = "lua";
} }
{ {
plugin = comment-nvim; plugin = comment-nvim;
type = "lua"; type = "lua";
config = ''require('Comment').setup()''; config = ''require('Comment').setup()'';
} }
{ {
plugin = plenary-nvim; plugin = plenary-nvim;
type = "lua"; type = "lua";
} }
{ {
plugin = auto-save-nvim; plugin = auto-save-nvim;
type = "lua"; type = "lua";
config = ''require("auto-save").setup()''; config = ''require("auto-save").setup()'';
} }
{ {
plugin = vimtex; plugin = vimtex;
config = '' config = ''
" Disable all keybinds so we can define our own " Disable all keybinds so we can define our own
let g:vimtex_mappings_enabled = 0 let g:vimtex_mappings_enabled = 0
let g:vimtex_imaps_enabled = 0 let g:vimtex_imaps_enabled = 0
let g:vimtex_view_method = 'zathura' let g:vimtex_view_method = 'zathura'
let g:vimtex_compiler_latexmk = {'build_dir': '.tex'} let g:vimtex_compiler_latexmk = {'build_dir': '.tex'}
" Set the normal keybinds " Set the normal keybinds
nnoremap <localleader>f <plug>(vimtex-view) nnoremap <localleader>f <plug>(vimtex-view)
nnoremap <localleader>g <plug>(vimtex-compile) nnoremap <localleader>g <plug>(vimtex-compile)
nnoremap <localleader>d <plug>(vimtex-env-delete) nnoremap <localleader>d <plug>(vimtex-env-delete)
nnoremap <localleader>c <plug>(vimtex-env-change) nnoremap <localleader>c <plug>(vimtex-env-change)
''; '';
} }
fzf-vim fzf-vim
vim-caddyfile vim-caddyfile
vim-graphql vim-graphql
vim-pug vim-pug
vim-prisma vim-prisma
vim-javascript vim-javascript
vim-jsx-pretty vim-jsx-pretty
vim-vue vim-vue
vim-over vim-over
vim-endwise vim-endwise
rust-vim rust-vim
neoformat neoformat
]; ];
}; };
}]; }
];
} }

View File

@ -1,7 +1,5 @@
{ pkgs, ... }: {pkgs, ...}: {
{
services.ratbagd.enable = true; services.ratbagd.enable = true;
environment.systemPackages = [ pkgs.piper ]; environment.systemPackages = [pkgs.piper];
} }

View File

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
services.pipewire = { services.pipewire = {
enable = true; enable = true;

View File

@ -1,141 +1,141 @@
{ pkgs, ... }: {pkgs, ...}: {
home-manager.sharedModules = [
{
programs.qutebrowser = {
enable = true;
package = pkgs.qutebrowser-qt6;
{ settings = {
home-manager.sharedModules = [{ confirm_quit = [
programs.qutebrowser = { "multiple-tabs"
enable = true; "downloads"
package = pkgs.qutebrowser-qt6; ];
settings = { session.lazy_restore = true;
confirm_quit = [
"multiple-tabs"
"downloads"
];
session.lazy_restore = true; tabs = {
show = "multiple";
mousewheel_switching = false;
last_close = "close";
new_position.unrelated = "next";
};
tabs = { content = {
show = "multiple"; persistent_storage = true;
mousewheel_switching = false; notifications.enabled = true;
last_close = "close"; register_protocol_handler = true;
new_position.unrelated = "next"; mute = true;
headers.accept_language = "ja-JP,en-US";
};
editor.command = ["kitty" "-e" "nvim" "{}"];
}; };
content = { keyBindings = {
persistent_storage = true; normal = {
notifications.enabled = true; d = "scroll-page 0 0.5";
register_protocol_handler = true; u = "scroll-page 0 -0.5";
mute = true; D = "scroll-page 0 0.5";
headers.accept_language = "ja-JP,en-US"; U = "scroll-page 0 -0.5";
"<Alt+Left>" = "back";
"<Alt+Right>" = "forward";
"<Ctrl+Shift+Tab>" = "tab-prev";
"<Ctrl+Tab>" = "tab-next";
J = "tab-prev";
K = "tab-next";
"<F12>" = "devtools";
zb = "bookmark-del";
x = "tab-close";
X = "undo";
st = "config-cycle tabs.show multiple switching";
sTh = "set tabs.position left";
sTj = "set tabs.position bottom";
sTk = "set tabs.position top";
sTl = "set tabs.position right";
};
}; };
editor.command = [ "kitty" "-e" "nvim" "{}" ]; extraConfig = ''
# Mute tabs by default
from qutebrowser.mainwindow import tabwidget
tabwidget.TabWidget.MUTE_STRING = ""
tabwidget.TabWidget.AUDIBLE_STRING = "[A]"
# Use ranger as the file selector
c.fileselect.handler = 'external'
c.fileselect.folder.command = ['kitty', '-e', 'ranger', '--choosedir={}']
c.fileselect.multiple_files.command = ['kitty', '-e', 'ranger', '--choosefiles={}']
c.fileselect.single_file.command = ['kitty', '-e', 'ranger', '--choosefile={}']
# Better context menu colors
c.colors.contextmenu.disabled.fg = '#808080'
c.colors.contextmenu.menu.bg = '#353535'
c.colors.contextmenu.menu.fg = '#ffffff'
c.colors.contextmenu.selected.bg = '#909090'
# Chromium flags
c.qt.args = ["disable-backing-store-limit", "enable-accelerated-video-decode", "disable-gpu-driver-bug-workarounds"]
c.qt.chromium.low_end_device_mode = 'never'
# Download settings
c.downloads.location.directory = "$HOME/Downloads"
c.downloads.location.prompt = False
c.downloads.position = "bottom"
c.downloads.remove_finished = 5000
# Increase the default scroll offset of j/k
# NOTE: Unfortunately this breaks websites that use their own keybinds for j/k/etc
# config.bind('j', 'run-with-count 5 scroll down')
# config.bind('k', 'run-with-count 5 scroll up')
# NOTE: Use with smooth scrolling enabled to scroll smoothly
# config.bind('d', 'run-with-count 12 scroll down')
# config.bind('u', 'run-with-count 12 scroll up')
# Don't paste something by accident
config.unbind('pp', mode='normal')
config.unbind('pP', mode='normal')
config.unbind('Pp', mode='normal')
config.unbind('PP', mode='normal')
config.unbind('wp', mode='normal')
config.unbind('wP', mode='normal')
# Easily enter account information
# NOTE: I re-evaluated pass when I was focusing on a terminal-centric workflow.
config.bind('zl', 'spawn --userscript qute-pass')
config.bind('zpl', 'spawn --userscript qute-pass --password-only')
config.bind('zol', 'spawn --userscript qute-pass --otp-only')
# Hide the status bar except under exceptional circumstances
# NOTE: This broke more things than not, which is why I ultimately decided
# to always use the status bar. More information can be found in the
# following discussion: https://github.com/qutebrowser/qutebrowser/issues/2236
# config.bind('o', 'set statusbar.show always;; set-cmd-text -s :open')
# config.bind('O', 'set statusbar.show always;; set-cmd-text -s :open -t')
# config.bind('T', 'set statusbar.show always;; set-cmd-text -sr :tab-focus')
# config.bind(':', 'set statusbar.show always;; set-cmd-text :')
# config.bind('/', 'set statusbar.show always;; set-cmd-text /')
# config.bind('<Escape>', 'mode-enter normal;; set statusbar.show in-mode', mode='command')
config.bind('zM', 'spawn mpv --force-window=immediate {url}')
config.bind('zm', 'hint links spawn mpv --force-window=immediate {hint-url}')
# Use proxy websites for popular services
config.bind('zu', 'hint links spawn -u untrack-url -O {hint-url}')
# Don't automatically enter/leave insert mode
# NOTE: This was originally done to prevent insert mode from prematurely exiting
# in certain # cases (such as mouse usage), although keeping auto functionality
# seems to be more useful # long-term.
c.input.insert_mode.auto_enter = False
c.input.insert_mode.auto_leave = False
c.url.start_pages = ['about:blank']
c.url.default_page = "about:blank"
c.url.searchengines = {
'DEFAULT': 'https://search.goo.ne.jp/web.jsp?MT={}'
}
'';
}; };
}
keyBindings = { ];
normal = {
d = "scroll-page 0 0.5";
u = "scroll-page 0 -0.5";
D = "scroll-page 0 0.5";
U = "scroll-page 0 -0.5";
"<Alt+Left>" = "back";
"<Alt+Right>" = "forward";
"<Ctrl+Shift+Tab>" = "tab-prev";
"<Ctrl+Tab>" = "tab-next";
J = "tab-prev";
K = "tab-next";
"<F12>" = "devtools";
zb = "bookmark-del";
x = "tab-close";
X = "undo";
st = "config-cycle tabs.show multiple switching";
sTh = "set tabs.position left";
sTj = "set tabs.position bottom";
sTk = "set tabs.position top";
sTl = "set tabs.position right";
};
};
extraConfig = ''
# Mute tabs by default
from qutebrowser.mainwindow import tabwidget
tabwidget.TabWidget.MUTE_STRING = ""
tabwidget.TabWidget.AUDIBLE_STRING = "[A]"
# Use ranger as the file selector
c.fileselect.handler = 'external'
c.fileselect.folder.command = ['kitty', '-e', 'ranger', '--choosedir={}']
c.fileselect.multiple_files.command = ['kitty', '-e', 'ranger', '--choosefiles={}']
c.fileselect.single_file.command = ['kitty', '-e', 'ranger', '--choosefile={}']
# Better context menu colors
c.colors.contextmenu.disabled.fg = '#808080'
c.colors.contextmenu.menu.bg = '#353535'
c.colors.contextmenu.menu.fg = '#ffffff'
c.colors.contextmenu.selected.bg = '#909090'
# Chromium flags
c.qt.args = ["disable-backing-store-limit", "enable-accelerated-video-decode", "disable-gpu-driver-bug-workarounds"]
c.qt.chromium.low_end_device_mode = 'never'
# Download settings
c.downloads.location.directory = "$HOME/Downloads"
c.downloads.location.prompt = False
c.downloads.position = "bottom"
c.downloads.remove_finished = 5000
# Increase the default scroll offset of j/k
# NOTE: Unfortunately this breaks websites that use their own keybinds for j/k/etc
# config.bind('j', 'run-with-count 5 scroll down')
# config.bind('k', 'run-with-count 5 scroll up')
# NOTE: Use with smooth scrolling enabled to scroll smoothly
# config.bind('d', 'run-with-count 12 scroll down')
# config.bind('u', 'run-with-count 12 scroll up')
# Don't paste something by accident
config.unbind('pp', mode='normal')
config.unbind('pP', mode='normal')
config.unbind('Pp', mode='normal')
config.unbind('PP', mode='normal')
config.unbind('wp', mode='normal')
config.unbind('wP', mode='normal')
# Easily enter account information
# NOTE: I re-evaluated pass when I was focusing on a terminal-centric workflow.
config.bind('zl', 'spawn --userscript qute-pass')
config.bind('zpl', 'spawn --userscript qute-pass --password-only')
config.bind('zol', 'spawn --userscript qute-pass --otp-only')
# Hide the status bar except under exceptional circumstances
# NOTE: This broke more things than not, which is why I ultimately decided
# to always use the status bar. More information can be found in the
# following discussion: https://github.com/qutebrowser/qutebrowser/issues/2236
# config.bind('o', 'set statusbar.show always;; set-cmd-text -s :open')
# config.bind('O', 'set statusbar.show always;; set-cmd-text -s :open -t')
# config.bind('T', 'set statusbar.show always;; set-cmd-text -sr :tab-focus')
# config.bind(':', 'set statusbar.show always;; set-cmd-text :')
# config.bind('/', 'set statusbar.show always;; set-cmd-text /')
# config.bind('<Escape>', 'mode-enter normal;; set statusbar.show in-mode', mode='command')
config.bind('zM', 'spawn mpv --force-window=immediate {url}')
config.bind('zm', 'hint links spawn mpv --force-window=immediate {hint-url}')
# Use proxy websites for popular services
config.bind('zu', 'hint links spawn -u untrack-url -O {hint-url}')
# Don't automatically enter/leave insert mode
# NOTE: This was originally done to prevent insert mode from prematurely exiting
# in certain # cases (such as mouse usage), although keeping auto functionality
# seems to be more useful # long-term.
c.input.insert_mode.auto_enter = False
c.input.insert_mode.auto_leave = False
c.url.start_pages = ['about:blank']
c.url.default_page = "about:blank"
c.url.searchengines = {
'DEFAULT': 'https://search.goo.ne.jp/web.jsp?MT={}'
}
'';
};
}];
} }

View File

@ -1,33 +1,37 @@
{ pkgs, lib, ... }:
{ {
home-manager.sharedModules = [{ pkgs,
programs.rofi = { lib,
enable = true; ...
}: {
home-manager.sharedModules = [
{
programs.rofi = {
enable = true;
package = (pkgs.callPackage ../../packages/rofi/wrapper.nix { package = pkgs.callPackage ../../packages/rofi/wrapper.nix {
rofi-unwrapped = (pkgs.callPackage ../../packages/rofi/wayland.nix { }); rofi-unwrapped = pkgs.callPackage ../../packages/rofi/wayland.nix {};
}); };
cycle = false; cycle = false;
extraConfig = { extraConfig = {
modi = "drun,filebrowser"; modi = "drun,filebrowser";
font = "Noto Sans CJK JP 12"; font = "Noto Sans CJK JP 12";
show-icons = true; show-icons = true;
bw = 0; bw = 0;
display-drun = ""; display-drun = "";
display-window = ""; display-window = "";
display-combi = ""; display-combi = "";
icon-theme = "Fluent-dark"; icon-theme = "Fluent-dark";
terminal = "kitty"; terminal = "kitty";
drun-match-fields = "name"; drun-match-fields = "name";
drun-display-format = "{name}"; drun-display-format = "{name}";
me-select-entry = ""; me-select-entry = "";
me-accept-entry = "MousePrimary"; me-accept-entry = "MousePrimary";
};
theme = lib.mkForce ./launchpad.rasi;
}; };
}
theme = lib.mkForce ./launchpad.rasi; ];
};
}];
} }

View File

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
stylix.image = ./wallpaper.png; stylix.image = ./wallpaper.png;
stylix.polarity = "dark"; stylix.polarity = "dark";
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/monokai.yaml"; stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/monokai.yaml";

View File

@ -1,23 +1,23 @@
{ pkgs, ... }: {pkgs, ...}: {
security.pam.services.swaylock = {};
{ home-manager.sharedModules = [
security.pam.services.swaylock = { }; {
programs.swaylock = {
home-manager.sharedModules = [{ package = pkgs."swaylock-effects";
programs.swaylock = { settings = {
package = pkgs."swaylock-effects"; show-keyboard-layout = true;
settings = { daemonize = true;
show-keyboard-layout = true; effect-blur = "20x2";
daemonize = true; clock = true;
effect-blur = "20x2"; indicator = true;
clock = true; font-size = 25;
indicator = true; indicator-radius = 85;
font-size = 25; indicator-thickness = 16;
indicator-radius = 85; screenshots = true;
indicator-thickness = 16; fade-in = 1;
screenshots = true; };
fade-in = 1;
}; };
}; }
}]; ];
} }

View File

@ -1,22 +1,22 @@
{ pkgs, ... }: {pkgs, ...}: {
{
programs.thunar.enable = true; programs.thunar.enable = true;
services.tumbler.enable = true; # Thumbnail support services.tumbler.enable = true; # Thumbnail support
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
xfce.exo # Open with kitty support xfce.exo # Open with kitty support
glib glib
(pkgs.callPackage ../../packages/go-thumbnailer { }) (pkgs.callPackage ../../packages/go-thumbnailer {})
]; ];
services.gvfs.enable = true; # Trash support services.gvfs.enable = true; # Trash support
services.gnome.gnome-keyring.enable = true; # Mount support services.gnome.gnome-keyring.enable = true; # Mount support
home-manager.sharedModules = [{ home-manager.sharedModules = [
xdg.configFile."xfce4/helpers.rc".text = '' {
TerminalEmulator=kitty xdg.configFile."xfce4/helpers.rc".text = ''
TerminalEmulatorDismissed=true TerminalEmulator=kitty
''; TerminalEmulatorDismissed=true
}]; '';
}
];
} }

View File

@ -1,154 +1,157 @@
{ lib, pkgs, ... }:
{ {
home-manager.sharedModules = [{ lib,
programs.waybar = { pkgs,
enable = true; ...
package = (pkgs.callPackage ../../packages/waybar { }); }: {
home-manager.sharedModules = [
{
programs.waybar = {
enable = true;
package = pkgs.callPackage ../../packages/waybar {};
settings = { settings = {
mainBar = { mainBar = {
layer = "top"; layer = "top";
position = "right"; position = "right";
width = 45; width = 45;
spacing = 8;
modules-left = [ "wlr/workspaces" "custom/new-workspace" ];
modules-right =
[ "tray" "wireplumber" "backlight" "battery" "clock" ];
tray = {
icon-size = 24;
spacing = 8; spacing = 8;
};
"wlr/workspaces" = { modules-left = ["wlr/workspaces" "custom/new-workspace"];
on-click = "activate"; modules-right = ["tray" "wireplumber" "backlight" "battery" "clock"];
sort-by-number = true;
format = "{icon}"; tray = {
format-icons = { icon-size = 24;
"1" = ""; spacing = 8;
"2" = "";
"3" = "";
"4" = "";
"5" = "";
"6" = "";
"7" = "";
"8" = "";
"9" = "";
"10" = "";
}; };
};
wireplumber = { "wlr/workspaces" = {
format = "{icon}"; on-click = "activate";
tooltip-format = "{volume}% {node_name}"; sort-by-number = true;
format-muted = ""; format = "{icon}";
format-icons = [ "" "" ]; format-icons = {
}; "1" = "";
"2" = "";
battery = { "3" = "";
"format" = "{icon}"; "4" = "";
"tooltip-format" = "{capacity}% {timeTo}"; "5" = "";
"format-icons" = [ "" "" "" "" "" ]; "6" = "";
}; "7" = "";
"8" = "";
clock = { "9" = "";
"format" = "{:%H\n%M}"; "10" = "";
"tooltip-format" = "<tt>{calendar}</tt>";
"calendar" = {
"mode" = "month";
"weeks-pos" = "right";
"format" = {
"months" = "<span color='#ffead3'><b>{}</b></span>";
"days" = "<span color='#ecc6d9'><b>{}</b></span>";
"weeks" = "<span size='14pt' color='#99ffdd'><b>W{}</b></span>";
"weekdays" = "<span size='18pt' color='#ffcc66'><b>{}</b></span>";
"today" = "<span color='#ff6699'><b>{}</b></span>";
}; };
}; };
};
backlight = { wireplumber = {
"format" = "{icon}"; format = "{icon}";
"format-icons" = [ "" "" ]; tooltip-format = "{volume}% {node_name}";
}; format-muted = "";
format-icons = ["" ""];
};
"custom/new-workspace" = { battery = {
"format" = "+"; "format" = "{icon}";
"on-click" = "hyprctl dispatch workspace empty && rofi -show drun"; "tooltip-format" = "{capacity}% {timeTo}";
"on-click-right" = "rofi -show drun"; "format-icons" = ["" "" "" "" ""];
"tooltip" = false; };
clock = {
"format" = "{:%H\n%M}";
"tooltip-format" = "<tt>{calendar}</tt>";
"calendar" = {
"mode" = "month";
"weeks-pos" = "right";
"format" = {
"months" = "<span color='#ffead3'><b>{}</b></span>";
"days" = "<span color='#ecc6d9'><b>{}</b></span>";
"weeks" = "<span size='14pt' color='#99ffdd'><b>W{}</b></span>";
"weekdays" = "<span size='18pt' color='#ffcc66'><b>{}</b></span>";
"today" = "<span color='#ff6699'><b>{}</b></span>";
};
};
};
backlight = {
"format" = "{icon}";
"format-icons" = ["" ""];
};
"custom/new-workspace" = {
"format" = "+";
"on-click" = "hyprctl dispatch workspace empty && rofi -show drun";
"on-click-right" = "rofi -show drun";
"tooltip" = false;
};
}; };
}; };
style = lib.mkForce ''
@define-color base00 #272822;
@define-color base01 #383830;
@define-color base02 #49483e;
@define-color base03 #75715e;
@define-color base04 #a59f85;
@define-color base05 #f8f8f2;
@define-color base06 #f5f4f1;
@define-color base07 #f9f8f5;
@define-color base08 #f92672;
@define-color base09 #fd971f;
@define-color base0A #f4bf75;
@define-color base0B #a6e22e;
@define-color base0C #a1efe4;
@define-color base0D #66d9ef;
@define-color base0E #ae81ff;
@define-color base0F #cc6633;
* {
color: @base05;
font-size: 16px;
}
window#waybar {
background: alpha(@base00, 0.92);
border-left: 1px solid alpha(@base02, 0.67);
}
#workspaces button {
padding: 12px 0;
border-radius: 0;
}
#workspaces button.active {
background: alpha(@base02, 0.67);
}
#window {
padding-top: 8px;
padding-bottom: 12px;
}
tooltip, #tray menu {
background: @base00;
border: 1px solid alpha(@base09, 0.93);
padding: 8px;
}
#backlight, #battery, #wireplumber {
font-family: "Font Awesome 6 Free Solid";
font-size: 24px;
}
#custom-new-workspace {
font-family: "Font Awesome 6 Free Solid";
padding-top: 8px;
padding-bottom: 8px;
color: alpha(@base0A, 0.67);
}
#clock {
font-size: 18px;
font-weight: bold;
padding-bottom: 8px;
}
'';
}; };
}
style = lib.mkForce '' ];
@define-color base00 #272822;
@define-color base01 #383830;
@define-color base02 #49483e;
@define-color base03 #75715e;
@define-color base04 #a59f85;
@define-color base05 #f8f8f2;
@define-color base06 #f5f4f1;
@define-color base07 #f9f8f5;
@define-color base08 #f92672;
@define-color base09 #fd971f;
@define-color base0A #f4bf75;
@define-color base0B #a6e22e;
@define-color base0C #a1efe4;
@define-color base0D #66d9ef;
@define-color base0E #ae81ff;
@define-color base0F #cc6633;
* {
color: @base05;
font-size: 16px;
}
window#waybar {
background: alpha(@base00, 0.92);
border-left: 1px solid alpha(@base02, 0.67);
}
#workspaces button {
padding: 12px 0;
border-radius: 0;
}
#workspaces button.active {
background: alpha(@base02, 0.67);
}
#window {
padding-top: 8px;
padding-bottom: 12px;
}
tooltip, #tray menu {
background: @base00;
border: 1px solid alpha(@base09, 0.93);
padding: 8px;
}
#backlight, #battery, #wireplumber {
font-family: "Font Awesome 6 Free Solid";
font-size: 24px;
}
#custom-new-workspace {
font-family: "Font Awesome 6 Free Solid";
padding-top: 8px;
padding-bottom: 8px;
color: alpha(@base0A, 0.67);
}
#clock {
font-size: 18px;
font-weight: bold;
padding-bottom: 8px;
}
'';
};
}];
} }

View File

@ -1,19 +1,21 @@
{ {
home-manager.sharedModules = [{ home-manager.sharedModules = [
xdg.userDirs = { {
enable = true; xdg.userDirs = {
enable = true;
desktop = null; desktop = null;
templates = null; templates = null;
publicShare = null; publicShare = null;
download = "/home/user/"; download = "/home/user/";
documents = "/home/user/"; documents = "/home/user/";
music = "/home/user/"; music = "/home/user/";
pictures = "/home/user/"; pictures = "/home/user/";
videos = "/home/user/"; videos = "/home/user/";
}; };
xdg.configFile."user-dirs.locale".text = "ja_JP"; xdg.configFile."user-dirs.locale".text = "ja_JP";
}]; }
];
} }

View File

@ -1,15 +1,17 @@
{ {
home-manager.sharedModules = [{ home-manager.sharedModules = [
programs.zathura = { {
enable = true; programs.zathura = {
enable = true;
options = { options = {
guioptions = "v"; guioptions = "v";
adjust-open = "width"; adjust-open = "width";
statusbar-basename = true; statusbar-basename = true;
render-loading = false; render-loading = false;
scroll-step = 120; scroll-step = 120;
};
}; };
}; }
}]; ];
} }

View File

@ -1,10 +1,10 @@
{ lib {
, buildGoModule lib,
, fetchFromGitHub buildGoModule,
, pkg-config fetchFromGitHub,
, vips pkg-config,
vips,
}: }:
buildGoModule rec { buildGoModule rec {
pname = "go-thumbnailer"; pname = "go-thumbnailer";
version = "0.1.0"; version = "0.1.0";
@ -36,6 +36,6 @@ buildGoModule rec {
description = "A cover thumbnailer written in Go for performance and reliability."; description = "A cover thumbnailer written in Go for performance and reliability.";
homepage = "https://github.com/donovanglover/go-thumbnailer"; homepage = "https://github.com/donovanglover/go-thumbnailer";
license = licenses.mit; license = licenses.mit;
maintainers = [ ]; maintainers = [];
}; };
} }

View File

@ -1,5 +1,8 @@
{ lib, rustPlatform, fetchFromGitHub }: {
lib,
rustPlatform,
fetchFromGitHub,
}:
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
pname = "hyprland-autoname-workspaces"; pname = "hyprland-autoname-workspaces";
version = "1.0.0"; version = "1.0.0";
@ -17,6 +20,6 @@ rustPlatform.buildRustPackage rec {
description = "Automatically rename the workspaces with icons of started applications"; description = "Automatically rename the workspaces with icons of started applications";
homepage = "https://github.com/hyprland-community/hyprland-autoname-workspaces"; homepage = "https://github.com/hyprland-community/hyprland-autoname-workspaces";
license = licenses.isc; license = licenses.isc;
maintainers = with maintainers; [ donovanglover ]; maintainers = with maintainers; [donovanglover];
}; };
} }

View File

@ -1,5 +1,8 @@
{ lib, rustPlatform, fetchFromGitHub }: {
lib,
rustPlatform,
fetchFromGitHub,
}:
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
pname = "joshuto"; pname = "joshuto";
version = "493af3185092036cbbae81ae620b101f66cf4e9a"; version = "493af3185092036cbbae81ae620b101f66cf4e9a";
@ -17,6 +20,6 @@ rustPlatform.buildRustPackage rec {
description = "Ranger-like terminal file manager written in Rust"; description = "Ranger-like terminal file manager written in Rust";
homepage = "https://github.com/kamiyaa/joshuto"; homepage = "https://github.com/kamiyaa/joshuto";
license = licenses.lgpl3Only; license = licenses.lgpl3Only;
maintainers = with maintainers; [ figsoda totoroot ]; maintainers = with maintainers; [figsoda totoroot];
}; };
} }

View File

@ -1,11 +1,11 @@
{ lib {
, buildGoModule lib,
, fetchFromGitHub buildGoModule,
, pkg-config fetchFromGitHub,
, gtk3 pkg-config,
, gtk-layer-shell gtk3,
gtk-layer-shell,
}: }:
buildGoModule rec { buildGoModule rec {
pname = "nwg-dock-hyprland"; pname = "nwg-dock-hyprland";
version = "0.1.2"; version = "0.1.2";
@ -19,16 +19,16 @@ buildGoModule rec {
vendorSha256 = "sha256-GhcrIVnZRbiGTfeUAWvslOVWDZmoL0ZRnjgTtQgxe2Q="; vendorSha256 = "sha256-GhcrIVnZRbiGTfeUAWvslOVWDZmoL0ZRnjgTtQgxe2Q=";
ldflags = [ "-s" "-w" ]; ldflags = ["-s" "-w"];
nativeBuildInputs = [ pkg-config ]; nativeBuildInputs = [pkg-config];
buildInputs = [ gtk3 gtk-layer-shell ]; buildInputs = [gtk3 gtk-layer-shell];
meta = with lib; { meta = with lib; {
description = "GTK3-based dock for hyprland"; description = "GTK3-based dock for hyprland";
homepage = "https://github.com/nwg-piotr/nwg-dock-hyprland"; homepage = "https://github.com/nwg-piotr/nwg-dock-hyprland";
license = licenses.mit; license = licenses.mit;
platforms = platforms.linux; platforms = platforms.linux;
maintainers = with maintainers; [ dit7ya ]; maintainers = with maintainers; [dit7ya];
}; };
} }

View File

@ -1,28 +1,28 @@
{ stdenv {
, lib stdenv,
, fetchFromGitHub lib,
, meson fetchFromGitHub,
, ninja meson,
, pkg-config ninja,
, libxkbcommon pkg-config,
, pango libxkbcommon,
, which pango,
, git which,
, cairo git,
, libxcb cairo,
, xcbutil libxcb,
, xcbutilwm xcbutil,
, xcbutilxrm xcbutilwm,
, xcb-util-cursor xcbutilxrm,
, libstartup_notification xcb-util-cursor,
, bison libstartup_notification,
, flex bison,
, librsvg flex,
, check librsvg,
, glib check,
, buildPackages glib,
buildPackages,
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "rofi-unwrapped"; pname = "rofi-unwrapped";
version = "1.7.5"; version = "1.7.5";
@ -41,8 +41,8 @@ stdenv.mkDerivation rec {
sed -i 's/~root/~nobody/g' test/helper-expand.c sed -i 's/~root/~nobody/g' test/helper-expand.c
''; '';
depsBuildBuild = [ buildPackages.stdenv.cc pkg-config glib ]; depsBuildBuild = [buildPackages.stdenv.cc pkg-config glib];
nativeBuildInputs = [ meson ninja pkg-config flex bison ]; nativeBuildInputs = [meson ninja pkg-config flex bison];
buildInputs = [ buildInputs = [
libxkbcommon libxkbcommon
pango pango
@ -65,7 +65,7 @@ stdenv.mkDerivation rec {
description = "Window switcher, run dialog and dmenu replacement"; description = "Window switcher, run dialog and dmenu replacement";
homepage = "https://github.com/davatorium/rofi"; homepage = "https://github.com/davatorium/rofi";
license = licenses.mit; license = licenses.mit;
maintainers = with maintainers; [ bew ]; maintainers = with maintainers; [bew];
platforms = with platforms; linux; platforms = with platforms; linux;
}; };
} }

View File

@ -1,12 +1,12 @@
{ stdenv {
, lib stdenv,
, fetchFromGitHub lib,
, rofi-unwrapped fetchFromGitHub,
, wayland-scanner rofi-unwrapped,
, wayland-protocols wayland-scanner,
, wayland wayland-protocols,
wayland,
}: }:
rofi-unwrapped.overrideAttrs (oldAttrs: rec { rofi-unwrapped.overrideAttrs (oldAttrs: rec {
pname = "rofi-wayland-unwrapped"; pname = "rofi-wayland-unwrapped";
version = "git"; version = "git";
@ -19,14 +19,14 @@ rofi-unwrapped.overrideAttrs (oldAttrs: rec {
sha256 = "sha256-8IfHpaVFGeWqyw+tLjNtg+aWwAHhSA5PuXJYjpoht2E="; sha256 = "sha256-8IfHpaVFGeWqyw+tLjNtg+aWwAHhSA5PuXJYjpoht2E=";
}; };
nativeBuildInputs = oldAttrs.nativeBuildInputs ++ [ wayland-scanner ]; nativeBuildInputs = oldAttrs.nativeBuildInputs ++ [wayland-scanner];
buildInputs = oldAttrs.buildInputs ++ [ wayland wayland-protocols ]; buildInputs = oldAttrs.buildInputs ++ [wayland wayland-protocols];
meta = with lib; { meta = with lib; {
description = "Window switcher, run dialog and dmenu replacement for Wayland"; description = "Window switcher, run dialog and dmenu replacement for Wayland";
homepage = "https://github.com/lbonn/rofi"; homepage = "https://github.com/lbonn/rofi";
license = licenses.mit; license = licenses.mit;
maintainers = with maintainers; [ bew ]; maintainers = with maintainers; [bew];
platforms = with platforms; linux; platforms = with platforms; linux;
}; };
}) })

View File

@ -1,14 +1,26 @@
{ symlinkJoin, lib, rofi-unwrapped, makeWrapper, wrapGAppsHook, gdk-pixbuf, hicolor-icon-theme, theme ? null, plugins ? [], symlink-dmenu ? false }: {
symlinkJoin,
lib,
rofi-unwrapped,
makeWrapper,
wrapGAppsHook,
gdk-pixbuf,
hicolor-icon-theme,
theme ? null,
plugins ? [],
symlink-dmenu ? false,
}:
symlinkJoin { symlinkJoin {
name = "rofi-${rofi-unwrapped.version}"; name = "rofi-${rofi-unwrapped.version}";
paths = [ paths =
rofi-unwrapped.out [
] ++ (lib.forEach plugins (p: p.out)); rofi-unwrapped.out
]
++ (lib.forEach plugins (p: p.out));
nativeBuildInputs = [ makeWrapper wrapGAppsHook ]; nativeBuildInputs = [makeWrapper wrapGAppsHook];
buildInputs = [ gdk-pixbuf ]; buildInputs = [gdk-pixbuf];
preferLocalBuild = true; preferLocalBuild = true;
passthru.unwrapped = rofi-unwrapped; passthru.unwrapped = rofi-unwrapped;
@ -36,7 +48,9 @@ symlinkJoin {
--prefix XDG_DATA_DIRS : $out/share --prefix XDG_DATA_DIRS : $out/share
''; '';
meta = rofi-unwrapped.meta // { meta =
priority = (rofi-unwrapped.meta.priority or 0) - 1; rofi-unwrapped.meta
}; // {
priority = (rofi-unwrapped.meta.priority or 0) - 1;
};
} }

View File

@ -1,32 +1,30 @@
{ lib {
, stdenv lib,
, fetchurl stdenv,
, fetchFromGitHub fetchurl,
, cmake fetchFromGitHub,
, curl cmake,
, nasm curl,
, libopenmpt nasm,
, p7zip libopenmpt,
, libgme p7zip,
, libpng libgme,
, SDL2 libpng,
, SDL2_mixer SDL2,
, zlib SDL2_mixer,
, unzip zlib,
, makeWrapper unzip,
, makeDesktopItem makeWrapper,
, copyDesktopItems makeDesktopItem,
}: copyDesktopItems,
}: let
let
version = "2.2.11"; version = "2.2.11";
# Normal assets found on the official release # Normal assets found on the official release
assets = stdenv.mkDerivation rec { assets = stdenv.mkDerivation rec {
pname = "srb2-data"; pname = "srb2-data";
inherit version; inherit version;
nativeBuildInputs = [ unzip ]; nativeBuildInputs = [unzip];
src = fetchurl { src = fetchurl {
url = "https://github.com/STJr/SRB2/releases/download/SRB2_release_${version}/SRB2-v${lib.replaceStrings ["."] [""] version}-Full.zip"; url = "https://github.com/STJr/SRB2/releases/download/SRB2_release_${version}/SRB2-v${lib.replaceStrings ["."] [""] version}-Full.zip";
sha256 = "sha256-KsJIkCczD/HyIwEy5dI3zsHbWFCMBaCoCHizfupFoWM="; sha256 = "sha256-KsJIkCczD/HyIwEy5dI3zsHbWFCMBaCoCHizfupFoWM=";
@ -37,79 +35,78 @@ let
cp -r *pk3 *dta *dat models/ $out/share/srb2/ cp -r *pk3 *dta *dat models/ $out/share/srb2/
''; '';
}; };
in
stdenv.mkDerivation rec {
pname = "srb2";
inherit version;
in stdenv.mkDerivation rec { src = fetchFromGitHub {
owner = "STJr";
repo = "SRB2";
rev = "SRB2_release_${version}";
sha256 = "sha256-tyiXivJWjNnL+4YynUV6k6iaMs8o9HkHrp+qFj2+qvQ=";
};
pname = "srb2"; nativeBuildInputs = [
inherit version; cmake
nasm
p7zip
makeWrapper
copyDesktopItems
];
src = fetchFromGitHub { buildInputs = [
owner = "STJr"; curl
repo = "SRB2"; libgme
rev = "SRB2_release_${version}"; libpng
sha256 = "sha256-tyiXivJWjNnL+4YynUV6k6iaMs8o9HkHrp+qFj2+qvQ="; libopenmpt
}; SDL2
SDL2_mixer
zlib
];
nativeBuildInputs = [ cmakeFlags = [
cmake "-DSRB2_ASSET_DIRECTORY=${assets}/share/srb2"
nasm "-DGME_INCLUDE_DIR=${libgme}/include"
p7zip "-DOPENMPT_INCLUDE_DIR=${libopenmpt.dev}/include"
makeWrapper "-DSDL2_MIXER_INCLUDE_DIR=${lib.getDev SDL2_mixer}/include/SDL2"
copyDesktopItems "-DSDL2_INCLUDE_DIR=${lib.getDev SDL2.dev}/include/SDL2"
]; ];
buildInputs = [ patches = [
curl ./cmake.patch
libgme ];
libpng
libopenmpt
SDL2
SDL2_mixer
zlib
];
cmakeFlags = [ # Desktop icon
"-DSRB2_ASSET_DIRECTORY=${assets}/share/srb2" desktopItems = [
"-DGME_INCLUDE_DIR=${libgme}/include" (makeDesktopItem rec {
"-DOPENMPT_INCLUDE_DIR=${libopenmpt.dev}/include" name = "Sonic Robo Blast 2";
"-DSDL2_MIXER_INCLUDE_DIR=${lib.getDev SDL2_mixer}/include/SDL2" exec = pname;
"-DSDL2_INCLUDE_DIR=${lib.getDev SDL2.dev}/include/SDL2" icon = pname;
]; comment = meta.description;
desktopName = name;
genericName = name;
categories = ["Game"];
})
];
patches = [ installPhase = ''
./cmake.patch mkdir -p $out/bin $out/share/applications $out/share/pixmaps $out/share/icons
];
# Desktop icon copyDesktopItems
desktopItems = [
(makeDesktopItem rec {
name = "Sonic Robo Blast 2";
exec = pname;
icon = pname;
comment = meta.description;
desktopName = name;
genericName = name;
categories = [ "Game" ];
})
];
installPhase = '' cp ../srb2.png $out/share/pixmaps/.
mkdir -p $out/bin $out/share/applications $out/share/pixmaps $out/share/icons cp ../srb2.png $out/share/icons/.
copyDesktopItems cp bin/lsdlsrb2 $out/bin/srb2
wrapProgram $out/bin/srb2 --set SRB2WADDIR "${assets}/share/srb2"
'';
cp ../srb2.png $out/share/pixmaps/. meta = with lib; {
cp ../srb2.png $out/share/icons/. description = "Sonic Robo Blast 2 is a 3D Sonic the Hedgehog fangame based on a modified version of Doom Legacy";
homepage = "https://www.srb2.org/";
cp bin/lsdlsrb2 $out/bin/srb2 platforms = platforms.linux;
wrapProgram $out/bin/srb2 --set SRB2WADDIR "${assets}/share/srb2" license = licenses.gpl2Plus;
''; maintainers = with maintainers; [zeratax];
};
meta = with lib; { }
description = "Sonic Robo Blast 2 is a 3D Sonic the Hedgehog fangame based on a modified version of Doom Legacy";
homepage = "https://www.srb2.org/";
platforms = platforms.linux;
license = licenses.gpl2Plus;
maintainers = with maintainers; [ zeratax ];
};
}

View File

@ -1,39 +1,56 @@
{ lib {
, stdenv lib,
, fetchFromGitHub stdenv,
, meson fetchFromGitHub,
, pkg-config meson,
, ninja pkg-config,
, wrapGAppsHook ninja,
, wayland wrapGAppsHook,
, wlroots wayland,
, gtkmm3 wlroots,
, libsigcxx gtkmm3,
, jsoncpp libsigcxx,
, scdoc jsoncpp,
, spdlog scdoc,
, gtk-layer-shell spdlog,
, howard-hinnant-date gtk-layer-shell,
, libinotify-kqueue howard-hinnant-date,
, libxkbcommon libinotify-kqueue,
, evdevSupport ? true, libevdev libxkbcommon,
, inputSupport ? true, libinput evdevSupport ? true,
, jackSupport ? true, libjack2 libevdev,
, mpdSupport ? true, libmpdclient inputSupport ? true,
, mprisSupport ? stdenv.isLinux, playerctl ? false libinput,
, nlSupport ? true, libnl jackSupport ? true,
, pulseSupport ? true, libpulseaudio libjack2,
, rfkillSupport ? true mpdSupport ? true,
, runTests ? true, catch2_3 libmpdclient,
, sndioSupport ? true, sndio mprisSupport ? stdenv.isLinux,
, swaySupport ? true, sway playerctl ? false,
, traySupport ? true, libdbusmenu-gtk3 nlSupport ? true,
, udevSupport ? true, udev libnl,
, upowerSupport ? true, upower pulseSupport ? true,
, wireplumberSupport ? true, wireplumber libpulseaudio,
, withMediaPlayer ? mprisSupport && false, glib, gobject-introspection, python3 rfkillSupport ? true,
runTests ? true,
catch2_3,
sndioSupport ? true,
sndio,
swaySupport ? true,
sway,
traySupport ? true,
libdbusmenu-gtk3,
udevSupport ? true,
udev,
upowerSupport ? true,
upower,
wireplumberSupport ? true,
wireplumber,
withMediaPlayer ? mprisSupport && false,
glib,
gobject-introspection,
python3,
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "waybar"; pname = "waybar";
version = "0.9.18"; version = "0.9.18";
@ -45,9 +62,15 @@ stdenv.mkDerivation rec {
hash = "sha256-bnaYNa1jb7kZ1mtMzeOQqz4tmBG1w5YXlQWoop1Q0Yc="; hash = "sha256-bnaYNa1jb7kZ1mtMzeOQqz4tmBG1w5YXlQWoop1Q0Yc=";
}; };
nativeBuildInputs = [ nativeBuildInputs =
meson ninja pkg-config scdoc wrapGAppsHook [
] ++ lib.optional withMediaPlayer gobject-introspection; meson
ninja
pkg-config
scdoc
wrapGAppsHook
]
++ lib.optional withMediaPlayer gobject-introspection;
propagatedBuildInputs = lib.optionals withMediaPlayer [ propagatedBuildInputs = lib.optionals withMediaPlayer [
glib glib
@ -58,56 +81,63 @@ stdenv.mkDerivation rec {
strictDeps = false; strictDeps = false;
buildInputs = with lib; buildInputs = with lib;
[ wayland wlroots gtkmm3 libsigcxx jsoncpp spdlog gtk-layer-shell howard-hinnant-date libxkbcommon ] [wayland wlroots gtkmm3 libsigcxx jsoncpp spdlog gtk-layer-shell howard-hinnant-date libxkbcommon]
++ optional (!stdenv.isLinux) libinotify-kqueue ++ optional (!stdenv.isLinux) libinotify-kqueue
++ optional evdevSupport libevdev ++ optional evdevSupport libevdev
++ optional inputSupport libinput ++ optional inputSupport libinput
++ optional jackSupport libjack2 ++ optional jackSupport libjack2
++ optional mpdSupport libmpdclient ++ optional mpdSupport libmpdclient
++ optional mprisSupport playerctl ++ optional mprisSupport playerctl
++ optional nlSupport libnl ++ optional nlSupport libnl
++ optional pulseSupport libpulseaudio ++ optional pulseSupport libpulseaudio
++ optional sndioSupport sndio ++ optional sndioSupport sndio
++ optional swaySupport sway ++ optional swaySupport sway
++ optional traySupport libdbusmenu-gtk3 ++ optional traySupport libdbusmenu-gtk3
++ optional udevSupport udev ++ optional udevSupport udev
++ optional upowerSupport upower ++ optional upowerSupport upower
++ optional wireplumberSupport wireplumber; ++ optional wireplumberSupport wireplumber;
nativeCheckInputs = [ catch2_3 ]; nativeCheckInputs = [catch2_3];
doCheck = runTests; doCheck = runTests;
mesonFlags = (lib.mapAttrsToList mesonFlags =
(option: enable: "-D${option}=${if enable then "enabled" else "disabled"}") (
{ lib.mapAttrsToList
dbusmenu-gtk = traySupport; (option: enable: "-D${option}=${
jack = jackSupport; if enable
libinput = inputSupport; then "enabled"
libnl = nlSupport; else "disabled"
libudev = udevSupport; }")
mpd = mpdSupport; {
mpris = mprisSupport; dbusmenu-gtk = traySupport;
pulseaudio = pulseSupport; jack = jackSupport;
rfkill = rfkillSupport; libinput = inputSupport;
sndio = sndioSupport; libnl = nlSupport;
tests = runTests; libudev = udevSupport;
upower_glib = upowerSupport; mpd = mpdSupport;
wireplumber = wireplumberSupport; mpris = mprisSupport;
} pulseaudio = pulseSupport;
) ++ [ rfkill = rfkillSupport;
"-Dsystemd=disabled" sndio = sndioSupport;
"-Dgtk-layer-shell=enabled" tests = runTests;
"-Dman-pages=enabled" upower_glib = upowerSupport;
"-Dcava=disabled" wireplumber = wireplumberSupport;
"-Dexperimental=true" }
]; )
++ [
"-Dsystemd=disabled"
"-Dgtk-layer-shell=enabled"
"-Dman-pages=enabled"
"-Dcava=disabled"
"-Dexperimental=true"
];
preFixup = lib.optionalString withMediaPlayer '' preFixup = lib.optionalString withMediaPlayer ''
cp $src/resources/custom_modules/mediaplayer.py $out/bin/waybar-mediaplayer.py cp $src/resources/custom_modules/mediaplayer.py $out/bin/waybar-mediaplayer.py
wrapProgram $out/bin/waybar-mediaplayer.py \ wrapProgram $out/bin/waybar-mediaplayer.py \
--prefix PYTHONPATH : "$PYTHONPATH:$out/${python3.sitePackages}" --prefix PYTHONPATH : "$PYTHONPATH:$out/${python3.sitePackages}"
''; '';
postPatch = '' postPatch = ''
# use hyprctl to switch workspaces # use hyprctl to switch workspaces
@ -118,7 +148,7 @@ stdenv.mkDerivation rec {
changelog = "https://github.com/alexays/waybar/releases/tag/${version}"; changelog = "https://github.com/alexays/waybar/releases/tag/${version}";
description = "Highly customizable Wayland bar for Sway and Wlroots based compositors"; description = "Highly customizable Wayland bar for Sway and Wlroots based compositors";
license = licenses.mit; license = licenses.mit;
maintainers = with maintainers; [ FlorianFranzen minijackson synthetica lovesegfault rodrgz ]; maintainers = with maintainers; [FlorianFranzen minijackson synthetica lovesegfault rodrgz];
platforms = platforms.unix; platforms = platforms.unix;
homepage = "https://github.com/alexays/waybar"; homepage = "https://github.com/alexays/waybar";
}; };

View File

@ -1,10 +1,10 @@
{ lib {
, makeWrapper lib,
, rustPlatform makeWrapper,
, pkg-config rustPlatform,
, fetchFromGitHub pkg-config,
, wayland fetchFromGitHub,
, wayland,
}: }:
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
pname = "waycorner"; pname = "waycorner";
@ -35,6 +35,6 @@ rustPlatform.buildRustPackage rec {
homepage = "https://github.com/AndreasBackx/waycorner"; homepage = "https://github.com/AndreasBackx/waycorner";
platforms = platforms.linux; platforms = platforms.linux;
license = licenses.mit; license = licenses.mit;
maintainers = with maintainers; [ NotAShelf ]; maintainers = with maintainers; [NotAShelf];
}; };
} }