all: format .nix filex with nixfmt-rfc
This commit is contained in:
130
home/home.nix
130
home/home.nix
@@ -2,12 +2,21 @@
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
qutebrowser_firejail = pkgs.writeShellScriptBin "qutebrowser" ''
|
||||
firejail -- ${lib.getExe pkgs.qutebrowser} "$@"
|
||||
'';
|
||||
in {
|
||||
imports = [./zsh.nix ./i3status-rust.nix ./sway.nix ./i3.nix ./home_packages.nix ./whatsapp-for-linux.nix];
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./zsh.nix
|
||||
./i3status-rust.nix
|
||||
./sway.nix
|
||||
./i3.nix
|
||||
./home_packages.nix
|
||||
./whatsapp-for-linux.nix
|
||||
];
|
||||
|
||||
home.stateVersion = "22.11";
|
||||
home.username = "akill";
|
||||
@@ -41,7 +50,9 @@ in {
|
||||
WLR_RENDERER = "vulkan";
|
||||
};
|
||||
|
||||
wayland.windowManager.sway = {enable = true;};
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
programs = {
|
||||
home-manager.enable = true;
|
||||
@@ -60,7 +71,11 @@ in {
|
||||
clock24 = true;
|
||||
keyMode = "vi";
|
||||
terminal = "screen-256color";
|
||||
plugins = with pkgs.tmuxPlugins; [sysstat net-speed gruvbox];
|
||||
plugins = with pkgs.tmuxPlugins; [
|
||||
sysstat
|
||||
net-speed
|
||||
gruvbox
|
||||
];
|
||||
};
|
||||
|
||||
mpv = {
|
||||
@@ -137,7 +152,9 @@ in {
|
||||
font = "JetBrainsMono:size=10";
|
||||
dpi-aware = "yes";
|
||||
};
|
||||
mouse = {hide-when-typing = "yes";};
|
||||
mouse = {
|
||||
hide-when-typing = "yes";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -183,8 +200,12 @@ in {
|
||||
userEmail = "asmir.abdulahovic@gmail.com";
|
||||
extraConfig = {
|
||||
init.defaultBranch = "master";
|
||||
pull = {rebase = true;};
|
||||
credential = {helper = "store";};
|
||||
pull = {
|
||||
rebase = true;
|
||||
};
|
||||
credential = {
|
||||
helper = "store";
|
||||
};
|
||||
};
|
||||
signing.key = "020C42B7A9ABA3E2";
|
||||
signing.signByDefault = true;
|
||||
@@ -192,7 +213,14 @@ in {
|
||||
|
||||
obs-studio = {
|
||||
enable = true;
|
||||
plugins = with pkgs.obs-studio-plugins; [obs-vkcapture input-overlay obs-multi-rtmp obs-pipewire-audio-capture wlrobs obs-vaapi];
|
||||
plugins = with pkgs.obs-studio-plugins; [
|
||||
obs-vkcapture
|
||||
input-overlay
|
||||
obs-multi-rtmp
|
||||
obs-pipewire-audio-capture
|
||||
wlrobs
|
||||
obs-vaapi
|
||||
];
|
||||
};
|
||||
|
||||
i3status-rust.enable = true;
|
||||
@@ -220,36 +248,38 @@ in {
|
||||
enableSshSupport = true;
|
||||
};
|
||||
|
||||
swayidle = let
|
||||
locker = pkgs.writeShellScriptBin "swaylock_fancy" ''
|
||||
TMP_FILE=$(${pkgs.coreutils}/bin/mktemp /tmp/.swaylock_ss_XXXXXX.jpg)
|
||||
${lib.getExe pkgs.grim} -t ppm - | ${pkgs.imagemagick}/bin/convert - -blur 0x12 "$TMP_FILE"
|
||||
${lib.getExe pkgs.swaylock} -f -i "$TMP_FILE"
|
||||
${pkgs.coreutils}/bin/rm "$TMP_FILE"
|
||||
'';
|
||||
in {
|
||||
enable = true;
|
||||
events = [
|
||||
{
|
||||
event = "before-sleep";
|
||||
command = "${locker}/bin/swaylock_fancy";
|
||||
}
|
||||
{
|
||||
event = "lock";
|
||||
command = "${locker}/bin/swaylock_fancy";
|
||||
}
|
||||
{
|
||||
event = "after-resume";
|
||||
command = "${pkgs.procps}/bin/pkill -USR1 i3status-rs";
|
||||
}
|
||||
];
|
||||
timeouts = [
|
||||
{
|
||||
timeout = 15 * 60;
|
||||
command = "${locker}/bin/swaylock_fancy";
|
||||
}
|
||||
];
|
||||
};
|
||||
swayidle =
|
||||
let
|
||||
locker = pkgs.writeShellScriptBin "swaylock_fancy" ''
|
||||
TMP_FILE=$(${pkgs.coreutils}/bin/mktemp /tmp/.swaylock_ss_XXXXXX.jpg)
|
||||
${lib.getExe pkgs.grim} -t ppm - | ${pkgs.imagemagick}/bin/convert - -blur 0x12 "$TMP_FILE"
|
||||
${lib.getExe pkgs.swaylock} -f -i "$TMP_FILE"
|
||||
${pkgs.coreutils}/bin/rm "$TMP_FILE"
|
||||
'';
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
events = [
|
||||
{
|
||||
event = "before-sleep";
|
||||
command = "${locker}/bin/swaylock_fancy";
|
||||
}
|
||||
{
|
||||
event = "lock";
|
||||
command = "${locker}/bin/swaylock_fancy";
|
||||
}
|
||||
{
|
||||
event = "after-resume";
|
||||
command = "${pkgs.procps}/bin/pkill -USR1 i3status-rs";
|
||||
}
|
||||
];
|
||||
timeouts = [
|
||||
{
|
||||
timeout = 15 * 60;
|
||||
command = "${locker}/bin/swaylock_fancy";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
kanshi = {
|
||||
enable = true;
|
||||
@@ -286,17 +316,17 @@ in {
|
||||
systemd.user = {
|
||||
services = {
|
||||
/*
|
||||
himalaya = {
|
||||
Unit.Description = "Himalaya new messages notifier";
|
||||
Service = {
|
||||
ExecStart = "himalaya notify";
|
||||
Restart = "always";
|
||||
RestartSec = 10;
|
||||
};
|
||||
Install = {
|
||||
WantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
};
|
||||
himalaya = {
|
||||
Unit.Description = "Himalaya new messages notifier";
|
||||
Service = {
|
||||
ExecStart = "himalaya notify";
|
||||
Restart = "always";
|
||||
RestartSec = 10;
|
||||
};
|
||||
Install = {
|
||||
WantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
};
|
||||
*/
|
||||
};
|
||||
};
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
inputs,
|
||||
system,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
chromium_teams = pkgs.writeShellScriptBin "chromium_teams" ''
|
||||
${lib.getExe pkgs.ungoogled-chromium} --socket=wayland org.chromium.Chromium --app=https://teams.microsoft.com/
|
||||
'';
|
||||
@@ -25,9 +26,10 @@
|
||||
PROXY_PORT="1337"
|
||||
${lib.getExe pkgs.openssh} -D "$PROXY_PORT" -q -N "$@"
|
||||
'';
|
||||
wrap_sh = let
|
||||
bubblewrap = pkgs.callPackage ../packages/bubblewrap/default.nix {};
|
||||
in
|
||||
wrap_sh =
|
||||
let
|
||||
bubblewrap = pkgs.callPackage ../packages/bubblewrap/default.nix { };
|
||||
in
|
||||
pkgs.writeShellScriptBin "wrap.sh" ''
|
||||
if ${pkgs.coreutils-full}/bin/test $# -ne 1; then
|
||||
echo "Usage: $0 <directory>"
|
||||
@@ -41,8 +43,10 @@
|
||||
--tmp-overlay "$FULL_PATH" \
|
||||
"$SHELL"
|
||||
'';
|
||||
in {
|
||||
home.packages = with pkgs;
|
||||
in
|
||||
{
|
||||
home.packages =
|
||||
with pkgs;
|
||||
[
|
||||
anydesk
|
||||
appimage-run
|
||||
@@ -57,7 +61,7 @@ in {
|
||||
ungoogled-chromium
|
||||
cmake
|
||||
compsize
|
||||
/*cura*/
|
||||
# cura
|
||||
deluge
|
||||
dfu-util
|
||||
discord
|
||||
@@ -153,7 +157,7 @@ in {
|
||||
yt-dlp
|
||||
zapzap
|
||||
zathura
|
||||
/*zeal-qt6*/
|
||||
# zeal-qt6
|
||||
zig
|
||||
]
|
||||
++ [
|
||||
@@ -166,7 +170,7 @@ in {
|
||||
]
|
||||
++ [
|
||||
inputs.swaysw.packages.${system}.swaysw
|
||||
(pkgs.callPackage ../packages/viber/default.nix {})
|
||||
(pkgs.callPackage ../packages/bubblewrap/default.nix {})
|
||||
(pkgs.callPackage ../packages/viber/default.nix { })
|
||||
(pkgs.callPackage ../packages/bubblewrap/default.nix { })
|
||||
];
|
||||
}
|
||||
|
||||
33
home/i3.nix
33
home/i3.nix
@@ -2,9 +2,11 @@
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
scratchpad_cmd = "floating enable, resize set 1502 845, move position center, move scratchpad, scratchpad show";
|
||||
in {
|
||||
in
|
||||
{
|
||||
xsession.windowManager.i3 = {
|
||||
enable = true;
|
||||
package = pkgs.i3;
|
||||
@@ -53,24 +55,28 @@ in {
|
||||
"${modifier}+Escape" = "workspace back_and_forth";
|
||||
"${modifier}+p" = "exec ${pkgs.dmenu}/bin/dmenu_run";
|
||||
|
||||
"Mod4+l" = "exec i3-msg [instance=\"python3_scr\"] scratchpad show || exec alacritty --class python3_scr -e python3";
|
||||
"Mod4+l" =
|
||||
"exec i3-msg [instance=\"python3_scr\"] scratchpad show || exec alacritty --class python3_scr -e python3";
|
||||
"Mod4+j" = "exec i3-msg [class=\"ViberPC\"] scratchpad show || exec viber";
|
||||
"Mod4+m" = "exec i3-msg [class=\"Thunderbird\"] scratchpad show || exec thunderbird";
|
||||
"Mod4+y" = "exec i3-msg [instance=\"pulsemixer_scr\"] scratchpad show || exec alacritty --class pulsemixer_scr -e pulsemixer";
|
||||
"Mod4+y" =
|
||||
"exec i3-msg [instance=\"pulsemixer_scr\"] scratchpad show || exec alacritty --class pulsemixer_scr -e pulsemixer";
|
||||
};
|
||||
|
||||
window = {
|
||||
/*
|
||||
border = 4;
|
||||
*/
|
||||
# border = 4;
|
||||
commands = [
|
||||
{
|
||||
command = scratchpad_cmd;
|
||||
criteria = {instance = "pulsemixer_scr|python3_scr";};
|
||||
criteria = {
|
||||
instance = "pulsemixer_scr|python3_scr";
|
||||
};
|
||||
}
|
||||
{
|
||||
command = scratchpad_cmd;
|
||||
criteria = {class = "Thunderbird";};
|
||||
criteria = {
|
||||
class = "Thunderbird";
|
||||
};
|
||||
}
|
||||
{
|
||||
command = scratchpad_cmd;
|
||||
@@ -81,7 +87,9 @@ in {
|
||||
}
|
||||
{
|
||||
command = "focus child, layout tabbed, focus";
|
||||
criteria = {class = "qutebrowser";};
|
||||
criteria = {
|
||||
class = "qutebrowser";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
@@ -90,7 +98,10 @@ in {
|
||||
{
|
||||
position = "top";
|
||||
fonts = {
|
||||
names = ["DejaVu Sans Mono" "FontAwesome5Free"];
|
||||
names = [
|
||||
"DejaVu Sans Mono"
|
||||
"FontAwesome5Free"
|
||||
];
|
||||
style = "Fixed Bold SemiCondensed";
|
||||
size = 7.0;
|
||||
};
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{...}: {
|
||||
{ ... }:
|
||||
{
|
||||
programs.i3status-rust = {
|
||||
bars.top = {
|
||||
icons = "awesome5";
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
system,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cliphist_sway = pkgs.writeShellScriptBin "cliphist_sway" ''
|
||||
${lib.getExe pkgs.cliphist} list | \
|
||||
${lib.getExe pkgs.wofi} --dmenu --insensitive | \
|
||||
@@ -16,9 +17,10 @@
|
||||
${lib.getExe pkgs.grim} -g "$GEOM" - | ${pkgs.wl-clipboard}/bin/wl-copy
|
||||
'';
|
||||
swaysw = inputs.swaysw.packages.${system}.swaysw;
|
||||
viber = pkgs.callPackage ../packages/viber/default.nix {};
|
||||
viber = pkgs.callPackage ../packages/viber/default.nix { };
|
||||
term = "${pkgs.foot}/bin/footclient";
|
||||
in {
|
||||
in
|
||||
{
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
extraSessionCommands = "";
|
||||
@@ -26,7 +28,7 @@ in {
|
||||
|
||||
config = {
|
||||
fonts = {
|
||||
names = ["JetBrainsMono"];
|
||||
names = [ "JetBrainsMono" ];
|
||||
style = "Bold Semi-Condensed";
|
||||
size = 11.0;
|
||||
};
|
||||
@@ -34,15 +36,21 @@ in {
|
||||
window.commands = [
|
||||
{
|
||||
command = "move scratchpad, resize set 1152 648";
|
||||
criteria = {app_id = "pulsemixer|python3|com.rtosta.zapzap|whatsapp-for-linux|com.viber";};
|
||||
criteria = {
|
||||
app_id = "pulsemixer|python3|com.rtosta.zapzap|whatsapp-for-linux|com.viber";
|
||||
};
|
||||
}
|
||||
{
|
||||
command = "move scratchpad, resize set 1502 845";
|
||||
criteria = {app_id = "com.viber";};
|
||||
criteria = {
|
||||
app_id = "com.viber";
|
||||
};
|
||||
}
|
||||
{
|
||||
command = "floating enable";
|
||||
criteria = {app_id = "sws_cli";};
|
||||
criteria = {
|
||||
app_id = "sws_cli";
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
@@ -50,8 +58,8 @@ in {
|
||||
output = {
|
||||
eDP-1 = {
|
||||
/*
|
||||
bg = "~/pic/wallpaper stretch";
|
||||
scale = "1.4";
|
||||
bg = "~/pic/wallpaper stretch";
|
||||
scale = "1.4";
|
||||
*/
|
||||
};
|
||||
|
||||
@@ -61,16 +69,25 @@ in {
|
||||
};
|
||||
|
||||
input = {
|
||||
"type:keyboard" = {repeat_delay = "150";};
|
||||
"type:keyboard" = {repeat_rate = "70";};
|
||||
"type:touchpad" = {tap = "enabled";};
|
||||
"type:keyboard" = {
|
||||
repeat_delay = "150";
|
||||
};
|
||||
"type:keyboard" = {
|
||||
repeat_rate = "70";
|
||||
};
|
||||
"type:touchpad" = {
|
||||
tap = "enabled";
|
||||
};
|
||||
};
|
||||
|
||||
bars = [
|
||||
{
|
||||
position = "top";
|
||||
fonts = {
|
||||
names = ["Iosevka" "FontAwesome"];
|
||||
names = [
|
||||
"Iosevka"
|
||||
"FontAwesome"
|
||||
];
|
||||
style = "Bold Semi-Condensed";
|
||||
size = 12.0;
|
||||
};
|
||||
@@ -124,12 +141,14 @@ in {
|
||||
"Alt+bracketright" = "focus output right";
|
||||
"Alt+bracketleft" = "focus output left";
|
||||
|
||||
"Mod4+l" = ''
|
||||
exec ${pkgs.sway}/bin/swaymsg [app_id="python3"] scratchpad show || exec ${term} -a python3 ${lib.getExe pkgs.python3}'';
|
||||
"Mod4+j" = "exec ${pkgs.sway}/bin/swaymsg [app_id=com.rtosta.zapzap] scratchpad show || exec ${lib.getExe pkgs.zapzap}";
|
||||
"Mod4+h" = "exec ${pkgs.sway}/bin/swaymsg [app_id=com.viber] scratchpad show || exec ${viber}/bin/viber";
|
||||
"Mod4+y" = ''
|
||||
exec ${pkgs.sway}/bin/swaymsg [app_id="pulsemixer"] scratchpad show || exec ${term} -a pulsemixer ${lib.getExe pkgs.pulsemixer}'';
|
||||
"Mod4+l" =
|
||||
''exec ${pkgs.sway}/bin/swaymsg [app_id="python3"] scratchpad show || exec ${term} -a python3 ${lib.getExe pkgs.python3}'';
|
||||
"Mod4+j" =
|
||||
"exec ${pkgs.sway}/bin/swaymsg [app_id=com.rtosta.zapzap] scratchpad show || exec ${lib.getExe pkgs.zapzap}";
|
||||
"Mod4+h" =
|
||||
"exec ${pkgs.sway}/bin/swaymsg [app_id=com.viber] scratchpad show || exec ${viber}/bin/viber";
|
||||
"Mod4+y" =
|
||||
''exec ${pkgs.sway}/bin/swaymsg [app_id="pulsemixer"] scratchpad show || exec ${term} -a pulsemixer ${lib.getExe pkgs.pulsemixer}'';
|
||||
"Mod4+p" = "exec ${lib.getExe pkgs.tessen} -a copy";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
{lib, ...}:
|
||||
with lib; {
|
||||
{ lib, ... }:
|
||||
with lib;
|
||||
{
|
||||
xdg.configFile."whatsapp-for-linux/settings.conf".source = builtins.toFile "settings.conf" (
|
||||
generators.toINI {} {
|
||||
generators.toINI { } {
|
||||
General = {
|
||||
zoom_level = 1;
|
||||
close_to_tray = false;
|
||||
|
||||
57
home/zsh.nix
57
home/zsh.nix
@@ -1,4 +1,5 @@
|
||||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.z-lua = {
|
||||
enableAliases = true;
|
||||
enableZshIntegration = true;
|
||||
@@ -63,45 +64,45 @@
|
||||
file = "sudo.plugin.zsh";
|
||||
}
|
||||
{
|
||||
name = "zsh-fast-syntax-highlighting";
|
||||
src = pkgs.zsh-fast-syntax-highlighting;
|
||||
file = "share/zsh/site-functions/fast-syntax-highlighting.plugin.zsh";
|
||||
name = "zsh-fast-syntax-highlighting";
|
||||
src = pkgs.zsh-fast-syntax-highlighting;
|
||||
file = "share/zsh/site-functions/fast-syntax-highlighting.plugin.zsh";
|
||||
}
|
||||
];
|
||||
|
||||
envExtra = '''';
|
||||
|
||||
initExtra = ''
|
||||
# binds
|
||||
bindkey '^K' fzf-file-widget
|
||||
# binds
|
||||
bindkey '^K' fzf-file-widget
|
||||
|
||||
# options
|
||||
setopt nobeep
|
||||
setopt nopromptcr
|
||||
setopt c_bases
|
||||
setopt completeinword
|
||||
setopt completealiases
|
||||
setopt notify
|
||||
# options
|
||||
setopt nobeep
|
||||
setopt nopromptcr
|
||||
setopt c_bases
|
||||
setopt completeinword
|
||||
setopt completealiases
|
||||
setopt notify
|
||||
|
||||
#
|
||||
RPS1=""
|
||||
#
|
||||
RPS1=""
|
||||
|
||||
#
|
||||
function chpwd() {
|
||||
ls;
|
||||
}
|
||||
#
|
||||
function chpwd() {
|
||||
ls;
|
||||
}
|
||||
|
||||
eval "$(direnv hook zsh)"
|
||||
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
|
||||
eval "$(direnv hook zsh)"
|
||||
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
|
||||
|
||||
if [[ -n "$PS1" ]] && [[ -z "$TMUX" ]] && [[ -n "$SSH_CONNECTION" ]]; then
|
||||
TMUX_EXE="${pkgs.tmux}/bin/tmux"
|
||||
systemd-run --scope --user $TMUX_EXE attach-session -t $USER || systemd-run --scope --user $TMUX_EXE new-session -s $USER
|
||||
fi
|
||||
if [[ -n "$PS1" ]] && [[ -z "$TMUX" ]] && [[ -n "$SSH_CONNECTION" ]]; then
|
||||
TMUX_EXE="${pkgs.tmux}/bin/tmux"
|
||||
systemd-run --scope --user $TMUX_EXE attach-session -t $USER || systemd-run --scope --user $TMUX_EXE new-session -s $USER
|
||||
fi
|
||||
|
||||
if [[ -n "$BUBBLEWRAP_DIR" ]]; then
|
||||
RPS1="{{$BUBBLEWRAP_DIR}}"
|
||||
fi
|
||||
if [[ -n "$BUBBLEWRAP_DIR" ]]; then
|
||||
RPS1="{{$BUBBLEWRAP_DIR}}"
|
||||
fi
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user