more or less wayland support
This commit is contained in:
parent
ada74f1c4e
commit
87f9fb7bb6
6 changed files with 188 additions and 7 deletions
|
|
@ -44,15 +44,15 @@
|
||||||
LC_TIME = "de_DE.UTF-8";
|
LC_TIME = "de_DE.UTF-8";
|
||||||
};
|
};
|
||||||
|
|
||||||
services.displayManager.defaultSession = "none+i3";
|
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
./programm_configs/yubikey-gpg.nix
|
./programm_configs/yubikey-gpg.nix
|
||||||
./printing/config.nix
|
./printing/config.nix
|
||||||
|
|
||||||
] ++ (if inputs.x11mode then
|
] ++ (if inputs.x11mode then
|
||||||
[ ./programm_configs/x11.nix ]
|
[ ./programm_configs/x11.nix ]
|
||||||
else [ ]);
|
else [
|
||||||
|
./programm_configs/wayland.nix
|
||||||
|
]);
|
||||||
|
|
||||||
|
|
||||||
services.gvfs.enable = true;
|
services.gvfs.enable = true;
|
||||||
|
|
@ -118,6 +118,9 @@
|
||||||
x11mode = inputs.x11mode;
|
x11mode = inputs.x11mode;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
# enable polkit
|
||||||
|
security.polkit.enable = true;
|
||||||
|
|
||||||
# Allow unfree packages
|
# Allow unfree packages
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
|
|
||||||
13
home.nix
13
home.nix
|
|
@ -19,17 +19,23 @@ in
|
||||||
# release notes.
|
# release notes.
|
||||||
home.stateVersion = "24.05"; # Please read the comment before changing.
|
home.stateVersion = "24.05"; # Please read the comment before changing.
|
||||||
|
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
./programm_configs/git.nix
|
./programm_configs/git.nix
|
||||||
./programm_configs/vscode.nix
|
./programm_configs/vscode.nix
|
||||||
./programm_configs/rofi.nix
|
./programm_configs/rofi.nix
|
||||||
./programm_configs/picom.nix
|
|
||||||
./programm_configs/zsh.nix
|
./programm_configs/zsh.nix
|
||||||
./programm_configs/gnome.nix
|
./programm_configs/gnome.nix
|
||||||
./programm_configs/autorandr.nix
|
./programm_configs/autorandr.nix
|
||||||
./programm_configs/polybar.nix
|
./programm_configs/polybar.nix
|
||||||
./programm_configs/redshift.nix
|
./programm_configs/redshift.nix
|
||||||
] ++ (if x11mode then [ ./programm_configs/i3.nix ] else [ ]);
|
] ++ (if x11mode then [
|
||||||
|
./programm_configs/i3.nix
|
||||||
|
./programm_configs/picom.nix
|
||||||
|
] else [
|
||||||
|
./programm_configs/sway.nix
|
||||||
|
./programm_configs/waybar.nix
|
||||||
|
]);
|
||||||
|
|
||||||
# The home.packages option allows you to install Nix packages into your
|
# The home.packages option allows you to install Nix packages into your
|
||||||
# environment.
|
# environment.
|
||||||
|
|
@ -42,7 +48,6 @@ in
|
||||||
firefox
|
firefox
|
||||||
tex
|
tex
|
||||||
jetbrains.idea-ultimate
|
jetbrains.idea-ultimate
|
||||||
arandr
|
|
||||||
thunderbird
|
thunderbird
|
||||||
signal-desktop
|
signal-desktop
|
||||||
nextcloud-client
|
nextcloud-client
|
||||||
|
|
@ -62,7 +67,7 @@ in
|
||||||
samba
|
samba
|
||||||
unzip
|
unzip
|
||||||
direnv
|
direnv
|
||||||
];
|
] ++ (if x11mode then [ arandr ] else [ wdisplays ]);
|
||||||
|
|
||||||
fonts.fontconfig.enable = true;
|
fonts.fontconfig.enable = true;
|
||||||
|
|
||||||
|
|
|
||||||
121
programm_configs/sway.nix
Normal file
121
programm_configs/sway.nix
Normal file
|
|
@ -0,0 +1,121 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
{
|
||||||
|
wayland.windowManager.sway = let mod = "Mod4"; in {
|
||||||
|
enable = true;
|
||||||
|
systemd = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
config = rec {
|
||||||
|
fonts = { names = [ "DejaVu Sans Mono" "FontAwesome 6" ]; };
|
||||||
|
terminal = "alacritty";
|
||||||
|
bars = [ ];
|
||||||
|
input = {
|
||||||
|
"*" = {
|
||||||
|
xkb_layout = "de";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
menu = "${pkgs.rofi}/bin/rofi -show combi -config ~/.config/rofi/config.rasi";
|
||||||
|
modifier = mod; # Super key
|
||||||
|
gaps = {
|
||||||
|
inner = 10;
|
||||||
|
outer = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
keybindings = {
|
||||||
|
# screenlock
|
||||||
|
"${mod}+shift+l" = "exec --no-startup-id ~/.config/i3/lock.sh";
|
||||||
|
|
||||||
|
# audio control fluff
|
||||||
|
"XF86AudioRaiseVolume" = "exec --no-startup-id wpctl set-volume @DEFAULT_SINK@ 5%+ && $refresh_i3status";
|
||||||
|
"XF86AudioLowerVolume" = "exec --no-startup-id wpctl set-volume @DEFAULT_SINK@ 5%- && $refresh_i3status";
|
||||||
|
"XF86AudioMute" = "exec --no-startup-id wpctl set-mute @DEFAULT_SINK@ toggle && $refresh_i3status";
|
||||||
|
|
||||||
|
# Terminal
|
||||||
|
"${mod}+Return" = "exec alacritty";
|
||||||
|
"${mod}+Shift+q" = "kill";
|
||||||
|
"${mod}+d" = "exec ${pkgs.rofi}/bin/rofi -show combi -config ~/.config/rofi/config.rasi";
|
||||||
|
|
||||||
|
"${mod}+Left" = "focus left";
|
||||||
|
"${mod}+Down" = "focus down";
|
||||||
|
"${mod}+Up" = "focus up";
|
||||||
|
"${mod}+Right" = "focus right";
|
||||||
|
|
||||||
|
"${mod}+Shift+Left" = "move left";
|
||||||
|
"${mod}+Shift+Down" = "move down";
|
||||||
|
"${mod}+Shift+Up" = "move up";
|
||||||
|
"${mod}+Shift+Right" = "move right";
|
||||||
|
|
||||||
|
"${mod}+h" = "splith";
|
||||||
|
"${mod}+v" = "splitv";
|
||||||
|
"${mod}+f" = "fullscreen toggle";
|
||||||
|
|
||||||
|
"${mod}+s" = "layout stacking";
|
||||||
|
"${mod}+w" = "layout tabbed";
|
||||||
|
"${mod}+e" = "layout toggle split";
|
||||||
|
|
||||||
|
"${mod}+Shift+space" = "floating toggle";
|
||||||
|
"${mod}+space" = "focus mode_toggle";
|
||||||
|
|
||||||
|
"${mod}+1" = "workspace number 1";
|
||||||
|
"${mod}+2" = "workspace number 2";
|
||||||
|
"${mod}+3" = "workspace number 3";
|
||||||
|
"${mod}+4" = "workspace number 4";
|
||||||
|
"${mod}+5" = "workspace number 5";
|
||||||
|
"${mod}+6" = "workspace number 6";
|
||||||
|
"${mod}+7" = "workspace number 7";
|
||||||
|
"${mod}+8" = "workspace number 8";
|
||||||
|
"${mod}+9" = "workspace number 9";
|
||||||
|
"${mod}+0" = "workspace number 10";
|
||||||
|
|
||||||
|
"${mod}+Shift+1" =
|
||||||
|
"move container to workspace number 1";
|
||||||
|
"${mod}+Shift+2" =
|
||||||
|
"move container to workspace number 2";
|
||||||
|
"${mod}+Shift+3" =
|
||||||
|
"move container to workspace number 3";
|
||||||
|
"${mod}+Shift+4" =
|
||||||
|
"move container to workspace number 4";
|
||||||
|
"${mod}+Shift+5" =
|
||||||
|
"move container to workspace number 5";
|
||||||
|
"${mod}+Shift+6" =
|
||||||
|
"move container to workspace number 6";
|
||||||
|
"${mod}+Shift+7" =
|
||||||
|
"move container to workspace number 7";
|
||||||
|
"${mod}+Shift+8" =
|
||||||
|
"move container to workspace number 8";
|
||||||
|
"${mod}+Shift+9" =
|
||||||
|
"move container to workspace number 9";
|
||||||
|
"${mod}+Shift+0" =
|
||||||
|
"move container to workspace number 10";
|
||||||
|
|
||||||
|
"${mod}+Shift+r" = "reload";
|
||||||
|
"${mod}+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'";
|
||||||
|
|
||||||
|
"${mod}+r" = "mode resize";
|
||||||
|
};
|
||||||
|
startup = [
|
||||||
|
{
|
||||||
|
command = "systemctl --user restart waybar";
|
||||||
|
always = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
command = "nextcloud";
|
||||||
|
always = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
command = "systemctl --user restart redshift";
|
||||||
|
always = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
command = "systemctl --user restart xfce4-notifyd.service";
|
||||||
|
always = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
command = "blueman-applet";
|
||||||
|
always = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
24
programm_configs/waybar.nix
Normal file
24
programm_configs/waybar.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
let
|
||||||
|
colors = {
|
||||||
|
background = "#222";
|
||||||
|
background-alt = "#444";
|
||||||
|
foreground = "#dfdfdf";
|
||||||
|
foreground-alt = "#555";
|
||||||
|
primary = "#ffb52a";
|
||||||
|
secondary = "#e60053";
|
||||||
|
alert = "#bd2c40";
|
||||||
|
accent = "#ffbb00";
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
programs.waybar = {
|
||||||
|
enable = true;
|
||||||
|
systemd = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
settings = [
|
||||||
|
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
27
programm_configs/wayland.nix
Normal file
27
programm_configs/wayland.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
let
|
||||||
|
swayconf = ''
|
||||||
|
input * {
|
||||||
|
xkb_layout "de"
|
||||||
|
}
|
||||||
|
output eDP-2 mode 3840x2160
|
||||||
|
exec "regreet; swaymsg exit"
|
||||||
|
include /etc/sway/config.d/*
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
{
|
||||||
|
# greeter for wayland
|
||||||
|
hardware.opengl.enable = true;
|
||||||
|
|
||||||
|
services.greetd.enable = true;
|
||||||
|
|
||||||
|
programs.regreet = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
default_session = {
|
||||||
|
command = "${pkgs.sway}/bin/sway --config ${swayconf}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
{
|
{
|
||||||
|
services.displayManager.defaultSession = "none+i3";
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
xkb.layout = "de";
|
xkb.layout = "de";
|
||||||
xkb.variant = "";
|
xkb.variant = "";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue