Compare commits

..

No commits in common. "64c5de2f8400b0d2589f9543978f777cb002a2bd" and "8c7d2af6cd186bc5c08609adfbe33913506ad620" have entirely different histories.

16 changed files with 76 additions and 302 deletions

View file

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

View file

@ -77,7 +77,11 @@
extraSpecialArgs = { inherit inputs outputs; }; extraSpecialArgs = { inherit inputs outputs; };
}; };
"john@pixnix" = lib.homeManagerConfiguration { "john@pixnix" = lib.homeManagerConfiguration {
modules = [ ./home/pixnix.nix ]; modules = [
./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,8 +2,6 @@
# Common GUI apps # Common GUI apps
imports = [ imports = [
./firefox.nix ./firefox.nix
./gtk.nix
./qt.nix
./vscode.nix ./vscode.nix
]; ];

View file

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

View file

@ -1,59 +0,0 @@
{
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,19 +1,7 @@
{ 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.
# #
@ -25,11 +13,7 @@
# #
# See https://wiki.hyprland.org/Configuring/Monitors/ # See https://wiki.hyprland.org/Configuring/Monitors/
monitor=eDP-1,2400x1600,auto,1.5 monitor=,preferred,auto,auto
xwayland {
force_zero_scaling = true
}
# See https://wiki.hyprland.org/Configuring/Keywords/ for more # See https://wiki.hyprland.org/Configuring/Keywords/ for more
@ -54,8 +38,7 @@
follow_mouse = 1 follow_mouse = 1
touchpad { touchpad {
natural_scroll = true natural_scroll = false
clickfinger_behavior = true
} }
sensitivity = 0 # -1.0 - 1.0, 0 means no modification. sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
@ -64,8 +47,8 @@
general { general {
# See https://wiki.hyprland.org/Configuring/Variables/ for more # See https://wiki.hyprland.org/Configuring/Variables/ for more
gaps_in = 2 gaps_in = 5
gaps_out = 6 gaps_out = 20
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)
@ -79,7 +62,7 @@
decoration { decoration {
# See https://wiki.hyprland.org/Configuring/Variables/ for more # See https://wiki.hyprland.org/Configuring/Variables/ for more
rounding = 6 rounding = 10
blur { blur {
enabled = true enabled = true
@ -121,8 +104,7 @@
gestures { gestures {
# See https://wiki.hyprland.org/Configuring/Variables/ for more # See https://wiki.hyprland.org/Configuring/Variables/ for more
workspace_swipe = true workspace_swipe = false
} }
# Example per-device config # Example per-device config
@ -137,11 +119,58 @@
# 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

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

View file

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

View file

@ -1,32 +0,0 @@
{ 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

@ -1,21 +0,0 @@
{ 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

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

View file

@ -1,49 +0,0 @@
{ 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

@ -1,20 +0,0 @@
--- 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

@ -1,19 +0,0 @@
{ 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

@ -1,18 +0,0 @@
{ 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,7 +9,6 @@
../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
@ -22,11 +21,6 @@
networkmanager.enable = true; networkmanager.enable = true;
}; };
xdg.portal = {
enable = true;
wlr.enable = true;
};
system.stateVersion = "23.05"; system.stateVersion = "23.05";
} }