ops/nixos: refactoring for sway
This commit is contained in:
parent
1c571d965a
commit
b7cd20c769
4 changed files with 127 additions and 94 deletions
|
@ -13,5 +13,11 @@ in
|
|||
|
||||
config = {
|
||||
my.home-manager.imports = lib.mkAfter [ ./home-manager/graphical-client-wayland.nix ];
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
gtkUsePortal = true;
|
||||
extraPortals = with depot.pkgs; [ xdg-desktop-portal-wlr ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -9,24 +9,43 @@
|
|||
waybar
|
||||
mako
|
||||
kanshi
|
||||
|
||||
qt5.qtwayland
|
||||
]);
|
||||
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
wrapperFeatures.gtk = true;
|
||||
extraSessionCommands = ''
|
||||
export SDL_VIDEODRIVER=wayland
|
||||
export QT_QPA_PLATFORM=wayland
|
||||
export QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
|
||||
export XDG_CURRENT_DESKTOP=sway
|
||||
export MOZ_ENABLE_WAYLAND=1
|
||||
export MOZ_USE_XINPUT2=1
|
||||
'';
|
||||
config = {
|
||||
modifier = "Mod4";
|
||||
keybindings = let
|
||||
modifier = config.wayland.windowManager.sway.config.modifier;
|
||||
in lib.mkOptionDefault {
|
||||
"${modifier}+l" = "exec loginctl lock-session";
|
||||
"${modifier}+l" = "exec ${pkgs.swaylock}/bin/swaylock";
|
||||
"${modifier}+p" = "exec ${depot.nix.pkgs.flameshot}/bin/flameshot gui";
|
||||
"${modifier}+Return" = "exec ${pkgs.alacritty}/bin/alacritty";
|
||||
};
|
||||
startup = [
|
||||
{ command = "xss-lock --transfer-sleep-lock -- ${pkgs.swaylock}/bin/swaylock"; }
|
||||
{ command = "${pkgs.gnome3.networkmanagerapplet}/bin/nm-applet"; }
|
||||
];
|
||||
|
||||
output."*".bg = "${depot.pkgs.lukegb-wallpapers}/lunik1-gruvbox-dark-rainbow.png fill";
|
||||
|
||||
# howl: tap-to-click
|
||||
input."1739:24385:Synaptics_TM2438-005" = {
|
||||
tap = "enabled";
|
||||
tap_button_map = "lrm";
|
||||
middle_emulation = "enabled";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
my.alacritty.fontSize = 12;
|
||||
}
|
||||
|
|
|
@ -19,4 +19,10 @@
|
|||
];
|
||||
};
|
||||
};
|
||||
|
||||
services.random-background = {
|
||||
enable = true;
|
||||
imageDirectory = "${depot.nix.pkgs.lukegb-wallpapers}";
|
||||
interval = null;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -2,100 +2,102 @@
|
|||
{
|
||||
imports = [ ./client.nix ];
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
gtk3.extraConfig = {
|
||||
gtk-application-prefer-dark-theme = 1;
|
||||
};
|
||||
};
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme = "gtk";
|
||||
};
|
||||
|
||||
home.packages = lib.mkAfter (with pkgs; [
|
||||
google-chrome-beta
|
||||
firefox
|
||||
mpv
|
||||
dino
|
||||
lutris
|
||||
pavucontrol
|
||||
pngquant
|
||||
rxvt_unicode
|
||||
teamspeak_client
|
||||
virtmanager
|
||||
xclip
|
||||
xss-lock
|
||||
yubioath-desktop
|
||||
depot.nix.pkgs.flameshot
|
||||
]);
|
||||
|
||||
programs.alacritty = {
|
||||
enable = true;
|
||||
settings.font = let
|
||||
iosevka = style: { family = "Iosevka"; inherit style; };
|
||||
in {
|
||||
normal = iosevka "Regular";
|
||||
bold = iosevka "Bold";
|
||||
italic = iosevka "Italic";
|
||||
bold_italic = iosevka "Bold Italic";
|
||||
|
||||
size = 6;
|
||||
};
|
||||
settings.colors = {
|
||||
# Ayu Dark, from https://github.com/alacritty/alacritty/wiki/Color-schemes
|
||||
primary = {
|
||||
background = "#0A0E14";
|
||||
foreground = "#B3B1AD";
|
||||
};
|
||||
|
||||
# Normal colors
|
||||
normal = {
|
||||
black = "#01060E";
|
||||
red = "#EA6C73";
|
||||
green = "#91B362";
|
||||
yellow = "#F9AF4F";
|
||||
blue = "#53BDFA";
|
||||
magenta = "#FAE994";
|
||||
cyan = "#90E1C6";
|
||||
white = "#C7C7C7";
|
||||
};
|
||||
|
||||
# Bright colors
|
||||
bright = {
|
||||
black = "#686868";
|
||||
red = "#F07178";
|
||||
green = "#C2D94C";
|
||||
yellow = "#FFB454";
|
||||
blue = "#59C2FF";
|
||||
magenta = "#FFEE99";
|
||||
cyan = "#95E6CB";
|
||||
white = "#FFFFFF";
|
||||
};
|
||||
options.my.alacritty = with lib; {
|
||||
fontSize = mkOption {
|
||||
default = 6;
|
||||
type = types.int;
|
||||
};
|
||||
};
|
||||
|
||||
home.file."bin/screencap" = {
|
||||
executable = true;
|
||||
text = ''
|
||||
#!/usr/bin/env bash
|
||||
exec ${depot.nix.pkgs.flameshot}/bin/flameshot gui
|
||||
config = {
|
||||
gtk = {
|
||||
enable = true;
|
||||
gtk3.extraConfig = {
|
||||
gtk-application-prefer-dark-theme = 1;
|
||||
};
|
||||
};
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme = "gtk";
|
||||
};
|
||||
|
||||
home.packages = lib.mkAfter (with pkgs; [
|
||||
google-chrome-beta
|
||||
firefox
|
||||
mpv
|
||||
dino
|
||||
lutris
|
||||
pavucontrol
|
||||
pngquant
|
||||
rxvt_unicode
|
||||
teamspeak_client
|
||||
virtmanager
|
||||
xclip
|
||||
xss-lock
|
||||
yubioath-desktop
|
||||
depot.nix.pkgs.flameshot
|
||||
]);
|
||||
|
||||
programs.alacritty = {
|
||||
enable = true;
|
||||
settings.font = let
|
||||
iosevka = style: { family = "Iosevka"; inherit style; };
|
||||
in {
|
||||
normal = iosevka "Regular";
|
||||
bold = iosevka "Bold";
|
||||
italic = iosevka "Italic";
|
||||
bold_italic = iosevka "Bold Italic";
|
||||
size = config.my.alacritty.fontSize;
|
||||
};
|
||||
settings.colors = {
|
||||
# Ayu Dark, from https://github.com/alacritty/alacritty/wiki/Color-schemes
|
||||
primary = {
|
||||
background = "#0A0E14";
|
||||
foreground = "#B3B1AD";
|
||||
};
|
||||
|
||||
# Normal colors
|
||||
normal = {
|
||||
black = "#01060E";
|
||||
red = "#EA6C73";
|
||||
green = "#91B362";
|
||||
yellow = "#F9AF4F";
|
||||
blue = "#53BDFA";
|
||||
magenta = "#FAE994";
|
||||
cyan = "#90E1C6";
|
||||
white = "#C7C7C7";
|
||||
};
|
||||
|
||||
# Bright colors
|
||||
bright = {
|
||||
black = "#686868";
|
||||
red = "#F07178";
|
||||
green = "#C2D94C";
|
||||
yellow = "#FFB454";
|
||||
blue = "#59C2FF";
|
||||
magenta = "#FFEE99";
|
||||
cyan = "#95E6CB";
|
||||
white = "#FFFFFF";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home.file."bin/screencap" = {
|
||||
executable = true;
|
||||
text = ''
|
||||
#!/usr/bin/env bash
|
||||
exec ${depot.nix.pkgs.flameshot}/bin/flameshot gui
|
||||
'';
|
||||
};
|
||||
home.file.".xprofile".text = ''
|
||||
. "${config.home.profileDirectory}/etc/profile.d/hm-session-vars.sh"
|
||||
|
||||
if [ -e "$HOME/.profile" ]; then
|
||||
. "$HOME/.profile"
|
||||
fi
|
||||
|
||||
systemctl --user import-environment DBUS_SESSION_BUS_ADDRESS DISPLAY XAUTHORITY XDG_DATA_DIRS XDG_RUNTIME_DIR XDG_SESSION_ID
|
||||
systemctl --user restart ssh-agent
|
||||
'';
|
||||
};
|
||||
home.file.".xprofile".text = ''
|
||||
. "${config.home.profileDirectory}/etc/profile.d/hm-session-vars.sh"
|
||||
|
||||
if [ -e "$HOME/.profile" ]; then
|
||||
. "$HOME/.profile"
|
||||
fi
|
||||
|
||||
systemctl --user import-environment DBUS_SESSION_BUS_ADDRESS DISPLAY XAUTHORITY XDG_DATA_DIRS XDG_RUNTIME_DIR XDG_SESSION_ID
|
||||
systemctl --user restart ssh-agent
|
||||
'';
|
||||
|
||||
services.random-background = {
|
||||
enable = true;
|
||||
imageDirectory = "${depot.nix.pkgs.lukegb-wallpapers}";
|
||||
interval = null;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue