feat: added LAN config for Korea

This commit is contained in:
Patrick Großmann 2023-03-05 22:56:36 +09:00
parent ba85a6474c
commit 63a3969e95
Signed by: patrick
GPG key ID: 451F95EFB8BECD0F
6 changed files with 244 additions and 93 deletions

View file

@ -19,7 +19,8 @@
# So to not dox myself this config file is hardcoded
rekey.secrets.enp0s20f0u2u4 = {
file = ../secrets/koreaIP.age;
path = "/etc/systemd/network/enp0s20f0u2u4.network";
path = "/etc/systemd/network/10-enp0s20f0u2u4.network";
mode = "444";
};
services.resolved = {
enable = true;

View file

@ -1,14 +1,13 @@
age-encryption.org/v1
-> X25519 3J4C1gErVk61rhDZ2V8wNRQhOz4gZQ+kUnF0w4bacTM
e6YK/xDjXtTTJL5wSbZ+xzhuGodu2OJeTw3u4hJ2Oik
-> piv-p256 XTQkUA A0GdsIHUCWBXggnSZj0XGHDQk3OsTH9WB7nNzhZJnwj/
j5bCq50HjIqPp1jTsyX6WfEBNooyq8ovMkYEzrn33CQ
-> piv-p256 ZFgiIw AkhhWD/yOroM1ttX1PNAi6Fss1Nqm7pJHB4micU5IfsI
kTB28H46jvtCYF7u7PoN02kQof41ycuZbSQh6UWz57Y
-> "\s0YT#-grease 3YP75@.
aqpRxhJHTMQsvjgPW1bqZSD7YgOX9fw+VNUW+KURv6cV+gLYZeoecFruJXchA60E
9efPuI8vUfNxmYzPQChsqxqDdzwc5wg0u+ZrwSaz
--- M/B7EHfz8B63cqQ/zQwO64Pqo5ewYx2nqBoLZdtuGbY
Þ$M:×-u/ö6<C3B6>[P°Ðµ”ˆâ<CB86>ЉX<E280B0><58>HÄ&Í¢ÀšœÌ<C593>w¬/^~*×èQ¶Þ¾¡ß-þ<>ÎÍv`8<t$©,”%
°;ï‚;†
Œ•íª—öƒÕ÷×yÿÙ Í
-> X25519 PLUAL+hWRS3OD8ImxBUoRt9kX9dUkZaqW25fTbOtnAI
zhT1ya1g6WlGahW0GUwsILumC1APvk0dTluzwh490Os
-> piv-p256 XTQkUA AuPSCNGUN4fg8FMqDNrDhU7WEmzAZgEgWBl+IFuDJfNO
TXkyWp7UOiIz3fmzJe5DXrG5WJKNnoaKQnCk/RseiMw
-> piv-p256 ZFgiIw A5tAnf15c/eAEMxnunVr3AiZ//ERgcSQVqBwv5DNU3XV
ybrErVyofg6SMKhYkmx+xEVjTEVGqWlwFmWCFCS5Wyw
-> Qkg@hYz-grease c0A[ <IEUfBf P4}dgT .
B5wfx2tzBhImMdJkgchENUIR14wfItWtd1ybelvS26iGw8rz02Xj6/vPw6Dkm5mF
mP1nY5bTA8ojv9TeciAX7NopZVpWgmvs/C8yFg
--- zuav8flFoWG2+yRIssk2fg5P0ocNv53YqmzsLEluvHA
lq`×<>:%OXèáD>Ôˆ¥Eý‰P¡¤&î<>Ò„-ZA”á"¬R<C2AC>­sK™p³yÛOûkµ:™Ÿx…
{Ûá!raª Û Þ6ga(p×|_ñJ¾Ø#Û}'SŒñr#Øç/¹bó¥Ñû†–Þ‘

View file

@ -15,16 +15,17 @@
enable = true;
dotDir = ".config/zsh";
initExtra = lib.mkAfter (''
function atuin-prefix-search() {
if out=$(${pkgs.sqlite}/bin/sqlite3 -readonly ~/.local/share/atuin/history.db \
'SELECT command FROM history WHERE command LIKE cast('"x'$(str_to_hex "$_atuin_search_prefix")'"' as text) || "%" ORDER BY timestamp DESC LIMIT 1 OFFSET '"$_atuin_search_offset"); then
[[ -z "$out" ]] && return 1
BUFFER=$out
else
return 1
fi
function atuin-prefix-search() {
if out=$(${pkgs.sqlite}/bin/sqlite3 -readonly ~/.local/share/atuin/history.db \
'SELECT command FROM history WHERE command LIKE cast('"x'$(str_to_hex "$_atuin_search_prefix")'"' as text) ||\
"%" ORDER BY timestamp DESC LIMIT 1 OFFSET '"$_atuin_search_offset"); then
[[ -z "$out" ]] && return 1
BUFFER=$out
else
return 1
fi
}; zle -N atuin-prefix-search
}; zle -N atuin-prefix-search
''
+ (builtins.readFile ../../../data/zsh/zshrc));
plugins = [

View file

@ -1,11 +1,15 @@
{
config,
pkgs,
lib,
...
}:
with lib; let
cfg = config.programs.touchegg;
#
# GESTURES
#
# each on has a member type as a single entry enum
# to be able to definitely distinguish them
# common options
fingers = mkOption {
type = types.ints.between 2 5;
@ -20,6 +24,13 @@ with lib; let
# Submodules for the different gestures
swipe_gesture = types.submodule {
inherit fingers;
type = mkOption {
type = types.enum ["swipe"];
description = ''
Type of gesture to perform
'';
default = "";
};
direction = mkOption {
type = types.enum ["UP" "DOWN" "LEFT" "RIGHT"];
@ -32,6 +43,13 @@ with lib; let
pinch_gesture = types.submodule {
inherit fingers;
type = mkOption {
type = types.enum ["pinch"];
description = ''
Type of gesture to perform
'';
default = "";
};
direction = mkOption {
type = types.enum ["IN" "OUT"];
@ -44,8 +62,19 @@ with lib; let
tap_gesture = types.submodule {
inherit fingers;
type = mkOption {
type = types.enum ["tap"];
description = ''
Type of gesture to perform
'';
default = "";
};
};
#
# ACTIONS
#
# common options
animate = mkOption {
type = tyes.bool;
@ -56,7 +85,7 @@ with lib; let
};
color = mkOption {
type = type.str;
type = types.str;
description = ''
hex value of the animation color
'';
@ -65,7 +94,7 @@ with lib; let
};
borderColor = mkOption {
type = type.str;
type = types.str;
description = ''
hex value of the color of the
animation border
@ -78,8 +107,6 @@ with lib; let
inherit animate color borderColor;
};
# Submodules for the actions performed
# by gestures
maximize_restore_window = {
inherit animation_common_options;
};
@ -121,7 +148,11 @@ with lib; let
"auto"
];
description = ''
The desktop/workspace to switch to. It is recommended to use previous/next for better compatibility. However, some desktop environments, like KDE, allow to configure a grid of desktops and up/down/left/right come in handy. With SWIPE gestures, auto will use your natural scroll preferences to figure out the direction.
The desktop/workspace to switch to.
It is recommended to use previous/next for better compatibility.
However, some desktop environments, like KDE,
allow to configure a grid of desktops and up/down/left/right come in handy.
With SWIPE gestures, auto will use your natural scroll preferences to figure out the direction.
'';
default = "auto";
example = "next";
@ -255,6 +286,7 @@ with lib; let
};
mouse_click = {
inherit on;
button = mkOption {
type = types.enum ["left" "right" "middle"];
description = ''
@ -262,15 +294,6 @@ with lib; let
'';
example = "left";
};
on = mkOption {
type = types.enum ["begin" "end"];
description = ''
If the command should be executed on the beginning or on the end of the gesture.
'';
default = "end";
example = "begin";
};
};
gestureModule = let
@ -281,32 +304,11 @@ with lib; let
'';
in
types.submodule {
options = {
gestures = mkOption {
# hopefully this works it not
# because of submodule weirdness
swipe_gesture = mkOption {
type = types.listOf swipe_gesture;
description = helpStr;
default = [];
};
pinch_gesture = mkOption {
type = types.listOf pinch_gesture;
description = helpStr;
default = [];
};
tap_gesture = mkOption {
type = types.listOf tap_gesture;
description = helpStr;
default = [];
};
description = ''
the type of gesture
'';
type = types.enum [swipe_gesture pinch_gesture tap_gesture];
description = helpStr;
example = ""; # TODO
};
@ -321,6 +323,7 @@ with lib; let
};
in {
options.programs.touchegg = {
inherit color borderColor;
enable = mkEnableOption "Touch gesture daemon";
animation_delay = mkOption {
@ -347,41 +350,181 @@ in {
example = "";
};
color = mkOption {
type = types.str;
description = ''
Color of the animation
'';
default = "39E9FED";
example = "";
};
borderColor = mkOption {
type = types.str;
description = ''
Color of the animation
'';
default = "9E9FED";
example = "";
};
gestures = mkOption {
type = types.attrOf gestureModule;
type = types.attrsOf gestureModule;
description = "touchegg gestures";
default = {};
};
};
config = mkIf cfg.enable {
#assertions =
# TODO
home.packages = [pkgs.touchegg];
config = let
cfg = config.programs.touchegg;
in
mkIf cfg.enable {
# TODO
home.packages = [pkgs.touchegg];
xdg.configFile.touchegg = {
target = "touchegg/touchegg.conf";
text = builtins.toXML {};
xdg.configFile.touchegg = {
target = "touchegg/touchegg.conf";
text = ''
<touchégg>
<settings>
<!--
Delay, in milliseconds, since the gesture starts before the animation is displayed.
Default: 150ms if this property is not set.
Example: Use the MAXIMIZE_RESTORE_WINDOW action. You will notice that no animation is
displayed if you complete the action quick enough. This property configures that time.
-->
<property name="animation_delay">150</property>
<!--
Percentage of the gesture to be completed to apply the action. Set to 0 to execute actions unconditionally.
Default: 20% if this property is not set.
Example: Use the MAXIMIZE_RESTORE_WINDOW action. You will notice that, even if the
animation is displayed, the action is not executed if you did not move your fingers far
enough. This property configures the percentage of the gesture that must be reached to
execute the action.
-->
<property name="action_execute_threshold">20</property>
<!--
Global animation colors can be configured to match your system colors using HEX notation:
<color>909090</color>
<borderColor>FFFFFF</borderColor>
You can also use auto:
<property name="color">auto</property>
<property name="borderColor">auto</property>
Notice that you can override an specific animation color.
-->
<property name="color">auto</property>
<property name="borderColor">auto</property>
</settings>
<!--
Configuration for every application.
-->
<application name="All">
<gesture type="SWIPE" fingers="3" direction="UP">
<action type="MAXIMIZE_RESTORE_WINDOW">
<animate>true</animate>
</action>
</gesture>
<gesture type="SWIPE" fingers="3" direction="DOWN">
<action type="MINIMIZE_WINDOW">
<animate>true</animate>
</action>
</gesture>
<gesture type="SWIPE" fingers="3" direction="LEFT">
<action type="TILE_WINDOW">
<direction>left</direction>
<animate>true</animate>
</action>
</gesture>
<gesture type="SWIPE" fingers="3" direction="RIGHT">
<action type="TILE_WINDOW">
<direction>right</direction>
<animate>true</animate>
</action>
</gesture>
<gesture type="PINCH" fingers="3" direction="IN">
<action type="CLOSE_WINDOW">
<animate>true</animate>
<color>F84A53</color>
<borderColor>F84A53</borderColor>
</action>
</gesture>
<gesture type="SWIPE" fingers="4" direction="UP">
<action type="CHANGE_DESKTOP">
<direction>auto</direction>
<animate>true</animate>
<animationPosition>auto</animationPosition>
</action>
</gesture>
<gesture type="SWIPE" fingers="4" direction="DOWN">
<action type="CHANGE_DESKTOP">
<direction>auto</direction>
<animate>true</animate>
<animationPosition>auto</animationPosition>
</action>
</gesture>
<gesture type="SWIPE" fingers="4" direction="RIGHT">
<action type="SEND_KEYS">
<repeat>false</repeat>
<modifiers>Super_L</modifiers>
<keys>S</keys>
<on>begin</on>
</action>
</gesture>
<gesture type="PINCH" fingers="4" direction="OUT">
<action type="SHOW_DESKTOP">
<animate>true</animate>
</action>
</gesture>
<gesture type="PINCH" fingers="4" direction="IN">
<action type="SEND_KEYS">
<repeat>false</repeat>
<modifiers>Super_L</modifiers>
<keys>A</keys>
<on>begin</on>
</action>
</gesture>
<gesture type="TAP" fingers="2">
<action type="MOUSE_CLICK">
<button>3</button>
<on>begin</on>
</action>
</gesture>
<gesture type="TAP" fingers="3">
<action type="MOUSE_CLICK">
<button>2</button>
<on>begin</on>
</action>
</gesture>
</application>
<!--
Configuration for specific applications.
-->
<application name="Google-chrome,Chromium-browser">
<gesture type="PINCH" fingers="2" direction="IN">
<action type="SEND_KEYS">
<repeat>true</repeat>
<modifiers>Control_L</modifiers>
<keys>KP_Subtract</keys>
<decreaseKeys>KP_Add</decreaseKeys>
</action>
</gesture>
<gesture type="PINCH" fingers="2" direction="OUT">
<action type="SEND_KEYS">
<repeat>true</repeat>
<modifiers>Control_L</modifiers>
<keys>KP_Add</keys>
<decreaseKeys>KP_Subtract</decreaseKeys>
</action>
</gesture>
</application>
</touchégg>
'';
};
};
#systemd.user.services.touchegg =
};
}

View file

@ -0,0 +1,6 @@
{config, ...}: {
#
# MY Config
#
programs.touchegg.enable = true;
}

View file

@ -9,7 +9,8 @@
common/graphical/autorandr.nix
common/programs/polybar.nix
common/programs/rofi.nix
#common/touchegg.nix
common/touchegg-module.nix
common/touchegg-settings.nix
];
home = {