This commit is contained in:
Thomas Avé 2024-06-01 16:56:07 +02:00
parent 4c8460ce84
commit c643f70f98
9 changed files with 884 additions and 874 deletions

View File

@ -5,74 +5,74 @@
{ config, inputs, lib, pkgs, ... }:
{
imports = [
./hardware-configuration.nix
imports = [
./hardware-configuration.nix
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
time.timeZone = "Europe/Brussels";
networking.hostName = "nixos"; # Define your hostname.
# Pick only one of the below networking options.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
# System Packages
programs.zsh.enable = true;
programs.hyprland.enable = true;
# Pipewire
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
users.users.user = {
isNormalUser = true;
extraGroups = [ "wheel" ]; # Enable sudo for the user.
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKAa3tMzSCRuprEACrBsKI0F/o73o6J9L1qR3TaZn/N8 user@Kell"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBxMq4kubz4wWr4S8xU3GRkPcn6XRS3y7IP+qylN5QAp user@Aloria"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHtzTFdvLEvXpv69qAWLTipl4hgsKgRrRrWJRecsFthG user@Riva"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOxtJRtlAphl8euicVUR/6C7o+tyhpYmcbMBLHnldEIX server@mallorea"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILazQU/Y9I5PkMZoG/Lzc6mDR7s+aRHzqJoFUhYSse4P PocoF1"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFoUYcVMsDw6tmjfdOuQkwaXx8fohKJs/6/5HoLzTP6x Tablet"
];
shell = pkgs.zsh;
};
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
time.timeZone = "Europe/Brussels";
networking.hostName = "nixos"; # Define your hostname.
# Pick only one of the below networking options.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# System Packages
programs.zsh.enable = true;
programs.hyprland.enable = true;
environment.systemPackages = with pkgs; [
wget
git
curl
];
# Pipewire
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
services.openssh = {
enable = true;
settings = {
PermitRootLogin = "no";
PasswordAuthentication = false;
};
};
users.users.user = {
isNormalUser = true;
extraGroups = [ "wheel" ]; # Enable sudo for the user.
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKAa3tMzSCRuprEACrBsKI0F/o73o6J9L1qR3TaZn/N8 user@Kell"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBxMq4kubz4wWr4S8xU3GRkPcn6XRS3y7IP+qylN5QAp user@Aloria"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHtzTFdvLEvXpv69qAWLTipl4hgsKgRrRrWJRecsFthG user@Riva"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOxtJRtlAphl8euicVUR/6C7o+tyhpYmcbMBLHnldEIX server@mallorea"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILazQU/Y9I5PkMZoG/Lzc6mDR7s+aRHzqJoFUhYSse4P PocoF1"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFoUYcVMsDw6tmjfdOuQkwaXx8fohKJs/6/5HoLzTP6x Tablet"
];
shell = pkgs.zsh;
};
networking.firewall.enable = false;
system.stateVersion = "23.11";
environment.sessionVariables.NIXOS_OZONE_WL = "1"; #hint electron apps to use wayland:
nix.settings.experimental-features = [ "nix-command" "flakes" ];
environment.systemPackages = with pkgs; [
wget
git
curl
];
services.openssh = {
enable = true;
settings = {
PermitRootLogin = "no";
PasswordAuthentication = false;
};
};
networking.firewall.enable = false;
system.stateVersion = "23.11";
environment.sessionVariables.NIXOS_OZONE_WL = "1"; #hint electron apps to use wayland:
# Fonts
fonts.packages = with pkgs; [
# Fonts
fonts.packages = with pkgs; [
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
iosevka
nerdfonts
];
noto-fonts-cjk
noto-fonts-emoji
iosevka
nerdfonts
];
}

View File

@ -1,49 +1,51 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland = {
type = "git";
url = "https://github.com/hyprwm/Hyprland";
submodules = true;
};
split-monitor-workspaces = {
url = "github:Duckonaut/split-monitor-workspaces";
inputs.hyprland.follows = "hyprland";
};
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland = {
type = "git";
url = "https://github.com/hyprwm/Hyprland";
submodules = true;
};
split-monitor-workspaces = {
url = "github:Duckonaut/split-monitor-workspaces";
inputs.hyprland.follows = "hyprland";
};
};
outputs = {
self,
nixpkgs,
home-manager,
split-monitor-workspaces,
...
}@inputs: let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in {
nixosConfigurations = {
nixos = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; }; # allows access to flake inputs in nixos modules
modules = [
./configuration.nix
home-manager.nixosModules.home-manager
{
home-manager = {
extraSpecialArgs = { inherit inputs; }; # allows access to flake inputs in hm modules
useGlobalPkgs = true;
useUserPackages = true;
users.user = {
imports = [ ./home.nix ];
};
};
}
];
};
outputs =
{ self
, nixpkgs
, home-manager
, split-monitor-workspaces
, ...
}@inputs:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in
{
nixosConfigurations = {
nixos = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; }; # allows access to flake inputs in nixos modules
modules = [
./configuration.nix
home-manager.nixosModules.home-manager
{
home-manager = {
extraSpecialArgs = { inherit inputs; }; # allows access to flake inputs in hm modules
useGlobalPkgs = true;
useUserPackages = true;
users.user = {
imports = [ ./home.nix ];
};
};
}
];
};
};
};
}

View File

@ -5,7 +5,8 @@
{
imports =
[ (modulesPath + "/profiles/qemu-guest.nix")
[
(modulesPath + "/profiles/qemu-guest.nix")
];
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ];
@ -14,12 +15,14 @@
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/563963bd-8e27-4c9c-a1d6-d204ea7c43ff";
{
device = "/dev/disk/by-uuid/563963bd-8e27-4c9c-a1d6-d204ea7c43ff";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/9F3C-9F3B";
{
device = "/dev/disk/by-uuid/9F3C-9F3B";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};

View File

@ -1,53 +1,53 @@
{ inputs, config, pkgs, ... }:
{
imports = [
(import ./modules/zsh/config.nix {inherit config pkgs;})
(import ./modules/nvim/config.nix {inherit config pkgs;})
(import ./modules/email/config.nix {inherit config pkgs;})
(import ./modules/hyprland/config.nix {inherit inputs config pkgs;})
];
imports = [
(import ./modules/zsh/config.nix { inherit config pkgs; })
(import ./modules/nvim/config.nix { inherit config pkgs; })
(import ./modules/email/config.nix { inherit config pkgs; })
(import ./modules/hyprland/config.nix { inherit inputs config pkgs; })
];
home.stateVersion = "24.11";
targets.genericLinux.enable = true;
nixpkgs.config.allowUnfree = true;
home.stateVersion = "24.11";
targets.genericLinux.enable = true;
nixpkgs.config.allowUnfree = true;
home.packages = with pkgs; [
htop
mailcap
];
home.packages = with pkgs; [
htop
mailcap
];
home.file = {
".mailcap".text = "text/html; w3m -dump -o -document_charset=%{charset} %s; nametemplate=%s.html; copiousoutput";
home.file = {
".mailcap".text = "text/html; w3m -dump -o -document_charset=%{charset} %s; nametemplate=%s.html; copiousoutput";
};
programs.bash.enable = true;
programs.home-manager.enable = true;
programs.git = {
enable = true;
userName = "Thomas Avé";
userEmail = "email@thomasave.be";
aliases = {
s = "status";
a = "add";
};
};
programs.bash.enable = true;
programs.home-manager.enable = true;
programs.git = {
enable = true;
userName = "Thomas Avé";
userEmail = "email@thomasave.be";
aliases = {
s = "status";
a = "add";
};
};
home.sessionVariables = {
XDG_CONFIG_HOME = "${config.xdg.configHome}";
XDG_CACHE_HOME = "${config.xdg.cacheHome}";
XDG_DATA_HOME = "${config.xdg.dataHome}";
XDG_STATE_HOME = "${config.xdg.stateHome}";
home.sessionVariables = {
XDG_CONFIG_HOME = "${config.xdg.configHome}";
XDG_CACHE_HOME = "${config.xdg.cacheHome}";
XDG_DATA_HOME = "${config.xdg.dataHome}";
XDG_STATE_HOME = "${config.xdg.stateHome}";
CUDA_CACHE_PATH = "${config.xdg.cacheHome}/nv";
DOCKER_CONFIG = "${config.xdg.configHome}/docker";
LESSHISTFILE = "${config.xdg.cacheHome}/less/history";
PARALLEL_HOME = "${config.xdg.configHome}/parallel";
PYTHONSTARTUP = "${config.xdg.configHome}/python/pythonrc";
SQLITE_HISTORY = "${config.xdg.cacheHome}/sqlite_history";
WINEPREFIX = "${config.xdg.dataHome}/wine";
XDG_CURRENT_DESKTOP = "GNOME";
OPENCV_LOG_LEVEL = "ERROR";
COLORTERM = "truecolor";
};
CUDA_CACHE_PATH = "${config.xdg.cacheHome}/nv";
DOCKER_CONFIG = "${config.xdg.configHome}/docker";
LESSHISTFILE = "${config.xdg.cacheHome}/less/history";
PARALLEL_HOME = "${config.xdg.configHome}/parallel";
PYTHONSTARTUP = "${config.xdg.configHome}/python/pythonrc";
SQLITE_HISTORY = "${config.xdg.cacheHome}/sqlite_history";
WINEPREFIX = "${config.xdg.dataHome}/wine";
XDG_CURRENT_DESKTOP = "GNOME";
OPENCV_LOG_LEVEL = "ERROR";
COLORTERM = "truecolor";
};
}

View File

@ -1,127 +1,127 @@
{ config, pkgs, ... }:
{
programs.alacritty = {
enable = true;
settings = {
scrolling.history = 10000;
window = {
dynamic_padding = true;
dynamic_title = true;
opacity = 0.3;
};
colors = {
bright = {
black = "#555556";
blue = "#00afff";
cyan = "#50cdfe";
green = "#b0e05e";
magenta = "#af87ff";
red = "#f5669c";
white = "#ffffff";
yellow = "#fef26c";
};
normal = {
black = "#121213";
blue = "#0f7fcf";
cyan = "#42a7cf";
green = "#97e123";
magenta = "#8700ff";
red = "#fa2573";
white = "#bbbbbb";
yellow = "#dfd460";
};
primary = {
background = "#000011";
foreground = "#F8F8F2";
};
};
font = {
size = 15;
bold = {
family = "Iosevka Term Extended";
style = "Bold";
};
bold_italic = {
family = "Iosevka Term Extended";
style = "Bold Italic";
};
italic = {
family = "Iosevka Term Extended";
style = "Italic";
};
normal = {
family = "Iosevka Term Extended";
style = "Regular";
};
};
keyboard.bindings = [
{
action = "ToggleFullscreen";
key = "F11";
}
{
action = "ToggleViMode";
key = "Escape";
mode = "Vi";
}
{
action = "ScrollHalfPageUp";
key = "E";
mode = "Vi";
mods = "Control";
}
{
key = "F";
mods = "Control|Shift";
action = "ReceiveChar";
}
{
chars = "\u001B[72;6u";
key = "H";
mods = "Control|Shift";
}
{
chars = "\u001B[74;6u";
key = "J";
mods = "Control|Shift";
}
{
chars = "\u001B[75;6u";
key = "K";
mods = "Control|Shift";
}
{
chars = "\u001B[76;6u";
key = "L";
mods = "Control|Shift";
}
{
chars = "\u001B[105;5u";
key = "I";
mods = "Control";
}
{
chars = "\u001B[46;5u";
key = "Period";
mods = "Control";
}
{
chars = "\u001B[44;5u";
key = "Comma";
mods = "Control";
}
{
chars = "\u001B[59;5u";
key = "Semicolon";
mods = "Control";
}
{
chars = "\u001B[13;2u";
key = "Return";
mods = "Shift";
}
]
programs.alacritty = {
enable = true;
settings = {
scrolling.history = 10000;
window = {
dynamic_padding = true;
dynamic_title = true;
opacity = 0.3;
};
colors = {
bright = {
black = "#555556";
blue = "#00afff";
cyan = "#50cdfe";
green = "#b0e05e";
magenta = "#af87ff";
red = "#f5669c";
white = "#ffffff";
yellow = "#fef26c";
};
normal = {
black = "#121213";
blue = "#0f7fcf";
cyan = "#42a7cf";
green = "#97e123";
magenta = "#8700ff";
red = "#fa2573";
white = "#bbbbbb";
yellow = "#dfd460";
};
primary = {
background = "#000011";
foreground = "#F8F8F2";
};
};
font = {
size = 15;
bold = {
family = "Iosevka Term Extended";
style = "Bold";
};
bold_italic = {
family = "Iosevka Term Extended";
style = "Bold Italic";
};
italic = {
family = "Iosevka Term Extended";
style = "Italic";
};
normal = {
family = "Iosevka Term Extended";
style = "Regular";
};
};
keyboard.bindings = [
{
action = "ToggleFullscreen";
key = "F11";
}
{
action = "ToggleViMode";
key = "Escape";
mode = "Vi";
}
{
action = "ScrollHalfPageUp";
key = "E";
mode = "Vi";
mods = "Control";
}
{
key = "F";
mods = "Control|Shift";
action = "ReceiveChar";
}
{
chars = "\u001B[72;6u";
key = "H";
mods = "Control|Shift";
}
{
chars = "\u001B[74;6u";
key = "J";
mods = "Control|Shift";
}
{
chars = "\u001B[75;6u";
key = "K";
mods = "Control|Shift";
}
{
chars = "\u001B[76;6u";
key = "L";
mods = "Control|Shift";
}
{
chars = "\u001B[105;5u";
key = "I";
mods = "Control";
}
{
chars = "\u001B[46;5u";
key = "Period";
mods = "Control";
}
{
chars = "\u001B[44;5u";
key = "Comma";
mods = "Control";
}
{
chars = "\u001B[59;5u";
key = "Semicolon";
mods = "Control";
}
{
chars = "\u001B[13;2u";
key = "Return";
mods = "Shift";
}
]
};
};
}
}

View File

@ -1,248 +1,248 @@
{ config, pkgs, ... }:
{
programs.notmuch = {
enable = true;
extraConfig = {
database = {
path = "/home/user/.config/aerc/mail";
};
user = {
name = "Thomas Avé";
primary_email = "email@thomasave.be";
other_email = "Thomas.Ave@uantwerpen.be;Thomas.Ave@imec.be;";
};
maildir = {
synchronize_flags = "true";
};
};
programs.notmuch = {
enable = true;
extraConfig = {
database = {
path = "/home/user/.config/aerc/mail";
};
user = {
name = "Thomas Avé";
primary_email = "email@thomasave.be";
other_email = "Thomas.Ave@uantwerpen.be;Thomas.Ave@imec.be;";
};
maildir = {
synchronize_flags = "true";
};
};
programs.aerc = {
enable = true;
extraBinds = {
global = {
"<C-p>" = ":menu -adc 'fzy -l 30' :cf -a<Enter>";
"<tab>" = ":next-tab<Enter>";
"?" = ":help keys<Enter>";
"<F5>" = ":check-mail<Enter>";
};
messages = {
"q" = ":q<Enter>";
"<Backspace>" = ":q<Enter>";
"j" = ":next<Enter>";
"k" = ":prev<Enter>";
"<Up>" = ":prev<Enter>";
"g" = ":select 0<Enter>";
"G" = ":select -1<Enter>";
"J" = ":next-folder<Enter>";
"K" = ":prev-folder<Enter>";
"v" = ":mark -t<Enter>";
"V" = ":mark -v<Enter>";
"<Space>" = ":read -t<Enter>";
"T" = ":toggle-threads<Enter>";
"<Enter>" = ":view<Enter>";
"d" = ":prompt 'Really delete this message?' 'delete-message'<Enter>";
"D" = ":delete<Enter>";
"a" = ":archive flat<Enter>";
"A" = ":unmark -a<Enter>:mark -T<Enter>:archive flat<Enter>";
"f" = ":flag -t<Enter>";
"m" = ":compose<Enter>";
"rr" = ":reply -a<Enter>";
"rq" = ":reply -aq<Enter>";
"Rr" = ":reply<Enter>";
"Rq" = ":reply -q<Enter>";
"c" = ":cf<space>";
"$" = ":term<space>";
"!" = ":term<space>";
"|" = ":pipe<space>";
"/" = ":search -a<space>";
"\\" = ":filter -a <space>";
"n" = ":next-result<Enter>";
"N" = ":prev-result<Enter>";
"<Esc>" = ":clear<Enter>";
"s" = ":split<Enter>";
"S" = ":vsplit<Enter>";
"pl" = ":patch list<Enter>";
"pa" = ":patch apply <Tab>";
"pd" = ":patch drop <Tab>";
"pb" = ":patch rebase<Enter>";
"pt" = ":patch term<Enter>";
"ps" = ":patch switch <Tab>";
};
view = {
"/" = ":toggle-key-passthrough<Enter>/";
"q" = ":close<Enter>";
"O" = ":open<Enter>";
"o" = ":open<Enter>";
"S" = ":save<space>";
"|" = ":pipe<space>";
"D" = ":delete<Enter>";
"A" = ":archive flat<Enter>";
"<C-l>" = ":open-link <space>";
"f" = ":flag -t<Enter>";
"rr" = ":reply -a<Enter>";
"rq" = ":reply -aq<Enter>";
"Rr" = ":reply<Enter>";
"Rq" = ":reply -q<Enter>";
"H" = ":toggle-headers<Enter>";
"<C-k>" = ":prev-part<Enter>";
"<C-Up>" = ":prev-part<Enter>";
"<C-j>" = ":next-part<Enter>";
"<C-Down>" = ":next-part<Enter>";
"J" = ":next<Enter>";
"<C-Right>" = ":next<Enter>";
"K" = ":prev<Enter>";
"<C-Left>" = ":prev<Enter>";
};
"view::passthrough" = {
"$noinherit" = "true";
"$ex" = "<C-x>";
"<Esc>" = ":toggle-key-passthrough<Enter>";
};
compose = {
"$noinherit" = "true";
"$ex" = "<C-x>";
"$complete" = "<C-o>";
"<C-k>" = ":prev-field<Enter>";
"<C-Up>" = ":prev-field<Enter>";
"<C-j>" = ":next-field<Enter>";
"<C-Down>" = ":next-field<Enter>";
"<A-p>" = ":switch-account -p<Enter>";
"<C-Left>" = ":switch-account -p<Enter>";
"<A-n>" = ":switch-account -n<Enter>";
"<C-Right>" = ":switch-account -n<Enter>";
"<tab>" = ":next-field<Enter>";
"<backtab>" = ":prev-field<Enter>";
"<C-p>" = ":prev-tab<Enter>";
"<C-PgUp>" = ":prev-tab<Enter>";
"<C-n>" = ":next-tab<Enter>";
"<C-PgDn>" = ":next-tab<Enter>";
};
"compose::editor" = {
"$noinherit" = "true";
"$ex" = "<C-x>";
"<C-k>" = ":prev-field<Enter>";
"<C-Up>" = ":prev-field<Enter>";
"<C-j>" = ":next-field<Enter>";
"<C-Down>" = ":next-field<Enter>";
"<C-p>" = ":prev-tab<Enter>";
"<C-PgUp>" = ":prev-tab<Enter>";
"<C-n>" = ":next-tab<Enter>";
"<C-PgDn>" = ":next-tab<Enter>";
};
"compose::review" = {
"y" = ":send<Enter>";
"n" = ":abort<Enter>";
"v" = ":preview<Enter>";
"p" = ":postpone<Enter>";
"q" = ":choose -o d discard abort -o p postpone postpone<Enter>";
"e" = ":edit<Enter>";
"a" = ":attach<space>";
"d" = ":detach<space>";
};
terminal = {
"$noinherit" = "true";
"$ex" = "<C-x>";
"<C-p>" = ":prev-tab<Enter>";
"<C-n>" = ":next-tab<Enter>";
"<C-PgUp>" = ":prev-tab<Enter>";
"<C-PgDn>" = ":next-tab<Enter>";
};
};
extraConfig = {
general = {
term = "xterm-256color";
};
ui = {
border-char-vertical = "";
border-char-horizontal = "";
styleset-name = "catppuccin-mocha";
timestamp-format = "2006-01-02 15:04";
sidebar-width = 30;
mouse-enabled = true;
dirlist-right = "{{if .Unread}}{{humanReadable .Unread}}{{end}}";
dirlist-tree = true;
};
viewer = {
pager = "nvim -u $XDG_CONFIG_HOME/nvim/aerc.lua";
};
compose = {
address-book-cmd = "notmuch address \"\%s\"";
};
multipart-converters = {
"text/html" = "w3m -dump -o display_link_number=1 -T text/html";
};
filters = {
"text/plain" = "cat";
"text/calendar" = "gnome-calendar";
"message/delivery-status" = "cat";
"message/rfc822" = "cat";
"text/html" = "w3m -dump -o display_link_number=1 -T text/html";
"text/*" = "bat -fP --file-name=\"$AERC_FILENAME\"";
"application/x-sh" = "bat -fP -l sh";
};
};
};
programs.aerc = {
enable = true;
extraBinds = {
global = {
"<C-p>" = ":menu -adc 'fzy -l 30' :cf -a<Enter>";
"<tab>" = ":next-tab<Enter>";
"?" = ":help keys<Enter>";
"<F5>" = ":check-mail<Enter>";
};
messages = {
"q" = ":q<Enter>";
"<Backspace>" = ":q<Enter>";
"j" = ":next<Enter>";
"k" = ":prev<Enter>";
"<Up>" = ":prev<Enter>";
"g" = ":select 0<Enter>";
"G" = ":select -1<Enter>";
"J" = ":next-folder<Enter>";
"K" = ":prev-folder<Enter>";
"v" = ":mark -t<Enter>";
"V" = ":mark -v<Enter>";
"<Space>" = ":read -t<Enter>";
"T" = ":toggle-threads<Enter>";
"<Enter>" = ":view<Enter>";
"d" = ":prompt 'Really delete this message?' 'delete-message'<Enter>";
"D" = ":delete<Enter>";
"a" = ":archive flat<Enter>";
"A" = ":unmark -a<Enter>:mark -T<Enter>:archive flat<Enter>";
"f" = ":flag -t<Enter>";
"m" = ":compose<Enter>";
"rr" = ":reply -a<Enter>";
"rq" = ":reply -aq<Enter>";
"Rr" = ":reply<Enter>";
"Rq" = ":reply -q<Enter>";
"c" = ":cf<space>";
"$" = ":term<space>";
"!" = ":term<space>";
"|" = ":pipe<space>";
"/" = ":search -a<space>";
"\\" = ":filter -a <space>";
"n" = ":next-result<Enter>";
"N" = ":prev-result<Enter>";
"<Esc>" = ":clear<Enter>";
"s" = ":split<Enter>";
"S" = ":vsplit<Enter>";
"pl" = ":patch list<Enter>";
"pa" = ":patch apply <Tab>";
"pd" = ":patch drop <Tab>";
"pb" = ":patch rebase<Enter>";
"pt" = ":patch term<Enter>";
"ps" = ":patch switch <Tab>";
};
view = {
"/" = ":toggle-key-passthrough<Enter>/";
"q" = ":close<Enter>";
"O" = ":open<Enter>";
"o" = ":open<Enter>";
"S" = ":save<space>";
"|" = ":pipe<space>";
"D" = ":delete<Enter>";
"A" = ":archive flat<Enter>";
"<C-l>" = ":open-link <space>";
"f" = ":flag -t<Enter>";
"rr" = ":reply -a<Enter>";
"rq" = ":reply -aq<Enter>";
"Rr" = ":reply<Enter>";
"Rq" = ":reply -q<Enter>";
"H" = ":toggle-headers<Enter>";
"<C-k>" = ":prev-part<Enter>";
"<C-Up>" = ":prev-part<Enter>";
"<C-j>" = ":next-part<Enter>";
"<C-Down>" = ":next-part<Enter>";
"J" = ":next<Enter>";
"<C-Right>" = ":next<Enter>";
"K" = ":prev<Enter>";
"<C-Left>" = ":prev<Enter>";
};
"view::passthrough" = {
"$noinherit" = "true";
"$ex" = "<C-x>";
"<Esc>" = ":toggle-key-passthrough<Enter>";
};
compose = {
"$noinherit" = "true";
"$ex" = "<C-x>";
"$complete" = "<C-o>";
"<C-k>" = ":prev-field<Enter>";
"<C-Up>" = ":prev-field<Enter>";
"<C-j>" = ":next-field<Enter>";
"<C-Down>" = ":next-field<Enter>";
"<A-p>" = ":switch-account -p<Enter>";
"<C-Left>" = ":switch-account -p<Enter>";
"<A-n>" = ":switch-account -n<Enter>";
"<C-Right>" = ":switch-account -n<Enter>";
"<tab>" = ":next-field<Enter>";
"<backtab>" = ":prev-field<Enter>";
"<C-p>" = ":prev-tab<Enter>";
"<C-PgUp>" = ":prev-tab<Enter>";
"<C-n>" = ":next-tab<Enter>";
"<C-PgDn>" = ":next-tab<Enter>";
};
"compose::editor" = {
"$noinherit" = "true";
"$ex" = "<C-x>";
"<C-k>" = ":prev-field<Enter>";
"<C-Up>" = ":prev-field<Enter>";
"<C-j>" = ":next-field<Enter>";
"<C-Down>" = ":next-field<Enter>";
"<C-p>" = ":prev-tab<Enter>";
"<C-PgUp>" = ":prev-tab<Enter>";
"<C-n>" = ":next-tab<Enter>";
"<C-PgDn>" = ":next-tab<Enter>";
};
"compose::review" = {
"y" = ":send<Enter>";
"n" = ":abort<Enter>";
"v" = ":preview<Enter>";
"p" = ":postpone<Enter>";
"q" = ":choose -o d discard abort -o p postpone postpone<Enter>";
"e" = ":edit<Enter>";
"a" = ":attach<space>";
"d" = ":detach<space>";
};
terminal = {
"$noinherit" = "true";
"$ex" = "<C-x>";
"<C-p>" = ":prev-tab<Enter>";
"<C-n>" = ":next-tab<Enter>";
"<C-PgUp>" = ":prev-tab<Enter>";
"<C-PgDn>" = ":next-tab<Enter>";
};
};
extraConfig = {
general = {
term = "xterm-256color";
};
ui = {
border-char-vertical = "";
border-char-horizontal = "";
styleset-name = "catppuccin-mocha";
timestamp-format = "2006-01-02 15:04";
sidebar-width = 30;
mouse-enabled = true;
dirlist-right = "{{if .Unread}}{{humanReadable .Unread}}{{end}}";
dirlist-tree = true;
};
viewer = {
pager = "nvim -u $XDG_CONFIG_HOME/nvim/aerc.lua";
};
compose = {
address-book-cmd = "notmuch address \"\%s\"";
};
multipart-converters = {
"text/html" = "w3m -dump -o display_link_number=1 -T text/html";
};
filters = {
"text/plain" = "cat";
"text/calendar" = "gnome-calendar";
"message/delivery-status" = "cat";
"message/rfc822" = "cat";
"text/html" = "w3m -dump -o display_link_number=1 -T text/html";
"text/*" = "bat -fP --file-name=\"$AERC_FILENAME\"";
"application/x-sh" = "bat -fP -l sh";
};
};
};
home.file."${config.xdg.configHome}/aerc/map.conf".text = "Inbox=tag:inbox and not tag:archived and not tag:deleted";
home.file."${config.xdg.configHome}/aerc/stylesets/catppuccin-mocha".text = ''
*.default=true
*.normal=true
home.file."${config.xdg.configHome}/aerc/map.conf".text = "Inbox=tag:inbox and not tag:archived and not tag:deleted";
home.file."${config.xdg.configHome}/aerc/stylesets/catppuccin-mocha".text = ''
*.default=true
*.normal=true
default.fg=#abb2bf
default.bg=#11121D
*.bg=#11121D
default.fg=#abb2bf
default.bg=#11121D
*.bg=#11121D
error.fg=#f38ba8
warning.fg=#fab387
success.fg=#a6e3a1
error.fg=#f38ba8
warning.fg=#fab387
success.fg=#a6e3a1
tab.fg=#6c7086
tab.bg=#181825
tab.selected.fg=#cdd6f4
tab.selected.bg=#023269
tab.selected.bold=true
tab.fg=#6c7086
tab.bg=#181825
tab.selected.fg=#cdd6f4
tab.selected.bg=#023269
tab.selected.bold=true
part*.selected.bg=#023269
part*.selected.bg=#023269
border.fg=#023269
border.bold=true
border.fg=#023269
border.bold=true
msglist_unread.bold=true
msglist_unread.fg=#f9e2af
msglist_flagged.fg=#e06c75
msglist_unread.bold=true
msglist_unread.fg=#f9e2af
msglist_flagged.fg=#e06c75
msglist_flagged.bold=true
msglist_result.fg=#89b4fa
msglist_result.bold=true
msglist_*.selected.bold=true
msglist_*.selected.bg=#023269
msglist_*.bg=#11121D
msglist_flagged.bold=true
msglist_result.fg=#89b4fa
msglist_result.bold=true
msglist_*.selected.bold=true
msglist_*.selected.bg=#023269
msglist_*.bg=#11121D
dirlist_*.selected.bold=true
dirlist_*.selected.bg=#023269
dirlist_*.bg=#181825
dirlist_*.selected.bold=true
dirlist_*.selected.bg=#023269
dirlist_*.bg=#181825
statusline_default.fg=#9399b2
statusline_default.bg=#2C3043
statusline_error.bold=true
statusline_success.bold=true
statusline_default.fg=#9399b2
statusline_default.bg=#2C3043
statusline_error.bold=true
statusline_success.bold=true
spinner.bg=#11121D
spinner.bg=#11121D
[viewer]
header.bg=#181825
url.fg=#89b4fa
url.underline=true
header.bold=true
signature.dim=true
diff_meta.bold=true
diff_chunk.fg=#89b4fa
diff_chunk_func.fg=#89b4fa
diff_chunk_func.bold=true
diff_add.fg=#a6e3a1
diff_del.fg=#f38ba8
quote_*.fg=#6c7086
quote_1.fg=#9399b2
'';
[viewer]
header.bg=#181825
url.fg=#89b4fa
url.underline=true
header.bold=true
signature.dim=true
diff_meta.bold=true
diff_chunk.fg=#89b4fa
diff_chunk_func.fg=#89b4fa
diff_chunk_func.bold=true
diff_add.fg=#a6e3a1
diff_del.fg=#f38ba8
quote_*.fg=#6c7086
quote_1.fg=#9399b2
'';
}

View File

@ -1,233 +1,238 @@
{ inputs
, config
, pkgs
, ...
}:
let
hyprland = inputs.hyprland.packages.${pkgs.system}.hyprland;
playerctl = "${pkgs.playerctl}/bin/playerctl";
wl-paste = "${pkgs.wl-clipboard}/bin/wl-paste";
hyprpaper = "${pkgs.hyprpaper}/bin/hyprpaper";
waybar = "${pkgs.waybar}/bin/waybar";
scripts = "${config.xdg.configHome}/scripts";
wpctl = "${pkgs.wireplumber}/bin/wpctl";
alacritty = "${pkgs.alacritty}/bin/alacritty";
swaylock = "${pkgs.swaylock}/bin/swaylock";
rofi = "${pkgs.rofi}/bin/rofi";
jq = "${pkgs.jq}/bin/jq";
launch_alacritty = pkgs.writeShellScriptBin "launch_alacritty" ''
RUNNING_WAYPIPE=false
SSH_CLIENT=""
CHILD_PID=$(pgrep -P "$1")
if [ "$GRAND_CHILD_PID" != "" ]; then
GRAND_CHILD_NAME=$(ps -p "$GRAND_CHILD_PID" -o comm=)
if [ "$GRAND_CHILD_NAME" == "ssh" ]; then
CHILD_PID=$GRAND_CHILD_PID
SSH_CLIENT=$(ps -p "$CHILD_PID" -o args --no-headers | awk '{ print $2 }')
fi
if [ "$GRAND_CHILD_NAME" == "waypipe" ]; then
RUNNING_WAYPIPE=true
CHILD_PID=$(pgrep -P "$GRAND_CHILD_PID")
SSH_CLIENT=$(ps -p "$GRAND_CHILD_PID" -o args --no-headers | awk '{ print $4 }')
fi
fi
if [ $RUNNING_WAYPIPE == true ]; then
PREVIOUS_SESSION_ID=$(grep -z "SSH_SESSION_ID" "/proc/$CHILD_PID/environ" | xargs -0 -n 1 | grep -oP "[0-9]*")
SSH_SESSION_ID=$RANDOM
${alacritty} -e zsh -c "SSH_SESSION_ID=$SSH_SESSION_ID waypipe ssh -t \"$SSH_CLIENT\" env SSH_SESSION_ID=\"$SSH_SESSION_ID\" PREVIOUS_SESSION_ID=\"$PREVIOUS_SESSION_ID\" \"zsh --login\""
else
if [ "$(ps -p "$1" -o comm=)" == "alacritty" ]; then
CWD=$(readlink -e /proc/"$CHILD_PID"/cwd)
if [ "$CWD" != "" ]; then
${alacritty} --working-directory "$CWD"
else
${alacritty}
fi
else
${alacritty}
fi
fi
'';
in
{
inputs,
config,
pkgs,
...
}: let
hyprland = inputs.hyprland.packages.${pkgs.system}.hyprland;
playerctl = "${pkgs.playerctl}/bin/playerctl";
wl-paste = "${pkgs.wl-clipboard}/bin/wl-paste";
hyprpaper = "${pkgs.hyprpaper}/bin/hyprpaper";
waybar = "${pkgs.waybar}/bin/waybar";
scripts = "${config.xdg.configHome}/scripts";
wpctl = "${pkgs.wireplumber}/bin/wpctl";
alacritty = "${pkgs.alacritty}/bin/alacritty";
swaylock = "${pkgs.swaylock}/bin/swaylock";
rofi = "${pkgs.rofi}/bin/rofi";
jq = "${pkgs.jq}/bin/jq";
launch_alacritty = pkgs.writeShellScriptBin "launch_alacritty" ''
RUNNING_WAYPIPE=false
SSH_CLIENT=""
CHILD_PID=$(pgrep -P "$1")
services.kdeconnect = {
enable = true;
package = pkgs.kdePackages.kdeconnect-kde;
indicator = true;
};
if [ "$GRAND_CHILD_PID" != "" ]; then
GRAND_CHILD_NAME=$(ps -p "$GRAND_CHILD_PID" -o comm=)
if [ "$GRAND_CHILD_NAME" == "ssh" ]; then
CHILD_PID=$GRAND_CHILD_PID
SSH_CLIENT=$(ps -p "$CHILD_PID" -o args --no-headers | awk '{ print $2 }')
fi
if [ "$GRAND_CHILD_NAME" == "waypipe" ]; then
RUNNING_WAYPIPE=true
CHILD_PID=$(pgrep -P "$GRAND_CHILD_PID")
SSH_CLIENT=$(ps -p "$GRAND_CHILD_PID" -o args --no-headers | awk '{ print $4 }')
fi
fi
if [ $RUNNING_WAYPIPE == true ]; then
PREVIOUS_SESSION_ID=$(grep -z "SSH_SESSION_ID" "/proc/$CHILD_PID/environ" | xargs -0 -n 1 | grep -oP "[0-9]*")
SSH_SESSION_ID=$RANDOM
${alacritty} -e zsh -c "SSH_SESSION_ID=$SSH_SESSION_ID waypipe ssh -t \"$SSH_CLIENT\" env SSH_SESSION_ID=\"$SSH_SESSION_ID\" PREVIOUS_SESSION_ID=\"$PREVIOUS_SESSION_ID\" \"zsh --login\""
else
if [ "$(ps -p "$1" -o comm=)" == "alacritty" ]; then
CWD=$(readlink -e /proc/"$CHILD_PID"/cwd)
if [ "$CWD" != "" ]; then
${alacritty} --working-directory "$CWD"
else
${alacritty}
fi
else
${alacritty}
fi
fi
'';
in {
services.kdeconnect = {
enable = true;
package = pkgs.kdePackages.kdeconnect-kde;
indicator = true;
};
wayland.windowManager.hyprland = {
enable = true;
systemd.variables = ["--all"];
systemd.enable = true;
systemd.enableXdgAutostart = true;
xwayland.enable = true;
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
plugins = [
inputs.split-monitor-workspaces.packages.${pkgs.system}.split-monitor-workspaces
];
settings = {
"$mainMod" = "SUPER";
exec-once = [
"hyprpaper"
"${wl-paste} --type text --watch cliphist store"
"${wl-paste} --type image --watch cliphist store"
# "${waybar}"
];
env = [
"WLR_NO_HARDWARE_CURSORS,1"
"TERMINAL,${alacritty}"
"WLR_RENDERER_ALLOW_SOFTWARE,1"
];
debug = {
disable_logs = false;
};
windowrulev2 = [
"float, title:^(rofi)(.*)$"
"center, title:^(rofi)(.*)$"
"noborder, title:^(rofi)(.*)$"
"stayfocused, title:^()$,class:^(steam)$"
"minsize 1 1, title:^()$,class:^(steam)$"
"stayfocused, title:^()$,class:^(steam)$"
];
windowrule = [
"noanim,waybar"
];
monitor = [
"DP-3,preferred,0x550,1"
"DP-2,preferred,1920x0,1"
"HDMI-A-1,preferred,5760x550,1"
];
general = {
gaps_in = 1;
gaps_out = 5;
border_size = 2;
"col.active_border" = "rgba(002f5fee)";
"col.inactive_border" = "rgba(ffffff00)";
layout = "dwindle";
};
input = {
kb_layout = "us";
follow_mouse = 1;
kb_options = "compose:rctrl, caps:super, altwin:swap_alt_win";
numlock_by_default = true;
};
binds = {
scroll_event_delay = 1;
};
xwayland = {
force_zero_scaling = true;
};
misc = {
disable_hyprland_logo = 1;
};
decoration = {
rounding = 1;
blur = {
enabled = false;
};
};
animations = {
enabled = "yes";
bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";
animation = [
"windows, 1, 2, myBezier"
"windowsOut, 1, 2, default, popin 80%"
"border, 1, 2, default"
"borderangle, 1, 2, default"
"fade, 1, 2, default"
"workspaces, 1, 1, default"
];
};
dwindle = {
preserve_split = "yes";
no_gaps_when_only = 1;
force_split = 2;
};
gestures = {
workspace_swipe = "on";
workspace_swipe_invert = false;
};
bindr = [
"$mainMod, SUPER_L, exec, pkill rofi || ${rofi} -show drun"
"$mainMod, SUPER_R, exec, pkill rofi || ${rofi} -show drun"
];
bindm = [
"$mainMod, mouse:272, movewindow"
"$mainMod, mouse:273, resizewindow"
];
bind = [
"$mainMod, return, exec, ${launch_alacritty}/bin/launch_alacritty $(hyprctl activewindow -j | ${jq} .pid)"
"$mainMod SHIFT, return, exec, ${alacritty}"
"$mainMod, Q, killactive,"
"$mainMod, A, exec, nautilus"
"$mainMod, S, exec, gnome-calendar"
"$mainMod, B, exec, MOZ_ENABLE_WAYLAND=1 firefox"
"$mainMod, M, fullscreen, 1"
"$mainMod, F11, fullscreen"
"$mainMod, F, togglefloating,"
"$mainMod, SPACE, togglesplit, # dwindle"
"CONTROL_L ALT_L, L, exec, ${swaylock}"
"$mainMod, C, exec, cliphist list | awk '{print $0, \"\0icon\x1fcom.github.davidmhewitt.clipped\"}' | ${rofi} -dmenu -display-columns 2 | cliphist decode | wl-copy"
"$mainMod, Y, exec, ${config.xdg.configHome}/rofi/rofi-ykman.sh"
"$mainMod, N, exec, ${config.xdg.configHome}/rofi/rofi-ssh.sh"
"$mainMod, Escape, exec, ${rofi} -show power-menu -modi power-menu:${scripts}/rofi-power-menu"
",XF86MonBrightnessUp, exec, xbacklight -inc 10"
",XF86MonBrightnessDown, exec, xbacklight -dec 10"
",XF86AudioRaiseVolume, exec, ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 10%+ --limit 1.0"
",XF86AudioLowerVolume, exec, ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 10%-"
",XF86AudioMicMute, exec, ${wpctl} set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
",mouse_right, exec, ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 1%+ --limit 1.0"
",mouse_left, exec, ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 1%-"
",XF86AudioMute, exec, ${wpctl} set-mute @DEFAULT_AUDIO_SINK@ toggle"
",XF86AudioNext, exec, ${playerctl} next"
",XF86AudioPrev, exec, ${playerctl} previous"
"$mainMod,XF86AudioMute, exec, ${playerctl} play-pause"
"$mainMod,XF86AudioRaiseVolume, exec, ${playerctl} next"
"$mainMod,XF86AudioLowerVolume, exec, ${playerctl} previous"
", Print, exec, grim -g \"$(slurp -d)\" - | wl-copy"
"$mainMod, H, exec, ${scripts}/vim-hypr-nav.sh l"
"$mainMod, L, exec, ${scripts}/vim-hypr-nav.sh r"
"$mainMod, K, exec, ${scripts}/vim-hypr-nav.sh u"
"$mainMod, J, exec, ${scripts}/vim-hypr-nav.sh d"
"$mainMod CONTROL_L, H, swapwindow, l"
"$mainMod CONTROL_L, L, swapwindow, r"
"$mainMod CONTROL_L, K, swapwindow, u"
"$mainMod CONTROL_L, J, swapwindow, d"
"$mainMod SHIFT, H, movewindow, l"
"$mainMod SHIFT, L, movewindow, r"
"$mainMod SHIFT, K, movewindow, u"
"$mainMod SHIFT, J, movewindow, d"
"$mainMod ALT, L, resizeactive, 20 0"
"$mainMod ALT, H, resizeactive, -20 0"
"$mainMod ALT, K, resizeactive, 0 -20"
"$mainMod ALT, J, resizeactive, 0 20"
"$mainMod SHIFT, T, split-movetoworkspace, empty"
"$mainMod, T, split-workspace, empty"
"$mainMod, TAB, split-workspace, m+1"
"$mainMod SHIFT, TAB, split-workspace, m-1"
]
++ (
# workspaces
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
builtins.concatLists (builtins.genList (
x: let
ws = let
c = (x + 1) / 10;
in
builtins.toString (x + 1 - (c * 10));
in [
"$mainMod, ${ws}, split-workspace, ${toString (x + 1)}"
"$mod SHIFT, ${ws}, split-movetoworkspace, ${toString (x + 1)}"
]
)
10)
);
wayland.windowManager.hyprland = {
enable = true;
systemd.variables = [ "--all" ];
systemd.enable = true;
systemd.enableXdgAutostart = true;
xwayland.enable = true;
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
plugins = [
inputs.split-monitor-workspaces.packages.${pkgs.system}.split-monitor-workspaces
];
settings = {
"$mainMod" = "SUPER";
exec-once = [
"hyprpaper"
"${wl-paste} --type text --watch cliphist store"
"${wl-paste} --type image --watch cliphist store"
# "${waybar}"
];
env = [
"WLR_NO_HARDWARE_CURSORS,1"
"TERMINAL,${alacritty}"
"WLR_RENDERER_ALLOW_SOFTWARE,1"
];
debug = {
disable_logs = false;
};
windowrulev2 = [
"float, title:^(rofi)(.*)$"
"center, title:^(rofi)(.*)$"
"noborder, title:^(rofi)(.*)$"
"stayfocused, title:^()$,class:^(steam)$"
"minsize 1 1, title:^()$,class:^(steam)$"
"stayfocused, title:^()$,class:^(steam)$"
];
windowrule = [
"noanim,waybar"
];
monitor = [
"DP-3,preferred,0x550,1"
"DP-2,preferred,1920x0,1"
"HDMI-A-1,preferred,5760x550,1"
];
general = {
gaps_in = 1;
gaps_out = 5;
border_size = 2;
"col.active_border" = "rgba(002f5fee)";
"col.inactive_border" = "rgba(ffffff00)";
layout = "dwindle";
};
input = {
kb_layout = "us";
follow_mouse = 1;
kb_options = "compose:rctrl, caps:super, altwin:swap_alt_win";
numlock_by_default = true;
};
binds = {
scroll_event_delay = 1;
};
xwayland = {
force_zero_scaling = true;
};
misc = {
disable_hyprland_logo = 1;
};
decoration = {
rounding = 1;
blur = {
enabled = false;
};
};
animations = {
enabled = "yes";
bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";
animation = [
"windows, 1, 2, myBezier"
"windowsOut, 1, 2, default, popin 80%"
"border, 1, 2, default"
"borderangle, 1, 2, default"
"fade, 1, 2, default"
"workspaces, 1, 1, default"
];
};
dwindle = {
preserve_split = "yes";
no_gaps_when_only = 1;
force_split = 2;
};
gestures = {
workspace_swipe = "on";
workspace_swipe_invert = false;
};
bindr = [
"$mainMod, SUPER_L, exec, pkill rofi || ${rofi} -show drun"
"$mainMod, SUPER_R, exec, pkill rofi || ${rofi} -show drun"
];
bindm = [
"$mainMod, mouse:272, movewindow"
"$mainMod, mouse:273, resizewindow"
];
bind = [
"$mainMod, return, exec, ${launch_alacritty}/bin/launch_alacritty $(hyprctl activewindow -j | ${jq} .pid)"
"$mainMod SHIFT, return, exec, ${alacritty}"
"$mainMod, Q, killactive,"
"$mainMod, A, exec, nautilus"
"$mainMod, S, exec, gnome-calendar"
"$mainMod, B, exec, MOZ_ENABLE_WAYLAND=1 firefox"
"$mainMod, M, fullscreen, 1"
"$mainMod, F11, fullscreen"
"$mainMod, F, togglefloating,"
"$mainMod, SPACE, togglesplit, # dwindle"
"CONTROL_L ALT_L, L, exec, ${swaylock}"
"$mainMod, C, exec, cliphist list | awk '{print $0, \"\0icon\x1fcom.github.davidmhewitt.clipped\"}' | ${rofi} -dmenu -display-columns 2 | cliphist decode | wl-copy"
"$mainMod, Y, exec, ${config.xdg.configHome}/rofi/rofi-ykman.sh"
"$mainMod, N, exec, ${config.xdg.configHome}/rofi/rofi-ssh.sh"
"$mainMod, Escape, exec, ${rofi} -show power-menu -modi power-menu:${scripts}/rofi-power-menu"
",XF86MonBrightnessUp, exec, xbacklight -inc 10"
",XF86MonBrightnessDown, exec, xbacklight -dec 10"
",XF86AudioRaiseVolume, exec, ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 10%+ --limit 1.0"
",XF86AudioLowerVolume, exec, ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 10%-"
",XF86AudioMicMute, exec, ${wpctl} set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
",mouse_right, exec, ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 1%+ --limit 1.0"
",mouse_left, exec, ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 1%-"
",XF86AudioMute, exec, ${wpctl} set-mute @DEFAULT_AUDIO_SINK@ toggle"
",XF86AudioNext, exec, ${playerctl} next"
",XF86AudioPrev, exec, ${playerctl} previous"
"$mainMod,XF86AudioMute, exec, ${playerctl} play-pause"
"$mainMod,XF86AudioRaiseVolume, exec, ${playerctl} next"
"$mainMod,XF86AudioLowerVolume, exec, ${playerctl} previous"
", Print, exec, grim -g \"$(slurp -d)\" - | wl-copy"
"$mainMod, H, exec, ${scripts}/vim-hypr-nav.sh l"
"$mainMod, L, exec, ${scripts}/vim-hypr-nav.sh r"
"$mainMod, K, exec, ${scripts}/vim-hypr-nav.sh u"
"$mainMod, J, exec, ${scripts}/vim-hypr-nav.sh d"
"$mainMod CONTROL_L, H, swapwindow, l"
"$mainMod CONTROL_L, L, swapwindow, r"
"$mainMod CONTROL_L, K, swapwindow, u"
"$mainMod CONTROL_L, J, swapwindow, d"
"$mainMod SHIFT, H, movewindow, l"
"$mainMod SHIFT, L, movewindow, r"
"$mainMod SHIFT, K, movewindow, u"
"$mainMod SHIFT, J, movewindow, d"
"$mainMod ALT, L, resizeactive, 20 0"
"$mainMod ALT, H, resizeactive, -20 0"
"$mainMod ALT, K, resizeactive, 0 -20"
"$mainMod ALT, J, resizeactive, 0 20"
"$mainMod SHIFT, T, split-movetoworkspace, empty"
"$mainMod, T, split-workspace, empty"
"$mainMod, TAB, split-workspace, m+1"
"$mainMod SHIFT, TAB, split-workspace, m-1"
]
++ (
# workspaces
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
builtins.concatLists (builtins.genList
(
x:
let
ws =
let
c = (x + 1) / 10;
in
builtins.toString (x + 1 - (c * 10));
in
[
"$mainMod, ${ws}, split-workspace, ${toString (x + 1)}"
"$mod SHIFT, ${ws}, split-movetoworkspace, ${toString (x + 1)}"
]
)
10)
);
};
};
}

View File

@ -1,58 +1,58 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
clang
go
nodejs
luarocks
jre
python3
python311Packages.pip
julia
unzip
dotnet-sdk_8
cargo
];
home.packages = with pkgs; [
clang
go
nodejs
luarocks
jre
python3
python311Packages.pip
julia
unzip
dotnet-sdk_8
cargo
];
home.file."${config.xdg.configHome}/nvim" = {
source = ./files;
recursive = true;
};
home.file."${config.xdg.configHome}/nvim" = {
source = ./files;
recursive = true;
};
home.file.".clang-tidy".text = ''
Checks: "*,
-abseil-*,
-altera-*,
-android-*,
-fuchsia-*,
-google-*,
-llvm*,
-zircon-*,
-bugprone-easily-swappable-parameters
-readability-identifier-length
-readability-avoid-const-params-in-decls,
-readability-magic-numbers
-bugprone-narrowing-conversions
-modernize-use-trailing-return-type
-cppcoreguidelines-pro-type-union-access
-modernize-use-nodiscard
-cppcoreguidelines-narrowing-conversions
-cppcoreguidelines-avoid-magic-numbers
-Wsign-compare
-hicpp-uppercase-literal-suffix
-readability-uppercase-literal-suffix
-readability-named-parameter
-performance-avoid-endl"
WarningsAsErrors: '''
HeaderFilterRegex: '''
FormatStyle: none
'';
home.file.".clang-tidy".text = ''
Checks: "*,
-abseil-*,
-altera-*,
-android-*,
-fuchsia-*,
-google-*,
-llvm*,
-zircon-*,
-bugprone-easily-swappable-parameters
-readability-identifier-length
-readability-avoid-const-params-in-decls,
-readability-magic-numbers
-bugprone-narrowing-conversions
-modernize-use-trailing-return-type
-cppcoreguidelines-pro-type-union-access
-modernize-use-nodiscard
-cppcoreguidelines-narrowing-conversions
-cppcoreguidelines-avoid-magic-numbers
-Wsign-compare
-hicpp-uppercase-literal-suffix
-readability-uppercase-literal-suffix
-readability-named-parameter
-performance-avoid-endl"
WarningsAsErrors: '''
HeaderFilterRegex: '''
FormatStyle: none
'';
programs.neovim = {
enable = true;
viAlias = true;
vimAlias = true;
defaultEditor = true;
};
programs.neovim = {
enable = true;
viAlias = true;
vimAlias = true;
defaultEditor = true;
};
}

View File

@ -1,98 +1,98 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
fzy
lf
curl
fd
zsh-powerlevel10k
zsh-autocomplete
zsh-vi-mode
ripgrep
rsync
moreutils
home.packages = with pkgs; [
fzy
lf
curl
fd
zsh-powerlevel10k
zsh-autocomplete
zsh-vi-mode
ripgrep
rsync
moreutils
];
home.sessionVariables = {
BROWSER = "firefox";
GPULAB_CERT = "${config.xdg.dataHome}/gpulab.pem";
GPULAB_DEV = "False";
GCC_COLORS = "error = '01;31:warning = '01;35:note = '01;36:caret = '01;32:locus = '01:quote = '01'";
ARCHFLAGS = "-arch x86_64";
TERM = "screen-256color";
PYTHONDONTWRITEBYTECODE = "1";
GOPATH = "${config.xdg.dataHome}/go";
};
home.file."${config.xdg.configHome}/zsh" = {
source = ./files;
recursive = true;
};
programs.command-not-found.enable = true;
programs.zoxide = {
enable = true;
enableZshIntegration = true;
};
programs.fzf = {
enable = true;
};
programs.zsh = {
enable = true;
enableCompletion = true;
syntaxHighlighting.enable = false;
autosuggestion.enable = true;
initExtraFirst = ''
source ${config.xdg.configHome}/zsh/p10k.zsh
function zvm_after_init() {
source ${config.xdg.configHome}/zsh/term.zsh
source ${config.xdg.configHome}/zsh/completion.zsh
source ${config.xdg.configHome}/zsh/waypipe.zsh
if [ -n "\$\{commands[fzf-share]\}" ]; then
source "$(fzf-share)/key-bindings.zsh"
source "$(fzf-share)/completion.zsh"
fi
source ${config.xdg.configHome}/zsh/keys.zsh
}
'';
shellAliases = {
mallorea = "run_waypipe mallorea";
vault = "run_waypipe vault";
riva = "run_waypipe riva";
kell = "run_waypipe kell";
aloria = "run_waypipe aloria";
ll = "ls -lhat";
ls = "ls --color=auto";
lf = "cd \"\$(${pkgs.lf}/bin/lf -print-last-dir)\"";
compress = "tar --use-compress-program = lbzip2 -cvf";
wget = "wget --hsts-file = \"$XDG_DATA_HOME/wget-hsts\"";
python = "python3";
v = "nvim -c ':lua require(\"oil\").open()' && cd \"\$(cat /tmp/oil_dir 2> /dev/null || pwd)\"";
cpr = "rsync --archive -hh --partial --info = stats1,progress2 --modify-window = 1";
mvr = "rsync --archive -hh --partial --info = stats1,progress2 --modify-window = 1 --remove-source-files";
rg = "rg -i --colors 'match:bg:yellow' --colors 'match:fg:black' --colors 'match:style:nobold' --colors 'path:fg:green' --colors 'path:style:bold' --colors 'line:fg:yellow' --colors 'line:style:bold'";
ag = "rg -i --colors 'match:bg:yellow' --colors 'match:fg:black' --colors 'match:style:nobold' --colors 'path:fg:green' --colors 'path:style:bold' --colors 'line:fg:yellow' --colors 'line:style:bold'";
push = "git add -A && git commit -m '`date`' && git push";
reset = "tput reset";
};
history.size = 10000000;
history.save = 10000000;
history.path = "${config.xdg.dataHome}/zsh/history";
autocd = true;
plugins = [
{
name = "zsh-powerlevel10k";
src = "${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/";
file = "powerlevel10k.zsh-theme";
}
{
name = "vi-mode";
src = pkgs.zsh-vi-mode;
file = "share/zsh-vi-mode/zsh-vi-mode.plugin.zsh";
}
];
home.sessionVariables = {
BROWSER = "firefox";
GPULAB_CERT = "${config.xdg.dataHome}/gpulab.pem";
GPULAB_DEV = "False";
GCC_COLORS = "error = '01;31:warning = '01;35:note = '01;36:caret = '01;32:locus = '01:quote = '01'";
ARCHFLAGS = "-arch x86_64";
TERM = "screen-256color";
PYTHONDONTWRITEBYTECODE = "1";
GOPATH = "${config.xdg.dataHome}/go";
};
home.file."${config.xdg.configHome}/zsh" = {
source = ./files;
recursive = true;
};
programs.command-not-found.enable = true;
programs.zoxide = {
enable = true;
enableZshIntegration = true;
};
programs.fzf = {
enable = true;
};
programs.zsh = {
enable = true;
enableCompletion = true;
syntaxHighlighting.enable = false;
autosuggestion.enable = true;
initExtraFirst = ''
source ${config.xdg.configHome}/zsh/p10k.zsh
function zvm_after_init() {
source ${config.xdg.configHome}/zsh/term.zsh
source ${config.xdg.configHome}/zsh/completion.zsh
source ${config.xdg.configHome}/zsh/waypipe.zsh
if [ -n "\$\{commands[fzf-share]\}" ]; then
source "$(fzf-share)/key-bindings.zsh"
source "$(fzf-share)/completion.zsh"
fi
source ${config.xdg.configHome}/zsh/keys.zsh
}
'';
shellAliases = {
mallorea = "run_waypipe mallorea";
vault = "run_waypipe vault";
riva = "run_waypipe riva";
kell = "run_waypipe kell";
aloria = "run_waypipe aloria";
ll = "ls -lhat";
ls = "ls --color=auto";
lf = "cd \"\$(${pkgs.lf}/bin/lf -print-last-dir)\"";
compress = "tar --use-compress-program = lbzip2 -cvf";
wget = "wget --hsts-file = \"$XDG_DATA_HOME/wget-hsts\"";
python = "python3";
v = "nvim -c ':lua require(\"oil\").open()' && cd \"\$(cat /tmp/oil_dir 2> /dev/null || pwd)\"";
cpr = "rsync --archive -hh --partial --info = stats1,progress2 --modify-window = 1";
mvr = "rsync --archive -hh --partial --info = stats1,progress2 --modify-window = 1 --remove-source-files";
rg = "rg -i --colors 'match:bg:yellow' --colors 'match:fg:black' --colors 'match:style:nobold' --colors 'path:fg:green' --colors 'path:style:bold' --colors 'line:fg:yellow' --colors 'line:style:bold'";
ag = "rg -i --colors 'match:bg:yellow' --colors 'match:fg:black' --colors 'match:style:nobold' --colors 'path:fg:green' --colors 'path:style:bold' --colors 'line:fg:yellow' --colors 'line:style:bold'";
push = "git add -A && git commit -m '`date`' && git push";
reset = "tput reset";
};
history.size = 10000000;
history.save = 10000000;
history.path = "${config.xdg.dataHome}/zsh/history";
autocd = true;
plugins = [
{
name = "zsh-powerlevel10k";
src = "${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/";
file = "powerlevel10k.zsh-theme";
}
{
name = "vi-mode";
src = pkgs.zsh-vi-mode;
file = "share/zsh-vi-mode/zsh-vi-mode.plugin.zsh";
}
];
};
};
}