nix fmt
This commit is contained in:
parent
a9218a80e6
commit
7137e93805
49 changed files with 2034 additions and 2002 deletions
|
@ -1,4 +1,8 @@
|
|||
{ pkgs, lib, ... }: {
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
# TODO: re-enable this with the appropriate version?
|
||||
# programs.home-manager.enable = true;
|
||||
# programs.home-manager.path = https://github.com/rycee/home-manager/archive/445c0b1482c38172a9f8294ee16a7ca7462388e5.tar.gz;
|
||||
|
@ -8,7 +12,7 @@
|
|||
allowBroken = false;
|
||||
allowUnfree = true;
|
||||
|
||||
permittedInsecurePackages = [ ];
|
||||
permittedInsecurePackages = [];
|
||||
};
|
||||
|
||||
home.keyboard = {
|
||||
|
@ -32,7 +36,7 @@
|
|||
programs.fzf.enable = true;
|
||||
|
||||
home.packages =
|
||||
[ ]
|
||||
[]
|
||||
++ (with pkgs; [
|
||||
coreutils
|
||||
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
{ repoFlake
|
||||
, pkgs
|
||||
, config
|
||||
, repoHttps ? "https://gitlab.com/steveeJ/dotfiles.git"
|
||||
, repoSsh ? "git@gitlab.com:/steveeJ/dotfiles.git"
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
{
|
||||
repoFlake,
|
||||
pkgs,
|
||||
config,
|
||||
repoHttps ? "https://gitlab.com/steveeJ/dotfiles.git",
|
||||
repoSsh ? "git@gitlab.com:/steveeJ/dotfiles.git",
|
||||
...
|
||||
}: let
|
||||
repoBareLocal =
|
||||
pkgs.runCommand "fetchbare"
|
||||
{
|
||||
outputHashMode = "recursive";
|
||||
outputHashAlgo = "sha256";
|
||||
outputHash = "0000000000000000000000000000000000000000000000000000";
|
||||
} ''
|
||||
{
|
||||
outputHashMode = "recursive";
|
||||
outputHashAlgo = "sha256";
|
||||
outputHash = "0000000000000000000000000000000000000000000000000000";
|
||||
} ''
|
||||
(
|
||||
set -xe
|
||||
export GIT_SSL_CAINFO=${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt
|
||||
|
@ -39,9 +39,7 @@ let
|
|||
set_remotes ${repoHttps} ${repoSsh}
|
||||
fi
|
||||
'';
|
||||
|
||||
in
|
||||
{
|
||||
in {
|
||||
# TODO: fix the dotfiles
|
||||
# home.activation.vcsh = config.lib.dag.entryAfter["linkGeneration"] ''
|
||||
# $DRY_RUN_CMD ${vcshActivationScript}
|
||||
|
|
|
@ -1,19 +1,18 @@
|
|||
{ pkgs
|
||||
, config
|
||||
, lib
|
||||
, # packages',
|
||||
repoFlakeInputs'
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
inherit (import ../lib.nix { }) mkSimpleTrayService;
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
# packages',
|
||||
repoFlakeInputs',
|
||||
...
|
||||
}: let
|
||||
inherit (import ../lib.nix {}) mkSimpleTrayService;
|
||||
|
||||
lockCmd = "${pkgs.swaylock}/bin/swaylock -efF --color '#000000'";
|
||||
displayOffCmd = "${pkgs.sway}/bin/swaymsg 'output * power off'";
|
||||
displayOnCmd = "${pkgs.sway}/bin/swaymsg 'output * power on'";
|
||||
swapOutputWorkspaces = ../../../scripts/sway-swapoutputworkspaces.sh;
|
||||
in
|
||||
{
|
||||
in {
|
||||
imports = [
|
||||
../profiles/wayland-desktop.nix
|
||||
../programs/waybar.nix
|
||||
|
@ -86,106 +85,104 @@ in
|
|||
systemd.enable = true;
|
||||
xwayland = true;
|
||||
|
||||
config =
|
||||
let
|
||||
modifier = "Mod4";
|
||||
inherit (config.wayland.windowManager.sway.config) left right up down;
|
||||
in
|
||||
{
|
||||
inherit modifier;
|
||||
bars = [ ];
|
||||
config = let
|
||||
modifier = "Mod4";
|
||||
inherit (config.wayland.windowManager.sway.config) left right up down;
|
||||
in {
|
||||
inherit modifier;
|
||||
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:touchpad" = {
|
||||
natural_scroll = "enabled";
|
||||
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:touchpad" = {
|
||||
natural_scroll = "enabled";
|
||||
};
|
||||
|
||||
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 --show-actions";
|
||||
|
||||
# only 1-9 exist on the default config
|
||||
"${modifier}+0" = "workspace number 0";
|
||||
"${modifier}+Shift+0" = "move container to workspace number 0";
|
||||
|
||||
# disable splitting for now as i sometimes trigger it accidentally and then get stuck with it
|
||||
"${modifier}+b" = "nop";
|
||||
"${modifier}+v" = "nop";
|
||||
|
||||
# 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+${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+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}+Shift+e" = "exec ${pkgs.sway}/bin/swaymsg exit";
|
||||
"${modifier}+q" = "kill";
|
||||
"${modifier}+Shift+q" = "exec ${pkgs.sway}/bin/swaymsg -t get_tree | ${pkgs.jq}/bin/jq 'recurse(.nodes[], .floating_nodes[]) | select(.focused).pid' | ${pkgs.findutils}/bin/xargs -L1 kill -9";
|
||||
|
||||
"${modifier}+x" = "exec ${swapOutputWorkspaces}";
|
||||
|
||||
"${modifier}+Ctrl+l" = "exec ${lockCmd}";
|
||||
|
||||
"--locked XF86AudioPlay" = "exec ${pkgs.playerctl}/bin/playerctl play-pause";
|
||||
"XF86AudioPrev" = "exec ${pkgs.playerctl}/bin/playerctl previous";
|
||||
"XF86AudioNext" = "exec ${pkgs.playerctl}/bin/playerctl next";
|
||||
|
||||
"XF86AudioRaiseVolume" = "exec ${pkgs.pulsemixer}/bin/pulsemixer --change-volume +5";
|
||||
"XF86AudioLowerVolume" = "exec ${pkgs.pulsemixer}/bin/pulsemixer --change-volume -5";
|
||||
"--locked XF86AudioMute" = "exec ${pkgs.pulsemixer}/bin/pulsemixer --toggle-mute";
|
||||
|
||||
"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
|
||||
) &
|
||||
'');
|
||||
}
|
||||
]
|
||||
++ 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";
|
||||
};
|
||||
|
||||
window.titlebar = false;
|
||||
window.border = 4;
|
||||
|
||||
# this maps to focus_on_window_activation
|
||||
focus.newWindow = "urgent";
|
||||
};
|
||||
|
||||
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 --show-actions";
|
||||
|
||||
# only 1-9 exist on the default config
|
||||
"${modifier}+0" = "workspace number 0";
|
||||
"${modifier}+Shift+0" = "move container to workspace number 0";
|
||||
|
||||
# disable splitting for now as i sometimes trigger it accidentally and then get stuck with it
|
||||
"${modifier}+b" = "nop";
|
||||
"${modifier}+v" = "nop";
|
||||
|
||||
# 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+${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+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}+Shift+e" = "exec ${pkgs.sway}/bin/swaymsg exit";
|
||||
"${modifier}+q" = "kill";
|
||||
"${modifier}+Shift+q" = "exec ${pkgs.sway}/bin/swaymsg -t get_tree | ${pkgs.jq}/bin/jq 'recurse(.nodes[], .floating_nodes[]) | select(.focused).pid' | ${pkgs.findutils}/bin/xargs -L1 kill -9";
|
||||
|
||||
"${modifier}+x" = "exec ${swapOutputWorkspaces}";
|
||||
|
||||
"${modifier}+Ctrl+l" = "exec ${lockCmd}";
|
||||
|
||||
"--locked XF86AudioPlay" = "exec ${pkgs.playerctl}/bin/playerctl play-pause";
|
||||
"XF86AudioPrev" = "exec ${pkgs.playerctl}/bin/playerctl previous";
|
||||
"XF86AudioNext" = "exec ${pkgs.playerctl}/bin/playerctl next";
|
||||
|
||||
"XF86AudioRaiseVolume" = "exec ${pkgs.pulsemixer}/bin/pulsemixer --change-volume +5";
|
||||
"XF86AudioLowerVolume" = "exec ${pkgs.pulsemixer}/bin/pulsemixer --change-volume -5";
|
||||
"--locked XF86AudioMute" = "exec ${pkgs.pulsemixer}/bin/pulsemixer --toggle-mute";
|
||||
|
||||
"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
|
||||
) &
|
||||
'');
|
||||
}
|
||||
]
|
||||
++ 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";
|
||||
};
|
||||
|
||||
window.titlebar = false;
|
||||
window.border = 4;
|
||||
|
||||
# this maps to focus_on_window_activation
|
||||
focus.newWindow = "urgent";
|
||||
};
|
||||
};
|
||||
|
||||
services.swayidle = {
|
||||
|
|
|
@ -1,17 +1,16 @@
|
|||
{ pkgs
|
||||
, config
|
||||
, lib
|
||||
, repoFlake
|
||||
, nodeFlake
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
inherit (import ../lib.nix { }) mkSimpleTrayService;
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
repoFlake,
|
||||
nodeFlake,
|
||||
...
|
||||
}: let
|
||||
inherit (import ../lib.nix {}) mkSimpleTrayService;
|
||||
|
||||
nixpkgs-wayland' = repoFlake.inputs.nixpkgs-wayland.packages.${pkgs.system};
|
||||
wayprompt = nixpkgs-wayland'.wayprompt;
|
||||
in
|
||||
{
|
||||
in {
|
||||
fonts.fontconfig.enable = true;
|
||||
|
||||
# services.gpg-agent.pinentryFlavor = lib.mkForce null;
|
||||
|
@ -27,43 +26,46 @@ in
|
|||
systemd.user.targets.tray = {
|
||||
Unit = {
|
||||
Description = "Home Manager System Tray";
|
||||
Requires = [ "graphical-session-pre.target" ];
|
||||
Requires = ["graphical-session-pre.target"];
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
# required by network-manager-applet
|
||||
pkgs.networkmanagerapplet
|
||||
|
||||
wlr-randr
|
||||
wayout
|
||||
wl-clipboard
|
||||
wmctrl
|
||||
|
||||
nixpkgs-wayland'.shotman
|
||||
|
||||
# identifies key input syms
|
||||
wev
|
||||
|
||||
# TODO: whwat's this for?
|
||||
# wltype
|
||||
|
||||
pavucontrol
|
||||
playerctl
|
||||
pasystray
|
||||
qt5.qtwayland
|
||||
qt6.qtwayland
|
||||
# libsForQt5.qt5.qtwayland
|
||||
# libsForQt6.qt6.qtwayland
|
||||
|
||||
# probably required by flameshot
|
||||
# xdg-desktop-portal xdg-desktop-portal-wlr
|
||||
# grim
|
||||
] ++ (lib.lists.optionals (!pkgs.stdenv.isAarch64)
|
||||
# TODO: broken on aarch64
|
||||
home.packages = with pkgs;
|
||||
[
|
||||
# required by network-manager-applet
|
||||
pkgs.networkmanagerapplet
|
||||
|
||||
wlr-randr
|
||||
wayout
|
||||
wl-clipboard
|
||||
wmctrl
|
||||
|
||||
nixpkgs-wayland'.shotman
|
||||
|
||||
# identifies key input syms
|
||||
wev
|
||||
|
||||
# TODO: whwat's this for?
|
||||
# wltype
|
||||
|
||||
pavucontrol
|
||||
playerctl
|
||||
pasystray
|
||||
qt5.qtwayland
|
||||
qt6.qtwayland
|
||||
# libsForQt5.qt5.qtwayland
|
||||
# libsForQt6.qt6.qtwayland
|
||||
|
||||
# probably required by flameshot
|
||||
# xdg-desktop-portal xdg-desktop-portal-wlr
|
||||
# grim
|
||||
]
|
||||
);
|
||||
++ (
|
||||
lib.lists.optionals (!pkgs.stdenv.isAarch64)
|
||||
# TODO: broken on aarch64
|
||||
[
|
||||
]
|
||||
);
|
||||
|
||||
home.sessionVariables = {
|
||||
XDG_SESSION_TYPE = "wayland";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue