Remove hyprland

This commit is contained in:
Erwin Boskma 2023-03-15 12:03:15 +01:00
parent 0b189f2c93
commit 4673e17301
Signed by: erwin
SSH key fingerprint: SHA256:CyeNoWXd3kjX2Nwu6pDxxdS7OqmPVOy0NavA/KU/ntU
8 changed files with 120 additions and 144 deletions

View file

@ -52,11 +52,6 @@
inputs.flake-utils.follows = "flake-utils"; inputs.flake-utils.follows = "flake-utils";
}; };
hyprland = {
url = "github:Hyprwm/Hyprland";
inputs.nixpkgs.follows = "nixpkgs";
};
nil = { nil = {
url = "github:oxalica/nil"; url = "github:oxalica/nil";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@ -156,7 +151,6 @@
}) })
sops.nixosModules.sops sops.nixosModules.sops
inputs.sunshine.nixosModules.sunshine inputs.sunshine.nixosModules.sunshine
inputs.hyprland.nixosModules.default
] ++ (nixpkgs.lib.optional (deployConfig != null) { _module.args.nixinate = deployConfig; }) ] ++ (nixpkgs.lib.optional (deployConfig != null) { _module.args.nixinate = deployConfig; })
; ;
}; };

View file

@ -1,163 +1,163 @@
{ pkgs, config, lib, ... }: { config, lib, ... }:
with lib; with lib;
let let
cfg = config.eboskma.programs.hyprland; cfg = config.eboskma.programs.hyprland;
terminal = "${pkgs.foot}/bin/footclient"; # terminal = "${pkgs.foot}/bin/footclient";
dmenu = "${pkgs.rofi}/bin/rofi -show drun -no-lazy-grab"; # dmenu = "${pkgs.rofi}/bin/rofi -show drun -no-lazy-grab";
menu = "${pkgs.rofi}/bin/rofi -show run -no-lazy-grab"; # menu = "${pkgs.rofi}/bin/rofi -show run -no-lazy-grab";
rofiPower = pkgs.writeShellScriptBin "rofi-power" (builtins.readFile ../sway/powermenu.sh); # rofiPower = pkgs.writeShellScriptBin "rofi-power" (builtins.readFile ../sway/powermenu.sh);
powerMenu = "${rofiPower}/bin/rofi-power"; # powerMenu = "${rofiPower}/bin/rofi-power";
wallpapers = { # wallpapers = {
hd = ../sway/wallpapers/river-1920.png; # hd = ../sway/wallpapers/river-1920.png;
qhd = ../sway/wallpapers/river-2560.png; # qhd = ../sway/wallpapers/river-2560.png;
uhd = ../sway/wallpapers/river-3840.png; # uhd = ../sway/wallpapers/river-3840.png;
}; # };
swaylockcmd = "${pkgs.swaylock}/bin/swaylock --ignore-empty-password --daemonize --show-failed-attempts --indicator-caps-lock --image ${wallpapers.qhd} --scaling fill"; # swaylockcmd = "${pkgs.swaylock}/bin/swaylock --ignore-empty-password --daemonize --show-failed-attempts --indicator-caps-lock --image ${wallpapers.qhd} --scaling fill";
in in
{ {
options.eboskma.programs.hyprland = { enable = mkEnableOption "Hyprland"; }; options.eboskma.programs.hyprland = { enable = mkEnableOption "Hyprland"; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
wayland.windowManager.hyprland = { # wayland.windowManager.hyprland = {
enable = true; # enable = true;
extraConfig = '' # extraConfig = ''
monitor = DP-2,2560x1440@165,0x0,1 # monitor = DP-2,2560x1440@165,0x0,1
general { # general {
gaps_out = 10 # gaps_out = 10
} # }
decoration { # decoration {
rounding = 5 # rounding = 5
inactive_opacity = 0.9 # inactive_opacity = 0.9
dim_inactive = true # dim_inactive = true
dim_strength = 0.5 # dim_strength = 0.5
} # }
animations { # animations {
animation = workspaces,1,3,default # animation = workspaces,1,3,default
animation = windows,1,3,default # animation = windows,1,3,default
animation = windowsOut,1,3,default # animation = windowsOut,1,3,default
} # }
input { # input {
kb_layout = us # kb_layout = us
kb_options = lv3:ralt_switch,eurosign:5 # kb_options = lv3:ralt_switch,eurosign:5
natural_scroll = true # natural_scroll = true
} # }
misc { # misc {
no_vfr = false # no_vfr = false
focus_on_activate = false # focus_on_activate = false
} # }
binds { # binds {
workspace_back_and_forth = true # workspace_back_and_forth = true
} # }
$mod = SUPER # $mod = SUPER
bind = $mod,Return,exec,${terminal} # bind = $mod,Return,exec,${terminal}
bind = $mod_SHIFT,Q,killactive # bind = $mod_SHIFT,Q,killactive
bind = $mod,S,exec,${dmenu} # bind = $mod,S,exec,${dmenu}
bind = $mod_SHIFT,S,exec,${menu} # bind = $mod_SHIFT,S,exec,${menu}
bind = $mod,N,movefocus,l # bind = $mod,N,movefocus,l
bind = $mod,E,movefocus,d # bind = $mod,E,movefocus,d
bind = $mod,I,movefocus,u # bind = $mod,I,movefocus,u
bind = $mod,O,movefocus,r # bind = $mod,O,movefocus,r
bind = $mod_SHIFT,N,movewindow,l # bind = $mod_SHIFT,N,movewindow,l
bind = $mod_SHIFT,E,movewindow,d # bind = $mod_SHIFT,E,movewindow,d
bind = $mod_SHIFT,O,movewindow,r # bind = $mod_SHIFT,O,movewindow,r
bind = $mod_SHIFT,I,movewindow,u # bind = $mod_SHIFT,I,movewindow,u
bind = $mod_SHIFT,Space,togglefloating,active # bind = $mod_SHIFT,Space,togglefloating,active
bind = $mod,T,fullscreen,0 # bind = $mod,T,fullscreen,0
bind = $mod_SHIFT,T,fullscreen,1 # bind = $mod_SHIFT,T,fullscreen,1
bind = $mod,1,workspace,1 # bind = $mod,1,workspace,1
bind = $mod,2,workspace,2 # bind = $mod,2,workspace,2
bind = $mod,3,workspace,3 # bind = $mod,3,workspace,3
bind = $mod,4,workspace,4 # bind = $mod,4,workspace,4
bind = $mod,5,workspace,5 # bind = $mod,5,workspace,5
bind = $mod,6,workspace,6 # bind = $mod,6,workspace,6
bind = $mod,7,workspace,7 # bind = $mod,7,workspace,7
bind = $mod,8,workspace,8 # bind = $mod,8,workspace,8
bind = $mod,9,workspace,9 # bind = $mod,9,workspace,9
bind = $mod,0,workspace,10 # bind = $mod,0,workspace,10
bind = $mod_SHIFT,1,movetoworkspacesilent,1 # bind = $mod_SHIFT,1,movetoworkspacesilent,1
bind = $mod_SHIFT,2,movetoworkspacesilent,2 # bind = $mod_SHIFT,2,movetoworkspacesilent,2
bind = $mod_SHIFT,3,movetoworkspacesilent,3 # bind = $mod_SHIFT,3,movetoworkspacesilent,3
bind = $mod_SHIFT,4,movetoworkspacesilent,4 # bind = $mod_SHIFT,4,movetoworkspacesilent,4
bind = $mod_SHIFT,5,movetoworkspacesilent,5 # bind = $mod_SHIFT,5,movetoworkspacesilent,5
bind = $mod_SHIFT,6,movetoworkspacesilent,6 # bind = $mod_SHIFT,6,movetoworkspacesilent,6
bind = $mod_SHIFT,7,movetoworkspacesilent,7 # bind = $mod_SHIFT,7,movetoworkspacesilent,7
bind = $mod_SHIFT,8,movetoworkspacesilent,8 # bind = $mod_SHIFT,8,movetoworkspacesilent,8
bind = $mod_SHIFT,9,movetoworkspacesilent,9 # bind = $mod_SHIFT,9,movetoworkspacesilent,9
bind = $mod_SHIFT,0,movetoworkspacesilent,10 # bind = $mod_SHIFT,0,movetoworkspacesilent,10
bind = $mod_SHIFT,Minus,movetoworkspacesilent,special # bind = $mod_SHIFT,Minus,movetoworkspacesilent,special
bind = $mod,Minus,togglespecialworkspace # bind = $mod,Minus,togglespecialworkspace
bind = $mod_SHIFT,C,exec,${config.wayland.windowManager.hyprland.package}/bin/hyprctl reload # bind = $mod_SHIFT,C,exec,${config.wayland.windowManager.hyprland.package}/bin/hyprctl reload
bind = $mod_SHIFT,F,exec,${powerMenu} # bind = $mod_SHIFT,F,exec,${powerMenu}
bind = $mod,L,exec,${swaylockcmd} # bind = $mod,L,exec,${swaylockcmd}
bind = $mod_SHIFT,K,pin # bind = $mod_SHIFT,K,pin
bind = $mod,Print,exec,${pkgs.grim}/bin/grim # bind = $mod,Print,exec,${pkgs.grim}/bin/grim
bind = $mod_SHIFT,Print,exec,${pkgs.grim}/bin/grim | ${pkgs.wl-clipboard}/bin/wl-copy -t image/png -f # bind = $mod_SHIFT,Print,exec,${pkgs.grim}/bin/grim | ${pkgs.wl-clipboard}/bin/wl-copy -t image/png -f
bind = ,XF86AudioRaiseVolume,exec,${pkgs.pamedia}/bin/pamedia up # bind = ,XF86AudioRaiseVolume,exec,${pkgs.pamedia}/bin/pamedia up
bind = ,XF86AudioLowerVolume,exec,${pkgs.pamedia}/bin/pamedia down # bind = ,XF86AudioLowerVolume,exec,${pkgs.pamedia}/bin/pamedia down
bind = ,XF86AudioMute,exec,${pkgs.pamedia}/bin/pamedia mute # bind = ,XF86AudioMute,exec,${pkgs.pamedia}/bin/pamedia mute
bind = ,XF86Calculator,exec,${pkgs.gnome.gnome-calculator}/bin/gnome-calculator # bind = ,XF86Calculator,exec,${pkgs.gnome.gnome-calculator}/bin/gnome-calculator
bind = $mod,D,exec,${pkgs.swaynotificationcenter}/bin/swaync-client -t -sw # bind = $mod,D,exec,${pkgs.swaynotificationcenter}/bin/swaync-client -t -sw
bind = $mod,W,togglegroup # bind = $mod,W,togglegroup
bind = $mod,N,changegroupactive,b # bind = $mod,N,changegroupactive,b
bind = $mod,O,changegroupactive,f # bind = $mod,O,changegroupactive,f
bindm = $mod,mouse:272,movewindow # bindm = $mod,mouse:272,movewindow
bindm = $mod,mouse:273,resizewindow # bindm = $mod,mouse:273,resizewindow
windowrulev2 = workspace 1,class:^(firefox)$ # windowrulev2 = workspace 1,class:^(firefox)$
windowrulev2 = workspace 2,class:^(foot)$ # windowrulev2 = workspace 2,class:^(foot)$
windowrulev2 = workspace 3,class:^(emacs)$ # windowrulev2 = workspace 3,class:^(emacs)$
exec = ${pkgs.networkmanagerapplet}/bin/nm-applet --indicator # exec = ${pkgs.networkmanagerapplet}/bin/nm-applet --indicator
exec-once = ${pkgs.swaybg}/bin/swaybg -i ${wallpapers.qhd} -m fill # exec-once = ${pkgs.swaybg}/bin/swaybg -i ${wallpapers.qhd} -m fill
exec-once = ${config.wayland.windowManager.hyprland.package}/bin/hyprctl setcursor Nordzy-cursors 24 # exec-once = ${config.wayland.windowManager.hyprland.package}/bin/hyprctl setcursor Nordzy-cursors 24
exec-once = ${pkgs.systemd}/bin/systemctl --user start swaync # exec-once = ${pkgs.systemd}/bin/systemctl --user start swaync
exec-once = ${pkgs.systemd}/bin/systemctl --user start fcitx5-daemon # exec-once = ${pkgs.systemd}/bin/systemctl --user start fcitx5-daemon
'' + # '' +
(lib.optionalString config.eboskma.programs.emacs.enable "bind = $mod,C,exec,${config.eboskma.programs.emacs.package}/bin/emacsclient -c"); # (lib.optionalString config.eboskma.programs.emacs.enable "bind = $mod,C,exec,${config.eboskma.programs.emacs.package}/bin/emacsclient -c");
}; # };
systemd.user.services.hypridle = { # systemd.user.services.hypridle = {
Unit = { # Unit = {
Description = "Idle manager for Wayland (Hyprland)"; # Description = "Idle manager for Wayland (Hyprland)";
Documentation = "man:swayidle(1)"; # Documentation = "man:swayidle(1)";
PartOf = "graphical-session.target"; # PartOf = "graphical-session.target";
}; # };
Service = { # Service = {
ExecStart = "${pkgs.swayidle}/bin/swayidle -w timeout 900 '${swaylockcmd}' timeout 1200 '${config.wayland.windowManager.hyprland.package}/bin/hyprctl dispatch dpms off' resume '${config.wayland.windowManager.hyprland.package}/bin/hyprctl dispatch dpms on'"; # ExecStart = "${pkgs.swayidle}/bin/swayidle -w timeout 900 '${swaylockcmd}' timeout 1200 '${config.wayland.windowManager.hyprland.package}/bin/hyprctl dispatch dpms off' resume '${config.wayland.windowManager.hyprland.package}/bin/hyprctl dispatch dpms on'";
}; # };
Install = { # Install = {
WantedBy = [ "hyprland-session.target" ]; # WantedBy = [ "hyprland-session.target" ];
}; # };
}; # };
}; };
} }

