mirror of
https://github.com/oddlama/nix-config.git
synced 2025-10-11 07:10:39 +02:00
feat: split sway config into own file
This commit is contained in:
parent
14329a9a5d
commit
ae62336669
4 changed files with 131 additions and 66 deletions
|
@ -1,32 +1,10 @@
|
|||
{pkgs, ...}: {
|
||||
imports = [
|
||||
./kitty.nix
|
||||
./sway.nix
|
||||
];
|
||||
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
config = rec {
|
||||
modifier = "Mod4";
|
||||
terminal = "kitty";
|
||||
|
||||
focus.followMouse = false;
|
||||
input = {
|
||||
"*" = {
|
||||
xkb_layout = "de";
|
||||
repeat_delay = "235";
|
||||
repeat_rate = "60";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
xdg-utils
|
||||
wdisplays
|
||||
wl-clipboard
|
||||
pinentry
|
||||
xdragon
|
||||
|
||||
discord
|
||||
firefox
|
||||
thunderbird
|
||||
|
@ -35,26 +13,12 @@
|
|||
zathura
|
||||
feh
|
||||
];
|
||||
home.sessionVariables.NIXOS_OZONE_WL = 1;
|
||||
home.sessionVariables.WLR_NO_HARDWARE_CURSORS = 1;
|
||||
home.sessionVariables.WLR_RENDERER = "vulkan";
|
||||
|
||||
# TODO VP9 hardware video decoding blocklisted
|
||||
# TODO xdg-open
|
||||
# TODO gpg orswitch to sk
|
||||
# TODO mouse speed
|
||||
# TODO persist tmp malte ddelete.
|
||||
# TODO ncdu
|
||||
# TODO gpg switch to sk
|
||||
|
||||
home.shellAliases = {
|
||||
p = "cd ~/projects";
|
||||
zf = "zathura --fork";
|
||||
};
|
||||
|
||||
# Needed to fix cursors in firefox under wayland, see https://github.com/NixOS/nixpkgs/issues/207339#issuecomment-1374497558
|
||||
gtk = {
|
||||
enable = true;
|
||||
theme = {
|
||||
package = pkgs.gnome.gnome-themes-extra;
|
||||
name = "Adwaita-dark";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
104
users/myuser/graphical/sway.nix
Normal file
104
users/myuser/graphical/sway.nix
Normal file
|
@ -0,0 +1,104 @@
|
|||
{
|
||||
pkgs,
|
||||
nixosConfig,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./kitty.nix
|
||||
];
|
||||
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
config =
|
||||
{
|
||||
modifier = "Mod4";
|
||||
terminal = "kitty";
|
||||
|
||||
focus.followMouse = false;
|
||||
window.titlebar = false;
|
||||
input = {
|
||||
"type:keyboard" = {
|
||||
xkb_layout = "de";
|
||||
repeat_delay = "235";
|
||||
repeat_rate = "60";
|
||||
};
|
||||
"type:mouse" = {
|
||||
accel_profile = "flat";
|
||||
pointer_accel = "0.5";
|
||||
};
|
||||
};
|
||||
assigns = {
|
||||
"9" = [
|
||||
{class = "^steam_app_";}
|
||||
{app_id = "^Steam$";}
|
||||
{class = "^steam$";}
|
||||
];
|
||||
};
|
||||
# TODO eww -> bars = [ ];
|
||||
}
|
||||
# Extra configuration based on which system we are on. It's not ideal to
|
||||
# distinguish by node name here, but at least this way it can stay in the
|
||||
# sway related config file.
|
||||
// {
|
||||
potksed = let
|
||||
monitorMain = "LG Electronics 27GN950 111NTGYLB719";
|
||||
monitorLeft = "LG Electronics LG Ultra HD 0x00007F39";
|
||||
in {
|
||||
output = {
|
||||
# TODO "*" = { background = background; };
|
||||
${monitorLeft} = {
|
||||
mode = "3840x2160@60Hz";
|
||||
pos = "0 0";
|
||||
adaptive_sync = "enable";
|
||||
subpixel = "rgb";
|
||||
};
|
||||
${monitorMain} = {
|
||||
mode = "3840x2160@144Hz";
|
||||
pos = "3840 0";
|
||||
adaptive_sync = "enable";
|
||||
subpixel = "rgb";
|
||||
render_bit_depth = "10";
|
||||
};
|
||||
};
|
||||
workspaceOutputAssign = [
|
||||
{
|
||||
workspace = "1";
|
||||
output = monitorMain;
|
||||
}
|
||||
{
|
||||
workspace = "7";
|
||||
output = monitorLeft;
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
.${nixosConfig.node.name}
|
||||
or {};
|
||||
};
|
||||
|
||||
home.sessionVariables = {
|
||||
# Let nixos electron wrappers enable wayland
|
||||
NIXOS_OZONE_WL = 1;
|
||||
# Cursor invisible, TODO retest with vulkan
|
||||
WLR_NO_HARDWARE_CURSORS = 1;
|
||||
# opengl backend flickers, also vulkan is love.
|
||||
WLR_RENDERER = "vulkan";
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
xdg-utils
|
||||
wdisplays
|
||||
wl-clipboard
|
||||
pinentry # For yubikey
|
||||
xdragon
|
||||
];
|
||||
|
||||
# Needed to fix cursors in firefox under wayland, see https://github.com/NixOS/nixpkgs/issues/207339#issuecomment-1374497558
|
||||
gtk = {
|
||||
enable = true;
|
||||
theme = {
|
||||
package = pkgs.gnome.gnome-themes-extra;
|
||||
name = "Adwaita-dark";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue