style: format with nix fmt
Currently uses `nixpkgs-fmt`
This commit is contained in:
parent
a6efd4146b
commit
36e14ad3f6
10 changed files with 267 additions and 263 deletions
|
@ -132,7 +132,7 @@
|
||||||
maxCacheTtl = 86400;
|
maxCacheTtl = 86400;
|
||||||
pinentryFlavor = "tty";
|
pinentryFlavor = "tty";
|
||||||
enableSshSupport = true;
|
enableSshSupport = true;
|
||||||
sshKeys = ["CFDE97EDC2FDB2FD27020A084F1E3F40221BAFE7"];
|
sshKeys = [ "CFDE97EDC2FDB2FD27020A084F1E3F40221BAFE7" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
home.sessionVariables."PASSWORD_STORE_DIR" = "${config.xdg.dataHome}/password-store";
|
home.sessionVariables."PASSWORD_STORE_DIR" = "${config.xdg.dataHome}/password-store";
|
||||||
|
|
|
@ -77,7 +77,7 @@
|
||||||
age.secrets."jeeves.user.password" = {
|
age.secrets."jeeves.user.password" = {
|
||||||
rekeyFile = "${inputs.self}/secrets/home/jeeves/user/password.age";
|
rekeyFile = "${inputs.self}/secrets/home/jeeves/user/password.age";
|
||||||
generator = {
|
generator = {
|
||||||
script = {pkgs, ...}: ''
|
script = { pkgs, ... }: ''
|
||||||
${pkgs.mkpasswd}/bin/mkpasswd -m sha-516
|
${pkgs.mkpasswd}/bin/mkpasswd -m sha-516
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
@ -124,16 +124,16 @@
|
||||||
# };
|
# };
|
||||||
security.sudo = {
|
security.sudo = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraRules= [
|
extraRules = [
|
||||||
{
|
{
|
||||||
users = [
|
users = [
|
||||||
"jeeves"
|
"jeeves"
|
||||||
];
|
];
|
||||||
commands = [
|
commands = [
|
||||||
{
|
{
|
||||||
command = "ALL" ;
|
command = "ALL";
|
||||||
options= [ "NOPASSWD" ]; # "SETENV" # Adding the following could be a good idea
|
options = [ "NOPASSWD" ]; # "SETENV" # Adding the following could be a good idea
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
mode = "077";
|
mode = "077";
|
||||||
rekeyFile = "${inputs.self}/secrets/home/jeeves/wireguard/key.age";
|
rekeyFile = "${inputs.self}/secrets/home/jeeves/wireguard/key.age";
|
||||||
generator = {
|
generator = {
|
||||||
script = {lib, pkgs, file, ...}: ''
|
script = { lib, pkgs, file, ... }: ''
|
||||||
priv=$(${pkgs.wireguard-tools}/bin/wg genkey)
|
priv=$(${pkgs.wireguard-tools}/bin/wg genkey)
|
||||||
${pkgs.wireguard-tools}/bin/wg pubkey <<< "$priv" > ${lib.escapeShellArg (lib.removeSuffix ".age" file + ".pub")}
|
${pkgs.wireguard-tools}/bin/wg pubkey <<< "$priv" > ${lib.escapeShellArg (lib.removeSuffix ".age" file + ".pub")}
|
||||||
echo "$priv"
|
echo "$priv"
|
||||||
|
@ -22,7 +22,7 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.firewall.allowedUDPPorts = [51820];
|
networking.firewall.allowedUDPPorts = [ 51820 ];
|
||||||
systemd.network = {
|
systemd.network = {
|
||||||
netdevs = {
|
netdevs = {
|
||||||
"50-wg0" = {
|
"50-wg0" = {
|
||||||
|
@ -76,7 +76,7 @@
|
||||||
};
|
};
|
||||||
networks.wg0 = {
|
networks.wg0 = {
|
||||||
matchConfig.Name = "wg0";
|
matchConfig.Name = "wg0";
|
||||||
address = ["10.100.0.1/24"];
|
address = [ "10.100.0.1/24" ];
|
||||||
networkConfig = {
|
networkConfig = {
|
||||||
IPMasquerade = "ipv4";
|
IPMasquerade = "ipv4";
|
||||||
IPForward = true;
|
IPForward = true;
|
||||||
|
|
|
@ -8,13 +8,15 @@
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
home.activation = lib.mkIf pkgs.stdenv.isDarwin {
|
home.activation = lib.mkIf pkgs.stdenv.isDarwin {
|
||||||
trampolineApps = let
|
trampolineApps =
|
||||||
mac-app-util = inputs.mac-app-util.packages.${pkgs.stdenv.system}.default;
|
let
|
||||||
in lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
mac-app-util = inputs.mac-app-util.packages.${pkgs.stdenv.system}.default;
|
||||||
fromDir="$HOME/Applications/Home Manager Apps"
|
in
|
||||||
toDir="$HOME/Applications/Home Manager Trampolines"
|
lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||||
${mac-app-util}/bin/mac-app-util sync-trampolines "$fromDir" "$toDir"
|
fromDir="$HOME/Applications/Home Manager Apps"
|
||||||
'';
|
toDir="$HOME/Applications/Home Manager Trampolines"
|
||||||
|
${mac-app-util}/bin/mac-app-util sync-trampolines "$fromDir" "$toDir"
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,79 +1,79 @@
|
||||||
{ keyPath, ... }:
|
{ keyPath, ... }:
|
||||||
|
|
||||||
''
|
''
|
||||||
## where to store your database, default is your system data directory
|
## where to store your database, default is your system data directory
|
||||||
## mac: ~/Library/Application Support/com.elliehuxtable.atuin/history.db
|
## mac: ~/Library/Application Support/com.elliehuxtable.atuin/history.db
|
||||||
## linux: ~/.local/share/atuin/history.db
|
## linux: ~/.local/share/atuin/history.db
|
||||||
# db_path = "~/.history.db"
|
# db_path = "~/.history.db"
|
||||||
|
|
||||||
## where to store your encryption key, default is your system data directory
|
## where to store your encryption key, default is your system data directory
|
||||||
key_path = "${keyPath}"
|
key_path = "${keyPath}"
|
||||||
|
|
||||||
## where to store your auth session token, default is your system data directory
|
## where to store your auth session token, default is your system data directory
|
||||||
# session_path = "~/.key"
|
# session_path = "~/.key"
|
||||||
|
|
||||||
## date format used, either "us" or "uk"
|
## date format used, either "us" or "uk"
|
||||||
# dialect = "us"
|
# dialect = "us"
|
||||||
|
|
||||||
## enable or disable automatic sync
|
## enable or disable automatic sync
|
||||||
auto_sync = true
|
auto_sync = true
|
||||||
|
|
||||||
## enable or disable automatic update checks
|
## enable or disable automatic update checks
|
||||||
update_check = false
|
update_check = false
|
||||||
|
|
||||||
## address of the sync server
|
## address of the sync server
|
||||||
sync_address = "https://naboo.qtrp.org/atuin"
|
sync_address = "https://naboo.qtrp.org/atuin"
|
||||||
|
|
||||||
## how often to sync history. note that this is only triggered when a command
|
## how often to sync history. note that this is only triggered when a command
|
||||||
## is ran, so sync intervals may well be longer
|
## is ran, so sync intervals may well be longer
|
||||||
## set it to 0 to sync after every command
|
## set it to 0 to sync after every command
|
||||||
sync_frequency = "1m"
|
sync_frequency = "1m"
|
||||||
|
|
||||||
## which search mode to use
|
## which search mode to use
|
||||||
## possible values: prefix, fulltext, fuzzy, skim
|
## possible values: prefix, fulltext, fuzzy, skim
|
||||||
# search_mode = "fuzzy"
|
# search_mode = "fuzzy"
|
||||||
|
|
||||||
## which filter mode to use
|
## which filter mode to use
|
||||||
## possible values: global, host, session, directory
|
## possible values: global, host, session, directory
|
||||||
filter_mode = "global"
|
filter_mode = "global"
|
||||||
|
|
||||||
# ## which filter mode to use when atuin is invoked from a shell up-key binding
|
# ## which filter mode to use when atuin is invoked from a shell up-key binding
|
||||||
# ## the accepted values are identical to those of "filter_mode"
|
# ## the accepted values are identical to those of "filter_mode"
|
||||||
# ## leave unspecified to use same mode set in "filter_mode"
|
# ## leave unspecified to use same mode set in "filter_mode"
|
||||||
# filter_mode_shell_up_keybinding = "session"
|
# filter_mode_shell_up_keybinding = "session"
|
||||||
|
|
||||||
## which style to use
|
## which style to use
|
||||||
## possible values: auto, full, compact
|
## possible values: auto, full, compact
|
||||||
# style = "auto"
|
# style = "auto"
|
||||||
|
|
||||||
## the maximum number of lines the interface should take up
|
## the maximum number of lines the interface should take up
|
||||||
## set it to 0 to always go full screen
|
## set it to 0 to always go full screen
|
||||||
# inline_height = 0
|
# inline_height = 0
|
||||||
|
|
||||||
## enable or disable showing a preview of the selected command
|
## enable or disable showing a preview of the selected command
|
||||||
## useful when the command is longer than the terminal width and is cut off
|
## useful when the command is longer than the terminal width and is cut off
|
||||||
# show_preview = false
|
# show_preview = false
|
||||||
|
|
||||||
## what to do when the escape key is pressed when searching
|
## what to do when the escape key is pressed when searching
|
||||||
## possible values: return-original, return-query
|
## possible values: return-original, return-query
|
||||||
# exit_mode = "return-original"
|
# exit_mode = "return-original"
|
||||||
|
|
||||||
## possible values: emacs, subl
|
## possible values: emacs, subl
|
||||||
# word_jump_mode = "emacs"
|
# word_jump_mode = "emacs"
|
||||||
|
|
||||||
## characters that count as a part of a word
|
## characters that count as a part of a word
|
||||||
# word_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
|
# word_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
|
||||||
|
|
||||||
## number of context lines to show when scrolling by pages
|
## number of context lines to show when scrolling by pages
|
||||||
# scroll_context_lines = 1
|
# scroll_context_lines = 1
|
||||||
|
|
||||||
## prevent commands matching any of these regexes from being written to history.
|
## prevent commands matching any of these regexes from being written to history.
|
||||||
## Note that these regular expressions are unanchored, i.e. if they don't start
|
## Note that these regular expressions are unanchored, i.e. if they don't start
|
||||||
## with ^ or end with $, they'll match anywhere in the command.
|
## with ^ or end with $, they'll match anywhere in the command.
|
||||||
## For details on the supported regular expression syntax, see
|
## For details on the supported regular expression syntax, see
|
||||||
## https://docs.rs/regex/latest/regex/#syntax
|
## https://docs.rs/regex/latest/regex/#syntax
|
||||||
# history_filter = [
|
# history_filter = [
|
||||||
# "^secret-cmd",
|
# "^secret-cmd",
|
||||||
# "^innocuous-cmd .*--secret=.+"
|
# "^innocuous-cmd .*--secret=.+"
|
||||||
# ]
|
# ]
|
||||||
''
|
''
|
||||||
|
|
|
@ -11,31 +11,32 @@ let
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
cp = "${pkgs.advcpmv}/bin/advcp -rvi";
|
cp = "${pkgs.advcpmv}/bin/advcp -rvi";
|
||||||
mv = "${pkgs.advcpmv}/bin/advmv -vi";
|
mv = "${pkgs.advcpmv}/bin/advmv -vi";
|
||||||
rebuild = let
|
rebuild =
|
||||||
rebuild_script = pkgs.writeShellScript "rebuild" ''
|
let
|
||||||
${
|
rebuild_script = pkgs.writeShellScript "rebuild" ''
|
||||||
let
|
${
|
||||||
inherit (lib.strings)
|
let
|
||||||
hasInfix;
|
inherit (lib.strings)
|
||||||
inherit (pkgs.hostPlatform)
|
hasInfix;
|
||||||
isx86_64 isAarch64
|
inherit (pkgs.hostPlatform)
|
||||||
isLinux isDarwin;
|
isx86_64 isAarch64
|
||||||
in
|
isLinux isDarwin;
|
||||||
if isx86_64 && isLinux then
|
in
|
||||||
"sudo --validate && sudo nixos-rebuild"
|
if isx86_64 && isLinux then
|
||||||
else if isDarwin then
|
"sudo --validate && sudo nixos-rebuild"
|
||||||
"darwin-rebuild"
|
else if isDarwin then
|
||||||
else if isAarch64 then
|
"darwin-rebuild"
|
||||||
"nix-on-droid"
|
else if isAarch64 then
|
||||||
else
|
"nix-on-droid"
|
||||||
"home-manager"
|
else
|
||||||
} --flake ${
|
"home-manager"
|
||||||
if cfg.hostname != null
|
} --flake ${
|
||||||
then "${cfg.flakePath}#${cfg.hostname}"
|
if cfg.hostname != null
|
||||||
else "${cfg.flakePath}"
|
then "${cfg.flakePath}#${cfg.hostname}"
|
||||||
} ''$''\{1:-switch''\} "''$''\{@:2''\}" # |& nix run nixpkgs#nix-output-monitor
|
else "${cfg.flakePath}"
|
||||||
'';
|
} ''$''\{1:-switch''\} "''$''\{@:2''\}" # |& nix run nixpkgs#nix-output-monitor
|
||||||
in
|
'';
|
||||||
|
in
|
||||||
"${rebuild_script}";
|
"${rebuild_script}";
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
@ -168,7 +169,7 @@ in
|
||||||
let
|
let
|
||||||
shellPackage = builtins.getAttr (builtins.head cfg.shells) pkgs;
|
shellPackage = builtins.getAttr (builtins.head cfg.shells) pkgs;
|
||||||
in
|
in
|
||||||
"${shellPackage}/${shellPackage.shellPath}";
|
"${shellPackage}/${shellPackage.shellPath}";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Nushell
|
# Nushell
|
||||||
|
@ -184,7 +185,7 @@ in
|
||||||
|
|
||||||
inherit shellAliases;
|
inherit shellAliases;
|
||||||
|
|
||||||
environmentVariables = {};
|
environmentVariables = { };
|
||||||
})
|
})
|
||||||
(mkIf cfg.atuin {
|
(mkIf cfg.atuin {
|
||||||
extraEnv = ''
|
extraEnv = ''
|
||||||
|
|
|
@ -100,7 +100,7 @@ in
|
||||||
|
|
||||||
CustomUserPreferences = {
|
CustomUserPreferences = {
|
||||||
"NSGlobalDomain" = {
|
"NSGlobalDomain" = {
|
||||||
"AppleSpacesSwitchOnActivate"= 0;
|
"AppleSpacesSwitchOnActivate" = 0;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -297,19 +297,19 @@ in
|
||||||
defaults write com.apple.dock persistent-apps -array \
|
defaults write com.apple.dock persistent-apps -array \
|
||||||
"$(__dock_item "/System/Applications/System Settings.app")"
|
"$(__dock_item "/System/Applications/System Settings.app")"
|
||||||
'';
|
'';
|
||||||
# defaults write com.apple.dock persistent-apps -array \
|
# defaults write com.apple.dock persistent-apps -array \
|
||||||
# "$(__dock_item /Applications/1Password.app)" \
|
# "$(__dock_item /Applications/1Password.app)" \
|
||||||
# "$(__dock_item ${pkgs.slack}/Applications/Slack.app)" \
|
# "$(__dock_item ${pkgs.slack}/Applications/Slack.app)" \
|
||||||
# "$(__dock_item /System/Applications/Calendar.app)" \
|
# "$(__dock_item /System/Applications/Calendar.app)" \
|
||||||
# "$(__dock_item ${pkgs.firefox-bin}/Applications/Firefox.app)" \
|
# "$(__dock_item ${pkgs.firefox-bin}/Applications/Firefox.app)" \
|
||||||
# "$(__dock_item /System/Applications/Messages.app)" \
|
# "$(__dock_item /System/Applications/Messages.app)" \
|
||||||
# "$(__dock_item /System/Applications/Mail.app)" \
|
# "$(__dock_item /System/Applications/Mail.app)" \
|
||||||
# "$(__dock_item /Applications/Mimestream.app)" \
|
# "$(__dock_item /Applications/Mimestream.app)" \
|
||||||
# "$(__dock_item /Applications/zoom.us.app)" \
|
# "$(__dock_item /Applications/zoom.us.app)" \
|
||||||
# "$(__dock_item ${pkgs.discord}/Applications/Discord.app)" \
|
# "$(__dock_item ${pkgs.discord}/Applications/Discord.app)" \
|
||||||
# "$(__dock_item /Applications/Obsidian.app)" \
|
# "$(__dock_item /Applications/Obsidian.app)" \
|
||||||
# "$(__dock_item ${pkgs.kitty}/Applications/kitty.app)" \
|
# "$(__dock_item ${pkgs.kitty}/Applications/kitty.app)" \
|
||||||
# "$(__dock_item /System/Applications/System\ Settings.app)"
|
# "$(__dock_item /System/Applications/System\ Settings.app)"
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -13,15 +13,15 @@ let
|
||||||
osascript ${./setbg.scpt} "''${1}"
|
osascript ${./setbg.scpt} "''${1}"
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
symlinkJoin {
|
symlinkJoin {
|
||||||
name = "setbg";
|
name = "setbg";
|
||||||
paths = [ setWallpaperUnwrapped ];
|
paths = [ setWallpaperUnwrapped ];
|
||||||
buildInputs = [ makeWrapper ];
|
buildInputs = [ makeWrapper ];
|
||||||
postBuild = ''
|
postBuild = ''
|
||||||
wrapProgram $out/bin/setbg \
|
wrapProgram $out/bin/setbg \
|
||||||
--prefix PATH : ${lib.makeBinPath [
|
--prefix PATH : ${lib.makeBinPath [
|
||||||
jq
|
jq
|
||||||
yabai
|
yabai
|
||||||
]}
|
]}
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,153 +21,153 @@ let
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
''
|
''
|
||||||
export PLUGIN_DIR="${plugin_dir}"
|
export PLUGIN_DIR="${plugin_dir}"
|
||||||
export UTIL_DIR="${util_dir}"
|
export UTIL_DIR="${util_dir}"
|
||||||
|
|
||||||
##### Bar Appearance #####
|
##### Bar Appearance #####
|
||||||
BACKGROUND_COLOR="0x502a2d3d"
|
BACKGROUND_COLOR="0x502a2d3d"
|
||||||
|
|
||||||
appearance=''$''\(defaults read -g AppleInterfaceStyle''\)
|
appearance=''$''\(defaults read -g AppleInterfaceStyle''\)
|
||||||
|
|
||||||
if [[ ''$''\{appearance''\} != 'Dark' ]]; then
|
if [[ ''$''\{appearance''\} != 'Dark' ]]; then
|
||||||
BACKGROUND_COLOR="0x50f5f0f5"
|
BACKGROUND_COLOR="0x50f5f0f5"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
height=''$''\(${get_menu_bar_height}/bin/get_menu_bar_height''\)
|
height=''$''\(${get_menu_bar_height}/bin/get_menu_bar_height''\)
|
||||||
|
|
||||||
sketchybar --bar height="32" \
|
sketchybar --bar height="32" \
|
||||||
blur_radius="25" \
|
blur_radius="25" \
|
||||||
position="top" \
|
position="top" \
|
||||||
sticky="on" \
|
sticky="on" \
|
||||||
margin="10" \
|
margin="10" \
|
||||||
color="0x002a2d3d" \
|
color="0x002a2d3d" \
|
||||||
notch_offset="5" \
|
notch_offset="5" \
|
||||||
corner_radius="12" \
|
corner_radius="12" \
|
||||||
border_color="0x80c4a7e7" \
|
border_color="0x80c4a7e7" \
|
||||||
border_width="0"
|
border_width="0"
|
||||||
|
|
||||||
##### Changing Defaults #####
|
##### Changing Defaults #####
|
||||||
# We now change some default values that are applied to all further items
|
# We now change some default values that are applied to all further items
|
||||||
# For a full list of all available item properties see:
|
# For a full list of all available item properties see:
|
||||||
# https://felixkratz.github.io/SketchyBar/config/items
|
# https://felixkratz.github.io/SketchyBar/config/items
|
||||||
|
|
||||||
sketchybar --default updates="when_shown" \
|
sketchybar --default updates="when_shown" \
|
||||||
icon.font="SF Pro Rounded:Bold:14.0" \
|
icon.font="SF Pro Rounded:Bold:14.0" \
|
||||||
icon.color="0xffc6ceef" \
|
icon.color="0xffc6ceef" \
|
||||||
label.font="SF Pro Rounded:Bold:14.0" \
|
label.font="SF Pro Rounded:Bold:14.0" \
|
||||||
label.color="0xffc6ceef" \
|
label.color="0xffc6ceef" \
|
||||||
padding_left="3" \
|
padding_left="3" \
|
||||||
padding_right="3" \
|
padding_right="3" \
|
||||||
label.padding_left="4" \
|
label.padding_left="4" \
|
||||||
label.padding_right="4" \
|
label.padding_right="4" \
|
||||||
icon.padding_left="4" \
|
icon.padding_left="4" \
|
||||||
icon.padding_right="4"
|
icon.padding_right="4"
|
||||||
|
|
||||||
##### Adding Mission Control Space Indicators #####
|
##### Adding Mission Control Space Indicators #####
|
||||||
# Now we add some mission control spaces:
|
# Now we add some mission control spaces:
|
||||||
# https://felixkratz.github.io/SketchyBar/config/components#space----associate-mission-control-spaces-with-an-item
|
# https://felixkratz.github.io/SketchyBar/config/components#space----associate-mission-control-spaces-with-an-item
|
||||||
# to indicate active and available mission control spaces
|
# to indicate active and available mission control spaces
|
||||||
|
|
||||||
SPACE_ICONS=("1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" "15" "16")
|
SPACE_ICONS=("1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" "15" "16")
|
||||||
|
|
||||||
for i in "''$''\{!SPACE_ICONS[@]''\}"; do
|
for i in "''$''\{!SPACE_ICONS[@]''\}"; do
|
||||||
sid=$(($i+1))
|
sid=$(($i+1))
|
||||||
sketchybar --add space space.''$''\{sid''\} left \
|
sketchybar --add space space.''$''\{sid''\} left \
|
||||||
--set space.''$''\{sid''\} associated_space="''$''\{sid''\}" \
|
--set space.''$''\{sid''\} associated_space="''$''\{sid''\}" \
|
||||||
icon="''$''\{SPACE_ICONS[i]''\}" \
|
icon="''$''\{SPACE_ICONS[i]''\}" \
|
||||||
background.color="0x44ffffff" \
|
background.color="0x44ffffff" \
|
||||||
background.corner_radius="7" \
|
background.corner_radius="7" \
|
||||||
background.height="20" \
|
background.height="20" \
|
||||||
background.drawing="on" \
|
background.drawing="on" \
|
||||||
background.border_color="0x952a2d3d" \
|
background.border_color="0x952a2d3d" \
|
||||||
background.border_width="1" \
|
background.border_width="1" \
|
||||||
label.drawing="off" \
|
label.drawing="off" \
|
||||||
script="''$''\{PLUGIN_DIR''\}/space.sh" \
|
script="''$''\{PLUGIN_DIR''\}/space.sh" \
|
||||||
click_script="yabai -m space --focus ''$''\{sid''\}"
|
click_script="yabai -m space --focus ''$''\{sid''\}"
|
||||||
done
|
done
|
||||||
|
|
||||||
##### Adding Left Items #####
|
##### Adding Left Items #####
|
||||||
# We add some regular items to the left side of the bar
|
# We add some regular items to the left side of the bar
|
||||||
# only the properties deviating from the current defaults need to be set
|
# only the properties deviating from the current defaults need to be set
|
||||||
|
|
||||||
sketchybar --add item space_separator left \
|
sketchybar --add item space_separator left \
|
||||||
--set space_separator icon="λ" \
|
--set space_separator icon="λ" \
|
||||||
icon.color="0xffff946f" \
|
icon.color="0xffff946f" \
|
||||||
padding_left="10" \
|
padding_left="10" \
|
||||||
padding_right="10" \
|
padding_right="10" \
|
||||||
label.drawing="off" \
|
label.drawing="off" \
|
||||||
\
|
\
|
||||||
--add item front_app left \
|
--add item front_app left \
|
||||||
--set front_app script="''$''\{PLUGIN_DIR''\}/front_app.sh" \
|
--set front_app script="''$''\{PLUGIN_DIR''\}/front_app.sh" \
|
||||||
icon.drawing="off" \
|
icon.drawing="off" \
|
||||||
background.color="''$''\{BACKGROUND_COLOR''\}" \
|
background.color="''$''\{BACKGROUND_COLOR''\}" \
|
||||||
background.corner_radius="7" \
|
background.corner_radius="7" \
|
||||||
blur_radius="30" \
|
blur_radius="30" \
|
||||||
background.border_color="0x80c4a7e7" \
|
background.border_color="0x80c4a7e7" \
|
||||||
background.border_width="1" \
|
background.border_width="1" \
|
||||||
--subscribe front_app front_app_switched
|
--subscribe front_app front_app_switched
|
||||||
|
|
||||||
##### Adding Right Items #####
|
##### Adding Right Items #####
|
||||||
# In the same way as the left items we can add items to the right side.
|
# In the same way as the left items we can add items to the right side.
|
||||||
# Additional position (e.g. center) are available, see:
|
# Additional position (e.g. center) are available, see:
|
||||||
# https://felixkratz.github.io/SketchyBar/config/items#adding-items-to-sketchybar
|
# https://felixkratz.github.io/SketchyBar/config/items#adding-items-to-sketchybar
|
||||||
|
|
||||||
# Some items refresh on a fixed cycle, e.g. the clock runs its script once
|
# Some items refresh on a fixed cycle, e.g. the clock runs its script once
|
||||||
# every 10s. Other items respond to events they subscribe to, e.g. the
|
# every 10s. Other items respond to events they subscribe to, e.g. the
|
||||||
# volume.sh script is only executed once an actual change in system audio
|
# volume.sh script is only executed once an actual change in system audio
|
||||||
# volume is registered. More info about the event system can be found here:
|
# volume is registered. More info about the event system can be found here:
|
||||||
# https://felixkratz.github.io/SketchyBar/config/events
|
# https://felixkratz.github.io/SketchyBar/config/events
|
||||||
|
|
||||||
sketchybar --add item clock right i \
|
sketchybar --add item clock right i \
|
||||||
--set clock update_freq="10" \
|
--set clock update_freq="10" \
|
||||||
icon="" \
|
icon="" \
|
||||||
background.color="''$''\{BACKGROUND_COLOR''\}" \
|
background.color="''$''\{BACKGROUND_COLOR''\}" \
|
||||||
background.corner_radius="7" \
|
background.corner_radius="7" \
|
||||||
icon.padding_left="10" \
|
icon.padding_left="10" \
|
||||||
label.padding_right="10" \
|
label.padding_right="10" \
|
||||||
blur_radius="30" \
|
blur_radius="30" \
|
||||||
background.border_color="0x80c4a7e7" \
|
background.border_color="0x80c4a7e7" \
|
||||||
background.border_width="1" \
|
background.border_width="1" \
|
||||||
script="''$''\{PLUGIN_DIR''\}/clock.sh" \
|
script="''$''\{PLUGIN_DIR''\}/clock.sh" \
|
||||||
\
|
\
|
||||||
--add item wifi right \
|
--add item wifi right \
|
||||||
--set wifi script="''$''\{PLUGIN_DIR''\}/wifi.sh" \
|
--set wifi script="''$''\{PLUGIN_DIR''\}/wifi.sh" \
|
||||||
icon="" \
|
icon="" \
|
||||||
background.color="''$''\{BACKGROUND_COLOR''\}" \
|
background.color="''$''\{BACKGROUND_COLOR''\}" \
|
||||||
background.corner_radius="7" \
|
background.corner_radius="7" \
|
||||||
icon.padding_left="10" \
|
icon.padding_left="10" \
|
||||||
label.padding_right="10" \
|
label.padding_right="10" \
|
||||||
blur_radius="30" \
|
blur_radius="30" \
|
||||||
background.border_color="0x80c4a7e7" \
|
background.border_color="0x80c4a7e7" \
|
||||||
background.border_width="1" \
|
background.border_width="1" \
|
||||||
--subscribe wifi wifi_change \
|
--subscribe wifi wifi_change \
|
||||||
\
|
\
|
||||||
--add item volume right \
|
--add item volume right \
|
||||||
--set volume script="''$''\{PLUGIN_DIR''\}/volume.sh" \
|
--set volume script="''$''\{PLUGIN_DIR''\}/volume.sh" \
|
||||||
background.color="''$''\{BACKGROUND_COLOR''\}" \
|
background.color="''$''\{BACKGROUND_COLOR''\}" \
|
||||||
background.corner_radius="7" \
|
background.corner_radius="7" \
|
||||||
icon.padding_left="10" \
|
icon.padding_left="10" \
|
||||||
label.padding_right="10" \
|
label.padding_right="10" \
|
||||||
blur_radius="30" \
|
blur_radius="30" \
|
||||||
background.border_color="0x80c4a7e7" \
|
background.border_color="0x80c4a7e7" \
|
||||||
background.border_width="1" \
|
background.border_width="1" \
|
||||||
--subscribe volume volume_change \
|
--subscribe volume volume_change \
|
||||||
\
|
\
|
||||||
--add item battery right \
|
--add item battery right \
|
||||||
--set battery script="''$''\{PLUGIN_DIR''\}/battery.sh" \
|
--set battery script="''$''\{PLUGIN_DIR''\}/battery.sh" \
|
||||||
update_freq="120" \
|
update_freq="120" \
|
||||||
background.color="''$''\{BACKGROUND_COLOR''\}" \
|
background.color="''$''\{BACKGROUND_COLOR''\}" \
|
||||||
background.corner_radius="7" \
|
background.corner_radius="7" \
|
||||||
icon.padding_left="10" \
|
icon.padding_left="10" \
|
||||||
label.padding_right="10" \
|
label.padding_right="10" \
|
||||||
blur_radius="30" \
|
blur_radius="30" \
|
||||||
background.border_color="0x80c4a7e7" \
|
background.border_color="0x80c4a7e7" \
|
||||||
background.border_width="1" \
|
background.border_width="1" \
|
||||||
--subscribe battery system_woke power_source_change \
|
--subscribe battery system_woke power_source_change \
|
||||||
|
|
||||||
##### Finalizing Setup #####
|
##### Finalizing Setup #####
|
||||||
# The below command is only needed at the end of the initial configuration to
|
# The below command is only needed at the end of the initial configuration to
|
||||||
# force all scripts to run the first time, it should never be run in an item script.
|
# force all scripts to run the first time, it should never be run in an item script.
|
||||||
|
|
||||||
sketchybar --update
|
sketchybar --update
|
||||||
''
|
''
|
||||||
|
|
|
@ -51,7 +51,7 @@ in
|
||||||
port = mkOption {
|
port = mkOption {
|
||||||
type = types.port;
|
type = types.port;
|
||||||
default = 6567;
|
default = 6567;
|
||||||
description =''
|
description = ''
|
||||||
Port to run the game server on
|
Port to run the game server on
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
@ -65,7 +65,8 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable ( let
|
config = mkIf cfg.enable (
|
||||||
|
let
|
||||||
# mindustryJar = builtins.fetchurl {
|
# mindustryJar = builtins.fetchurl {
|
||||||
# url = cfg.jarUrl;
|
# url = cfg.jarUrl;
|
||||||
# sha256 = cfg.jarSha256;
|
# sha256 = cfg.jarSha256;
|
||||||
|
@ -103,13 +104,13 @@ in
|
||||||
|
|
||||||
networking.firewall =
|
networking.firewall =
|
||||||
lib.pipe
|
lib.pipe
|
||||||
["TCP" "UDP"]
|
[ "TCP" "UDP" ]
|
||||||
[
|
[
|
||||||
(builtins.map
|
(builtins.map
|
||||||
(protocol:
|
(protocol:
|
||||||
lib.nameValuePair
|
lib.nameValuePair
|
||||||
"allowed${protocol}Ports"
|
"allowed${protocol}Ports"
|
||||||
[cfg.port]))
|
[ cfg.port ]))
|
||||||
builtins.listToAttrs
|
builtins.listToAttrs
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue