zellij, hyprland config

This commit is contained in:
iofq 2024-11-18 20:10:08 -06:00
parent 39052c860d
commit 22cca03fec
12 changed files with 135 additions and 51 deletions

View file

@ -48,11 +48,6 @@
inherit system; inherit system;
config.allowUnfree = true; config.allowUnfree = true;
overlays = [ overlays = [
(_final: _prev: {
steam = pkgs.writeShellScriptBin "steam" ''
${_prev.steam.outPath}/bin/steam -pipewire "$@"
'';
})
inputs.nvim.overlays.default inputs.nvim.overlays.default
]; ];
}; };

View file

@ -1,18 +1,13 @@
{pkgs, ...}: { {pkgs, ...}: {
programs.taskwarrior = {
enable = true;
colorTheme = "solarized-dark-256";
};
home.packages = with pkgs; [ home.packages = with pkgs; [
ripgrep
fd
k9s k9s
kubectl kubectl
nerdctl
python3 python3
p7zip p7zip
gnumake gnumake
go go
jq jq
awscli tree
]; ];
} }

View file

@ -9,9 +9,10 @@
]; ];
home = { home = {
packages = with pkgs; [ packages = with pkgs; [
tree
eza eza
bat bat
ripgrep
fd
]; ];
}; };
programs.fish = { programs.fish = {
@ -30,8 +31,14 @@
set -gx NIX_FLAKE '/home/e/dev/nix' set -gx NIX_FLAKE '/home/e/dev/nix'
"; ";
plugins = [ plugins = [
{ name = "fzf"; src = pkgs.fishPlugins.fzf-fish.src; } {
{ name = "puffer"; src = pkgs.fishPlugins.puffer.src; } name = "fzf";
inherit (pkgs.fishPlugins.fzf-fish) src;
}
{
name = "puffer";
inherit (pkgs.fishPlugins.puffer) src;
}
]; ];
functions = { functions = {
nix = { nix = {
@ -58,6 +65,7 @@
mpv = "mpv --no-keepaspect-window"; mpv = "mpv --no-keepaspect-window";
cat = "bat -pp"; cat = "bat -pp";
tcd = "cd $(mktemp -d)"; tcd = "cd $(mktemp -d)";
docker = "nerdctl";
}; };
}; };
programs.bash = { programs.bash = {

View file

@ -1,4 +1,4 @@
_: { {config, ...}: {
programs.tmux = { programs.tmux = {
enable = true; enable = true;
keyMode = "vi"; keyMode = "vi";
@ -17,4 +17,59 @@ _: {
setw -g window-status-current-format '[#P:#W*] ' setw -g window-status-current-format '[#P:#W*] '
''; '';
}; };
programs.zellij = {
enable = true;
enableFishIntegration = true;
};
home.file."${config.xdg.configHome}/zellij/config.kdl".text = ''
on_force_close "quit"
default_layout "compact"
default_mode "locked"
keybinds {
tmux {
bind "Ctrl a" { Write 2; SwitchToMode "Locked"; }
bind "[" { SwitchToMode "Scroll"; }
bind "\"" { NewPane "Down"; SwitchToMode "Locked"; }
bind "%" { NewPane "Right"; SwitchToMode "Locked"; }
bind "z" { ToggleFocusFullscreen; SwitchToMode "Locked"; }
bind "c" { NewTab; SwitchToMode "Locked"; }
bind "," { SwitchToMode "RenameTab"; }
bind "p" { GoToPreviousTab; SwitchToMode "Locked"; }
bind "n" { GoToNextTab; SwitchToMode "Locked"; }
bind "h" { MoveFocus "Left"; SwitchToMode "Locked"; }
bind "l" { MoveFocus "Right"; SwitchToMode "Locked"; }
bind "j" { MoveFocus "Down"; SwitchToMode "Locked"; }
bind "k" { MoveFocus "Up"; SwitchToMode "Locked"; }
bind "Ctrl h" { MoveFocus "Left"; }
bind "Ctrl l" { MoveFocus "Right"; }
bind "Ctrl j" { MoveFocus "Down"; }
bind "Ctrl k" { MoveFocus "Up"; }
bind "o" { FocusNextPane; }
bind "d" { Detach; }
bind "Space" { NextSwapLayout; }
bind "x" { CloseFocus; SwitchToMode "Locked"; }
bind "/" {
LaunchOrFocusPlugin "zellij-forgot" { floating true }
}
}
shared_except "tmux" {
bind "Ctrl a" {
SwitchToMode "Tmux"
}
}
}
mouse_mode true
pane_frames false
plugins {
zellij-forgot location="https://github.com/karimould/zellij-forgot/releases/download/0.4.0/zellij_forgot.wasm"
}
simplified_ui true
theme "ansi"
ui {
pane_frames {
hide_session_name true
}
}
'';
} }

View file

@ -19,7 +19,7 @@ _: {
}; };
size = 12; size = 12;
offset = { offset = {
x = 1; x = 0;
y = 1; y = 1;
}; };
}; };

View file

@ -5,7 +5,7 @@
extraConfig = '' extraConfig = ''
monitor=,preferred,auto,1 monitor=,preferred,auto,1
''; '';
plugins = [ pkgs.hyprlandPlugins.hyprexpo ]; plugins = [pkgs.hyprlandPlugins.hyprexpo];
settings = { settings = {
"$mod" = "SUPER"; "$mod" = "SUPER";
general = { general = {
@ -22,7 +22,9 @@
blur = { blur = {
enabled = false; enabled = false;
}; };
drop_shadow = "no"; shadow = {
enabled = false;
};
}; };
animations = { animations = {
enabled = "yes"; enabled = "yes";
@ -37,7 +39,7 @@
}; };
master = { master = {
new_status = "slave"; new_status = "slave";
no_gaps_when_only = 1; new_on_top = true;
}; };
input = { input = {
kb_options = "caps:super"; kb_options = "caps:super";
@ -131,6 +133,17 @@
"noinitialfocus,class:^(xwaylandvideobridge)$" "noinitialfocus,class:^(xwaylandvideobridge)$"
"maxsize 1 1,class:^(xwaylandvideobridge)$" "maxsize 1 1,class:^(xwaylandvideobridge)$"
"noblur,class:^(xwaylandvideobridge)$" "noblur,class:^(xwaylandvideobridge)$"
"bordersize 0, floating:0, onworkspace:w[t1]"
"rounding 0, floating:0, onworkspace:w[t1]"
"bordersize 0, floating:0, onworkspace:w[tg1]"
"rounding 0, floating:0, onworkspace:w[tg1]"
"bordersize 0, floating:0, onworkspace:f[1]"
"rounding 0, floating:0, onworkspace:f[1]"
];
workspace = [
"w[t1], gapsout:0, gapsin:0"
"w[tg1], gapsout:0, gapsin:0"
"f[1], gapsout:0, gapsin:0"
]; ];
}; };
}; };

View file

@ -10,10 +10,10 @@
home = { home = {
packages = with pkgs; [ packages = with pkgs; [
# gaming # gaming
steam
prismlauncher prismlauncher
runelite runelite
jdk21 jdk21
steam-run
# comms # comms
signal-desktop signal-desktop
@ -30,9 +30,6 @@
piper piper
calibre calibre
# font
spleen
# sysutils # sysutils
appimage-run appimage-run
wireguard-tools wireguard-tools

View file

@ -25,6 +25,7 @@
2022 2022
3610 3610
6443 6443
8080
25565 25565
9002 9002
30001 30001

View file

@ -47,7 +47,7 @@ in {
pkgs = pkgs-stable; pkgs = pkgs-stable;
inherit inputs system attrs; inherit inputs system attrs;
host = { host = {
hostName = "consensus"; hostName = "nc";
inherit (attrs) username; inherit (attrs) username;
}; };
}; };

View file

@ -1,7 +1,4 @@
{ {pkgs, ...}: {
pkgs,
...
}: {
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
./k3s.nix ./k3s.nix
@ -38,10 +35,10 @@
enable = true; enable = true;
allowedTCPPorts = [ allowedTCPPorts = [
22 22
9000 9000 #charon holesky
30001 30001 #mainnet
30303 30303 #mainnet
30304 30304 #charon holesky
]; ];
logRefusedConnections = true; logRefusedConnections = true;
}; };
@ -67,11 +64,15 @@
"wheel" "wheel"
"docker" "docker"
]; ];
openssh.authorizedKeys.keys = [''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHM4Zr0PFN7QdOG2aJ+nuzRCK6caulrpY6bphA1Ppl8Y e@t14'']; openssh.authorizedKeys.keys = [
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHM4Zr0PFN7QdOG2aJ+nuzRCK6caulrpY6bphA1Ppl8Y e@t14''
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAdo4PS8myKaKAdyIqSFj2VJ+oZ9DNRIp7PBz8IWKjjy''
];
}; };
hd = { hd = {
isNormalUser = true; isNormalUser = true;
extraGroups = [ extraGroups = [
"wheel"
"docker" "docker"
]; ];
}; };

View file

@ -4,16 +4,24 @@
config, config,
... ...
}: { }: {
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; imports = [(modulesPath + "/profiles/qemu-guest.nix")];
boot.loader.grub.device = "/dev/vda"; boot.loader.grub.device = "/dev/vda";
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "xen_blkfront" "vmw_pvscsi" ]; boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "xen_blkfront" "vmw_pvscsi"];
boot.initrd.kernelModules = [ "nvme" ]; boot.initrd.kernelModules = ["nvme"];
fileSystems."/" = { device = "/dev/vda3"; fsType = "ext4"; }; fileSystems."/" = {
device = "/dev/vda3";
fsType = "ext4";
};
boot = { boot = {
kernelModules = ["kvm-intel"]; kernelModules = ["kvm-intel"];
tmp.cleanOnBoot = true; tmp.cleanOnBoot = true;
}; };
swapDevices = [
{
device = "/swapfile";
size = 8 * 1024;
}
];
zramSwap.enable = false; zramSwap.enable = false;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;

View file

@ -13,6 +13,7 @@ in {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
cryptsetup cryptsetup
nfs-utils nfs-utils
nerdctl
]; ];
environment.extraInit = "[[ -f ${homeManagerSessionVars} ]] && source ${homeManagerSessionVars} && echo 'x' > /tmp/test"; environment.extraInit = "[[ -f ${homeManagerSessionVars} ]] && source ${homeManagerSessionVars} && echo 'x' > /tmp/test";
@ -24,7 +25,7 @@ in {
# Networking # Networking
networking = { networking = {
hostId = "1185c58e"; hostId = "1185c58e";
nameservers = ["100.114.91.10"]; nameservers = ["9.9.9.9" "1.1.1.1"];
networkmanager = { networkmanager = {
enable = true; enable = true;
dns = "systemd-resolved"; dns = "systemd-resolved";
@ -40,9 +41,8 @@ in {
# Services # Services
virtualisation = { virtualisation = {
podman = { containerd = {
enable = true; enable = true;
dockerCompat = true;
}; };
}; };
@ -58,6 +58,7 @@ in {
ssh = { ssh = {
startAgent = true; startAgent = true;
}; };
steam.enable = true;
}; };
services = { services = {
resolved = { resolved = {
@ -78,9 +79,19 @@ in {
tlp = { tlp = {
enable = true; enable = true;
settings = { settings = {
WIFI_PWR_ON_BAT = "off"; START_CHARGE_THRESH_BAT0 = 40;
START_CHARGE_THRESH_BAT0 = 80; STOP_CHARGE_THRESH_BAT0 = 80;
STOP_CHARGE_THRESH_BAT0 = 85; CPU_BOOST_ON_AC = 1;
CPU_BOOST_ON_BAT = 0;
CPU_SCALING_GOVERNOR_ON_AC = "performance";
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
CPU_MIN_PERF_ON_AC = 0;
CPU_MAX_PERF_ON_AC = 100;
CPU_MIN_PERF_ON_BAT = 0;
CPU_MAX_PERF_ON_BAT = 20;
}; };
}; };
ratbagd.enable = true; # Logitech ratbagd.enable = true; # Logitech