From 183c04212f21e1ca1602ea7e4b394ba43720401f Mon Sep 17 00:00:00 2001 From: Swarsel Date: Thu, 11 Jul 2024 16:40:50 +0200 Subject: [PATCH] chore: refine yubikey settings --- SwarselSystems.org | 30 +- index.html | 708 ++++++------------------- profiles/TEMPLATE/home.nix | 6 +- profiles/TEMPLATE/nixos.nix | 1 + profiles/common/home.nix | 263 +-------- profiles/common/nixos.nix | 16 +- profiles/fourside/home.nix | 7 +- profiles/fourside/nixos.nix | 6 +- profiles/onett/home.nix | 6 +- profiles/onett/nixos.nix | 1 + profiles/sandbox/nixos.nix | 2 +- profiles/server1/jellyfin/nixos.nix | 2 +- profiles/server1/matrix/nixos.nix | 1 - profiles/surface/home.nix | 1 + profiles/threed/home.nix | 6 +- profiles/threed/nixos.nix | 1 + programs/emacs/init.el | 2 + programs/firefox/tridactyl/tridactylrc | 12 + 18 files changed, 227 insertions(+), 844 deletions(-) diff --git a/SwarselSystems.org b/SwarselSystems.org index 1a44ea0..0a56d58 100644 --- a/SwarselSystems.org +++ b/SwarselSystems.org @@ -105,7 +105,7 @@ These blocks are used in several places throughout the configurations, but not o These blocks are to be used on systems that are not running NixOS. For example, one such system would be a Fedora system running home manager, where the respective NixOS features might not be available. -*** Theme +*** Theme (stylix) :PROPERTIES: :CUSTOM_ID: h:5bc1b0c9-dc59-4c81-b5b5-e60699deda78 :END: @@ -270,10 +270,12 @@ I also enable the extra socket here for ssh agent forwarding. But I have not ful enable = true; enableSshSupport = true; enableExtraSocket = true; - pinentryPackage = pkgs.pinentry-gtk2; + pinentryPackage = pkgs.pinentry.gtk2; + defaultCacheTtl = 600; + maxCacheTtl = 7200; extraConfig = '' - allow-emacs-pinentry allow-loopback-pinentry + allow-emacs-pinentry ''; }; @@ -4782,14 +4784,17 @@ Mostly used to install some compilers and lsp's that I want to have available wh yubikey-personalization yubikey-personalization-gui yubico-pam - # yubioath-flutter - # yubikey-manager - # yubikey-manager-qt + yubioath-flutter + yubikey-manager + yubikey-manager-qt yubico-piv-tool + cfssl + pcsctools + pcscliteWithPolkit.out # pinentry # theme related - gnome.adwaita-icon-theme + adwaita-icon-theme # kde-connect xdg-desktop-portal @@ -6360,7 +6365,6 @@ The rest of this configuration is found here: tooltip-format= "{:%Y %B}\n{calendar}"; }; - pulseaudio= { format= "{icon} {volume:2}%"; format-bluetooth= "{icon} {volume}%"; @@ -9291,9 +9295,19 @@ Also, Emacs needs a little extra love to accept my Yubikey for git commits etc. ("~/.dotfiles/" . 0))) :custom (magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1)) ; stay in the same window +#+end_src + +* Yubikey support + +The following settings are needed to make sure emacs works for magit commits and pushes. It is not a beautiful solution since commiting uses pinentry-emacs and pushing uses pinentry-gtk2, but it works for now at least. + +#+begin_src emacs-lisp + ;; yubikey support for pushing commits ;; commiting is enabled through nixos gpg-agent config + (use-package pinentry) + (pinentry-start) (setq epg-pinentry-mode 'loopback) (setenv "SSH_AUTH_SOCK" (string-chop-newline (shell-command-to-string "gpgconf --list-dirs agent-ssh-socket"))) #+end_src diff --git a/index.html b/index.html index 38cf104..b2036b2 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + SwarselSystems: NixOS + Emacs Configuration @@ -206,7 +206,7 @@ + +
  • 5. Yubikey support + @@ -369,7 +377,7 @@

    -This file has 40741 words spanning 10531 lines and was last revised on 2024-07-11 10:18:39 +0200. +This file has 40302 words spanning 10289 lines and was last revised on 2024-07-11 18:36:06 +0200.

    @@ -419,7 +427,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-11 10:18:39 +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-11 18:36:06 +0200)

  • @@ -431,7 +439,7 @@ system-configuration-options
    ---prefix=/nix/store/lymgpfqr5dp1wc0khbcbhhjnxq8ccsy9-emacs-pgtk-20240521.0 --disable-build-details --with-modules --with-pgtk --with-compress-install --with-toolkit-scroll-bars --with-native-compilation --without-imagemagick --with-mailutils --without-small-ja-dic --with-tree-sitter --without-xinput2 --with-xwidgets --with-dbus --with-selinux
    +--prefix=/nix/store/y5vn4lfxjh26r0pglhq102zg6gzx1hwm-emacs-pgtk-20240711.0 --disable-build-details --with-modules --with-pgtk --with-compress-install --with-toolkit-scroll-bars --with-native-compilation --without-imagemagick --with-mailutils --without-small-ja-dic --with-tree-sitter --without-xinput2 --with-xwidgets --with-dbus --with-selinux
     
    @@ -483,8 +491,6 @@ window.addEventListener('load', addDarkmodeWidget); - -

    2. Noweb-Ref blocks

    @@ -492,7 +498,6 @@ window.addEventListener('load', addDarkmodeWidget); These blocks are used in several places throughout the configurations, but not on all machines necessarily. For example, the theming section needs to be in a NixOS block on NixOS machines but in a home-manager block on non-NixOS. This serves to reduce code duplication.

    -

    2.1. Non-NixOS

    @@ -500,9 +505,8 @@ These blocks are used in several places throughout the configurations, but not o These blocks are to be used on systems that are not running NixOS. For example, one such system would be a Fedora system running home manager, where the respective NixOS features might not be available.

    -
    -

    2.1.1. Theme

    +

    2.1.1. Theme (stylix)

    This is where the theme for the whole OS is defined. This noweb-ref section cannot be copied to the general NixOS config for now since they are on different folder structure levels in the config, which would make the flake impure. @@ -515,6 +519,7 @@ For styling, I am using the stylix

     stylix = {
    +  enable = true;
       base16Scheme = ../../wallpaper/swarsel.yaml;
       # base16Scheme = "${pkgs.base16-schemes}/share/themes/shapeshifter.yaml";
       polarity = "dark";
    @@ -673,7 +678,6 @@ Do not that syncthingtray is also not mentioned here. It is install
     
    -

    2.1.5. gpg-agent

    @@ -695,10 +699,12 @@ services.gpg-agent = { enable = true; enableSshSupport = true; enableExtraSocket = true; - pinentryPackage = pkgs.pinentry-gtk2; + pinentryPackage = pkgs.pinentry.gtk2; + defaultCacheTtl = 600; + maxCacheTtl = 7200; extraConfig = '' - allow-emacs-pinentry allow-loopback-pinentry + allow-emacs-pinentry ''; }; @@ -707,7 +713,6 @@ services.gpg-agent = {
    -

    2.2. NixOS

    @@ -715,7 +720,6 @@ services.gpg-agent = { These settings are to be used only on full NixOS setups.

    -

    2.2.1. Wrap with hardware-configuration

    @@ -738,7 +742,6 @@ imports =
    -

    2.2.2. Virtual hosts init

    @@ -825,7 +828,6 @@ environment.shellAliases = {
    -

    2.3. flake.nix

    @@ -837,7 +839,6 @@ Handling the flake.nix file used to be a bit of a chore, since it felt like writ These blocks are later inserted here: flake.nix template. Adding new flake inputs is very easy, you just add them to Inputs & Inputs@Outputs first by name in the first source-block, and then the path in the second source-block. Any variables to be set for the host configuration are done in let, and the specific setup is done in either nixosConfigurations (for NixOS systems), homeConfigurations (for home-manager systems), or nixOnDroidConfigurations (for Nix on Android). There is also the nixos-generators section that currently just defines a Proxmox LXC image.

    -

    2.3.1. Inputs & Inputs@Outputs

    @@ -856,6 +857,7 @@ Mind the comma at the end. You need this because the ... is being p
     nixpkgs,
    +nixpkgs-stable,
     home-manager,
     nix-on-droid,
     nixos-generators,
    @@ -865,7 +867,6 @@ nixgl,
     stylix,
     sops-nix,
     lanzaboote,
    -nixpkgs-mautrix-signal,
     nix-gaming,
     nixos-hardware,
     nix-alien,
    @@ -910,6 +911,7 @@ This is supposed to allow me to run unpatched libraries directly without a need
     
     nixpkgs.url = github:nixos/nixpkgs/nixos-unstable;
     
    +nixpkgs-stable.url = github:NixOS/nixpkgs/nixos-24.05;
     
     # user-level configuration
     home-manager = {
    @@ -952,11 +954,6 @@ nixos-generators = {
       inputs.nixpkgs.follows = "nixpkgs";
     };
     
    -# provides expressions for mautrix-signal
    -nixpkgs-mautrix-signal ={
    -  url = github:niklaskorz/nixpkgs/nixos-23.11-mautrix-signal;
    -};
    -
     # patches for gaming on nix
     nix-gaming = {
       url = github:fufexan/nix-gaming;
    @@ -998,6 +995,11 @@ pkgs = import nixpkgs { inherit system;
                             overlays = [ emacs-overlay.overlay
                                          nur.overlay
                                          nixgl.overlay
    +                                     (final: _prev: {
    +                                       stable = import nixpkgs-stable {
    +                                         inherit (final) system config;
    +                                       };
    +                                     })
                                        ];
                             config.allowUnfree = true;
                           };
    @@ -1011,9 +1013,6 @@ armpkgs = import nixpkgs { system = "aarch64-linux";
                             config.allowUnfree = true;
                           };
     
    -pkgsmautrix = import nixpkgs-mautrix-signal { inherit system;
    -                        config.allowUnfree = true;
    -                      };
     
     # NixOS modules that can only be used on NixOS systems
     nixModules = [ stylix.nixosModules.stylix
    @@ -1063,8 +1062,7 @@ onett = nixpkgs.lib.nixosSystem {
     };
     
     sandbox = nixpkgs.lib.nixosSystem {
    -  pkgs = pkgsmautrix;
    -  specialArgs.unstable = nixpkgs-mautrix-signal;
    +  specialArgs = {inherit inputs pkgs; };
       modules = [
         sops-nix.nixosModules.sops
         ./profiles/sandbox/nixos.nix
    @@ -1158,11 +1156,9 @@ transmission = nixpkgs.lib.nixosSystem {
     };
     
     matrix = nixpkgs.lib.nixosSystem {
    -  # specialArgs = {inherit pkgsmautrix; };
    -  pkgs = pkgsmautrix;
    +  specialArgs = {inherit inputs pkgs; };
       # this is to import a service module that is not on nixpkgs
       # this way avoids infinite recursion errors
    -  specialArgs.unstable = nixpkgs-mautrix-signal;
       modules = [
         sops-nix.nixosModules.sops
         ./profiles/server1/matrix/nixos.nix
    @@ -1204,11 +1200,7 @@ sync = nixpkgs.lib.nixosSystem {
     
     #ovm swarsel
     swatrix = nixpkgs.lib.nixosSystem {
    -  # specialArgs = {inherit pkgsmautrix; };
    -  pkgs = pkgsmautrix;
    -  # this is to import a service module that is not on nixpkgs
    -  # this way avoids infinite recursion errors
    -  specialArgs.unstable = nixpkgs-mautrix-signal;
    +  specialArgs = {inherit inputs pkgs; };
       modules = [
         sops-nix.nixosModules.sops
         ./profiles/remote/oracle/matrix/nixos.nix
    @@ -1238,7 +1230,6 @@ In contrast, this defines home-manager systems, which I only have one of.
     
    -

    2.3.5. nixOnDroidConfigurations

    @@ -1258,7 +1249,6 @@ default = nix-on-droid.lib.nixOnDroidConfiguration {
    -

    2.3.6. nixos-generators

    @@ -1297,12 +1287,10 @@ proxmox-lxc = nixos-generators.nixosGenerate {
    -

    3. System

    -

    3.1. System specific configuration

    @@ -1314,7 +1302,6 @@ This section mainly exists house different `configuration.nix` files for system Important: Think about if a settings really needs to go into this area - chances are that the settings can also go to the general settings, which is to be preferred in order to reduce code duplication.

    -

    3.1.1. Template (for new machines)

    @@ -1330,7 +1317,6 @@ If a non-NixOS host must be used, check the Surface configuration for pointers. No matter what you do, check the initial /etc/nixos/configuration.nix for notable changes that might emerge in future versions of nix.

    -
    1. NixOS
      @@ -1371,6 +1357,7 @@ No matter what you do, check the initial /etc/nixos/configuration.nix for notabl stylix.image = ../../wallpaper/TEMPLATEwp.png; stylix = { + enable = true; base16Scheme = ../../wallpaper/swarsel.yaml; # base16Scheme = "${pkgs.base16-schemes}/share/themes/shapeshifter.yaml"; polarity = "dark"; @@ -1442,7 +1429,6 @@ No matter what you do, check the initial /etc/nixos/configuration.nix for notabl
    -
  • Home Manager
    @@ -1456,10 +1442,12 @@ No matter what you do, check the initial /etc/nixos/configuration.nix for notabl enable = true; enableSshSupport = true; enableExtraSocket = true; - pinentryPackage = pkgs.pinentry-gtk2; + pinentryPackage = pkgs.pinentry.gtk2; + defaultCacheTtl = 600; + maxCacheTtl = 7200; extraConfig = '' - allow-emacs-pinentry allow-loopback-pinentry + allow-emacs-pinentry ''; }; @@ -1592,7 +1580,6 @@ No matter what you do, check the initial /etc/nixos/configuration.nix for notabl
  • -

    3.1.2. Physical hosts

    @@ -1604,7 +1591,6 @@ No matter what you do, check the initial /etc/nixos/configuration.nix for notabl My Surface Pro 3, only used for on-the-go university work. Be careful when pushing large changes to this machine, as it easily runs out of memory on large switches. At the moment the only machine running non-NixOS, so special care must be taken not to break this one during updates.

    -
    1. Channel setup
      @@ -1631,7 +1617,6 @@ This is needed in order to use EGL. Prefix programs that use it with `nixGL`

    2. -
    3. Home manager

      @@ -1652,6 +1637,7 @@ Special things to note here: We are running xcape to allow CAPS to stylix.image = ../../wallpaper/surfacewp.png; stylix = { + enable = true; base16Scheme = ../../wallpaper/swarsel.yaml; # base16Scheme = "${pkgs.base16-schemes}/share/themes/shapeshifter.yaml"; polarity = "dark"; @@ -1823,14 +1809,12 @@ gpgconf --launch gpg-agent

    -
  • Onett (Lenovo Y510P)

    My laptop, sadly soon to be replaced by a new one, since most basic functions are stopping to work lately.

    -
    1. NixOS
      @@ -1873,6 +1857,7 @@ My laptop, sadly soon to be replaced by a new one, since most basic functions ar stylix.image = ../../wallpaper/lenovowp.png; stylix = { + enable = true; base16Scheme = ../../wallpaper/swarsel.yaml; # base16Scheme = "${pkgs.base16-schemes}/share/themes/shapeshifter.yaml"; polarity = "dark"; @@ -1948,7 +1933,6 @@ My laptop, sadly soon to be replaced by a new one, since most basic functions ar
  • -
  • Home Manager
    @@ -1962,10 +1946,12 @@ My laptop, sadly soon to be replaced by a new one, since most basic functions ar enable = true; enableSshSupport = true; enableExtraSocket = true; - pinentryPackage = pkgs.pinentry-gtk2; + pinentryPackage = pkgs.pinentry.gtk2; + defaultCacheTtl = 600; + maxCacheTtl = 7200; extraConfig = '' - allow-emacs-pinentry allow-loopback-pinentry + allow-emacs-pinentry ''; }; @@ -2090,14 +2076,12 @@ My laptop, sadly soon to be replaced by a new one, since most basic functions ar
  • -
  • Threed (Surface Pro 3)

    New setup for the SP3, this time using NixOS - another machine will take over the HM-only config for compatibility in the future.

    -
    1. NixOS
      @@ -2142,6 +2126,7 @@ New setup for the SP3, this time using NixOS - another machine will take over th stylix.image = ../../wallpaper/surfacewp.png; stylix = { + enable = true; base16Scheme = ../../wallpaper/swarsel.yaml; # base16Scheme = "${pkgs.base16-schemes}/share/themes/shapeshifter.yaml"; polarity = "dark"; @@ -2207,7 +2192,6 @@ New setup for the SP3, this time using NixOS - another machine will take over th
  • -
  • Home Manager
    @@ -2221,10 +2205,12 @@ New setup for the SP3, this time using NixOS - another machine will take over th enable = true; enableSshSupport = true; enableExtraSocket = true; - pinentryPackage = pkgs.pinentry-gtk2; + pinentryPackage = pkgs.pinentry.gtk2; + defaultCacheTtl = 600; + maxCacheTtl = 7200; extraConfig = '' - allow-emacs-pinentry allow-loopback-pinentry + allow-emacs-pinentry ''; }; @@ -2328,14 +2314,12 @@ New setup for the SP3, this time using NixOS - another machine will take over th
  • -
  • Fourside (Lenovo Thinkpad P14s Gen2)

    My new main machine.

    -
    1. NixOS
      @@ -2405,6 +2389,7 @@ Mostly just sets some opened ports for several games, enables virtualbox (which stylix.image = ../../wallpaper/lenovowp.png; stylix = { + enable = true; base16Scheme = ../../wallpaper/swarsel.yaml; # base16Scheme = "${pkgs.base16-schemes}/share/themes/shapeshifter.yaml"; polarity = "dark"; @@ -2453,10 +2438,9 @@ Mostly just sets some opened ports for several games, enables virtualbox (which hardware = { - opengl = { + graphics = { enable = true; - driSupport = true; - driSupport32Bit = true; + enable32Bit = true; extraPackages = with pkgs; [ vulkan-loader vulkan-validation-layers @@ -2510,7 +2494,6 @@ Mostly just sets some opened ports for several games, enables virtualbox (which
    2. -
    3. Home Manager

      @@ -2528,10 +2511,12 @@ This is basically just adjusted to the core count, path to the hwmonhwmonhwmon

    -

    3.1.3. Virtual hosts

    @@ -2666,7 +2651,6 @@ My server setup is built on Proxmox VE; back when I started, I created all kinds In the long run, I am thinking about a transition to kubernetes or using just a server running NixOS and using the built-in container functionality. For now however, I like the network management provided by Proxmox, as I am a bit intimidated by doing that from scratch.

    -
    1. TEMPLATE
      @@ -2720,7 +2704,6 @@ In the long run, I am thinking about a transition to kubernetes or using just a
  • -
  • NGINX
    @@ -2938,7 +2921,6 @@ In the long run, I am thinking about a transition to kubernetes or using just a
  • -
  • [Manual steps required] Calibre

    @@ -2969,7 +2951,6 @@ This machine requires manual setup: In general, I am not amazed by this setup; Kavita is the reader of choice, calibre-web mostly is there to have a convenient way to fullfill the opinionated folder structure when uploading ebooks (calibre-web does not work on its own since it forces sqlite which does not work nicely with my NFS book store). I hope that in the future Kavita will implement ebook upload, or that calibre-web will ditch the sqlite constraints.

    -
    1. NixOS
      @@ -3083,7 +3064,6 @@ In general, I am not amazed by this setup; Kavita is the reader of choice, calib
  • -
  • Jellyfin
    @@ -3152,7 +3132,7 @@ In general, I am not amazed by this setup; Kavita is the reader of choice, calib nixpkgs.config.packageOverrides = pkgs: { vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; }; }; - hardware.opengl = { + hardware.graphics = { enable = true; extraPackages = with pkgs; [ intel-media-driver # LIBVA_DRIVER_NAME=iHD @@ -3176,14 +3156,12 @@ In general, I am not amazed by this setup; Kavita is the reader of choice, calib
  • -
  • [WIP/Incomplete/Untested] Transmission

    This stuff just does not work, I seem to be unable to create a working VPN Split Tunneling on NixOS. Maybe this is introduced by the wonky Proxmox-NixOS container interaction, I am not sure. For now, this machine does not work at all and I am stuck with my Debian Container that does this for me …

    -
    1. NixOS
      @@ -3554,7 +3532,6 @@ This stuff just does not work, I seem to be unable to create a working VPN Split
  • -
  • [Manual steps needed] Matrix
      @@ -3580,7 +3557,6 @@ Make sure to also do this for doublepuppet.yaml
    1. Restart postgresql.service, matrix-synapse.service, mautrix-whatsapp.service, mautrix-telegram.service
    -
    1. NixOS
      @@ -3624,7 +3600,6 @@ in { ./hardware-configuration.nix # we import here a service that is not available yet on normal nixpkgs # this module is hence not in the modules list, we add it ourselves - (unstable + "/nixos/modules/services/matrix/mautrix-signal.nix") ]; networking.hostName = "matrix"; # Define your hostname. @@ -3889,7 +3864,6 @@ in {
  • -
  • Sound
    @@ -4036,7 +4010,6 @@ in {
  • -
  • Spotifyd
    @@ -4137,7 +4110,6 @@ in {
  • -
  • Sync
    @@ -4313,7 +4285,6 @@ in {
  • -
  • [Manual steps required] Swatrix
    @@ -4724,7 +4695,6 @@ in {
  • -
  • Paperless
    @@ -4820,14 +4790,12 @@ in {
  • -
  • Sandbox (Lenovo Y510P)

    My laptop, sadly soon to be replaced by a new one, since most basic functions are stopping to work lately.

    -
    1. NixOS
      @@ -5072,7 +5040,7 @@ networking.hostId = "8a8ad84a"; # vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; }; # }; - hardware.opengl = { + hardware.graphics = { enable = true; extraPackages = with pkgs; [ intel-media-driver # LIBVA_DRIVER_NAME=iHD @@ -5717,12 +5685,10 @@ networking.hostId = "8a8ad84a"; These are system-level settings specific to NixOS machines. All settings that are required on all machines go here.

      -

      3.2.1. General

      -
      1. Enable home-manager module
        @@ -5742,7 +5708,6 @@ First, we enable the use of home-manager as a NixoS module
    2. -
    3. Setup login keymap

      @@ -5759,7 +5724,6 @@ Next, we setup the keymap in case we are not in a graphical session. At this poi

    4. -
    5. Enable flakes and nix-command

      @@ -5774,7 +5738,6 @@ nix.settings.experimental-features = ["nix-command" "flakes"];

    6. -
    7. Environment setup

      @@ -5800,7 +5763,6 @@ Next, we will setup some environment variables that need to be set on the system

    8. -
    9. Make sure time is consistent in windows dualboot

      @@ -5815,7 +5777,6 @@ time.hardwareClockInLocalTime = true;

    10. -
    11. Disallow stylix from styling grub

      @@ -5831,7 +5792,6 @@ stylix.targets.grub.enable = false; # the styling makes grub more ugly

    12. -
    13. Enable PolicyKit

      @@ -5846,8 +5806,7 @@ security.polkit.enable = true;

    14. - -
    15. Enable automatic garbage collection
      +
    16. Enable automatic garbage collection

      The nix store fills up over time, until /boot/efi is filled. This snippet cleans it automatically on a weekly basis. @@ -5866,8 +5825,7 @@ nix.gc = {

    17. - -
    18. Enable automatic store optimisation
      +
    19. Enable automatic store optimisation

      This enables hardlinking identical files in the nix store, to save on disk space. I have read this incurs a significant I/O overhead, I need to keep an eye on this. @@ -5884,7 +5842,6 @@ nix.optimise = {

    20. -
    21. Reduce systemd timeouts

      @@ -5904,7 +5861,6 @@ There is a persistent bug over Linux kernels that makes the user wait 1m30s on s

    22. -
    23. Hardware settings

      @@ -5913,10 +5869,9 @@ Enable OpenGL, Sound, Bluetooth and various drivers.

      -hardware.opengl = {
      +hardware.graphics = {
         enable = true;
      -  driSupport = true;
      -  driSupport32Bit = true;
      +  enable32Bit = true;
       };
       
       sound.enable = true;
      @@ -5938,7 +5893,6 @@ hardware.bluetooth.settings = {
       
    24. -
    25. Common network settings

      @@ -5953,7 +5907,6 @@ networking.networkmanager.enable = true;

    26. -
    27. Locale settings

      @@ -5983,7 +5936,6 @@ i18n.extraLocaleSettings = {

    -

    3.2.2. System Packages

    @@ -5999,14 +5951,17 @@ environment.systemPackages = with pkgs; [ yubikey-personalization yubikey-personalization-gui yubico-pam - # yubioath-flutter - # yubikey-manager - # yubikey-manager-qt + yubioath-flutter + yubikey-manager + yubikey-manager-qt yubico-piv-tool + cfssl + pcsctools + pcscliteWithPolkit.out # pinentry # theme related - gnome.adwaita-icon-theme + adwaita-icon-theme # kde-connect xdg-desktop-portal @@ -6069,7 +6024,6 @@ environment.systemPackages = with pkgs; [
    -

    3.2.3. Programs (including zsh setup)

    @@ -6095,7 +6049,6 @@ environment.pathsToLink = [ "/share/zsh" ];
    -

    3.2.4. Services

    @@ -6103,7 +6056,6 @@ environment.pathsToLink = [ "/share/zsh" ]; Setting up some hardware services as well as keyboard related settings. Here we make sure that we can use the CAPS key as a ESC/CTRL double key, which is a lifesaver.

    -
    1. blueman
      @@ -6119,7 +6071,6 @@ services.blueman.enable = true;
  • -
  • Detect Scanners over network

    @@ -6138,7 +6089,6 @@ hardware.sane = {

  • -
  • Detect Printers over network

    @@ -6172,7 +6122,6 @@ BrowseProtocols all

  • -
  • enable GVfs

    @@ -6187,7 +6136,6 @@ services.gvfs.enable = true;

  • -
  • interception-tools: Make CAPS work as ESC/CTRL

    @@ -6227,7 +6175,6 @@ services.interception-tools = {

  • -

    3.2.5. Yubikey settings

    @@ -6266,7 +6213,6 @@ services.udev.packages = with pkgs; [
    -

    3.2.6. System Login

    @@ -6300,7 +6246,6 @@ environment.etc."greetd/environments".text = ''
    -

    3.3. Common Home-Manager

    @@ -6320,7 +6265,6 @@ Also, I define some useful shell scripts here. Programming languages and default lsp's are defined here: System Packages

    -
    1. Packaged
      @@ -6337,13 +6281,13 @@ Programming languages and default lsp's are defined here: Self-defined
      @@ -6643,7 +6586,6 @@ Programming languages and default lsp's are defined here:

      3.3.2. sops

      @@ -6673,7 +6615,6 @@ sops.secrets.caldav = {path = "${config.home.homeDirectory}/.emacs.d/.caldav";};
      -

      3.3.3. SSH Machines

      @@ -6818,7 +6759,6 @@ programs.ssh= {
      -

      3.3.4. Fonts + Theme

      @@ -6838,7 +6778,6 @@ stylix.targets.emacs.enable = false;
    -

    3.3.5. Desktop Entries

    @@ -6892,7 +6831,6 @@ xdg.desktopEntries = {
    -

    3.3.6. Linking dotfiles

    @@ -6944,7 +6882,6 @@ xdg.configFile = {
    -

    3.3.7. Sourcing environment variables

    @@ -6958,7 +6895,6 @@ home.sessionVariables = {
    -

    3.3.8. Programs

    @@ -6966,7 +6902,6 @@ home.sessionVariables = { This houses the configurations for all programs managed by home-manager.

    -
    1. General Programs: bottom, imv, sioyek, bat, carapace, wlogout, swayr, yt-dlp, mpv, jq, nix-index, ripgrep, pandoc, fzf
      @@ -6999,7 +6934,6 @@ programs.zoxide.enable = true;
    -

    3.3.9. password-store

    @@ -7018,7 +6952,6 @@ programs.password-store = {
    -

    3.3.10. direnv

    @@ -7037,7 +6970,6 @@ programs.direnv = {
    -

    3.3.11. eza

    @@ -7061,7 +6993,6 @@ programs.eza = {
    -

    3.3.12. git

    @@ -7112,7 +7043,6 @@ programs.git = {
    -

    3.3.13. Fuzzel

    @@ -7138,7 +7068,6 @@ programs.fuzzel = {
    -

    3.3.14. Starship

    @@ -7256,7 +7185,6 @@ programs.starship = {
    -

    3.3.15. Kitty

    @@ -7284,7 +7212,6 @@ programs.kitty = {
    -

    3.3.16. zsh

    @@ -7351,7 +7278,6 @@ programs.zsh = {
    -

    3.3.17. Mail

    @@ -7493,7 +7419,6 @@ accounts.email = {
    -

    3.3.18. Home-manager: Emacs

    @@ -7519,7 +7444,7 @@ programs.emacs = { extraEmacsPackages = epkgs: [ epkgs.mu4e epkgs.use-package - epkgs.lsp-bridge + # epkgs.lsp-bridge epkgs.doom-themes # build the rest of the packages myself @@ -7557,7 +7482,6 @@ programs.emacs = {
    -

    3.3.19. Waybar

    @@ -7691,7 +7615,6 @@ programs.waybar = { tooltip-format= "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>"; }; - pulseaudio= { format= "{icon} {volume:2}%"; format-bluetooth= "{icon} {volume}%"; @@ -7764,244 +7687,13 @@ programs.waybar = { }; }; }; - - style = '' - @define-color foreground #fdf6e3; - @define-color background #1a1a1a; - @define-color background-alt #292b2e; - @define-color foreground-warning #268bd2; - @define-color background-warning @background; - @define-color foreground-error red; - @define-color background-error @background; - @define-color foreground-critical gold; - @define-color background-critical blue; - - - * { - border: none; - border-radius: 0; - font-family: "FiraCode Nerd Font Propo", "Font Awesome 5 Free"; - font-size: 14px; - min-height: 0; - margin: -1px 0px; - } - - window#waybar { - background: transparent; - color: @foreground; - transition-duration: .5s; - } - - window#waybar.hidden { - opacity: 0.2; - } - - - #mpris { - padding: 0 10px; - background-color: transparent; - color: #1DB954; - font-family: Monospace; - font-size: 12px; - } - - #custom-right-arrow-dark, - #custom-left-arrow-dark { - color: @background; - background: @background-alt; - font-size: 24px; - } - - #window { - font-size: 12px; - padding: 0 20px; - } - - #mode { - background: @background-critical; - color: @foreground-critical; - padding: 0 3px; - } - - #custom-configwarn { - color: black; - padding: 0 3px; - animation-name: configblink; - animation-duration: 0.5s; - animation-timing-function: linear; - animation-iteration-count: infinite; - animation-direction: alternate; - } - - #custom-outer-right-arrow-dark, - #custom-outer-left-arrow-dark { - color: @background; - font-size: 24px; - } - - #custom-outer-left-arrow-dark, - #custom-left-arrow-dark, - #custom-left-arrow-light { - margin: 0 -1px; - } - - #custom-right-arrow-light, - #custom-left-arrow-light { - color: @background-alt; - background: @background; - font-size: 24px; - } - - #workspaces, - #clock.1, - #clock.2, - #clock.3, - #pulseaudio, - #memory, - #cpu, - #temperature, - #power-profiles-daemon, - #mpris, - #tray { - background: @background; - } - - #network, - #clock.2, - #battery, - #cpu, - #custom-pseudobat, - #disk { - background: @background-alt; - } - - - #workspaces button { - padding: 0 2px; - color: #fdf6e3; - } - #workspaces button.focused { - color: @foreground-warning; - } - - #workspaces button:hover { - background: @foreground; - color: @background; - border: @foreground; - padding: 0 2px; - box-shadow: inherit; - text-shadow: inherit; - } - - #workspaces button.urgent { - color: @background-critical; - background: @foreground-critical; - } - - #network { - color: #cc99c9; - } - - #temperature, - #power-profiles-daemon { - color: #9ec1cf; - } - - #disk { - /*color: #b58900;*/ - color: #9ee09e; - } - - #disk.warning { - color: @foreground-error; - background-color: @background-error; - } - #disk.critical, - #temperature.critical { - color: @foreground-critical; - background-color: @background-critical; - animation-name: blink; - animation-duration: 0.5s; - animation-timing-function: linear; - animation-iteration-count: infinite; - animation-direction: alternate; - } - #pulseaudio.muted { - color: @foreground-error; - } - #memory { - /*color: #2aa198;*/ - color: #fdfd97; - } - #cpu { - /*color: #6c71c4;*/ - color: #feb144; - } - - #pulseaudio { - /*color: #268bd2;*/ - color: #ff6663; - } - - #battery, - #custom-pseudobat { - color: cyan; - } - #battery.discharging { - color: #859900; - } - - @keyframes blink { - to { - color: @foreground-error; - background-color: @background-error; - } - } - @keyframes configblink { - to { - color: @foreground-error; - background-color: transparent; - } - } - - #battery.critical:not(.charging) { - color: @foreground-critical; - background-color: @background-critical; - animation-name: blink; - animation-duration: 0.5s; - animation-timing-function: linear; - animation-iteration-count: infinite; - animation-direction: alternate; - } - - #clock.1, - #clock.2, - #clock.3 { - font-family: Monospace; - } - - #clock, - #pulseaudio, - #memory, - #cpu, - #tray, - #temperature, - #power-profiles-daemon, - #network, - #mpris, - #battery, - #custom-pseudobat, - #disk { - padding: 0 3px; - } - ''; + style = (builtins.readFile ../../programs/waybar/style.css); };
    -

    3.3.20. Firefox

    @@ -8154,7 +7846,6 @@ programs.firefox = {
    -

    3.3.21. Services

    @@ -8162,7 +7853,6 @@ programs.firefox = { Services that can be defined through home-manager should be defined here.

    -
    1. gnome-keyring
      @@ -8180,7 +7870,6 @@ services.gnome-keyring = {
    -
  • mbsync

    @@ -8197,7 +7886,6 @@ services.mbsync = {

  • -
  • KDE Connect

    @@ -8215,7 +7903,6 @@ services.kdeconnect = {

  • -
  • syncthing

    @@ -8235,7 +7922,6 @@ services.syncthing = {

  • -
  • Emacs server

    @@ -8253,7 +7939,6 @@ services.emacs = {

  • -
  • Mako

    @@ -8300,7 +7985,6 @@ group-by=category

  • -

    3.3.22. Sway

    @@ -8420,22 +8104,6 @@ wayland.windowManager.sway = { assigns = { "1:一" = [{ app_id = "firefox"; }]; }; - colors = { - focused = { - # background = "#080808"; - # border = "#80a0ff"; - # childBorder = "#80a0ff"; - # indicator = "#080808"; - # text = "#ffd700"; - }; - unfocused = { - # background = "#080808"; - # border = "#80a0ff"; - # childBorder = "#303030"; - # indicator = "#80a0ff"; - # text = "#c6c6c6"; - }; - }; floating = { border = 1; criteria = [ @@ -8597,7 +8265,6 @@ wayland.windowManager.sway = {
    -

    3.4. flake.nix template and Closing Parenthesis (this needs to be the last heading in the Systems header)

    -

    3.4.2. flake.nix

    @@ -8645,6 +8310,7 @@ This tangles the flake.nix file; This block only needs to be touched when updati nixpkgs.url = github:nixos/nixpkgs/nixos-unstable; + nixpkgs-stable.url = github:NixOS/nixpkgs/nixos-24.05; # user-level configuration home-manager = { @@ -8687,11 +8353,6 @@ This tangles the flake.nix file; This block only needs to be touched when updati inputs.nixpkgs.follows = "nixpkgs"; }; - # provides expressions for mautrix-signal - nixpkgs-mautrix-signal ={ - url = github:niklaskorz/nixpkgs/nixos-23.11-mautrix-signal; - }; - # patches for gaming on nix nix-gaming = { url = github:fufexan/nix-gaming; @@ -8713,6 +8374,7 @@ This tangles the flake.nix file; This block only needs to be touched when updati self, nixpkgs, + nixpkgs-stable, home-manager, nix-on-droid, nixos-generators, @@ -8722,7 +8384,6 @@ This tangles the flake.nix file; This block only needs to be touched when updati stylix, sops-nix, lanzaboote, - nixpkgs-mautrix-signal, nix-gaming, nixos-hardware, nix-alien, @@ -8735,6 +8396,11 @@ This tangles the flake.nix file; This block only needs to be touched when updati overlays = [ emacs-overlay.overlay nur.overlay nixgl.overlay + (final: _prev: { + stable = import nixpkgs-stable { + inherit (final) system config; + }; + }) ]; config.allowUnfree = true; }; @@ -8748,9 +8414,6 @@ This tangles the flake.nix file; This block only needs to be touched when updati config.allowUnfree = true; }; - pkgsmautrix = import nixpkgs-mautrix-signal { inherit system; - config.allowUnfree = true; - }; # NixOS modules that can only be used on NixOS systems nixModules = [ stylix.nixosModules.stylix @@ -8798,8 +8461,7 @@ This tangles the flake.nix file; This block only needs to be touched when updati }; sandbox = nixpkgs.lib.nixosSystem { - pkgs = pkgsmautrix; - specialArgs.unstable = nixpkgs-mautrix-signal; + specialArgs = {inherit inputs pkgs; }; modules = [ sops-nix.nixosModules.sops ./profiles/sandbox/nixos.nix @@ -8893,11 +8555,9 @@ This tangles the flake.nix file; This block only needs to be touched when updati }; matrix = nixpkgs.lib.nixosSystem { - # specialArgs = {inherit pkgsmautrix; }; - pkgs = pkgsmautrix; + specialArgs = {inherit inputs pkgs; }; # this is to import a service module that is not on nixpkgs # this way avoids infinite recursion errors - specialArgs.unstable = nixpkgs-mautrix-signal; modules = [ sops-nix.nixosModules.sops ./profiles/server1/matrix/nixos.nix @@ -8939,11 +8599,7 @@ This tangles the flake.nix file; This block only needs to be touched when updati #ovm swarsel swatrix = nixpkgs.lib.nixosSystem { - # specialArgs = {inherit pkgsmautrix; }; - pkgs = pkgsmautrix; - # this is to import a service module that is not on nixpkgs - # this way avoids infinite recursion errors - specialArgs.unstable = nixpkgs-mautrix-signal; + specialArgs = {inherit inputs pkgs; }; modules = [ sops-nix.nixosModules.sops ./profiles/remote/oracle/matrix/nixos.nix @@ -8999,7 +8655,6 @@ This tangles the flake.nix file; This block only needs to be touched when updati In this section I handle my early init file; it takes care of frame-setup for emacsclient buffers.

    -
    -
  • org-mode: Auto-tangle and export Configuration Files

    @@ -9548,7 +9199,6 @@ This section automatically tangles all configuration blocks in this file to the

  • -
  • org-mode: Fold current heading

    @@ -9579,7 +9229,6 @@ However, I want to be able to fold a single heading consistently.

  • -
  • corfu: Do not interrupt navigation

    @@ -9612,7 +9261,6 @@ These functions are used here:

  • -
  • python shell reloading

    @@ -9656,7 +9304,6 @@ The standard Emacs behaviour for the Python process shell is a bit annoying. Thi

  • -

    4.2.2. Custom Keybindings

    @@ -9822,7 +9469,6 @@ In this section I setup some aliases that I use for various directories on my sy
    -

    4.2.4. Unclutter .emacs.d

    @@ -9849,7 +9495,6 @@ This section also sets the emacs directory to the ~/.cache/ directo
    -

    4.2.5. Move backup files to another location

    @@ -9888,7 +9533,6 @@ Many people dislike the Emacs backup files; I do enjoy them, but have to admit t In this general section I have settings that I either consider to be integral to my experience when using emacs or have no other section that I feel they belong to.

    -

    4.3.1. General setup

    @@ -9951,7 +9595,6 @@ Here I set up some things that are too minor to put under other categories.
    -

    4.3.2. Mark all themes as safe

    @@ -9986,7 +9629,6 @@ When Emacs compiles stuff, it often shows a bunch of warnings that I do not need
    -

    4.3.4. Indentation

    @@ -10026,7 +9668,6 @@ Lastly, I load the highlight-indent-guides package. This adds a nea
    -

    4.3.5. Scrolling

    @@ -10057,12 +9698,10 @@ By default, emacs scrolls half a page when reaching the bottom of the buffer. Th
    -

    4.3.6. Evil

    -
    1. General evil
      @@ -10150,7 +9789,6 @@ This package changes the char-search commands like f by showing the
    -
  • evil-cleverparens

    @@ -10165,7 +9803,6 @@ This helps keeping parentheses balanced which is useful when writing in language

  • -
  • evil-surround

    @@ -10185,7 +9822,6 @@ This minor-mode adds functionality for doing better surround-commands; for examp

  • -

    4.3.7. ispell

    @@ -10202,7 +9838,6 @@ This should setup a wordlist that can be used as a dictionary. However, for some
    -

    4.3.8. Font Configuration

    @@ -10231,7 +9866,6 @@ Here I define my fonts to be used. Honestly I do not understand the face-attribu
    -

    4.3.9. Theme

    @@ -10258,7 +9892,6 @@ I have grown to love the doom-citylights theme and have modeled my
    -

    4.3.10. Icons

    @@ -10282,7 +9915,6 @@ Used in:
    -

    4.3.11. Variable Pitch Mode

    @@ -10304,7 +9936,6 @@ This minor mode allows mixing fixed and variable pitch fonts within the same buf
    -

    4.3.12. Modeline

    @@ -10328,7 +9959,6 @@ Here I set up the modeline with some information that I find useful. Specficiall
    -

    4.3.13. Helper Modes

    @@ -10352,7 +9982,6 @@ This set of packages uses the default emacs completion framework and works toget Nerd icons is originally enabled here: Icons

    -
    1. vertico
      @@ -10375,7 +10004,6 @@ Nerd icons is originally enabled here: vertico-directory

      @@ -10397,7 +10025,6 @@ This package allows for Ido-like directory navigation.

    2. -
    3. orderless

      @@ -10416,7 +10043,6 @@ The completion styles that I chose here can possibly still be improved. I need t

    -
  • consult

    @@ -10530,7 +10156,6 @@ As stated above, this simply provides nerd-icons to the completion framework.

  • -
  • Helpful + which-key: Better help defaults

    @@ -10559,7 +10184,6 @@ This pair of packages provides information on keybinds in addition to function n

  • -

    4.3.14. Ligatures

    @@ -10592,7 +10216,6 @@ Personally, I think ligatures are fancy. With this mode, they stay 'cursorable'.
    -

    4.3.15. Popup (popper) + Shackle Buffers

    @@ -10689,7 +10312,6 @@ This section houses all configuration bits that are related to a specific packag At some point this will receive further sorting, but for now this is good enough.

    -

    4.4.1. Org Mode

    @@ -10701,7 +10323,6 @@ org-mode is probably my most-used mode in Emcas. It acts as my organizer, config Note that nearly all headings within the Org-mode heading are coded within the use-package setup, so be very careful about moving stuff about here.

    -
    1. General org-mode
      @@ -10836,7 +10457,6 @@ I wrote these capture templates to allow myself to quickly create Anki cards fro
    -
  • Font Faces

    @@ -10872,7 +10492,6 @@ Again, my understanding of the font-faces in Emacs is limited. This is mostly ju

  • -
  • org-appear

    @@ -10893,7 +10512,6 @@ This package makes emphasis-markers appear when the cursor moves over them. Very

  • -
  • Centered org-mode Buffers

    @@ -10913,7 +10531,6 @@ Function definition in: Visual

  • -
  • Fix headings not folding sometimes

    @@ -10928,7 +10545,6 @@ There is a weird bug in org-mode that makes it so that headings were not folding

  • -
  • Babel

    @@ -10939,7 +10555,6 @@ org-babel allows to run blocks in other programming languages within an org-mode It also offers a very useful utility of exporting org-mode buffers to different formats; the feature I enjoy most is what makes this file useful: the tangling functionality.

    -
    1. Language Configuration
      @@ -10963,7 +10578,6 @@ It also offers a very useful utility of exporting org-mode buffers to different
    2. -
    3. old easy structure templates
        @@ -10990,7 +10604,6 @@ Usage: Type <, followed by one of the below keywords and press <
  • -
  • aucTex

    @@ -11018,7 +10631,6 @@ This provides several utilities for LaTeX in Emacs, including many completions a

  • -
  • org-download

    @@ -11046,7 +10658,6 @@ This package allows to download and copy images into org-mode buffers. Sadly it

  • -
  • org-fragtog

    @@ -11063,7 +10674,6 @@ This package automatically toggles LaTeX-fragments in org-files. It seems to als

  • -
  • org-modern

    @@ -11082,7 +10692,6 @@ This just makes org-mode a little bit more beautiful, mostly by making the

  • -
  • Presentations

    @@ -11215,7 +10824,6 @@ This adds a rudimentary nix-mode to Emacs. I have not really tried this out, as

    -

    4.4.3. Markdown Mode

    @@ -11238,7 +10846,6 @@ This adds a rudimentary nix-mode to Emacs. I have not really tried this out, as
  • -
  • LaTeX in Markdown
    @@ -11255,7 +10862,6 @@ This adds a rudimentary nix-mode to Emacs. I have not really tried this out, as
  • -

    4.4.4. Olivetti

    @@ -11278,7 +10884,6 @@ This mode is not automatically activated anywhere because I only rarely need it.
    -

    4.4.5. darkroom

    @@ -11297,7 +10902,6 @@ This mode is not automatically activated anywhere because I only rarely need it.
    -

    4.4.6. Ripgrep

    @@ -11371,7 +10975,6 @@ In order to update the language grammars, run the next command below.
    -

    4.4.8. direnv (envrc)

    @@ -11385,7 +10988,6 @@ In order to update the language grammars, run the next command below.
    -

    4.4.9. avy

    @@ -11405,7 +11007,6 @@ In order to update the language grammars, run the next command below.
    -

    4.4.10. crdt (Collaborative Editing)

    @@ -11421,7 +11022,6 @@ With this it is possible to work on the same file collaboratively. I have never
    -

    4.4.11. devdocs

    @@ -11458,7 +11058,6 @@ To install a documentation, use the devdocs=install command and sel
    -

    4.4.12. Projectile

    @@ -11484,7 +11083,6 @@ projectile is useful for keeping track of your git projects within Emacs. I most
    -

    4.4.13. Magit

    @@ -11506,18 +11104,33 @@ Also, Emacs needs a little extra love to accept my Yubikey for git commits etc. ("~/.dotfiles/" . 0))) :custom (magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1)) ; stay in the same window + +
    +
    + + + +
    +

    5. Yubikey support

    +
    +

    +The following settings are needed to make sure emacs works for magit commits and pushes. It is not a beautiful solution since commiting uses pinentry-emacs and pushing uses pinentry-gtk2, but it works for now at least. +

    + +
    +
     
     ;; yubikey support for pushing commits
     ;; commiting is enabled through nixos gpg-agent config
    +(use-package pinentry)
    +(pinentry-start)
     (setq epg-pinentry-mode 'loopback)
     (setenv "SSH_AUTH_SOCK" (string-chop-newline (shell-command-to-string "gpgconf --list-dirs agent-ssh-socket")))
     
    -
    -
    -

    4.4.14. Forge

    +

    5.0.1. Forge

    NOTE: Make sure to configure a GitHub token before using this package! @@ -11554,9 +11167,8 @@ NOTE: Make sure to configure a GitHub token before using this package!

    -
    -

    4.4.15. git-timemachine

    +

    5.0.2. git-timemachine

    This is just a nice utility to browse different versions of a file of a git project within Emacs. @@ -11572,9 +11184,8 @@ This is just a nice utility to browse different versions of a file of a git proj

    -
    -

    4.4.16. Delimiters (brackets): rainbow-delimiters, highlight-parentheses

    +

    5.0.3. Delimiters (brackets): rainbow-delimiters, highlight-parentheses

    • rainbow-delimiters colors all delimiters, also ones not in current selection
    • @@ -11616,9 +11227,8 @@ I am not completely sure on electric-pair-mode yet, sometimes it is very helpful
    -
    -

    4.4.17. rainbow-mode

    +

    5.0.4. rainbow-mode

    Complimentary to the delimiters-packages above, this package sets the background color of the delimiters, which makes it easier to see at a glance where we are in a delimiter-tree. @@ -11634,7 +11244,7 @@ Complimentary to the delimiters-packages above, this package sets the background

    -
    -

    4.4.20. rust

    +

    5.0.7. rust

    This sets up rustic-mode with tree-sitter support - there is still one issue to iron out with automatic adding of dependency crates, but everything else works fine now. @@ -11785,9 +11393,8 @@ This sets up rustic-mode with tree-sitter support - there is still one issue to

    -
    -

    4.4.21. Tramp

    +

    5.0.8. Tramp

    Tramp allows for SSH access of files over Emacs. I have no ideas what the options here mean, but this is a recommended configuration that I found (sadly I lost the link). I need to research more what these options really do. @@ -11824,9 +11431,8 @@ Tramp allows for SSH access of files over Emacs. I have no ideas what the option

    -
    -

    4.4.22. diff-hl

    +

    5.0.9. diff-hl

    This is a simple highlighting utility that uses the margin to visually show the differences since the last git commit. @@ -11848,7 +11454,7 @@ This is a simple highlighting utility that uses the margin to visually show the

    -

    4.4.23. Commenting

    +

    5.0.10. Commenting

    This package allows for swift commenting out and in of code snippets. For some reason, it is a bit broken in my config, as it sometimes comments out too much, sometimes too little, and sometimes it splits lines during commenting. Also, in org-mode when inside a src-block, it often times jumps to the top of the block. @@ -11867,9 +11473,8 @@ Still, this is avery convenient package.

    -
    -

    4.4.24. yasnippet

    +

    5.0.11. yasnippet

    yasnippet allows to define snippets that can be quickly expanded by hitting the TAB key after inputting a keyword. @@ -11889,7 +11494,6 @@ I used to run this together with the yasnippet-snippets package, bu

    -
    1. yasnippet math-snippets
      -
      -

      4.4.26. Breadcrumb

      +

      5.0.13. Breadcrumb

      This simple shows the path to the current file on the top of the buffer - I just think it looks kind of neat, even though it is not extremely useful :) @@ -12016,9 +11618,8 @@ This simple shows the path to the current file on the top of the buffer - I just

      -
      -

      4.4.27. Prevent breaking of hardlinks

      +

      5.0.14. Prevent breaking of hardlinks

      This setting ensures that hard links are preserved during the backup process, which is useful for maintaining the integrity of files that are linked in multiple locations. @@ -12032,9 +11633,8 @@ This setting ensures that hard links are preserved during the backup process, wh

      -
      -

      4.4.28. Dirvish

      +

      5.0.15. Dirvish

      Dirvish is an improvement upon the dired-framework and has more features like file preview etc. Sadly it has an incompatibility with openwith which is why I have disabled that package. @@ -12098,7 +11698,7 @@ Dirvish is an improvement upon the dired-framework and has more features like fi

      -

      4.4.29. pdf-tools: pdf-viewer and support for dirvish

      +

      5.0.16. pdf-tools: pdf-viewer and support for dirvish

      This enables pdf-previewing in dirvish and gives a much better pdf-viewer than is shipped normally by emacs. @@ -12116,9 +11716,8 @@ This enables pdf-previewing in dirvish and gives a much better pdf-viewer than i

      -
      -

      4.4.30. Jupyter

      +

      5.0.17. Jupyter

      This is a jupyter client. Using it is a bit cumbersome though, so I have not fully explored all features. @@ -12132,9 +11731,8 @@ This is a jupyter client. Using it is a bit cumbersome though, so I have not ful

      -
      -

      4.4.31. undo-tree

      +

      5.0.18. undo-tree

      Base emacs undo logic is very useful, but not easy to understand for me. I prefer undo-tree, which makes switching between branches easier and also allows quickly switching back to a much older state using the visualizer. @@ -12173,7 +11771,7 @@ While we are at it, we are also setting up a persistent undo-file for every file

      -

      4.4.32. Hydra

      +

      5.0.19. Hydra

      Hydra allows for the writing of macro-style functions. I have not yet looked into this all too much, but it seems to be a potent feature. @@ -12186,7 +11784,6 @@ Hydra allows for the writing of macro-style functions. I have not yet looked int

      -
      1. Text scaling
        @@ -12211,7 +11808,7 @@ I only wrote this in order to try out hydra; rarely do I really need this. Howev
      -

      4.4.33. External Applications

      +

      5.0.20. External Applications

        @@ -12260,14 +11857,12 @@ I hope that this package will improve, then I will come back to it one day.
    2. -
    3. Anki

      This section is here to make Anki usable from within Emacs - an endeavour that I have mostly given up on.

      -
      1. Basic Anki setup
        @@ -12315,7 +11910,6 @@ This section is here to make Anki usable from within Emacs - an endeavour that I
      2. -
      3. Own Anki functions
          @@ -12362,9 +11956,8 @@ This section is here to make Anki usable from within Emacs - an endeavour that I
      -
      -

      4.4.34. Email

      +

      5.0.21. Email

        @@ -12391,7 +11984,6 @@ This seems not to be needed - I do not yet dare to delete it though.
    4. -
    5. mu4e

      @@ -12453,7 +12045,6 @@ The hook functions are defined here: mu4e-alert

      @@ -12475,9 +12066,8 @@ This adds the simple utility of sending desktop notifications whenever a new mai

    -
    -

    4.4.35. Calendar

    +

    5.0.22. Calendar

    This provides a beautiful calender to emacs. @@ -12543,9 +12133,8 @@ Yes, I am aware that I am exposing my university-calendar to the public here. I

    -
    -

    4.4.36. Dashboard: emacs startup screen

    +

    5.0.23. Dashboard: emacs startup screen

    This sets up the dashboard, which is really quite useless. But, it looks cool and makes me happy whenever I start an emacsclient without a file name as argument :) @@ -12619,10 +12208,9 @@ This sets up the dashboard, which is really quite useless. But, it

    -

    Author: Leon Schwarzäugl

    -

    Created: 2024-07-11 Do 10:18

    +

    Created: 2024-07-11 Do 18:36

    Validate

    diff --git a/profiles/TEMPLATE/home.nix b/profiles/TEMPLATE/home.nix index 6d50424..01b3e1a 100644 --- a/profiles/TEMPLATE/home.nix +++ b/profiles/TEMPLATE/home.nix @@ -7,10 +7,12 @@ enable = true; enableSshSupport = true; enableExtraSocket = true; - pinentryPackage = pkgs.pinentry-gtk2; + pinentryPackage = pkgs.pinentry.gtk2; + defaultCacheTtl = 600; + maxCacheTtl = 7200; extraConfig = '' - allow-emacs-pinentry allow-loopback-pinentry + allow-emacs-pinentry ''; }; diff --git a/profiles/TEMPLATE/nixos.nix b/profiles/TEMPLATE/nixos.nix index f1aac3e..11cb750 100644 --- a/profiles/TEMPLATE/nixos.nix +++ b/profiles/TEMPLATE/nixos.nix @@ -33,6 +33,7 @@ stylix.image = ../../wallpaper/TEMPLATEwp.png; stylix = { + enable = true; base16Scheme = ../../wallpaper/swarsel.yaml; # base16Scheme = "${pkgs.base16-schemes}/share/themes/shapeshifter.yaml"; polarity = "dark"; diff --git a/profiles/common/home.nix b/profiles/common/home.nix index 35922af..00fb8d9 100644 --- a/profiles/common/home.nix +++ b/profiles/common/home.nix @@ -9,13 +9,13 @@ ffmpeg_5-full flac mediainfo - picard + picard-tools audacity sox # printing cups - gnome.simple-scan + simple-scan # dict (aspellWithDicts (dicts: with dicts; [ de en en-computers en-science ])) @@ -41,11 +41,11 @@ obsidian spotify discord - nextcloud-client + stable.nextcloud-client spotify-player element-desktop-wayland nicotine-plus - transmission + stable.transmission mktorrent hexchat hugo @@ -104,7 +104,7 @@ unzip #nautilus - gnome.nautilus + nautilus xfce.tumbler libgsf @@ -130,7 +130,7 @@ #keychain qalculate-gtk gcr # needed for gnome-secrets to work - gnome.seahorse + seahorse # sops-related sops @@ -897,7 +897,7 @@ programs.emacs = { extraEmacsPackages = epkgs: [ epkgs.mu4e epkgs.use-package - epkgs.lsp-bridge + # epkgs.lsp-bridge epkgs.doom-themes # build the rest of the packages myself @@ -1047,7 +1047,6 @@ programs.waybar = { tooltip-format= "{:%Y %B}\n{calendar}"; }; - pulseaudio= { format= "{icon} {volume:2}%"; format-bluetooth= "{icon} {volume}%"; @@ -1120,237 +1119,7 @@ programs.waybar = { }; }; }; - - style = '' - @define-color foreground #fdf6e3; - @define-color background #1a1a1a; - @define-color background-alt #292b2e; - @define-color foreground-warning #268bd2; - @define-color background-warning @background; - @define-color foreground-error red; - @define-color background-error @background; - @define-color foreground-critical gold; - @define-color background-critical blue; - - - * { - border: none; - border-radius: 0; - font-family: "FiraCode Nerd Font Propo", "Font Awesome 5 Free"; - font-size: 14px; - min-height: 0; - margin: -1px 0px; - } - - window#waybar { - background: transparent; - color: @foreground; - transition-duration: .5s; - } - - window#waybar.hidden { - opacity: 0.2; - } - - - #mpris { - padding: 0 10px; - background-color: transparent; - color: #1DB954; - font-family: Monospace; - font-size: 12px; - } - - #custom-right-arrow-dark, - #custom-left-arrow-dark { - color: @background; - background: @background-alt; - font-size: 24px; - } - - #window { - font-size: 12px; - padding: 0 20px; - } - - #mode { - background: @background-critical; - color: @foreground-critical; - padding: 0 3px; - } - - #custom-configwarn { - color: black; - padding: 0 3px; - animation-name: configblink; - animation-duration: 0.5s; - animation-timing-function: linear; - animation-iteration-count: infinite; - animation-direction: alternate; - } - - #custom-outer-right-arrow-dark, - #custom-outer-left-arrow-dark { - color: @background; - font-size: 24px; - } - - #custom-outer-left-arrow-dark, - #custom-left-arrow-dark, - #custom-left-arrow-light { - margin: 0 -1px; - } - - #custom-right-arrow-light, - #custom-left-arrow-light { - color: @background-alt; - background: @background; - font-size: 24px; - } - - #workspaces, - #clock.1, - #clock.2, - #clock.3, - #pulseaudio, - #memory, - #cpu, - #temperature, - #power-profiles-daemon, - #mpris, - #tray { - background: @background; - } - - #network, - #clock.2, - #battery, - #cpu, - #custom-pseudobat, - #disk { - background: @background-alt; - } - - - #workspaces button { - padding: 0 2px; - color: #fdf6e3; - } - #workspaces button.focused { - color: @foreground-warning; - } - - #workspaces button:hover { - background: @foreground; - color: @background; - border: @foreground; - padding: 0 2px; - box-shadow: inherit; - text-shadow: inherit; - } - - #workspaces button.urgent { - color: @background-critical; - background: @foreground-critical; - } - - #network { - color: #cc99c9; - } - - #temperature, - #power-profiles-daemon { - color: #9ec1cf; - } - - #disk { - /*color: #b58900;*/ - color: #9ee09e; - } - - #disk.warning { - color: @foreground-error; - background-color: @background-error; - } - #disk.critical, - #temperature.critical { - color: @foreground-critical; - background-color: @background-critical; - animation-name: blink; - animation-duration: 0.5s; - animation-timing-function: linear; - animation-iteration-count: infinite; - animation-direction: alternate; - } - #pulseaudio.muted { - color: @foreground-error; - } - #memory { - /*color: #2aa198;*/ - color: #fdfd97; - } - #cpu { - /*color: #6c71c4;*/ - color: #feb144; - } - - #pulseaudio { - /*color: #268bd2;*/ - color: #ff6663; - } - - #battery, - #custom-pseudobat { - color: cyan; - } - #battery.discharging { - color: #859900; - } - - @keyframes blink { - to { - color: @foreground-error; - background-color: @background-error; - } - } - @keyframes configblink { - to { - color: @foreground-error; - background-color: transparent; - } - } - - #battery.critical:not(.charging) { - color: @foreground-critical; - background-color: @background-critical; - animation-name: blink; - animation-duration: 0.5s; - animation-timing-function: linear; - animation-iteration-count: infinite; - animation-direction: alternate; - } - - #clock.1, - #clock.2, - #clock.3 { - font-family: Monospace; - } - - #clock, - #pulseaudio, - #memory, - #cpu, - #tray, - #temperature, - #power-profiles-daemon, - #network, - #mpris, - #battery, - #custom-pseudobat, - #disk { - padding: 0 3px; - } - ''; + style = (builtins.readFile ../../programs/waybar/style.css); }; programs.firefox = { @@ -1640,22 +1409,6 @@ wayland.windowManager.sway = { assigns = { "1:一" = [{ app_id = "firefox"; }]; }; - colors = { - focused = { - # background = "#080808"; - # border = "#80a0ff"; - # childBorder = "#80a0ff"; - # indicator = "#080808"; - # text = "#ffd700"; - }; - unfocused = { - # background = "#080808"; - # border = "#80a0ff"; - # childBorder = "#303030"; - # indicator = "#80a0ff"; - # text = "#c6c6c6"; - }; - }; floating = { border = 1; criteria = [ diff --git a/profiles/common/nixos.nix b/profiles/common/nixos.nix index 1e1042b..b1be6e7 100644 --- a/profiles/common/nixos.nix +++ b/profiles/common/nixos.nix @@ -50,10 +50,9 @@ nix.optimise = { DefaultTimeoutStopSec=15s ''; -hardware.opengl = { +hardware.graphics = { enable = true; - driSupport = true; - driSupport32Bit = true; + enable32Bit = true; }; sound.enable = true; @@ -94,14 +93,17 @@ environment.systemPackages = with pkgs; [ yubikey-personalization yubikey-personalization-gui yubico-pam - # yubioath-flutter - # yubikey-manager - # yubikey-manager-qt + yubioath-flutter + yubikey-manager + yubikey-manager-qt yubico-piv-tool + cfssl + pcsctools + pcscliteWithPolkit.out # pinentry # theme related - gnome.adwaita-icon-theme + adwaita-icon-theme # kde-connect xdg-desktop-portal diff --git a/profiles/fourside/home.nix b/profiles/fourside/home.nix index 59ecc62..b9bad9d 100644 --- a/profiles/fourside/home.nix +++ b/profiles/fourside/home.nix @@ -7,10 +7,12 @@ enable = true; enableSshSupport = true; enableExtraSocket = true; - pinentryPackage = pkgs.pinentry-gtk2; + pinentryPackage = pkgs.pinentry.gtk2; + defaultCacheTtl = 600; + maxCacheTtl = 7200; extraConfig = '' - allow-emacs-pinentry allow-loopback-pinentry + allow-emacs-pinentry ''; }; @@ -93,6 +95,7 @@ { output = "HDMI-A-1"; workspace = "2:二";} ]; + keybindings = let modifier = config.wayland.windowManager.sway.config.modifier; in { diff --git a/profiles/fourside/nixos.nix b/profiles/fourside/nixos.nix index b9e974e..509a6e9 100644 --- a/profiles/fourside/nixos.nix +++ b/profiles/fourside/nixos.nix @@ -58,6 +58,7 @@ stylix.image = ../../wallpaper/lenovowp.png; stylix = { + enable = true; base16Scheme = ../../wallpaper/swarsel.yaml; # base16Scheme = "${pkgs.base16-schemes}/share/themes/shapeshifter.yaml"; polarity = "dark"; @@ -106,10 +107,9 @@ hardware = { - opengl = { + graphics = { enable = true; - driSupport = true; - driSupport32Bit = true; + enable32Bit = true; extraPackages = with pkgs; [ vulkan-loader vulkan-validation-layers diff --git a/profiles/onett/home.nix b/profiles/onett/home.nix index ce98816..27c5aa8 100644 --- a/profiles/onett/home.nix +++ b/profiles/onett/home.nix @@ -7,10 +7,12 @@ enable = true; enableSshSupport = true; enableExtraSocket = true; - pinentryPackage = pkgs.pinentry-gtk2; + pinentryPackage = pkgs.pinentry.gtk2; + defaultCacheTtl = 600; + maxCacheTtl = 7200; extraConfig = '' - allow-emacs-pinentry allow-loopback-pinentry + allow-emacs-pinentry ''; }; diff --git a/profiles/onett/nixos.nix b/profiles/onett/nixos.nix index e1632bb..54bd52c 100644 --- a/profiles/onett/nixos.nix +++ b/profiles/onett/nixos.nix @@ -35,6 +35,7 @@ stylix.image = ../../wallpaper/lenovowp.png; stylix = { + enable = true; base16Scheme = ../../wallpaper/swarsel.yaml; # base16Scheme = "${pkgs.base16-schemes}/share/themes/shapeshifter.yaml"; polarity = "dark"; diff --git a/profiles/sandbox/nixos.nix b/profiles/sandbox/nixos.nix index f9cbe3d..30bfc71 100644 --- a/profiles/sandbox/nixos.nix +++ b/profiles/sandbox/nixos.nix @@ -237,7 +237,7 @@ networking.hostId = "8a8ad84a"; # vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; }; # }; - hardware.opengl = { + hardware.graphics = { enable = true; extraPackages = with pkgs; [ intel-media-driver # LIBVA_DRIVER_NAME=iHD diff --git a/profiles/server1/jellyfin/nixos.nix b/profiles/server1/jellyfin/nixos.nix index 36d209b..f2f400d 100644 --- a/profiles/server1/jellyfin/nixos.nix +++ b/profiles/server1/jellyfin/nixos.nix @@ -58,7 +58,7 @@ nixpkgs.config.packageOverrides = pkgs: { vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; }; }; - hardware.opengl = { + hardware.graphics = { enable = true; extraPackages = with pkgs; [ intel-media-driver # LIBVA_DRIVER_NAME=iHD diff --git a/profiles/server1/matrix/nixos.nix b/profiles/server1/matrix/nixos.nix index a61833b..ce5ee93 100644 --- a/profiles/server1/matrix/nixos.nix +++ b/profiles/server1/matrix/nixos.nix @@ -36,7 +36,6 @@ in { ./hardware-configuration.nix # we import here a service that is not available yet on normal nixpkgs # this module is hence not in the modules list, we add it ourselves - (unstable + "/nixos/modules/services/matrix/mautrix-signal.nix") ]; networking.hostName = "matrix"; # Define your hostname. diff --git a/profiles/surface/home.nix b/profiles/surface/home.nix index 123bd3a..809919c 100644 --- a/profiles/surface/home.nix +++ b/profiles/surface/home.nix @@ -10,6 +10,7 @@ stylix.image = ../../wallpaper/surfacewp.png; stylix = { + enable = true; base16Scheme = ../../wallpaper/swarsel.yaml; # base16Scheme = "${pkgs.base16-schemes}/share/themes/shapeshifter.yaml"; polarity = "dark"; diff --git a/profiles/threed/home.nix b/profiles/threed/home.nix index d5bf174..e24bc11 100644 --- a/profiles/threed/home.nix +++ b/profiles/threed/home.nix @@ -7,10 +7,12 @@ enable = true; enableSshSupport = true; enableExtraSocket = true; - pinentryPackage = pkgs.pinentry-gtk2; + pinentryPackage = pkgs.pinentry.gtk2; + defaultCacheTtl = 600; + maxCacheTtl = 7200; extraConfig = '' - allow-emacs-pinentry allow-loopback-pinentry + allow-emacs-pinentry ''; }; diff --git a/profiles/threed/nixos.nix b/profiles/threed/nixos.nix index c88965d..5f2a8dd 100644 --- a/profiles/threed/nixos.nix +++ b/profiles/threed/nixos.nix @@ -37,6 +37,7 @@ stylix.image = ../../wallpaper/surfacewp.png; stylix = { + enable = true; base16Scheme = ../../wallpaper/swarsel.yaml; # base16Scheme = "${pkgs.base16-schemes}/share/themes/shapeshifter.yaml"; polarity = "dark"; diff --git a/programs/emacs/init.el b/programs/emacs/init.el index 7bf2f3f..d3e0038 100644 --- a/programs/emacs/init.el +++ b/programs/emacs/init.el @@ -1158,6 +1158,8 @@ create a new one." ;; yubikey support for pushing commits ;; commiting is enabled through nixos gpg-agent config +(use-package pinentry) +(pinentry-start) (setq epg-pinentry-mode 'loopback) (setenv "SSH_AUTH_SOCK" (string-chop-newline (shell-command-to-string "gpgconf --list-dirs agent-ssh-socket"))) diff --git a/programs/firefox/tridactyl/tridactylrc b/programs/firefox/tridactyl/tridactylrc index 3e03089..7e76baa 100644 --- a/programs/firefox/tridactyl/tridactylrc +++ b/programs/firefox/tridactyl/tridactylrc @@ -22,8 +22,20 @@ bind d composite tabprev; tabclose # bind D tabclose bind c hint bindurl ^http(s)?://www\.google\.com c hint -Jc [class="LC20lb MBeuO DKV0Md"],[class="YmvwI"],[class="YyVfkd"],[class="fl"] +bindurl ^http(s)?://news\.ycombinator\.com c hint -Jc [class="titleline"],[class="age"] +bindurl ^http(s)?://lobste\.rs c hint -Jc [class="u-url"],[class="comments_label"] bindurl ^http(s)?://www\.google\.com gi composite focusinput -l ; text.end_of_line +" Search in page +set findcase smart +bind / fillcmdline find +bind ? fillcmdline find -? +bind n findnext 1 +bind N findnext -1 + +" some pages like github break on the tridactyl quick search. have this as a fallback +unbind + " Subconfig Settings seturl www.google.com followpagepatterns.next Next seturl www.google.com followpagepatterns.prev Previous