Compare commits

..

No commits in common. "3dd54609e4c90b75fba37f6ca28aa839ae26541a" and "63422ffe6d4a85f8f691dd6aee8111e0c7e6ba11" have entirely different histories.

5 changed files with 71 additions and 325 deletions

View File

@ -60,8 +60,6 @@
gyroflow
libqalculate
sops
pwvucontrol
qpwgraph
];
home.sessionVariables = {

View File

@ -8,8 +8,8 @@
musicDirectory = "/home/max/Music/";
network.startWhenNeeded = true;
extraConfig = ''
restore_paused "yes"
auto_update "yes"
restore_paused = yes
auto_update = yes
'';
};
services.mpd-mpris.enable = true;

View File

@ -25,26 +25,6 @@
};
config = {
output = let
bgdir = "~/Documents/Blender/desktop background Informatiker";
bg1080 = bgdir + "/render 1080p new color.png";
bg1080vert = bgdir + "/render 1080p hochkant new.png";
bg4k = bgdir + "/render 4K new color.png";
in {
eDP-1 = {
bg = "'${bg1080}' fit";
};
HDMI-A-1 = {
bg = "'${bg4k}' fit";
};
DP-4 = {
bg = "'${bg1080}' fit";
};
DP-5 = {
bg = "'${bg1080vert}' fit";
};
};
input = {
"*" = {
xkb_layout = "de";
@ -55,35 +35,12 @@
tap = "enable";
natural_scroll = "enable";
};
# map laptop touchscreen to laptop display
"1267:11676:ELAN2513:00_04F3:2D9C" = {
map_to_output = "'AU Optronics 0x4B2D Unknown'";
};
# map laptop stylus to laptop display
"1267:11676:ELAN2513:00_04F3:2D9C_Stylus" = {
map_to_output = "'AU Optronics 0x4B2D Unknown'";
};
};
modifier = "Mod4";
keybindings = let
modifier = config.wayland.windowManager.sway.config.modifier;
in
lib.mkOptionDefault {
# special workspaces
"${modifier}+1" = "workspace main";
"${modifier}+2" = "workspace term";
"${modifier}+3" = "workspace msg";
"${modifier}+4" = "workspace music";
"${modifier}+Shift+1" = "move container to workspace main";
"${modifier}+Shift+2" = "move container to workspace term";
"${modifier}+Shift+3" = "move container to workspace msg";
"${modifier}+Shift+4" = "move container to workspace music";
# screen capture
"${modifier}+Print" = ''exec ${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp)" - | ${pkgs.wl-clipboard}/bin/wl-copy'';
"${modifier}+Shift+Print" = ''exec ${pkgs.wf-recorder}/bin/wf-recorder -g "$(${pkgs.slurp}/bin/slurp)" -f "$HOME/Videos/screencapture_$(${pkgs.coreutils}/bin/date +%F-%T).mp4"'';
# brightness
"XF86MonBrightnessDown" = "exec ${pkgs.light}/bin/light -U 5";
"XF86MonBrightnessUp" = "exec ${pkgs.light}/bin/light -A 5";
@ -95,22 +52,18 @@
# custom pause mode similar to typical system shutdown menus
"${modifier}+F12" = "mode pause-break";
};
menu = "${pkgs.tofi}/bin/tofi-drun | ${pkgs.findutils}/bin/xargs swaymsg exec --";
# use foot as default terminal
terminal = "foot";
assigns = {
"main" = [{app_id = "firefox";}];
"term" = [{app_id = "foot-startup";}];
"msg" = [{title = "\\[Locked\\] - KeePassXC$";}];
"1" = [{app_id = "firefox";}];
"2" = [{app_id = "foot";}];
};
bars = [];
menu = "${pkgs.tofi}/bin/tofi-drun | ${pkgs.findutils}/bin/xargs swaymsg exec --";
fonts = {
names = ["FiraCode Nerd Font"];
size = 11.0;
};
modes = {
pause-break = {
e = "exec --no-startup-id swaymsg exit, mode default";
@ -121,87 +74,13 @@
Escape = "mode default";
};
};
startup = [
{command = "dbus-sway-environment";}
{command = "configure-gtk";}
{command = "${pkgs.keepassxc}/bin/keepassxc";}
{command = "${pkgs.waybar}/bin/waybar";}
{command = "${pkgs.foot}/bin/foot -a foot-startup";}
{command = "${pkgs.foot}/bin/foot";}
];
defaultWorkspace = "main";
workspaceAutoBackAndForth = true;
workspaceOutputAssign = [
{
workspace = "main";
output = ["DP-4" "HDMI-A-1" "eDP-1"];
}
{
workspace = "term";
output = ["DP-5" "eDP-1"];
}
{
workspace = "msg";
output = ["eDP-1"];
}
{
workspace = "music";
output = ["eDP-1"];
}
{
workspace = "5";
output = ["DP-4" "HDMI-A-1" "eDP-1"];
}
];
colors = {
background = "#00000000";
focused = {
border = "#00FFEE";
background = "#4477AA";
text = "#F0F0F0";
childBorder = "#00FFEE";
indicator = "#00AA88";
};
focusedInactive = {
border = "#626262";
background = "#444444";
text = "#F0F0F0";
childBorder = "#626262";
indicator = "#00AA88";
};
placeholder = {
border = "#313131";
background = "#222222";
text = "#F0F0F0";
childBorder = "#313131";
indicator = "#005544";
};
unfocused = {
border = "#313131";
background = "#222222";
text = "#F0F0F0";
childBorder = "#313131";
indicator = "#00AA88";
};
urgent = {
border = "#FF3131";
background = "#882222";
text = "#F0F0F0";
childBorder = "#FF3131";
indicator = "#00AA88";
};
};
focus.mouseWarping = true;
gaps = {
inner = 5;
smartGaps = true;
smartBorders = "no_gaps";
};
window.titlebar = false;
};
};
@ -213,56 +92,7 @@
position = "top";
height = 26;
modules-left = ["sway/workspaces" "sway/mode"];
modules-center = ["sway/window"];
modules-right = ["mpd" "tray" "sway/language" "clock" "backlight" "battery" "network"];
"sway/workspaces" = {
disable-scroll = true;
all-outputs = false;
format = "<span size='150%'>{icon}</span> {name}";
format-icons = {
"main" = "󰈹";
"term" = "";
"msg" = "󰷹";
"music" = "󰫔";
"urgent" = "";
"focused" = "";
"default" = "";
};
};
"mpd" = {
format = "{stateIcon}{consumeIcon}{randomIcon}{repeatIcon}{singleIcon} {title} ({elapsedTime:%M:%S}/{totalTime:%M%S}) {volume}";
format-stopped = "{stateIcon}{randomIcon}{repeatIcon}{singleIcon} Stopped {volume}";
format-disconnected = "";
unkown-tag = "N/A";
interval = 2;
consume-icons = {
on = "󰮯 ";
off = "";
};
random-icons = {
on = "󰒟 ";
off = "󰒞 ";
};
repeat-icons = {
on = "󰑖 ";
off = "󰑗 ";
};
single-icons = {
on = "󰑘 ";
off = "";
};
state-icons = {
paused = "󰏤 ";
playing = "󰐊 ";
};
max-length = 50;
};
"tray" = {
spacing = 10;
};
modules-right = ["sway/language" "clock" "battery"];
"sway/language" = {
format = "{shortDescription}";
@ -273,26 +103,43 @@
interval = 60;
format = "{:%a %d.%m %I:%M}";
};
"backlight" = {
format = "{percent}% {icon}";
format-icons = ["󰹐" "󱩎" "󱩏" "󱩐" "󱩑" "󱩒" "󱩓" "󱩔" "󱩕" "󱩖" "󰛨"];
};
"battery" = {
format = "{capacity}% {icon}";
format-icons = ["󰂎" "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹"];
};
"network" = {
format-wifi = "{essid} ({signalStrength}%) 󰖩";
format-ethernet = "{ipaddr}/{cidr} 󰈀";
tooltip-format = "{ifname} via {gwaddr} 󰌘";
format-disconnected = "󰌙";
};
};
};
style = ./waybar.css;
style = ''
* {
border: none;
border-radius: 0;
padding: 0;
margin: 0;
font-size: 11px;
}
window#waybar {
background: #292828;
color: #ffffff;
}
#workspaces button {
margin-right: 10px;
color: #ffffff;
}
#workspaces button:hover, #workspaces button:active {
background-color: #292828;
color: #ffffff;
}
#workspaces button.focused {
background-color: #383737;
}
#language {
margin-right: 7px;
}
#battery {
margin-left: 7px;
margin-right: 3px;
}
'';
};
services.kanshi = {
@ -304,51 +151,33 @@
position = "0,0";
}
];
dock_luhbots = {
outputs = [
{
criteria = "eDP-1";
position = "0,1080";
}
{
criteria = "Dell Inc. DELL U2422HE GRCPH83";
position = "0,0";
}
{
criteria = "NEC Corporation E243WMi 7X313185NB";
transform = "90";
position = "1920,0";
}
];
exec = [
"${pkgs.sway}/bin/swaymsg workspace 1, move workspace to DP-4"
"${pkgs.sway}/bin/swaymsg workspace 2, move workspace to DP-5"
"${pkgs.sway}/bin/swaymsg workspace 3, move workspace to eDP-1"
"${pkgs.sway}/bin/swaymsg workspace 4, move workspace to eDP-1"
"${pkgs.sway}/bin/swaymsg workspace 5, move workspace to DP-4"
];
};
laptop_hannspree = {
outputs = [
{
criteria = "eDP-1";
position = "320,1440";
}
{
criteria = "HannStar Display Corp HC281UPB ";
position = "0,0";
mode = "3840x2160@60";
scale = 1.5;
}
];
exec = [
"${pkgs.sway}/bin/swaymsg workspace 1, move workspace to HDMI-A-1"
"${pkgs.sway}/bin/swaymsg workspace 2, move workspace to eDP-1"
"${pkgs.sway}/bin/swaymsg workspace 3, move workspace to eDP-1"
"${pkgs.sway}/bin/swaymsg workspace 4, move workspace to eDP-1"
"${pkgs.sway}/bin/swaymsg workspace 5, move workspace to HDMI-A-1"
];
};
dock_luhbots.outputs = [
{
criteria = "eDP-1";
position = "0,1080";
}
{
criteria = "Dell Inc. DELL U2422HE GRCPH83";
position = "0,0";
}
{
criteria = "NEC Corporation E243WMi 7X313185NB";
transform = "90";
position = "1920,0";
}
];
laptop_hannspree.outputs = [
{
criteria = "eDP-1";
position = "320,1440";
}
{
criteria = "HannStar Display Corp HC281UPB ";
position = "0,0";
mode = "3840x2160@60";
scale = 1.5;
}
];
};
};

View File

@ -1,81 +0,0 @@
* {
border: none;
border-radius: 0;
padding: 0;
margin: 0;
font-size: 11px;
font-family: "FiraCode Nerd Font";
}
window#waybar {
background: #292828;
color: #ffffff;
}
#workspaces button {
margin-right: 2px;
padding-left: 2px;
padding-right: 2px;
color: #ffffff;
}
#workspaces button:hover, #workspaces button:active {
background-color: #292828;
color: #ffffff;
}
#workspaces button.focused {
background-color: #383737;
color: #00ffee;
}
#mpd {
padding-left: 3px;
padding-right: 3px;
}
#tray {
border-width: 1px;
border-style: none none none solid;
border-color: #444444;
padding-left: 3px;
padding-right: 3px;
}
#language {
border-width: 1px;
border-style: none none none solid;
border-color: #444444;
padding-left: 3px;
padding-right: 3px;
}
#clock {
border-width: 1px;
border-style: none none none solid;
border-color: #444444;
padding-left: 3px;
padding-right: 3px;
}
#backlight {
border-width: 1px;
border-style: none none none solid;
border-color: #444444;
padding-left: 3px;
padding-right: 3px;
}
#battery {
border-width: 1px;
border-style: none none none solid;
border-color: #444444;
padding-left: 3px;
padding-right: 3px;
}
#network {
border-width: 1px;
border-style: none none none solid;
border-color: #444444;
padding-left: 3px;
padding-right: 3px;
}

View File

@ -11,7 +11,7 @@
set -e
# cd to your config dir
pushd ~/dotfiles/nixos
pushd ~/dotfiles/nixos/
# Edit your config
$EDITOR
@ -25,7 +25,7 @@
echo "NixOS Rebuilding..."
# Rebuild, output simplified errors, log trackebacks
sudo nixos-rebuild switch &>nixos-switch.log || (${pkgs.coreutils}/bin/cat nixos-switch.log | ${pkgs.gnugrep}/bin/grep --color error && false)
${pkgs.sudo}/bin/sudo nixos-rebuild switch &>nixos-switch.log || (${pkgs.coreutils}/bin/cat nixos-switch.log | ${pkgs.gnugrep}/bin/grep --color error && false)
# Get current generation metadata
current=$(nixos-rebuild list-generations | ${pkgs.gnugrep}/bin/grep current)