reformatting
This commit is contained in:
parent
47f0cd1be2
commit
7f59c589a7
@ -33,46 +33,46 @@ inputs:
|
|||||||
home.sessionVariables = { TERM = "xterm-256color"; };
|
home.sessionVariables = { TERM = "xterm-256color"; };
|
||||||
|
|
||||||
programs.fish = {
|
programs.fish = {
|
||||||
enable = true;
|
enable = true;
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
ls = "lsd";
|
ls = "lsd";
|
||||||
la = "ls -a";
|
la = "ls -a";
|
||||||
lla = "ls -la";
|
lla = "ls -la";
|
||||||
lt = "ls --tree";
|
lt = "ls --tree";
|
||||||
};
|
|
||||||
plugins = [
|
|
||||||
{
|
|
||||||
name = "done";
|
|
||||||
src = inputs.done;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "bobthefish";
|
|
||||||
src = inputs.bobthefish;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
shellInit = ''
|
|
||||||
# Load nix shit on non-NixOS computers (yea yea laugh it up we all have legacy machines somewhere)
|
|
||||||
if not set -q NIX_PATH
|
|
||||||
set --prepend fish_function_path ${pkgs.fishPlugins.foreign-env}/share/fish/vendor_functions.d
|
|
||||||
fenv source $HOME/.nix-profile/etc/profile.d/nix.sh
|
|
||||||
set -e fish_function_path[1]
|
|
||||||
end
|
|
||||||
'';
|
|
||||||
interactiveShellInit = ''
|
|
||||||
set TERM xterm-256color
|
|
||||||
|
|
||||||
set -U __done_min_cmd_duration 2000
|
|
||||||
|
|
||||||
set -Ua fish_user_paths ~/.bin
|
|
||||||
set -Ua fish_user_paths ~/.local/bin
|
|
||||||
set -Ua fish_user_paths ~/.npm-global/bin
|
|
||||||
set -Ua fish_user_paths ~/.cargo/bin
|
|
||||||
|
|
||||||
set -U fish_key_bindings fish_default_key_bindings
|
|
||||||
set -g theme_nerd_fonts yes
|
|
||||||
set -g theme_display_date no
|
|
||||||
|
|
||||||
eval (${pkgs.direnv}/bin/direnv hook fish)
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
plugins = [
|
||||||
|
{
|
||||||
|
name = "done";
|
||||||
|
src = inputs.done;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "bobthefish";
|
||||||
|
src = inputs.bobthefish;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
shellInit = ''
|
||||||
|
# Load nix shit on non-NixOS computers (yea yea laugh it up we all have legacy machines somewhere)
|
||||||
|
if not set -q NIX_PATH
|
||||||
|
set --prepend fish_function_path ${pkgs.fishPlugins.foreign-env}/share/fish/vendor_functions.d
|
||||||
|
fenv source $HOME/.nix-profile/etc/profile.d/nix.sh
|
||||||
|
set -e fish_function_path[1]
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
interactiveShellInit = ''
|
||||||
|
set TERM xterm-256color
|
||||||
|
|
||||||
|
set -U __done_min_cmd_duration 2000
|
||||||
|
|
||||||
|
set -Ua fish_user_paths ~/.bin
|
||||||
|
set -Ua fish_user_paths ~/.local/bin
|
||||||
|
set -Ua fish_user_paths ~/.npm-global/bin
|
||||||
|
set -Ua fish_user_paths ~/.cargo/bin
|
||||||
|
|
||||||
|
set -U fish_key_bindings fish_default_key_bindings
|
||||||
|
set -g theme_nerd_fonts yes
|
||||||
|
set -g theme_display_date no
|
||||||
|
|
||||||
|
eval (${pkgs.direnv}/bin/direnv hook fish)
|
||||||
|
'';
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@ -373,118 +373,119 @@ in
|
|||||||
modules-right = [ "custom/left-arrow-dark" "pulseaudio" "custom/left-arrow-light" "custom/left-arrow-dark" "memory" "custom/left-arrow-light" "custom/left-arrow-dark" "cpu" "custom/left-arrow-light" "custom/left-arrow-dark" ] ++ lib.optionals cfg.battery [ "battery" "custom/left-arrow-light" "custom/left-arrow-dark" ] ++ [ "tray" ];
|
modules-right = [ "custom/left-arrow-dark" "pulseaudio" "custom/left-arrow-light" "custom/left-arrow-dark" "memory" "custom/left-arrow-light" "custom/left-arrow-dark" "cpu" "custom/left-arrow-light" "custom/left-arrow-dark" ] ++ lib.optionals cfg.battery [ "battery" "custom/left-arrow-light" "custom/left-arrow-dark" ] ++ [ "tray" ];
|
||||||
|
|
||||||
modules =
|
modules =
|
||||||
let
|
let
|
||||||
checkWttr = "${pkgs.bash}/bin/bash -c '! (${pkgs.curl}/bin/curl wttr.in/${cfg.location}?format=+ | ${pkgs.gnugrep}/bin/grep \\'^Unknown location;\\')'";
|
checkWttr = "${pkgs.bash}/bin/bash -c '! (${pkgs.curl}/bin/curl wttr.in/${cfg.location}?format=+ | ${pkgs.gnugrep}/bin/grep \\'^Unknown location;\\')'";
|
||||||
in {
|
in
|
||||||
"custom/left-arrow-dark" = {
|
{
|
||||||
format = "";
|
"custom/left-arrow-dark" = {
|
||||||
tooltip = false;
|
format = "";
|
||||||
rotate = 270;
|
tooltip = false;
|
||||||
};
|
rotate = 270;
|
||||||
"custom/left-arrow-light" = {
|
};
|
||||||
format = "";
|
"custom/left-arrow-light" = {
|
||||||
tooltip = false;
|
format = "";
|
||||||
rotate = 270;
|
tooltip = false;
|
||||||
};
|
rotate = 270;
|
||||||
"custom/right-arrow-dark" = {
|
};
|
||||||
format = "";
|
"custom/right-arrow-dark" = {
|
||||||
tooltip = false;
|
format = "";
|
||||||
rotate = 270;
|
tooltip = false;
|
||||||
};
|
rotate = 270;
|
||||||
"custom/right-arrow-light" = {
|
};
|
||||||
format = "";
|
"custom/right-arrow-light" = {
|
||||||
tooltip = false;
|
format = "";
|
||||||
rotate = 270;
|
tooltip = false;
|
||||||
};
|
rotate = 270;
|
||||||
|
};
|
||||||
|
|
||||||
"custom/weather-temp" = {
|
"custom/weather-temp" = {
|
||||||
exec-if = checkWttr;
|
exec-if = checkWttr;
|
||||||
exec = "${pkgs.curl}/bin/curl 'wttr.in/${cfg.location}?format=%c+%t' || echo ERR";
|
exec = "${pkgs.curl}/bin/curl 'wttr.in/${cfg.location}?format=%c+%t' || echo ERR";
|
||||||
on-click = "${pkgs.xdg-utils}/bin/xdg-open 'https://weather.com/weather/today/l/85625'";
|
on-click = "${pkgs.xdg-utils}/bin/xdg-open 'https://weather.com/weather/today/l/85625'";
|
||||||
on-click-right = "${pkgs.xdg-utils}/bin/xdg-open 'https://wttr.in/${cfg.location}'";
|
on-click-right = "${pkgs.xdg-utils}/bin/xdg-open 'https://wttr.in/${cfg.location}'";
|
||||||
interval = 900;
|
interval = 900;
|
||||||
};
|
};
|
||||||
"custom/weather-precip" = {
|
"custom/weather-precip" = {
|
||||||
exec-if = checkWttr;
|
exec-if = checkWttr;
|
||||||
exec = "${pkgs.curl}/bin/curl 'wttr.in/${cfg.location}?format=🌧️+%p'";
|
exec = "${pkgs.curl}/bin/curl 'wttr.in/${cfg.location}?format=🌧️+%p'";
|
||||||
on-click = "${pkgs.xdg-utils}/bin/xdg-open 'https://www.lightningmaps.org/'";
|
on-click = "${pkgs.xdg-utils}/bin/xdg-open 'https://www.lightningmaps.org/'";
|
||||||
on-click-right = "${pkgs.xdg-utils}/bin/xdg-open 'https://wttr.in/${cfg.location}'";
|
on-click-right = "${pkgs.xdg-utils}/bin/xdg-open 'https://wttr.in/${cfg.location}'";
|
||||||
interval = 900;
|
interval = 900;
|
||||||
};
|
};
|
||||||
"custom/weather-wind" = {
|
"custom/weather-wind" = {
|
||||||
exec-if = checkWttr;
|
exec-if = checkWttr;
|
||||||
exec = "${pkgs.curl}/bin/curl 'wttr.in/${cfg.location}?format=🌬️+%w'";
|
exec = "${pkgs.curl}/bin/curl 'wttr.in/${cfg.location}?format=🌬️+%w'";
|
||||||
on-click = "${pkgs.xdg-utils}/bin/xdg-open 'https://www.ventusky.com/";
|
on-click = "${pkgs.xdg-utils}/bin/xdg-open 'https://www.ventusky.com/";
|
||||||
on-click-right = "${pkgs.xdg-utils}/bin/xdg-open 'https://wttr.in/${cfg.location}'";
|
on-click-right = "${pkgs.xdg-utils}/bin/xdg-open 'https://wttr.in/${cfg.location}'";
|
||||||
interval = 900;
|
interval = 900;
|
||||||
};
|
};
|
||||||
|
|
||||||
mpd = {
|
mpd = {
|
||||||
rotate = 90;
|
rotate = 90;
|
||||||
max-length = 60;
|
max-length = 60;
|
||||||
format = "{stateIcon} {artist} - {title}";
|
format = "{stateIcon} {artist} - {title}";
|
||||||
format-stopped = "⏹ STOPPED";
|
format-stopped = "⏹ STOPPED";
|
||||||
state-icons = {
|
state-icons = {
|
||||||
paused = "";
|
paused = "";
|
||||||
playing = "";
|
playing = "";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
"sway/workspaces" = {
|
||||||
|
disable-scroll = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
"clock#1" = {
|
||||||
|
tooltip = false;
|
||||||
|
format = "{:%a}";
|
||||||
|
};
|
||||||
|
"clock#2" = {
|
||||||
|
tooltip = false;
|
||||||
|
format = "{:%m-%d}";
|
||||||
|
};
|
||||||
|
"clock#3" = {
|
||||||
|
tooltip = false;
|
||||||
|
format = "{:%I:%M %p}";
|
||||||
|
};
|
||||||
|
|
||||||
|
pulseaudio = {
|
||||||
|
format = "{icon} {volume}%";
|
||||||
|
format-bluetooth = "{icon} {volume}%";
|
||||||
|
format-muted = "MUTE";
|
||||||
|
format-icons = {
|
||||||
|
headphone = "";
|
||||||
|
default = "";
|
||||||
|
};
|
||||||
|
on-click = "${pkgs.pulseaudio}/bin/pactl set-source-mute @DEFAULT_SOURCE@ toggle";
|
||||||
|
on-click-right = "${pkgs.pavucontrol}/bin/pavucontrol";
|
||||||
|
};
|
||||||
|
|
||||||
|
memory = {
|
||||||
|
interval = 10;
|
||||||
|
format = " {}%";
|
||||||
|
};
|
||||||
|
|
||||||
|
cpu = {
|
||||||
|
interval = 10;
|
||||||
|
format = " {usage}%";
|
||||||
|
};
|
||||||
|
|
||||||
|
battery = {
|
||||||
|
states = {
|
||||||
|
good = 90;
|
||||||
|
warning = 25;
|
||||||
|
critical = 10;
|
||||||
|
};
|
||||||
|
format = "{icon} {capacity}%";
|
||||||
|
format-icons = [ "" "" "" "" "" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
tray = {
|
||||||
|
icon-size = 18;
|
||||||
|
spacing = 5;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
"sway/workspaces" = {
|
|
||||||
disable-scroll = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
"clock#1" = {
|
|
||||||
tooltip = false;
|
|
||||||
format = "{:%a}";
|
|
||||||
};
|
|
||||||
"clock#2" = {
|
|
||||||
tooltip = false;
|
|
||||||
format = "{:%m-%d}";
|
|
||||||
};
|
|
||||||
"clock#3" = {
|
|
||||||
tooltip = false;
|
|
||||||
format = "{:%I:%M %p}";
|
|
||||||
};
|
|
||||||
|
|
||||||
pulseaudio = {
|
|
||||||
format = "{icon} {volume}%";
|
|
||||||
format-bluetooth = "{icon} {volume}%";
|
|
||||||
format-muted = "MUTE";
|
|
||||||
format-icons = {
|
|
||||||
headphone = "";
|
|
||||||
default = "";
|
|
||||||
};
|
|
||||||
on-click = "${pkgs.pulseaudio}/bin/pactl set-source-mute @DEFAULT_SOURCE@ toggle";
|
|
||||||
on-click-right = "${pkgs.pavucontrol}/bin/pavucontrol";
|
|
||||||
};
|
|
||||||
|
|
||||||
memory = {
|
|
||||||
interval = 10;
|
|
||||||
format = " {}%";
|
|
||||||
};
|
|
||||||
|
|
||||||
cpu = {
|
|
||||||
interval = 10;
|
|
||||||
format = " {usage}%";
|
|
||||||
};
|
|
||||||
|
|
||||||
battery = {
|
|
||||||
states = {
|
|
||||||
good = 90;
|
|
||||||
warning = 25;
|
|
||||||
critical = 10;
|
|
||||||
};
|
|
||||||
format = "{icon} {capacity}%";
|
|
||||||
format-icons = [ "" "" "" "" "" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
tray = {
|
|
||||||
icon-size = 18;
|
|
||||||
spacing = 5;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
} // cfg.waybarConfig)
|
} // cfg.waybarConfig)
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -111,83 +111,87 @@ in
|
|||||||
)
|
)
|
||||||
];
|
];
|
||||||
|
|
||||||
systemd.user.services.sunshine = {
|
systemd.user.services.sunshine = {
|
||||||
Unit = {
|
Unit = {
|
||||||
Description = "Host for Moonlight Streaming Client";
|
Description = "Host for Moonlight Streaming Client";
|
||||||
Requires = [ "dbus.service" ];
|
Requires = [ "dbus.service" ];
|
||||||
After = [ "graphical-session-pre.target" "network.target" ];
|
After = [ "graphical-session-pre.target" "network.target" ];
|
||||||
PartOf = [ "graphical-session.target" ];
|
PartOf = [ "graphical-session.target" ];
|
||||||
};
|
|
||||||
|
|
||||||
Install = {
|
|
||||||
WantedBy = [ "graphical-session.target" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
Service = {
|
|
||||||
WorkingDirectory = "${config.xdg.configHome}/sunshine";
|
|
||||||
Restart = "on-failure";
|
|
||||||
RestartSec = 3;
|
|
||||||
ExecStart = "${sunshine}/bin/sunshine";
|
|
||||||
ExecStartPre =
|
|
||||||
let
|
|
||||||
script = pkgs.writeShellScript "sunshine-pre-start" ''
|
|
||||||
${pkgs.coreutils}/bin/mkdir -p $HOME/.config/sunshine/assets
|
|
||||||
|
|
||||||
${pkgs.coreutils}/bin/rm -rf $HOME/.config/sunshine/assets/shaders
|
|
||||||
${pkgs.coreutils}/bin/rm -rf $HOME/.config/sunshine/assets/web
|
|
||||||
${pkgs.coreutils}/bin/rm -rf $HOME/.config/sunshine/assets/box.png
|
|
||||||
|
|
||||||
${pkgs.coreutils}/bin/cp --no-preserve=all -r ${sunshineAssets}/shaders $HOME/.config/sunshine/assets
|
|
||||||
${pkgs.coreutils}/bin/cp --no-preserve=all -r ${sunshineAssets}/web $HOME/.config/sunshine/assets
|
|
||||||
${pkgs.coreutils}/bin/cp --no-preserve=all ${sunshineAssets}/box.png $HOME/.config/sunshine/assets
|
|
||||||
'';
|
|
||||||
in
|
|
||||||
"${script}";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.user.services.scc = {
|
Install = {
|
||||||
Unit = {
|
WantedBy = [ "graphical-session.target" ];
|
||||||
Description = "User-mode driver and GTK3 based GUI for Steam Controller";
|
|
||||||
After = [ "graphical-session-pre.target" ];
|
|
||||||
PartOf = [ "graphical-session.target" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
Service = {
|
|
||||||
Type = "simple";
|
|
||||||
ExecStart = "${pkgs.sc-controller}/bin/scc-daemon debug";
|
|
||||||
Restart = "always";
|
|
||||||
RestartSec = 5;
|
|
||||||
};
|
|
||||||
|
|
||||||
Install = { WantedBy = [ "graphical-session.target" ]; };
|
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.user.services.steam = {
|
Service = {
|
||||||
Unit = {
|
WorkingDirectory = "${config.xdg.configHome}/sunshine";
|
||||||
Description = "Start Steam gaming platform";
|
Restart = "on-failure";
|
||||||
After = [ "graphical-session-pre.target" ];
|
RestartSec = 3;
|
||||||
PartOf = [ "graphical-session.target" ];
|
ExecStart = "${sunshine}/bin/sunshine";
|
||||||
};
|
ExecStartPre =
|
||||||
|
let
|
||||||
|
script = pkgs.writeShellScript "sunshine-pre-start" ''
|
||||||
|
${pkgs.coreutils}/bin/mkdir -p $HOME/.config/sunshine/assets
|
||||||
|
|
||||||
Service = {
|
${pkgs.coreutils}/bin/rm -rf $HOME/.config/sunshine/assets/shaders
|
||||||
Type = "simple";
|
${pkgs.coreutils}/bin/rm -rf $HOME/.config/sunshine/assets/web
|
||||||
ExecStart = let
|
${pkgs.coreutils}/bin/rm -rf $HOME/.config/sunshine/assets/box.png
|
||||||
|
|
||||||
|
${pkgs.coreutils}/bin/cp --no-preserve=all -r ${sunshineAssets}/shaders $HOME/.config/sunshine/assets
|
||||||
|
${pkgs.coreutils}/bin/cp --no-preserve=all -r ${sunshineAssets}/web $HOME/.config/sunshine/assets
|
||||||
|
${pkgs.coreutils}/bin/cp --no-preserve=all ${sunshineAssets}/box.png $HOME/.config/sunshine/assets
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
"${script}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.user.services.scc = {
|
||||||
|
Unit = {
|
||||||
|
Description = "User-mode driver and GTK3 based GUI for Steam Controller";
|
||||||
|
After = [ "graphical-session-pre.target" ];
|
||||||
|
PartOf = [ "graphical-session.target" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
Service = {
|
||||||
|
Type = "simple";
|
||||||
|
ExecStart = "${pkgs.sc-controller}/bin/scc-daemon debug";
|
||||||
|
Restart = "always";
|
||||||
|
RestartSec = 5;
|
||||||
|
};
|
||||||
|
|
||||||
|
Install = { WantedBy = [ "graphical-session.target" ]; };
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.user.services.steam = {
|
||||||
|
Unit = {
|
||||||
|
Description = "Start Steam gaming platform";
|
||||||
|
After = [ "graphical-session-pre.target" ];
|
||||||
|
PartOf = [ "graphical-session.target" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
Service = {
|
||||||
|
Type = "simple";
|
||||||
|
ExecStart =
|
||||||
|
let
|
||||||
steamStart = pkgs.writeShellScript "steam-start" ''
|
steamStart = pkgs.writeShellScript "steam-start" ''
|
||||||
${pkgs.systemd}/bin/systemctl --user stop scc
|
${pkgs.systemd}/bin/systemctl --user stop scc
|
||||||
# no sleep is needed here because steam is slow as fuck lol
|
# no sleep is needed here because steam is slow as fuck lol
|
||||||
/run/current-system/sw/bin/steam
|
/run/current-system/sw/bin/steam
|
||||||
'';
|
'';
|
||||||
in "${steamStart}";
|
in
|
||||||
ExecStop = let
|
"${steamStart}";
|
||||||
|
ExecStop =
|
||||||
|
let
|
||||||
steamStop = pkgs.writeShellScript "steam-stop" ''
|
steamStop = pkgs.writeShellScript "steam-stop" ''
|
||||||
${pkgs.coreutils}/bin/sleep 5 # give time for controller to reset
|
${pkgs.coreutils}/bin/sleep 5 # give time for controller to reset
|
||||||
${pkgs.systemd}/bin/systemctl --user start scc
|
${pkgs.systemd}/bin/systemctl --user start scc
|
||||||
'';
|
'';
|
||||||
in "${steamStop}";
|
in
|
||||||
};
|
"${steamStop}";
|
||||||
|
|
||||||
Install = { WantedBy = [ "graphical-session.target" ]; };
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Install = { WantedBy = [ "graphical-session.target" ]; };
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@ -56,7 +56,7 @@ in
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
name = "libpipewire-module-access";
|
name = "libpipewire-module-access";
|
||||||
args = {};
|
args = { };
|
||||||
}
|
}
|
||||||
{ name = "libpipewire-module-adapter"; }
|
{ name = "libpipewire-module-adapter"; }
|
||||||
{ name = "libpipewire-module-link-factory"; }
|
{ name = "libpipewire-module-link-factory"; }
|
||||||
|
@ -169,21 +169,27 @@ in
|
|||||||
{
|
{
|
||||||
from = 27031;
|
from = 27031;
|
||||||
to = 27036;
|
to = 27036;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [
|
networking.firewall.allowedTCPPorts = [
|
||||||
# Steam remote play
|
# Steam remote play
|
||||||
27036
|
27036
|
||||||
# Sunshine/moonlight streaming
|
# Sunshine/moonlight streaming
|
||||||
47984 47989 48010
|
47984
|
||||||
|
47989
|
||||||
|
48010
|
||||||
];
|
];
|
||||||
|
|
||||||
networking.firewall.allowedUDPPorts = [
|
networking.firewall.allowedUDPPorts = [
|
||||||
# Used for upnp or something?
|
# Used for upnp or something?
|
||||||
1900
|
1900
|
||||||
# Sunshine/moonlight streaming
|
# Sunshine/moonlight streaming
|
||||||
47998 47999 48000 48002 48010
|
47998
|
||||||
|
47999
|
||||||
|
48000
|
||||||
|
48002
|
||||||
|
48010
|
||||||
];
|
];
|
||||||
|
|
||||||
# Shit breaks without this lol
|
# Shit breaks without this lol
|
||||||
|
Loading…
Reference in New Issue
Block a user