1
1
Fork 1
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:
oddlama 2023-09-04 17:10:07 +02:00
parent 14329a9a5d
commit ae62336669
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
4 changed files with 131 additions and 66 deletions

View file

@ -6,6 +6,7 @@
fd fd
file file
hexyl hexyl
ncdu
neofetch neofetch
rage rage
rclone rclone

View file

@ -35,33 +35,29 @@ 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/mozilla"
".cache/fontconfig" ".cache/nix" # nix eval cache
".cache/mozilla" ".cache/nix-index"
".cache/nix" # nix eval cache ".cache/nvidia" # GLCache
".cache/nix-index" ".cache/nvim"
".cache/nvidia" # GLCache ".local/share/nvim"
".cache/nvim" ".local/state/direnv"
".local/share/nvim" ".local/state/nix"
".local/state/direnv" ".local/state/nvim"
".local/state/nix" ".local/state/wireplumber"
".local/state/nvim" "Downloads"
".local/state/wireplumber" ];
"Downloads"
];
environment.persistence."/persist".users.${myuser}.directories = environment.persistence."/persist".users.${myuser}.directories = mkUserDirs [
mkUserDirs ".mozilla"
[ ".config/discord" # Bad Discord! BAD! Saves state in ,config tststs
".mozilla" ".config/Signal" # L take, electron.
".config/discord" # Bad Discord! BAD! Saves state in ,config tststs ".local/share/atuin"
".config/Signal" # L take, electron. ".local/share/nix" # Repl history
".local/share/atuin" "projects"
".local/share/nix" # Repl history ];
"projects"
];
home-manager.users.${myuser} = { home-manager.users.${myuser} = {
imports = [ imports = [

View file

@ -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";
};
};
} }

View 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";
};
};
}