View file

@ -47,7 +47,6 @@
greetd = { greetd = {
enable = true; enable = true;
sway = true; sway = true;
hyprland = true;
}; };
libvirtd.enable = true; libvirtd.enable = true;
livebook = { livebook = {

View file

@ -40,14 +40,6 @@ in
swayidle swayidle
]; ];
}; };
hyprland = mkIf cfg.wayland {
enable = true;
# Required when also using the Home Manager module
# See the wiki: https://wiki.hyprland.org/Nix/#modules-mixnmatch
package = null;
};
}; };
xdg = { xdg = {

View file

@ -1,7 +1,6 @@
{ pkgs { pkgs
, config , config
, lib , lib
, inputs
, ... , ...
}: }:
with lib; let with lib; let
@ -9,13 +8,11 @@ with lib; let
style = builtins.replaceStrings [ "{WALLPAPER}" ] [ (builtins.toString ../../home-manager/modules/sway/wallpapers/river-2560.png) ] (builtins.readFile ./greetd.css); style = builtins.replaceStrings [ "{WALLPAPER}" ] [ (builtins.toString ../../home-manager/modules/sway/wallpapers/river-2560.png) ] (builtins.readFile ./greetd.css);
hyprland = inputs.hyprland.packages.${pkgs.system}.hyprland;
in in
{ {
options.eboskma.greetd = { options.eboskma.greetd = {
enable = mkEnableOption "enable greetd"; enable = mkEnableOption "enable greetd";
sway = mkEnableOption "sway"; sway = mkEnableOption "sway";
hyprland = mkEnableOption "hyprland";
}; };
config = config =
@ -50,7 +47,6 @@ in
"greetd/environments" = { "greetd/environments" = {
text = concatStringsSep "\n" ([ ] text = concatStringsSep "\n" ([ ]
++ (optional cfg.sway "${pkgs.sway}/bin/sway") ++ (optional cfg.sway "${pkgs.sway}/bin/sway")
++ (optional cfg.hyprland "${hyprland}/bin/Hyprland")
++ [ "${pkgs.bash}/bin/bash" ]); ++ [ "${pkgs.bash}/bin/bash" ]);
user = "greeter"; user = "greeter";
group = "greeter"; group = "greeter";

View file

@ -51,14 +51,12 @@ in
substituters = [ substituters = [
"https://nix-community.cachix.org" "https://nix-community.cachix.org"
"https://marcus7070.cachix.org" "https://marcus7070.cachix.org"
"https://hyprland.cachix.org"
"https://devenv.cachix.org" "https://devenv.cachix.org"
]; ];
trusted-public-keys = [ trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"marcus7070.cachix.org-1:JawxHSgnYsgNYJmNqZwvLjI4NcOwrcEZDToWlT3WwXw=" "marcus7070.cachix.org-1:JawxHSgnYsgNYJmNqZwvLjI4NcOwrcEZDToWlT3WwXw="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=" "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw="
]; ];
}; };

View file

@ -67,7 +67,6 @@ in
signingKeyFormat = "ssh"; signingKeyFormat = "ssh";
}; };
gpg.enable = true; gpg.enable = true;
hyprland.enable = true;
mpd.enable = true; mpd.enable = true;
neovim.enable = true; neovim.enable = true;
obs-studio.enable = true; obs-studio.enable = true;
@ -243,7 +242,6 @@ in
inputs.emacs-overlay.overlay inputs.emacs-overlay.overlay
]; ];
} }
inputs.hyprland.homeManagerModules.default
../../modules/options ../../modules/options
] ++ (map (mod: (../../home-manager/modules + "/${mod}")) (builtins.attrNames (builtins.readDir ../../home-manager/modules))); ] ++ (map (mod: (../../home-manager/modules + "/${mod}")) (builtins.attrNames (builtins.readDir ../../home-manager/modules)));
}; };

View file

@ -204,7 +204,6 @@ in
inputs.emacs-overlay.overlay inputs.emacs-overlay.overlay
]; ];
} }
inputs.hyprland.homeManagerModules.default
../../modules/options ../../modules/options
] ++ (map (mod: (../../home-manager/modules + "/${mod}")) (builtins.attrNames (builtins.readDir ../../home-manager/modules))); ] ++ (map (mod: (../../home-manager/modules + "/${mod}")) (builtins.attrNames (builtins.readDir ../../home-manager/modules)));