diff --git a/SwarselSystems.org b/SwarselSystems.org index c427675..ab7fff4 100644 --- a/SwarselSystems.org +++ b/SwarselSystems.org @@ -2069,7 +2069,7 @@ My new main machine. #+begin_src nix :tangle profiles/fourside/default.nix - { inputs, outputs, ... }: + { inputs, outputs, config, ... }: { imports = [ @@ -2104,23 +2104,23 @@ My new main machine. input-filename = "temp1_input"; }; monitors = { - main = { - name = "California Institute of Technology 0x1407 Unknown"; - mode = "1920x1080"; # TEMPLATE - scale = "1"; - position = "2560,0"; - workspace = "2:二"; - output = "eDP-1"; - }; - homedesktop = { - name = "Philips Consumer Electronics Company PHL BDM3270 AU11806002320"; - mode = "2560x1440"; - scale = "1"; - position = "0,0"; - workspace = "1:一"; - output = "DP-4"; - }; + main = { + name = "California Institute of Technology 0x1407 Unknown"; + mode = "1920x1080"; # TEMPLATE + scale = "1"; + position = "2560,0"; + workspace = "2:二"; + output = "eDP-1"; }; + homedesktop = { + name = "Philips Consumer Electronics Company PHL BDM3270 AU11806002320"; + mode = "2560x1440"; + scale = "1"; + position = "0,0"; + workspace = "1:一"; + output = "DP-4"; + }; + }; inputs = { "1:1:AT_Translated_Set_2_keyboard" = { xkb_layout = "us"; @@ -2128,6 +2128,21 @@ My new main machine. xkb_variant = "altgr-intl"; }; }; + keybindings = { + "Mod4+w" = "exec \"bash ~/.dotfiles/scripts/checkelement.sh\""; + "XF86MonBrightnessUp" = "exec brightnessctl set +5%"; + "XF86MonBrightnessDown" = "exec brightnessctl set 5%-"; + "XF86Display" = "exec wl-mirror eDP-1"; + # these are left open to use + # "XF86WLAN" = "exec wl-mirror eDP-1"; + # "XF86Messenger" = "exec wl-mirror eDP-1"; + # "XF86Go" = "exec wl-mirror eDP-1"; + # "XF86Favorites" = "exec wl-mirror eDP-1"; + # "XF86HomePage" = "exec wtype -P Escape -p Escape"; + # "XF86AudioLowerVolume" = "pactl set-sink-volume alsa_output.pci-0000_08_00.6.HiFi__hw_Generic_1__sink -5%"; + # "XF86AudioRaiseVolume" = "pactl set-sink-volume alsa_output.pci-0000_08_00.6.HiFi__hw_Generic_1__sink +5% "; + "XF86AudioMute" = "exec pactl set-sink-mute alsa_output.pci-0000_08_00.6.HiFi__Speaker__sink toggle && exec pactl set-sink-mute alsa_output.usb-Lenovo_ThinkPad_Thunderbolt_4_Dock_USB_Audio_000000000000-00.analog-stereo toggle"; + }; }; } @@ -2272,25 +2287,6 @@ This is basically just adjusted to the core count, path to the =hwmon= (this was # ]; - keybindings = - let - inherit (config.wayland.windowManager.sway.config) modifier; - in - { - "${modifier}+w" = "exec \"bash ~/.dotfiles/scripts/checkelement.sh\""; - "XF86MonBrightnessUp" = "exec brightnessctl set +5%"; - "XF86MonBrightnessDown" = "exec brightnessctl set 5%-"; - "XF86Display" = "exec wl-mirror eDP-1"; - # these are left open to use - # "XF86WLAN" = "exec wl-mirror eDP-1"; - # "XF86Messenger" = "exec wl-mirror eDP-1"; - # "XF86Go" = "exec wl-mirror eDP-1"; - # "XF86Favorites" = "exec wl-mirror eDP-1"; - # "XF86HomePage" = "exec wtype -P Escape -p Escape"; - # "XF86AudioLowerVolume" = "pactl set-sink-volume alsa_output.pci-0000_08_00.6.HiFi__hw_Generic_1__sink -5%"; - # "XF86AudioRaiseVolume" = "pactl set-sink-volume alsa_output.pci-0000_08_00.6.HiFi__hw_Generic_1__sink +5% "; - "XF86AudioMute" = "pactl set-sink-mute alsa_output.pci-0000_08_00.6.HiFi__hw_Generic_1__sink toggle"; - }; }; }; @@ -4459,28 +4455,28 @@ Modules that need to be loaded on the NixOS level. Note that these will not be a { options.swarselsystems.isLaptop = lib.mkEnableOption "laptop host"; config.swarselsystems.touchpad = lib.mkIf config.swarselsystems.isLaptop { - "type:touchpad" = { - dwt = "enabled"; - tap = "enabled"; - natural_scroll = "enabled"; - middle_emulation = "enabled"; - }; + "type:touchpad" = { + dwt = "enabled"; + tap = "enabled"; + natural_scroll = "enabled"; + middle_emulation = "enabled"; + }; }; config.swarselsystems.waybarModules = lib.mkIf config.swarselsystems.isLaptop [ - "custom/outer-left-arrow-dark" - "mpris" - "custom/left-arrow-light" - "network" - "custom/left-arrow-dark" - "pulseaudio" - "custom/left-arrow-light" - "battery" - "custom/left-arrow-dark" - "group/hardware" - "custom/left-arrow-light" - "clock#2" - "custom/left-arrow-dark" - "clock#1" + "custom/outer-left-arrow-dark" + "mpris" + "custom/left-arrow-light" + "network" + "custom/left-arrow-dark" + "pulseaudio" + "custom/left-arrow-light" + "battery" + "custom/left-arrow-dark" + "group/hardware" + "custom/left-arrow-light" + "clock#2" + "custom/left-arrow-dark" + "clock#1" ]; } #+end_src @@ -4588,6 +4584,11 @@ Modules that need to be loaded on the NixOS level. Note that these will not be a options.swarselsystems.standardinputs = mkOption { type = types.attrsOf (types.attrsOf types.str ); default = lib.recursiveUpdate (lib.recursiveUpdate config.swarselsystems.touchpad config.swarselsystems.kyria) config.swarselsystems.inputs; + internal = true; + }; + options.swarselsystems.keybindings = mkOption { + type = types.attrsOf types.str; + default = { }; }; @@ -7317,7 +7318,7 @@ Currently, I am too lazy to explain every option here, but most of it is very se let inherit (config.wayland.windowManager.sway.config) modifier; in - { + recursiveUpdate { "${modifier}+q" = "kill"; "${modifier}+f" = "exec firefox"; "${modifier}+Space" = "exec fuzzel"; @@ -7385,7 +7386,7 @@ Currently, I am too lazy to explain every option here, but most of it is very se "${modifier}+Shift+e" = "exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'"; "${modifier}+r" = "mode resize"; "${modifier}+Return" = "exec kitty"; - }; + } config.swarselsystems.keybindings; modes = { resize = { Down = "resize grow height 10 px or 10 ppt"; diff --git a/index.html b/index.html index b8ef69b..0ea71e5 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- +-This file has 42658 words spanning 11524 lines and was last revised on 2024-07-25 15:13:17 +0200. +This file has 42684 words spanning 11525 lines and was last revised on 2024-07-25 16:01:11 +0200.
@@ -450,7 +450,7 @@ This section defines my Emacs configuration. For a while, I considered to use ry
-My emacs is built using the emacs-overlay nix flake, which builds a bleeding edge emacs on wayland (pgtk) with utilities like treesitter support. By executing the below source block, the current build setting can be updated at any time, and you can see my most up-to-date build options (last updated: 2024-07-25 15:13:17 +0200) +My emacs is built using the emacs-overlay nix flake, which builds a bleeding edge emacs on wayland (pgtk) with utilities like treesitter support. By executing the below source block, the current build setting can be updated at any time, and you can see my most up-to-date build options (last updated: 2024-07-25 16:01:11 +0200)
@@ -2440,7 +2440,7 @@ in -
-{ inputs, outputs, ... }:
+{ inputs, outputs, config, ... }:
{
imports = [
@@ -2873,23 +2873,23 @@ My new main machine.
input-filename = "temp1_input";
};
monitors = {
- main = {
- name = "California Institute of Technology 0x1407 Unknown";
- mode = "1920x1080"; # TEMPLATE
- scale = "1";
- position = "2560,0";
- workspace = "2:二";
- output = "eDP-1";
- };
- homedesktop = {
- name = "Philips Consumer Electronics Company PHL BDM3270 AU11806002320";
- mode = "2560x1440";
- scale = "1";
- position = "0,0";
- workspace = "1:一";
- output = "DP-4";
- };
+ main = {
+ name = "California Institute of Technology 0x1407 Unknown";
+ mode = "1920x1080"; # TEMPLATE
+ scale = "1";
+ position = "2560,0";
+ workspace = "2:二";
+ output = "eDP-1";
};
+ homedesktop = {
+ name = "Philips Consumer Electronics Company PHL BDM3270 AU11806002320";
+ mode = "2560x1440";
+ scale = "1";
+ position = "0,0";
+ workspace = "1:一";
+ output = "DP-4";
+ };
+ };
inputs = {
"1:1:AT_Translated_Set_2_keyboard" = {
xkb_layout = "us";
@@ -2897,6 +2897,21 @@ My new main machine.
xkb_variant = "altgr-intl";
};
};
+ keybindings = {
+ "Mod4+w" = "exec \"bash ~/.dotfiles/scripts/checkelement.sh\"";
+ "XF86MonBrightnessUp" = "exec brightnessctl set +5%";
+ "XF86MonBrightnessDown" = "exec brightnessctl set 5%-";
+ "XF86Display" = "exec wl-mirror eDP-1";
+ # these are left open to use
+ # "XF86WLAN" = "exec wl-mirror eDP-1";
+ # "XF86Messenger" = "exec wl-mirror eDP-1";
+ # "XF86Go" = "exec wl-mirror eDP-1";
+ # "XF86Favorites" = "exec wl-mirror eDP-1";
+ # "XF86HomePage" = "exec wtype -P Escape -p Escape";
+ # "XF86AudioLowerVolume" = "pactl set-sink-volume alsa_output.pci-0000_08_00.6.HiFi__hw_Generic_1__sink -5%";
+ # "XF86AudioRaiseVolume" = "pactl set-sink-volume alsa_output.pci-0000_08_00.6.HiFi__hw_Generic_1__sink +5% ";
+ "XF86AudioMute" = "exec pactl set-sink-mute alsa_output.pci-0000_08_00.6.HiFi__Speaker__sink toggle && exec pactl set-sink-mute alsa_output.usb-Lenovo_ThinkPad_Thunderbolt_4_Dock_USB_Audio_000000000000-00.analog-stereo toggle";
+ };
};
}
@@ -3043,25 +3058,6 @@ This is basically just adjusted to the core count, path to the hwmon
In this section I define packages that I manually want to nixpkgs. This can be useful for packages that are currently awaiting a PR or public packages that I do not want to maintain. @@ -5470,8 +5466,8 @@ These are for packages that are on nixpkgs, but do not fit my usecase, meaning I This is simply a mirror of the most recent stable branch of nixpkgs. Useful for packages that are broken on nixpkgs, but do not need to be on bleeding edge anyways.
@@ -5481,8 +5477,8 @@ _ : rec { }
@@ -5515,15 +5511,15 @@ _ : rec { }
In this section I define custom modules under the swarsel attribute. These are mostly used to define settings specific to a host. I keep these settings confined to either home-manager or nixos to maintain compatibility with non-NixOS machines.
{
@@ -5553,42 +5549,42 @@ Modules that need to be loaded on the NixOS level. Note that these will not be a
{ lib, config, ... }:
{
options.swarselsystems.isLaptop = lib.mkEnableOption "laptop host";
config.swarselsystems.touchpad = lib.mkIf config.swarselsystems.isLaptop {
- "type:touchpad" = {
- dwt = "enabled";
- tap = "enabled";
- natural_scroll = "enabled";
- middle_emulation = "enabled";
- };
+ "type:touchpad" = {
+ dwt = "enabled";
+ tap = "enabled";
+ natural_scroll = "enabled";
+ middle_emulation = "enabled";
+ };
};
config.swarselsystems.waybarModules = lib.mkIf config.swarselsystems.isLaptop [
- "custom/outer-left-arrow-dark"
- "mpris"
- "custom/left-arrow-light"
- "network"
- "custom/left-arrow-dark"
- "pulseaudio"
- "custom/left-arrow-light"
- "battery"
- "custom/left-arrow-dark"
- "group/hardware"
- "custom/left-arrow-light"
- "clock#2"
- "custom/left-arrow-dark"
- "clock#1"
+ "custom/outer-left-arrow-dark"
+ "mpris"
+ "custom/left-arrow-light"
+ "network"
+ "custom/left-arrow-dark"
+ "pulseaudio"
+ "custom/left-arrow-light"
+ "battery"
+ "custom/left-arrow-dark"
+ "group/hardware"
+ "custom/left-arrow-light"
+ "clock#2"
+ "custom/left-arrow-dark"
+ "clock#1"
];
}
{ lib, ... }:
@@ -5612,7 +5608,7 @@ Modules that need to be loaded on the NixOS level. Note that these will not be a
{ lib, config, ... }:
@@ -5652,7 +5648,7 @@ in
{ lib, config, ... }:
@@ -5669,7 +5665,7 @@ in
{ lib, config, ... }:
@@ -5697,6 +5693,11 @@ in
options.swarselsystems.standardinputs = mkOption {
type = types.attrsOf (types.attrsOf types.str );
default = lib.recursiveUpdate (lib.recursiveUpdate config.swarselsystems.touchpad config.swarselsystems.kyria) config.swarselsystems.inputs;
+ internal = true;
+ };
+ options.swarselsystems.keybindings = mkOption {
+ type = types.attrsOf types.str;
+ default = { };
};
@@ -5705,7 +5706,7 @@ in
{ lib, config, ... }:
@@ -5727,7 +5728,7 @@ in
{ lib, config, ... }:
@@ -6303,8 +6304,8 @@ I use sops-nix to handle secrets that I want to have available on my machines at
By default, stylix wants to style GRUB as well. However, I think that looks horrible. @@ -6486,7 +6487,7 @@ Some programs profit from being installed through dedicated NixOS settings on sy
@@ -6582,7 +6583,7 @@ Enables the blueman service including the nice system tray icon.
In this section we enable compatibility with several network devices I have at home, mainly printers and scanners. @@ -6634,7 +6635,7 @@ services.printing = {
Avahi is the service used for the network discovery. @@ -6788,8 +6789,8 @@ This section houses the greetd related settings. I do not really want to use a d
This section sets up all the imports that are used in the home-manager section. @@ -7599,8 +7600,8 @@ This section is for programs that require no further configuration. zsh Integrat
nix-index provides a way to find out which packages are provided by which derivations. By default it also comes with a replacement for command-not-found.sh, however, the implementation is based on a channel based setup. I like consistency, so I replace the command with one that provides a flakes-based output.
@@ -8686,7 +8687,7 @@ Currently, I am too lazy to explain every option here, but most of it is very se
let
inherit (config.wayland.windowManager.sway.config) modifier;
in
- {
+ recursiveUpdate {
"${modifier}+q" = "kill";
"${modifier}+f" = "exec firefox";
"${modifier}+Space" = "exec fuzzel";
@@ -8754,7 +8755,7 @@ Currently, I am too lazy to explain every option here, but most of it is very se
"${modifier}+Shift+e" = "exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'";
"${modifier}+r" = "mode resize";
"${modifier}+Return" = "exec kitty";
- };
+ } config.swarselsystems.keybindings;
modes = {
resize = {
Down = "resize grow height 10 px or 10 ppt";
@@ -8941,8 +8942,8 @@ Currently, I am too lazy to explain every option here, but most of it is very se
{ pkgs, ... }:
@@ -9977,7 +9978,7 @@ The standard Emacs behaviour for the Python process shell is a bit annoying. Thi
This function searches for common delimiters in region and removes them, summarizing all captured lines by it. @@ -10010,7 +10011,7 @@ This function searches for common delimiters in region and removes them, summari
This formats the org code block at point in accordance to the nixpkgs-fmt formatter
@@ -11583,8 +11584,8 @@ This adds a rudimentary nix-mode to Emacs. I have not really tried this out, as
Adds functions for formatting nix code. @@ -13599,7 +13600,7 @@ My laptop, sadly soon to be replaced by a new one, since most basic functions ar