Add multiple hosts & restructure things

This commit is contained in:
2024-01-30 02:51:16 +00:00
parent f5f1a2b69c
commit 5e5508ec84
37 changed files with 596 additions and 510 deletions

View File

@@ -1,77 +1,90 @@
{ pkgs, lib, config, ... }: {
options.custom.bspwm.enable = lib.mkEnable "bspwm";
imports = [
../qutesearch/home.nix
../tint2/home.nix
../rofi/home.nix
];
home.packages = [
pkgs.feh
pkgs.flameshot
];
config = {
# programs.qutebrowser.enable = true;
# custom.qutesearch.enable = true;
# programs.tint2.enable = true;
# programs.rofi.enable = true;
services.network-manager-applet.enable = true;
xdg.portal = {
enable = true;
extraPortals = [
pkgs.xdg-desktop-portal-kde
home.packages = [
pkgs.feh
pkgs.flameshot
];
configPackages = [
pkgs.xdg-desktop-portal-kde
];
};
# handled by home manager
# home.sessionVariables = {
# # Tell java it's in no-reparenting land
# "_JAVA_AWT_WM_NONREPARENTING" = 1;
# };
services.network-manager-applet.enable = true;
services.sxhkd.enable = true;
xdg.configFile."sxhkd/sxhkdrc" = {
source = ./sxhkdrc;
executable = true;
};
home.file.".local/bin" = {
source = ./scripts;
recursive = true;
executable = true;
};
xsession.windowManager.bspwm = {
enable = true;
monitors = {
"eDP-1" = [ "I" "II" "III" "IV" "V" ];
xdg.portal = {
enable = true;
extraPortals = [
pkgs.xdg-desktop-portal-kde
];
configPackages = [
pkgs.xdg-desktop-portal-kde
];
};
settings = {
border_width = 1;
window_gap = 4;
split_ratio = 0.52;
# handled by home manager
# home.sessionVariables = {
# # Tell java it's in no-reparenting land
# "_JAVA_AWT_WM_NONREPARENTING" = 1;
# };
pointer_modifier = "super";
pointer_action1 = "move";
pointer_action2 = "resize_corner";
focus_follows_pointer = true;
pointer_follows_focus = true;
services.sxhkd.enable = true;
xdg.configFile."sxhkd/sxhkdrc" = {
source = ./sxhkdrc;
executable = true;
};
rules = {
Gimp = {
state = "floating";
home.file.".local/bin" = {
source = ./scripts;
recursive = true;
executable = true;
};
xsession.windowManager.bspwm = {
enable = true;
# monitors = {
# "eDP-1" = [ "I" "II" "III" "IV" "V" ];
# };
extraConfigEarly = ''
bspc monitor -d I II III IV V
'';
settings = {
border_width = 1;
window_gap = 4;
split_ratio = 0.52;
pointer_modifier = "super";
pointer_action1 = "move";
pointer_action2 = "resize_corner";
focus_follows_pointer = true;
pointer_follows_focus = true;
};
};
startupPrograms = [
# "pgrep -x sxhkd > /dev/null || sxhkd &"
"wmname LG3D"
# "xsetroot -cursor_name left_ptr &"
"tint2"
"feh --bg-scale ${config.custom.wallpaper}"
];
rules = {
Gimp = {
state = "floating";
};
};
startupPrograms = [
# "pgrep -x sxhkd > /dev/null || sxhkd &"
"wmname LG3D"
# "xsetroot -cursor_name left_ptr &"
"tint2"
"feh --bg-scale ${config.custom.wallpaper}"
];
};
};
}

0
modules/default.nix Normal file
View File

View File

@@ -1,10 +1,12 @@
{ pkgs, lib, ... }: {
nixpkgs.config.allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) [
"discord"
];
{ pkgs, lib, config, ... }: {
config = {
nixpkgs.config.allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) [
"discord"
];
home.packages = [
pkgs.discord
];
home.packages = [
pkgs.discord
];
}
}

View File

@@ -1,11 +1,10 @@
{ pkgs, ... }: {
{ pkgs, lib, config, ... }: {
home.packages = [
pkgs.grc
pkgs.fishPlugins.grc
];
programs.fish = {
enable = true;
interactiveShellInit = ''
set fish_greeting # Disable greeting
'';

5
modules/home.nix Normal file
View File

@@ -0,0 +1,5 @@
{ ... } : {
imports = [
]
}

View File

@@ -1,13 +0,0 @@
{ lib, ... }:
{
options = {
homeManager = lib.mkOption {
type = lib.types.set;
};
};
config = {
home-manager.users.dakedres = config.homeManager;
};
}

View File

@@ -5,131 +5,137 @@
../rofi/home.nix
];
home.packages = [
pkgs.swaybg
];
# options.custom.hyprland.enable = lib.mkEnable "hyprland";
# When swhkd is available, wlogout could be started via a script
# that disables keybind watching, starts wlogout, and enables keybind
# watching again once it's closed
programs.wlogout = {
enable = true;
};
config = {
home.packages = [
pkgs.swaybg
];
xdg.portal = {
enable = true;
extraPortals = [
pkgs.xdg-desktop-portal-gtk
];
configPackages = [
pkgs.xdg-desktop-portal-gtk
];
};
programs.waybar.enable = true;
wayland.windowManager.hyprland = {
enable = true;
settings = {
exec-once = [
"swaybg -i $WALLPAPER"
"waybar"
# When swhkd is available, wlogout could be started via a script
# that disables keybind watching, starts wlogout, and enables keybind
# watching again once it's closed
programs.wlogout = {
enable = true;
};
xdg.portal = {
enable = true;
extraPortals = [
pkgs.xdg-desktop-portal-gtk
];
monitor = [
"eDP-1,1920x1080@59.96,0x0,auto"
# "X11-1,600x800@59.96,0x0,auto"
configPackages = [
pkgs.xdg-desktop-portal-gtk
];
};
input = {
# kb_options = "caps:swapescape,altwin:swap_alt_win";
wayland.windowManager.hyprland = {
enable = true;
settings = {
exec-once = [
"swaybg -i $WALLPAPER"
"waybar"
];
monitor = [
"eDP-1,1920x1080@59.96,0x0,auto"
# "X11-1,600x800@59.96,0x0,auto"
];
input = {
# kb_options = "caps:swapescape,altwin:swap_alt_win";
};
general = {
gaps_in = 3;
gaps_out = 6;
};
group = {
groupbar = {
gradients = false;
text_color = "0xff111111";
};
};
misc = {
disable_hyprland_logo = true;
background_color = "0x000000";
};
animation = [
"workspaces,1,3,default,slidevert"
"windows,1,2,default,slide"
];
workspace = [
"name:I"
"name:II"
"name:III"
"name:IV"
"name:V"
];
windowrule = [
"fullscreen,noanim,noborder,title:(Albert)"
];
"$mod" = "SUPER";
bind = [
"$mod, Return, exec, $TERMINAL"
"$mod, o, exec, qutesearch"
"$mod, Space, exec, rofi -show drun"
"SUPERSHIFT, Space, exec, rofi -show run"
"$mod, Escape, exec, wlogout"
"$mod, w, killactive" # This closes the window and the name is dumb
"$mod, f, togglefloating"
"$mod, t, togglegroup"
"$mod, h, movefocus, l"
"$mod, j, movefocus, d"
"$mod, k, movefocus, u"
"$mod, l, movefocus, r"
"$mod, left, movefocus, l"
"$mod, down, movefocus, d"
"$mod, up, movefocus, u"
"$mod, right, movefocus, r"
"$mod, a, changegroupactive, f"
"$mod, d, changegroupactive, f"
"$mod, Tab, cyclenext"
"SUPERSHIFT, h, movewindoworgroup, l"
"SUPERSHIFT, j, movewindoworgroup, d"
"SUPERSHIFT, k, movewindoworgroup, u"
"SUPERSHIFT, l, movewindoworgroup, r"
"SUPERSHIFT, left, movewindoworgroup, l"
"SUPERSHIFT, down, movewindoworgroup, d"
"SUPERSHIFT, up, movewindoworgroup, u"
"SUPERSHIFT, right, movewindoworgroup, r"
"$mod, 1, workspace, 1"
"$mod, 2, workspace, 2"
"$mod, 3, workspace, 3"
"$mod, 4, workspace, 4"
"$mod, 5, workspace, 5"
];
bindm = [
"$mod, mouse:272, movewindow"
"$mod, mouse:273, resizewindow"
];
};
general = {
gaps_in = 3;
gaps_out = 6;
};
group = {
groupbar = {
gradients = false;
text_color = "0xff111111";
};
};
misc = {
disable_hyprland_logo = true;
background_color = "0x000000";
};
animation = [
"workspaces,1,3,default,slidevert"
"windows,1,2,default,slide"
];
workspace = [
"name:I"
"name:II"
"name:III"
"name:IV"
"name:V"
];
windowrule = [
"fullscreen,noanim,noborder,title:(Albert)"
];
"$mod" = "SUPER";
bind = [
"$mod, Return, exec, $TERMINAL"
"$mod, o, exec, qutesearch"
"$mod, Space, exec, rofi -show drun"
"SUPERSHIFT, Space, exec, rofi -show run"
"$mod, Escape, exec, wlogout"
"$mod, w, killactive" # This closes the window and the name is dumb
"$mod, f, togglefloating"
"$mod, t, togglegroup"
"$mod, h, movefocus, l"
"$mod, j, movefocus, d"
"$mod, k, movefocus, u"
"$mod, l, movefocus, r"
"$mod, left, movefocus, l"
"$mod, down, movefocus, d"
"$mod, up, movefocus, u"
"$mod, right, movefocus, r"
"$mod, a, changegroupactive, f"
"$mod, d, changegroupactive, f"
"$mod, Tab, cyclenext"
"SUPERSHIFT, h, movewindoworgroup, l"
"SUPERSHIFT, j, movewindoworgroup, d"
"SUPERSHIFT, k, movewindoworgroup, u"
"SUPERSHIFT, l, movewindoworgroup, r"
"SUPERSHIFT, left, movewindoworgroup, l"
"SUPERSHIFT, down, movewindoworgroup, d"
"SUPERSHIFT, up, movewindoworgroup, u"
"SUPERSHIFT, right, movewindoworgroup, r"
"$mod, 1, workspace, 1"
"$mod, 2, workspace, 2"
"$mod, 3, workspace, 3"
"$mod, 4, workspace, 4"
"$mod, 5, workspace, 5"
];
bindm = [
"$mod, mouse:272, movewindow"
"$mod, mouse:273, resizewindow"
];
};
};
}

View File

@@ -8,7 +8,7 @@
};
};
config = lib.mkIf config.custom.colors.kitty.enable {
config = {
programs.kitty.settings = with config.custom.colors; {
# Based on https://github.com/mk12/base16-kitty

19
modules/lf/home.nix Normal file
View File

@@ -0,0 +1,19 @@
{ ... }: {
programs.lf = {
enable = true;
commands = {
q = "quit"; # Why didn't they do this btw
};
keybindings = {
"<enter>" = "$$OPENER $f";
};
};
xdg.desktopEntries.lf = {
name = "LF";
genericName = "File browser";
exec = "lf %U";
terminal = true;
mimeType = [ "inode/directory" ];
};
}

View File

@@ -8,7 +8,7 @@
};
};
config = lib.mkIf config.custom.colors.ncspot.enable {
config = {
programs.ncspot.settings.theme = with config.custom.colors; {
# Attempts to look kinda green like the official client

View File

@@ -1,4 +1,4 @@
{ pkgs, ... }: {
{ pkgs, config, ... }: {
imports = [ ./colors.nix ];
home.packages = [
@@ -7,6 +7,7 @@
programs.ncspot = {
enable = true;
settings = {
cover_max_scale = 2;
};

View File

@@ -11,7 +11,7 @@
};
};
config = lib.mkIf config.custom.colors.qutebrowser.enable {
config = {
programs.qutebrowser.settings = with config.custom.colors; {
# Text color of the completion widget. May be a single color to use for
# all columns or a list of three colors, one for each column.

View File

@@ -1,7 +1,8 @@
{ ... }: {
programs.tint2.enable = true;
xdg.configFile."tint2/tint2rc" = {
source = ./tint2rc;
executable = true;
source = ./tint2rc;
executable = true;
};
}

View File

@@ -1,6 +1,5 @@
{ ... }: {
programs.waybar = {
enable = true;
settings = {
mainBar = {