Compare commits

...

11 commits

Author SHA1 Message Date
64c5de2f84 add wofi 2023-10-01 16:33:22 -05:00
3e0b5a1872 add waybar 2023-10-01 15:58:22 -05:00
9a37482320 add qt 2023-10-01 15:23:20 -05:00
0dfa785ec7 remove systemd fixes, remove recommendedEnvironment 2023-10-01 14:45:24 -05:00
f54e3593a0 enable systemd fixes 2023-10-01 14:19:43 -05:00
6d4bfdb7b3 hypr code fixes and such 2023-10-01 14:17:04 -05:00
7481c9f9c7 add kitty config 2023-10-01 11:19:53 -05:00
0f36251282 add kitty config 2023-10-01 11:19:13 -05:00
806291470f add additional wayland bits 2023-10-01 10:58:58 -05:00
3147aa7bf1 remove redundant hyprland bits 2023-09-30 15:19:40 -05:00
ced05c46c8 add kitty 2023-09-30 15:01:46 -05:00
16 changed files with 302 additions and 76 deletions

View file

@ -9,11 +9,11 @@
}, },
"locked": { "locked": {
"dir": "pkgs/firefox-addons", "dir": "pkgs/firefox-addons",
"lastModified": 1695441765, "lastModified": 1696061413,
"narHash": "sha256-s6sNoj2bKX9e7eE870o8Osr0lr3jNWUYkgdmIYQPCs8=", "narHash": "sha256-sqwTUo0CG9jmiCrdTNbZw0cbYRQrkgidHIqJ2M9Q8nM=",
"owner": "rycee", "owner": "rycee",
"repo": "nur-expressions", "repo": "nur-expressions",
"rev": "e1c9234dd58dfd8bfa7662df27d6124cad190f2a", "rev": "01661d8650f000a5fc8b0c2c60dce3d2bf5d4b99",
"type": "gitlab" "type": "gitlab"
}, },
"original": { "original": {
@ -40,11 +40,11 @@
}, },
"hardware": { "hardware": {
"locked": { "locked": {
"lastModified": 1695109627, "lastModified": 1695887975,
"narHash": "sha256-4rpyoVzmunIG6xWA/EonnSSqC69bDBzciFi6SjBze/0=", "narHash": "sha256-u3+5FR12dI305jCMb0fJNQx2qwoQ54lv1tPoEWp0hmg=",
"owner": "nixos", "owner": "nixos",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "cb4dc98f776ddb6af165e6f06b2902efe31ca67a", "rev": "adcfd6aa860d1d129055039696bc457af7d50d0e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -139,11 +139,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1695145219, "lastModified": 1695830400,
"narHash": "sha256-Eoe9IHbvmo5wEDeJXKFOpKUwxYJIOxKUesounVccNYk=", "narHash": "sha256-gToZXQVr0G/1WriO83olnqrLSHF2Jb8BPcmCt497ro0=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "5ba549eafcf3e33405e5f66decd1a72356632b96", "rev": "8a86b98f0ba1c405358f1b71ff8b5e1d317f5db2",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -155,11 +155,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1695346609, "lastModified": 1695825837,
"narHash": "sha256-jur+AjgRvablLA2oBvC4FD89zCXttVQDwi6OXk5x/14=", "narHash": "sha256-4Ne11kNRnQsmSJCRSSNkFRSnHC4Y5gPDBIQGjjPfJiU=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e9b4b56e5a20ac322c0c01ccab7ec697ab076ea0", "rev": "5cfafa12d57374f48bcc36fda3274ada276cf69e",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -77,11 +77,7 @@
extraSpecialArgs = { inherit inputs outputs; }; extraSpecialArgs = { inherit inputs outputs; };
}; };
"john@pixnix" = lib.homeManagerConfiguration { "john@pixnix" = lib.homeManagerConfiguration {
modules = [ modules = [ ./home/pixnix.nix ];
./home/pixnix.nix
hyprland.homeManagerModules.default
{wayland.windowManager.hyprland.enable = true;}
];
pkgs = pkgsFor.x86_64-linux; pkgs = pkgsFor.x86_64-linux;
extraSpecialArgs = { inherit inputs outputs; }; extraSpecialArgs = { inherit inputs outputs; };
}; };

View file

@ -2,6 +2,8 @@
# Common GUI apps # Common GUI apps
imports = [ imports = [
./firefox.nix ./firefox.nix
./gtk.nix
./qt.nix
./vscode.nix ./vscode.nix
]; ];
@ -9,4 +11,4 @@
obsidian obsidian
qFlipper qFlipper
]; ];
} }

View file

@ -0,0 +1,9 @@
{ config, pkgs, inputs, ... }: {
gtk = {
enable = true;
};
services.xsettingsd = {
enable = true;
};
}

View file

@ -0,0 +1,59 @@
{
wayland.windowManager.hyprland.extraConfig = ''
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
$mainMod = SUPER
# Alt-Tab action
bind = ALT, Tab, cyclenext,
bind = ALT, Tab, bringactivetotop,
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = $mainMod, Q, exec, kitty
bind = $mainMod, C, killactive,
bind = $mainMod, M, exit,
bind = $mainMod, E, exec, dolphin
bind = $mainMod, F, exec, firefox
bind = $mainMod, V, togglefloating,
bind = $mainMod, R, exec, wofi --show drun
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, J, togglesplit, # dwindle
# Move focus with mainMod + arrow keys
bind = $mainMod, left, movefocus, l
bind = $mainMod, right, movefocus, r
bind = $mainMod, up, movefocus, u
bind = $mainMod, down, movefocus, d
# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4
bind = $mainMod, 5, workspace, 5
bind = $mainMod, 6, workspace, 6
bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10
# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3
bind = $mainMod SHIFT, 4, movetoworkspace, 4
bind = $mainMod SHIFT, 5, movetoworkspace, 5
bind = $mainMod SHIFT, 6, movetoworkspace, 6
bind = $mainMod SHIFT, 7, movetoworkspace, 7
bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 10
# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow
'';
}

View file

@ -1,7 +1,19 @@
{ config, inputs, pkgs, ... }: { { config, inputs, pkgs, ... }: {
imports = [
./binds.nix
./tty-init.nix
../wayland-wm
];
home.packages = with pkgs; [
hyprpicker
];
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
enable = true; enable = true;
systemdIntegration = true; systemdIntegration = true;
xwayland.enable = true;
extraConfig = '' extraConfig = ''
# This is an example Hyprland config file. # This is an example Hyprland config file.
# #
@ -13,7 +25,11 @@
# #
# See https://wiki.hyprland.org/Configuring/Monitors/ # See https://wiki.hyprland.org/Configuring/Monitors/
monitor=,preferred,auto,auto monitor=eDP-1,2400x1600,auto,1.5
xwayland {
force_zero_scaling = true
}
# See https://wiki.hyprland.org/Configuring/Keywords/ for more # See https://wiki.hyprland.org/Configuring/Keywords/ for more
@ -38,7 +54,8 @@
follow_mouse = 1 follow_mouse = 1
touchpad { touchpad {
natural_scroll = false natural_scroll = true
clickfinger_behavior = true
} }
sensitivity = 0 # -1.0 - 1.0, 0 means no modification. sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
@ -47,8 +64,8 @@
general { general {
# See https://wiki.hyprland.org/Configuring/Variables/ for more # See https://wiki.hyprland.org/Configuring/Variables/ for more
gaps_in = 5 gaps_in = 2
gaps_out = 20 gaps_out = 6
border_size = 2 border_size = 2
col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
col.inactive_border = rgba(595959aa) col.inactive_border = rgba(595959aa)
@ -62,7 +79,7 @@
decoration { decoration {
# See https://wiki.hyprland.org/Configuring/Variables/ for more # See https://wiki.hyprland.org/Configuring/Variables/ for more
rounding = 10 rounding = 6
blur { blur {
enabled = true enabled = true
@ -104,7 +121,8 @@
gestures { gestures {
# See https://wiki.hyprland.org/Configuring/Variables/ for more # See https://wiki.hyprland.org/Configuring/Variables/ for more
workspace_swipe = false workspace_swipe = true
} }
# Example per-device config # Example per-device config
@ -119,58 +137,11 @@
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ # windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
$mainMod = SUPER
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = $mainMod, Q, exec, kitty
bind = $mainMod, C, killactive,
bind = $mainMod, M, exit,
bind = $mainMod, E, exec, dolphin
bind = $mainMod, V, togglefloating,
bind = $mainMod, R, exec, wofi --show drun
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, J, togglesplit, # dwindle
# Move focus with mainMod + arrow keys
bind = $mainMod, left, movefocus, l
bind = $mainMod, right, movefocus, r
bind = $mainMod, up, movefocus, u
bind = $mainMod, down, movefocus, d
# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4
bind = $mainMod, 5, workspace, 5
bind = $mainMod, 6, workspace, 6
bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10
# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3
bind = $mainMod SHIFT, 4, movetoworkspace, 4
bind = $mainMod SHIFT, 5, movetoworkspace, 5
bind = $mainMod SHIFT, 6, movetoworkspace, 6
bind = $mainMod SHIFT, 7, movetoworkspace, 7
bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 10
# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow
''; '';
}; };
# VSCode scaling fix
programs.vscode.userSettings = {
"window.zoomLevel" = 2;
};
} }

View file

@ -0,0 +1,9 @@
{
programs = {
fish.loginShellInit = ''
if test (tty) = "/dev/tty1"
exec Hyprland &> /dev/null
end
'';
};
}

View file

@ -0,0 +1,10 @@
{ pkgs, cofig, ... }: {
qt = {
enable = true;
platformTheme = "gtk";
style = {
name = "gtk2";
package = pkgs.qt6Packages.qt6gtk2;
};
};
}

View file

@ -0,0 +1,32 @@
{ pkgs, ... }: {
imports = [
./kitty.nix
./mako.nix
./waybar.nix
./wofi.nix
];
xdg.mimeApps.enable = true;
home.packages = with pkgs; [
grim
gtk3
imv
mimeo
# primary-xwayland
pulseaudio
slurp
waypipe
wf-recorder
wl-clipboard
wl-mirror
# wl-mirror-pick
# xdg-utils-spawn-terminal
ydotool
];
home.sessionVariables = {
MOZ_ENABLE_WAYLAND = 1;
QT_QPA_PLATFORM = "wayland";
LIBSEAT_BACKEND = "logind";
};
}

View file

@ -0,0 +1,21 @@
{ config, pkgs, ... }:
let
kitty-xterm = pkgs.writeShellScriptBin "xterm" ''
${config.programs.kitty.package}/bin/kitty -1 "$@"
'';
in
{
home = {
packages = [ kitty-xterm ];
sessionVariables = {
TERMINAL = "kitty -1";
};
};
programs.kitty = {
enable = true;
settings = {
scrollback_lines = 4000;
};
};
}

View file

@ -0,0 +1,5 @@
{
services.mako = {
enable = true;
};
}

View file

@ -0,0 +1,49 @@
{ ouputs, cofig, lib, pkgs, ... }:
let
cat = "${pkgs.coreutils}/bin/cat";
cut = "${pkgs.coreutils}/bin/cut";
find = "${pkgs.findutils}/bin/find";
grep = "${pkgs.gnugrep}/bin/grep";
journalctl = "${pkgs.systemd}/bin/journalctl";
jq = "${pkgs.jq}/bin/jq";
pgrep = "${pkgs.procps}/bin/pgrep";
ping = "${pkgs.iputils}/bin/ping";
playerctl = "${pkgs.playerctl}/bin/playerctl";
playerctld = "${pkgs.playerctl}/bin/playerctld";
systemctl = "${pkgs.systemd}/bin/systemctl";
tail = "${pkgs.coreutils}/bin/tail";
timeout = "${pkgs.coreutils}/bin/timeout";
wc = "${pkgs.coreutils}/bin/wc";
wofi = "${pkgs.wofi}/bin/wofi";
xargs = "${pkgs.findutils}/bin/xargs";
jsonOutput = name: { pre ? "", text ? "", tooltip ? "", alt? "", class ? "", percentage ? "" }: "${pkgs.writeShellScriptBin "waybar-${name}" ''
set -euo pipefail
${pre}
${jq} -cn \
--arg text "${text}" \
--arg tooltip "${tooltip}" \
--arg alt "${alt}" \
--arg class "${class}" \
--arg percentage "${percentage}" \
'{text:$text,tooltip:$tooltip,alt:$alt,class:$class,percentage:$percentage}'
''}/bin/waybar-${name}";
in
{
programs.waybar = {
enable = true;
package = pkgs.waybar.overrideAttrs (oa: {
mesonFlags = (oa.mesonFlags or [ ]) ++ [ "-Dexperimental=true" ];
});
systemd.enable = true;
settings = {
primary = {
mode = "dock";
layer = "top";
position = "top";
height = 24;
margin = "6";
};
};
};
}

View file

@ -0,0 +1,20 @@
--- a/src/wofi.c Mon Feb 22 23:53:57 2021 -0800
+++ b/src/wofi.c Wed Aug 11 13:49:13 2021 -0300
@@ -881,12 +881,15 @@
}
void wofi_term_run(const char* cmd) {
+ char *shell = getenv("SHELL");
+ if (!shell) shell = "sh";
+
if(terminal != NULL) {
- execlp(terminal, terminal, "-e", cmd, NULL);
+ execlp(terminal, terminal, "-e", shell, "-c", cmd, NULL);
}
size_t term_count = sizeof(terminals) / sizeof(char*);
for(size_t count = 0; count < term_count; ++count) {
- execlp(terminals[count], terminals[count], "-e", cmd, NULL);
+ execlp(terminals[count], terminals[count], "-e", shell, "-c", cmd, NULL);
}
fprintf(stderr, "No terminal emulator found please set term in config or use --term\n");
exit(1);

View file

@ -0,0 +1,19 @@
{ config, lib, pkgs, ... }: {
programs.wofi = {
enable = true;
package = pkgs.wofi.overrideAttrs (oa: {
patches = (oa.patches or [ ]) ++ [
./wofi-run-shell.patch # Fix for https://todo.sr.ht/~scoopta/wofi/174
];
});
settings = {
image_size = 48;
columns = 3;
allow_images = true;
insensitive = true;
run-always_parse_args = true;
run-cache_file = "/dev/null";
run-exec_search = true;
};
};
}

View file

@ -0,0 +1,18 @@
{ pkgs, ... }: {
services.greetd = {
enable = true;
settings = {
default_session.command = ''
${pkgs.greetd.tuigreet}/bin/tuigreet \
--time \
--asterisks \
--user-menu \
--cmd Hyprland
'';
};
};
environment.etc."greetd/environments".text = ''
Hyprland
'';
}

View file

@ -9,6 +9,7 @@
../common/users/john ../common/users/john
../common/optional/docker.nix ../common/optional/docker.nix
../common/optional/greetd.nix
../common/optional/hyprland.nix ../common/optional/hyprland.nix
../common/optional/libvirtd.nix ../common/optional/libvirtd.nix
../common/optional/pipewire.nix ../common/optional/pipewire.nix
@ -21,6 +22,11 @@
networkmanager.enable = true; networkmanager.enable = true;
}; };
xdg.portal = {
enable = true;
wlr.enable = true;
};
system.stateVersion = "23.05"; system.stateVersion = "23.05";
} }