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
|
@ -6,6 +6,7 @@
|
||||||
fd
|
fd
|
||||||
file
|
file
|
||||||
hexyl
|
hexyl
|
||||||
|
ncdu
|
||||||
neofetch
|
neofetch
|
||||||
rage
|
rage
|
||||||
rclone
|
rclone
|
||||||
|
|
|
@ -35,9 +35,7 @@ in {
|
||||||
# TODO numlock default on in sway and kernel console
|
# TODO numlock default on in sway and kernel console
|
||||||
# TODO make dataset for safe/persist/ and automount it
|
# TODO make dataset for safe/persist/ and automount it
|
||||||
# TODO modularized based on hmConfig
|
# TODO modularized based on hmConfig
|
||||||
environment.persistence."/state".users.${myuser}.directories =
|
environment.persistence."/state".users.${myuser}.directories = mkUserDirs [
|
||||||
mkUserDirs
|
|
||||||
[
|
|
||||||
".cache/fontconfig"
|
".cache/fontconfig"
|
||||||
".cache/mozilla"
|
".cache/mozilla"
|
||||||
".cache/nix" # nix eval cache
|
".cache/nix" # nix eval cache
|
||||||
|
@ -52,9 +50,7 @@ in {
|
||||||
"Downloads"
|
"Downloads"
|
||||||
];
|
];
|
||||||
|
|
||||||
environment.persistence."/persist".users.${myuser}.directories =
|
environment.persistence."/persist".users.${myuser}.directories = mkUserDirs [
|
||||||
mkUserDirs
|
|
||||||
[
|
|
||||||
".mozilla"
|
".mozilla"
|
||||||
".config/discord" # Bad Discord! BAD! Saves state in ,config tststs
|
".config/discord" # Bad Discord! BAD! Saves state in ,config tststs
|
||||||
".config/Signal" # L take, electron.
|
".config/Signal" # L take, electron.
|
||||||
|
|
|
@ -1,32 +1,10 @@
|
||||||
{pkgs, ...}: {
|
{pkgs, ...}: {
|
||||||
imports = [
|
imports = [
|
||||||
./kitty.nix
|
./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; [
|
home.packages = with pkgs; [
|
||||||
xdg-utils
|
|
||||||
wdisplays
|
|
||||||
wl-clipboard
|
|
||||||
pinentry
|
|
||||||
xdragon
|
|
||||||
|
|
||||||
discord
|
discord
|
||||||
firefox
|
firefox
|
||||||
thunderbird
|
thunderbird
|
||||||
|
@ -35,26 +13,12 @@
|
||||||
zathura
|
zathura
|
||||||
feh
|
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 VP9 hardware video decoding blocklisted
|
||||||
# TODO xdg-open
|
# TODO gpg switch to sk
|
||||||
# TODO gpg orswitch to sk
|
|
||||||
# TODO mouse speed
|
|
||||||
# TODO persist tmp malte ddelete.
|
|
||||||
# TODO ncdu
|
|
||||||
home.shellAliases = {
|
home.shellAliases = {
|
||||||
p = "cd ~/projects";
|
p = "cd ~/projects";
|
||||||
zf = "zathura --fork";
|
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