feat: start migrating steveej-t14 and sj-vps-htz-0 to sops
This commit is contained in:
parent
6587a914e4
commit
b481126ae2
55 changed files with 877 additions and 452 deletions
|
@ -11,12 +11,11 @@
|
|||
displayOffCmd = "${pkgs.sway}/bin/swaymsg 'output * power off'";
|
||||
displayOnCmd = "${pkgs.sway}/bin/swaymsg 'output * power on'";
|
||||
swapOutputWorkspaces = ../../../scripts/sway-swapoutputworkspaces.sh;
|
||||
|
||||
in {
|
||||
imports = [
|
||||
../profiles/wayland-desktop.nix
|
||||
../programs/waybar.nix
|
||||
../programs/salut.nix
|
||||
../profiles/wayland-desktop.nix
|
||||
../programs/waybar.nix
|
||||
../programs/salut.nix
|
||||
];
|
||||
|
||||
# TODO: autostart
|
||||
|
@ -44,7 +43,7 @@ in {
|
|||
pkgs.gnome-icon-theme
|
||||
|
||||
## fonts
|
||||
pkgs.dejavu_fonts # just a basic good fond
|
||||
pkgs.dejavu_fonts # just a basic good fond
|
||||
pkgs.font-awesome_5 # needed by i3status-rust
|
||||
pkgs.nerdfonts
|
||||
pkgs.font-awesome
|
||||
|
@ -80,9 +79,10 @@ in {
|
|||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
systemdIntegration = true;
|
||||
# systemd.enable = true;
|
||||
xwayland = false;
|
||||
|
||||
config = let
|
||||
config = let
|
||||
modifier = "Mod4";
|
||||
inherit (config.wayland.windowManager.sway.config) left right up down;
|
||||
in {
|
||||
|
@ -90,12 +90,14 @@ in {
|
|||
bars = [];
|
||||
|
||||
input = {
|
||||
"type:keyboard" = {
|
||||
xkb_layout = config.home.keyboard.layout;
|
||||
xkb_variant = config.home.keyboard.variant;
|
||||
} // lib.attrsets.optionalAttrs (builtins.length (config.home.keyboard.options or []) > 0) {
|
||||
xkb_options = builtins.concatStringsSep "," config.home.keyboard.options;
|
||||
};
|
||||
"type:keyboard" =
|
||||
{
|
||||
xkb_layout = config.home.keyboard.layout;
|
||||
xkb_variant = config.home.keyboard.variant;
|
||||
}
|
||||
// lib.attrsets.optionalAttrs (builtins.length (config.home.keyboard.options or []) > 0) {
|
||||
xkb_options = builtins.concatStringsSep "," config.home.keyboard.options;
|
||||
};
|
||||
|
||||
"type:touchpad" = {
|
||||
natural_scroll = "enabled";
|
||||
|
@ -105,8 +107,8 @@ in {
|
|||
keybindings = lib.mkOptionDefault {
|
||||
# as of 2023-05-21 the `!!` arg parsing mode was broken for me on yofi
|
||||
# "${modifier}+d" = "exec ${packages'.yofi}/bin/yofi binapps";
|
||||
"${modifier}+d" = "exec ${pkgs.fuzzel}/bin/fuzzel";
|
||||
|
||||
"${modifier}+d" = "exec ${pkgs.fuzzel}/bin/fuzzel --show-actions";
|
||||
|
||||
# only 1-9 exist on the default config
|
||||
"${modifier}+0" = "workspace number 0";
|
||||
"${modifier}+Shift+0" = "move container to workspace number 0";
|
||||
|
@ -118,15 +120,15 @@ in {
|
|||
# move workspace to output
|
||||
"${modifier}+Control+Shift+${left}" = "move workspace to output left";
|
||||
"${modifier}+Control+Shift+${right}" = "move workspace to output right";
|
||||
"${modifier}+Control+Shift+${up}" = "move workspace to output up";
|
||||
"${modifier}+Control+Shift+${up}" = "move workspace to output up";
|
||||
"${modifier}+Control+Shift+${down}" = "move workspace to output down";
|
||||
# move workspace to output with arrow keys
|
||||
"${modifier}+Control+Shift+Left" = "move workspace to output left";
|
||||
"${modifier}+Control+Shift+Left" = "move workspace to output left";
|
||||
"${modifier}+Control+Shift+Right" = "move workspace to output right";
|
||||
"${modifier}+Control+Shift+Up" = "move workspace to output up";
|
||||
"${modifier}+Control+Shift+Down" = "move workspace to output down";
|
||||
"${modifier}+Control+Shift+Up" = "move workspace to output up";
|
||||
"${modifier}+Control+Shift+Down" = "move workspace to output down";
|
||||
|
||||
"${modifier}+Shift+e" = "exec ${pkgs.sway}/bin/swaymsg exit";
|
||||
"${modifier}+Shift+e" = "exec ${pkgs.sway}/bin/swaymsg exit";
|
||||
"${modifier}+q" = "kill";
|
||||
"${modifier}+x" = "exec ${swapOutputWorkspaces}";
|
||||
|
||||
|
@ -140,20 +142,31 @@ in {
|
|||
"XF86AudioLowerVolume" = "exec ${pkgs.pulsemixer}/bin/pulsemixer --change-volume -5";
|
||||
"--locked XF86AudioMute" = "exec ${pkgs.pulsemixer}/bin/pulsemixer --toggle-mute";
|
||||
|
||||
# TODO: screenshot util, flameshot doesn't work in the packaged version
|
||||
"Print" = "exec ${pkgs.flameshot}/bin/flameshot gui";
|
||||
"Print" = "exec ${pkgs.shotman}/bin/shotman --capture region";
|
||||
};
|
||||
|
||||
terminal = "alacritty";
|
||||
startup = [
|
||||
{command = builtins.toString(pkgs.writeShellScript "ensure-graphical-session" ''
|
||||
(
|
||||
${pkgs.coreutils}/bin/sleep 0.2
|
||||
${pkgs.systemd}/bin/systemctl --user restart graphical-session.target
|
||||
) &
|
||||
'');
|
||||
}
|
||||
];
|
||||
startup =
|
||||
[
|
||||
{
|
||||
command = builtins.toString (pkgs.writeShellScript "ensure-graphical-session" ''
|
||||
(
|
||||
${pkgs.coreutils}/bin/sleep 0.2
|
||||
${pkgs.systemd}/bin/systemctl --user restart graphical-session.target
|
||||
) &
|
||||
'');
|
||||
}
|
||||
]
|
||||
++ lib.optionals config.services.swayidle.enable [
|
||||
{
|
||||
command = builtins.toString (pkgs.writeShellScript "ensure-graphical-session" ''
|
||||
(
|
||||
${pkgs.coreutils}/bin/sleep 0.2
|
||||
${pkgs.systemd}/bin/systemctl --user restart swayidle
|
||||
) &
|
||||
'');
|
||||
}
|
||||
];
|
||||
|
||||
colors.focused = lib.mkOptionDefault {
|
||||
childBorder = lib.mkForce "#ffa500";
|
||||
|
@ -166,19 +179,37 @@ in {
|
|||
services.swayidle = {
|
||||
enable = true;
|
||||
timeouts = [
|
||||
{ timeout = 10; command = "if ${pkgs.procps}/bin/pgrep -x swaylock; then ${displayOffCmd}; fi"; resumeCommand = displayOnCmd; }
|
||||
{ timeout = 60 * 5; command = lockCmd; }
|
||||
{ timeout = 60 * 6; command = displayOffCmd; resumeCommand = displayOnCmd; }
|
||||
{
|
||||
timeout = 10;
|
||||
command = "if ${pkgs.procps}/bin/pgrep -x swaylock; then ${displayOffCmd}; fi";
|
||||
resumeCommand = displayOnCmd;
|
||||
}
|
||||
{
|
||||
timeout = 60 * 5;
|
||||
command = lockCmd;
|
||||
}
|
||||
{
|
||||
timeout = 60 * 6;
|
||||
command = displayOffCmd;
|
||||
resumeCommand = displayOnCmd;
|
||||
}
|
||||
];
|
||||
events = [
|
||||
{ event = "before-sleep";
|
||||
{
|
||||
event = "before-sleep";
|
||||
command = builtins.concatStringsSep "; " [
|
||||
lockCmd
|
||||
"${pkgs.playerctl}/bin/playerctl pause"
|
||||
];
|
||||
];
|
||||
}
|
||||
{
|
||||
event = "after-resume";
|
||||
command = displayOnCmd;
|
||||
}
|
||||
{
|
||||
event = "lock";
|
||||
command = lockCmd;
|
||||
}
|
||||
{ event = "after-resume"; command = displayOnCmd; }
|
||||
{ event = "lock"; command = lockCmd; }
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue