Starting to break out for different XPS systems
This commit is contained in:
14
home-manager/programs/default.nix
Normal file
14
home-manager/programs/default.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
# Add program-specific configurations here
|
||||
./git.nix
|
||||
./direnv.nix
|
||||
./neovim.nix
|
||||
./sway.nix
|
||||
./waybar.nix
|
||||
# ./shell.nix
|
||||
./yazi.nix
|
||||
];
|
||||
}
|
||||
10
home-manager/programs/direnv.nix
Normal file
10
home-manager/programs/direnv.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
enableBashIntegration = true; # or enableZshIntegration = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
}
|
||||
|
||||
15
home-manager/programs/git.nix
Normal file
15
home-manager/programs/git.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Jared Kling";
|
||||
userEmail = "jared@kling.dev";
|
||||
|
||||
extraConfig = {
|
||||
init.defaultBranch = "main";
|
||||
pull.rebase = true;
|
||||
push.autoSetupRemote = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
11
home-manager/programs/neovim.nix
Normal file
11
home-manager/programs/neovim.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
withNodeJs = true;
|
||||
defaultEditor = true;
|
||||
};
|
||||
}
|
||||
167
home-manager/programs/sway.nix
Normal file
167
home-manager/programs/sway.nix
Normal file
@@ -0,0 +1,167 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
config = {
|
||||
# Input configuration
|
||||
input = {
|
||||
"type:touchpad" = {
|
||||
natural_scroll = "enabled";
|
||||
tap = "enabled";
|
||||
tap_button_map = "lrm";
|
||||
scroll_method = "two_finger";
|
||||
};
|
||||
"type:pointer" = {
|
||||
natural_scroll = "enabled";
|
||||
};
|
||||
};
|
||||
|
||||
# Key bindings
|
||||
keybindings = {
|
||||
"Mod4+Return" = "exec alacritty";
|
||||
"Mod4+Shift+q" = "kill";
|
||||
"Mod4+b" = "exec vivaldi";
|
||||
"Mod4+d" = "exec wofi --show drun --width 500 --height 350 --border 2 --prompt \"Apps\" --allow-images --gtk-dark";
|
||||
"Mod4+Shift+d" = "exec wofi --show run --width 400 --height 200 --prompt \"Run\"";
|
||||
"Mod4+Tab" = "exec ~/.config/sway/scripts/window-switcher.sh";
|
||||
"Mod4+Shift+c" = "reload";
|
||||
"Mod4+Shift+e" = "exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'";
|
||||
|
||||
# Focus movement
|
||||
"Mod4+h" = "focus left";
|
||||
"Mod4+j" = "focus down";
|
||||
"Mod4+k" = "focus up";
|
||||
"Mod4+l" = "focus right";
|
||||
"Mod4+Left" = "focus left";
|
||||
"Mod4+Down" = "focus down";
|
||||
"Mod4+Up" = "focus up";
|
||||
"Mod4+Right" = "focus right";
|
||||
|
||||
# Move windows
|
||||
"Mod4+Shift+h" = "move left";
|
||||
"Mod4+Shift+j" = "move down";
|
||||
"Mod4+Shift+k" = "move up";
|
||||
"Mod4+Shift+l" = "move right";
|
||||
"Mod4+Shift+Left" = "move left";
|
||||
"Mod4+Shift+Down" = "move down";
|
||||
"Mod4+Shift+Up" = "move up";
|
||||
"Mod4+Shift+Right" = "move right";
|
||||
|
||||
# Workspace switching
|
||||
"Mod4+1" = "workspace number 1";
|
||||
"Mod4+2" = "workspace number 2";
|
||||
"Mod4+3" = "workspace number 3";
|
||||
"Mod4+4" = "workspace number 4";
|
||||
"Mod4+5" = "workspace number 5";
|
||||
"Mod4+6" = "workspace number 6";
|
||||
"Mod4+7" = "workspace number 7";
|
||||
"Mod4+8" = "workspace number 8";
|
||||
"Mod4+9" = "workspace number 9";
|
||||
"Mod4+0" = "workspace number 10";
|
||||
|
||||
# Move containers to workspaces
|
||||
"Mod4+Shift+1" = "move container to workspace number 1";
|
||||
"Mod4+Shift+2" = "move container to workspace number 2";
|
||||
"Mod4+Shift+3" = "move container to workspace number 3";
|
||||
"Mod4+Shift+4" = "move container to workspace number 4";
|
||||
"Mod4+Shift+5" = "move container to workspace number 5";
|
||||
"Mod4+Shift+6" = "move container to workspace number 6";
|
||||
"Mod4+Shift+7" = "move container to workspace number 7";
|
||||
"Mod4+Shift+8" = "move container to workspace number 8";
|
||||
"Mod4+Shift+9" = "move container to workspace number 9";
|
||||
"Mod4+Shift+0" = "move container to workspace number 10";
|
||||
|
||||
"Mod4+f" = "fullscreen";
|
||||
"Mod4+Shift+b" = "exec pkill waybar; waybar &";
|
||||
};
|
||||
|
||||
# Window rules
|
||||
window = {
|
||||
commands = [
|
||||
{
|
||||
criteria = { class = ".*"; };
|
||||
command = "border pixel 2";
|
||||
}
|
||||
{
|
||||
criteria = { app_id = ".*"; };
|
||||
command = "border pixel 2";
|
||||
}
|
||||
{
|
||||
criteria = { window_role = "dialog"; };
|
||||
command = "border normal";
|
||||
}
|
||||
{
|
||||
criteria = { window_type = "dialog"; };
|
||||
command = "border normal";
|
||||
}
|
||||
];
|
||||
titlebar = false;
|
||||
};
|
||||
|
||||
# Assignments
|
||||
assigns = {
|
||||
"9" = [{ class = "Vivaldi-stable"; }];
|
||||
};
|
||||
|
||||
# Gaps
|
||||
gaps = {
|
||||
inner = 8;
|
||||
outer = 12;
|
||||
};
|
||||
|
||||
# Colors (Tokyo Night theme)
|
||||
colors = {
|
||||
focused = {
|
||||
border = "#7aa2f7";
|
||||
background = "#7aa2f7";
|
||||
text = "#1a1b26";
|
||||
indicator = "#7aa2f7";
|
||||
childBorder = "#7aa2f7";
|
||||
};
|
||||
focusedInactive = {
|
||||
border = "#24283b";
|
||||
background = "#24283b";
|
||||
text = "#c0caf5";
|
||||
indicator = "#24283b";
|
||||
childBorder = "#24283b";
|
||||
};
|
||||
unfocused = {
|
||||
border = "#24283b";
|
||||
background = "#1a1b26";
|
||||
text = "#9aa5ce";
|
||||
indicator = "#24283b";
|
||||
childBorder = "#24283b";
|
||||
};
|
||||
urgent = {
|
||||
border = "#f7768e";
|
||||
background = "#f7768e";
|
||||
text = "#1a1b26";
|
||||
indicator = "#f7768e";
|
||||
childBorder = "#f7768e";
|
||||
};
|
||||
};
|
||||
|
||||
# Output configuration
|
||||
output = {
|
||||
"*" = {
|
||||
#bg = "/home/jared/.config/sway/wallpapers/starters_and_pika.jpg fill";
|
||||
};
|
||||
};
|
||||
|
||||
# Seat configuration
|
||||
seat = {
|
||||
"seat0" = {
|
||||
xcursor_theme = "Bibata-Modern-Ice 24";
|
||||
};
|
||||
};
|
||||
|
||||
# Startup commands
|
||||
startup = [
|
||||
{ command = "waybar"; }
|
||||
{ command = "dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway"; }
|
||||
{ command = "systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"; }
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
229
home-manager/programs/waybar.nix
Normal file
229
home-manager/programs/waybar.nix
Normal file
@@ -0,0 +1,229 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
settings = {
|
||||
mainBar = {
|
||||
position = "top";
|
||||
height = 30;
|
||||
spacing = 4;
|
||||
|
||||
modules-left = [ "sway/workspaces" "sway/mode" ];
|
||||
modules-center = [ "sway/window" ];
|
||||
modules-right = [ "idle_inhibitor" "pulseaudio" "network" "cpu" "memory" "temperature" "battery" "tray" "clock" ];
|
||||
|
||||
"sway/workspaces" = {
|
||||
disable-scroll = true;
|
||||
all-outputs = true;
|
||||
format = "{name}: {icon}";
|
||||
format-icons = {
|
||||
"1" = "";
|
||||
"2" = "";
|
||||
"3" = "";
|
||||
"4" = "";
|
||||
"5" = "";
|
||||
"6" = "";
|
||||
"7" = "";
|
||||
"8" = "";
|
||||
"9" = "";
|
||||
"10" = "";
|
||||
urgent = "";
|
||||
focused = "";
|
||||
default = "";
|
||||
};
|
||||
};
|
||||
|
||||
"sway/mode" = {
|
||||
format = "<span style=\"italic\">{}</span>";
|
||||
};
|
||||
|
||||
"sway/window" = {
|
||||
format = "{}";
|
||||
max-length = 50;
|
||||
};
|
||||
|
||||
"idle_inhibitor" = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
activated = "";
|
||||
deactivated = "";
|
||||
};
|
||||
};
|
||||
|
||||
"tray" = {
|
||||
spacing = 10;
|
||||
};
|
||||
|
||||
"clock" = {
|
||||
tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
|
||||
format-alt = "{:%Y-%m-%d}";
|
||||
};
|
||||
|
||||
"cpu" = {
|
||||
format = "{usage}% ";
|
||||
tooltip = false;
|
||||
};
|
||||
|
||||
"memory" = {
|
||||
format = "{}% ";
|
||||
};
|
||||
|
||||
"temperature" = {
|
||||
thermal-zone = 2;
|
||||
hwmon-path = "/sys/class/hwmon/hwmon2/temp1_input";
|
||||
critical-threshold = 80;
|
||||
format = "{temperatureC}°C {icon}";
|
||||
format-icons = [ "" "" "" ];
|
||||
};
|
||||
|
||||
"battery" = {
|
||||
states = {
|
||||
warning = 30;
|
||||
critical = 15;
|
||||
};
|
||||
format = "{capacity}% {icon}";
|
||||
format-charging = " {capacity}%";
|
||||
format-plugged = " {capacity}%";
|
||||
format-alt = "{time} {icon}";
|
||||
format-icons = [ "" "" "" "" "" "" "" "" "" "" "" ];
|
||||
};
|
||||
|
||||
"network" = {
|
||||
format-wifi = "{essid} ({signalStrength}%) ";
|
||||
format-ethernet = "{ipaddr}/{cidr} ";
|
||||
tooltip-format = "{ifname} via {gwaddr} ";
|
||||
format-linked = "{ifname} (No IP) ";
|
||||
format-disconnected = "Disconnected ⚠";
|
||||
format-alt = "{ifname}: {ipaddr}/{cidr}";
|
||||
};
|
||||
|
||||
"pulseaudio" = {
|
||||
format = "{volume}% {icon} {format_source}";
|
||||
format-bluetooth = "{volume}% {icon} {format_source}";
|
||||
format-bluetooth-muted = " {icon} {format_source}";
|
||||
format-muted = " {format_source}";
|
||||
format-source = "{volume}% ";
|
||||
format-source-muted = "";
|
||||
format-icons = {
|
||||
headphone = "";
|
||||
hands-free = "";
|
||||
headset = "";
|
||||
phone = "";
|
||||
portable = "";
|
||||
car = "";
|
||||
default = [ "" "" "" ];
|
||||
};
|
||||
on-click = "pavucontrol";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
style = ''
|
||||
* {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
font-family: "JetBrainsMono Nerd Font", "Font Awesome 6 Free";
|
||||
font-size: 13px;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background: #1a1b26;
|
||||
color: #c0caf5;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
padding: 0 5px;
|
||||
background: transparent;
|
||||
color: #c0caf5;
|
||||
border-top: 2px solid transparent;
|
||||
}
|
||||
|
||||
#workspaces button.focused {
|
||||
color: #7aa2f7;
|
||||
border-top: 2px solid #7aa2f7;
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
color: #f7768e;
|
||||
}
|
||||
|
||||
#mode {
|
||||
background: #f7768e;
|
||||
color: #1a1b26;
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
#clock, #battery, #cpu, #memory, #temperature, #network, #pulseaudio, #tray, #mode, #idle_inhibitor {
|
||||
padding: 0 10px;
|
||||
margin: 0 4px;
|
||||
color: #c0caf5;
|
||||
}
|
||||
|
||||
#clock {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#battery {
|
||||
color: #c0caf5;
|
||||
}
|
||||
|
||||
#battery.charging {
|
||||
color: #9ece6a;
|
||||
}
|
||||
|
||||
#battery.critical:not(.charging) {
|
||||
color: #f7768e;
|
||||
animation-name: blink;
|
||||
animation-duration: 0.5s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
|
||||
#cpu {
|
||||
color: #bb9af7;
|
||||
}
|
||||
|
||||
#memory {
|
||||
color: #bb9af7;
|
||||
}
|
||||
|
||||
#temperature {
|
||||
color: #ff9e64;
|
||||
}
|
||||
|
||||
#temperature.critical {
|
||||
color: #f7768e;
|
||||
}
|
||||
|
||||
#network {
|
||||
color: #7aa2f7;
|
||||
}
|
||||
|
||||
#network.disconnected {
|
||||
color: #f7768e;
|
||||
}
|
||||
|
||||
#pulseaudio {
|
||||
color: #7aa2f7;
|
||||
}
|
||||
|
||||
#pulseaudio.muted {
|
||||
color: #f7768e;
|
||||
}
|
||||
|
||||
#tray {
|
||||
background-color: #1a1b26;
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
to {
|
||||
background-color: #f7768e;
|
||||
color: #1a1b26;
|
||||
}
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
9
home-manager/programs/yazi.nix
Normal file
9
home-manager/programs/yazi.nix
Normal file
@@ -0,0 +1,9 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.yazi = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user