diff --git a/SwarselSystems.org b/SwarselSystems.org index c7100d9..25e6909 100644 --- a/SwarselSystems.org +++ b/SwarselSystems.org @@ -717,9 +717,9 @@ In contrast, this defines home-manager systems, which I only have one of. #+begin_src nix :tangle no :noweb-ref flakehomeconf - "leons@PCisLee" = inputs.home-manager.lib.homeManagerConfiguration { + "swarsel@fedora" = inputs.home-manager.lib.homeManagerConfiguration { modules = homeModules ++ mixedModules ++ [ - ./profiles/surface/home.nix + ./profiles/home-manager/home.nix ]; }; @@ -1789,6 +1789,128 @@ in } #+end_src + +**** Home-manager only + +***** Home manager +:PROPERTIES: +:CUSTOM_ID: h:483a26b5-5a40-4417-9ffb-67cc2cf07161 +:END: + +Special things to note here: We are running xcape to allow =CAPS= to act as =CTRL= and =ESC=. Also we are using =nixGL= in most places. + +#+begin_src nix :tangle profile/home-manager/home.nix + + { config, pkgs, lib, fetchFromGitHub, ... }: + + { + programs.home-manager.enable = true; + home.username = "swarsel"; + home.homeDirectory = "/home/swarsel"; + + home.stateVersion = "23.05"; # Please read the comment before changing. + + stylix.image = ../../wallpaper/surfacewp.png; + <> + + nixpkgs = { + config = { + allowUnfree = true; + allowUnfreePredicate = (_: true); + }; + }; + services.xcape = { + enable = true; + mapExpression = { + Control_L = "Escape"; + }; + }; + #keyboard config + home.keyboard.layout = "us"; + + sops.age.sshKeyPaths = [ "${config.home.homeDirectory}/.ssh/sops" ]; + + # waybar config + programs.waybar.settings.mainBar.cpu.format = "{icon0} {icon1} {icon2} {icon3}"; + + programs.waybar.settings.mainBar.temperature.hwmon-path = "/sys/devices/platform/coretemp.0/hwmon/hwmon3/temp3_input"; + programs.waybar.settings.mainBar.modules-right = ["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" + "temperature" + "custom/left-arrow-light" + "disk" + "custom/left-arrow-dark" + "memory" + "custom/left-arrow-light" + "cpu" + "custom/left-arrow-dark" + "tray" + "custom/left-arrow-light" + "clock#2" + "custom/left-arrow-dark" + "clock#1" ]; + services.blueman-applet.enable = true; + home.packages = with pkgs; [ + # nixgl.auto.nixGLDefault + evince + # nodejs_20 + + # messaging + # we use gomuks for RAM preservation, but keep schildi around for files and images + ]; + + programs.zsh.initExtra = " + export GPG_TTY=\"$(tty)\" + export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) + gpgconf --launch gpg-agent + "; + + # sway config + wayland.windowManager.sway= { + config = rec { + input = { + "*" = { + xkb_layout = "us"; + xkb_options = "ctrl:nocaps,grp:win_space_toggle"; + xkb_variant = "altgr-intl"; + }; + "type:touchpad" = { + dwt = "enabled"; + tap = "enabled"; + natural_scroll = "enabled"; + middle_emulation = "enabled"; + }; + }; + + output = { + eDP-1 = { + mode = "2160x1440@59.955Hz"; + scale = "1"; + bg = "~/.dotfiles/wallpaper/surfacewp.png fill"; + }; + }; + + keybindings = let + inherit (config.wayland.windowManager.sway.config) modifier; + in { + }; + + startup = [ + ]; + + }; + + }; + } + +#+end_src + + **** Threed (Surface Pro 3) :PROPERTIES: :CUSTOM_ID: h:7b1a8f91-ef43-433c-ba4c-c5baf50e1de4 diff --git a/flake.nix b/flake.nix index 8669bb9..95a9f1a 100644 --- a/flake.nix +++ b/flake.nix @@ -289,9 +289,9 @@ homeConfigurations = { - "leons@PCisLee" = inputs.home-manager.lib.homeManagerConfiguration { + "swarsel@fedora" = inputs.home-manager.lib.homeManagerConfiguration { modules = homeModules ++ mixedModules ++ [ - ./profiles/surface/home.nix + ./profiles/home-manager/home.nix ]; }; diff --git a/index.html b/index.html index 4e9d59d..e9bb4fd 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 @@ -223,7 +223,7 @@

Table of Contents

-
  • 3.2. Manual Overlays and packages +
  • 3.2. Manual Overlays and packages
  • 3.3. Common NixOS @@ -268,7 +268,7 @@

    Table of Contents

  • 3.4.6. Linking dotfiles
  • 3.4.7. Sourcing environment variables
  • 3.4.8. Programs
  • -
  • 3.4.9. nix-index
  • +
  • 3.4.9. nix-index
  • 3.4.10. password-store
  • 3.4.11. direnv
  • 3.4.12. eza
  • @@ -336,7 +336,7 @@

    Table of Contents

    @@ -1059,8 +1059,8 @@

    2 -
    -

    2.3.3. General (outputs)

    +
    +

    2.3.3. General (outputs)

    @@ -1240,9 +1240,9 @@ 

    2
    -"leons@PCisLee" = inputs.home-manager.lib.homeManagerConfiguration {
    +"swarsel@fedora" = inputs.home-manager.lib.homeManagerConfiguration {
       modules = homeModules ++ mixedModules ++ [
    -    ./profiles/surface/home.nix
    +    ./profiles/home-manager/home.nix
       ];
     };
     
    @@ -2440,6 +2440,129 @@ 

    3 }; } +

    +
    +

    + + + +
  • Home-manager only
    +
      +
    1. Home manager
      +
      +

      +Special things to note here: We are running xcape to allow CAPS to act as CTRL and ESC. Also we are using nixGL in most places. +

      + +
      +
      +{ config, pkgs, lib, fetchFromGitHub, ... }:
      +
      +{
      +  programs.home-manager.enable = true;
      +  home.username = "swarsel";
      +  home.homeDirectory = "/home/swarsel";
      +
      +  home.stateVersion = "23.05"; # Please read the comment before changing.
      +
      +  stylix.image = ../../wallpaper/surfacewp.png;
      +  <<theme>>
      +
      +  nixpkgs = {
      +    config = {
      +      allowUnfree = true;
      +      allowUnfreePredicate = (_: true);
      +    };
      +  };
      +  services.xcape = {
      +    enable = true;
      +    mapExpression = {
      +      Control_L = "Escape";
      +    };
      +  };
      +  #keyboard config
      +  home.keyboard.layout = "us";
      +
      +  sops.age.sshKeyPaths = [ "${config.home.homeDirectory}/.ssh/sops" ];
      +
      +  # waybar config
      +  programs.waybar.settings.mainBar.cpu.format = "{icon0} {icon1} {icon2} {icon3}";
      +
      +  programs.waybar.settings.mainBar.temperature.hwmon-path = "/sys/devices/platform/coretemp.0/hwmon/hwmon3/temp3_input";
      +  programs.waybar.settings.mainBar.modules-right = ["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"
      +                                                    "temperature"
      +                                                    "custom/left-arrow-light"
      +                                                    "disk"
      +                                                    "custom/left-arrow-dark"
      +                                                    "memory"
      +                                                    "custom/left-arrow-light"
      +                                                    "cpu"
      +                                                    "custom/left-arrow-dark"
      +                                                    "tray"
      +                                                    "custom/left-arrow-light"
      +                                                    "clock#2"
      +                                                    "custom/left-arrow-dark"
      +                                                    "clock#1" ];
      +  services.blueman-applet.enable = true;
      +  home.packages = with pkgs; [
      +    # nixgl.auto.nixGLDefault
      +    evince
      +    # nodejs_20
      +
      +    # messaging
      +    # we use gomuks for RAM preservation, but keep schildi around for files and images
      +  ];
      +
      +  programs.zsh.initExtra = "
      +export GPG_TTY=\"$(tty)\"
      +export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
      +gpgconf --launch gpg-agent
      +      ";
      +
      +  # sway config
      +  wayland.windowManager.sway= {
      +    config = rec {
      +      input = {
      +        "*" = {
      +          xkb_layout = "us";
      +          xkb_options = "ctrl:nocaps,grp:win_space_toggle";
      +          xkb_variant = "altgr-intl";
      +        };
      +        "type:touchpad" = {
      +          dwt = "enabled";
      +          tap = "enabled";
      +          natural_scroll = "enabled";
      +          middle_emulation = "enabled";
      +        };
      +      };
      +
      +      output = {
      +        eDP-1 = {
      +          mode = "2160x1440@59.955Hz";
      +          scale = "1";
      +          bg = "~/.dotfiles/wallpaper/surfacewp.png fill";
      +        };
      +      };
      +
      +      keybindings = let
      +        inherit (config.wayland.windowManager.sway.config) modifier;
      +      in {
      +      };
      +
      +      startup = [
      +      ];
      +
      +    };
      +
      +  };
      +}
      +
       
      @@ -5411,8 +5534,8 @@

      3

  • -
    -

    3.2. Manual Overlays and packages

    +
    +

    3.2. Manual Overlays and packages

    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. @@ -5431,8 +5554,8 @@

    3.2. Manual Overlays a 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.

    -
    -

    3.2.1. pkgs

    +
    +

    3.2.1. pkgs

    @@ -5442,8 +5565,8 @@ 

    3.2.1. pkgs

    -
    -

    3.2.2. Overlays

    +
    +

    3.2.2. Overlays

    @@ -6123,7 +6246,7 @@ 

    3

      -
    1. zsh
      +
    2. zsh

      Do not touch this. @@ -6140,7 +6263,7 @@

      3

    -
  • syncthing
    +
  • syncthing
    @@ -7087,8 +7210,8 @@ 

    3

  • -
    -

    3.4.9. nix-index

    +
    +

    3.4.9. nix-index

    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. @@ -8751,9 +8874,9 @@

    3 homeConfigurations = { - "leons@PCisLee" = inputs.home-manager.lib.homeManagerConfiguration { + "swarsel@fedora" = inputs.home-manager.lib.homeManagerConfiguration { modules = homeModules ++ mixedModules ++ [ - ./profiles/surface/home.nix + ./profiles/home-manager/home.nix ]; }; @@ -9441,7 +9564,7 @@

    4

    -
  • Nix common prefix bracketer
    +
  • Nix common prefix bracketer

    This function searches for common delimiters in region and removes them, summarizing all captured lines by it. @@ -9474,7 +9597,7 @@

    4

  • -
  • Nix formatters
    +
  • Nix formatters

    This formats the org code block at point in accordance to the nixpkgs-fmt formatter @@ -11047,8 +11170,8 @@

    4

  • -
    -

    4.4.3. nixpkgs-fmt

    +
    +

    4.4.3. nixpkgs-fmt

    Adds functions for formatting nix code. @@ -13063,7 +13186,7 @@

    5

    Author: Leon Schwarzäugl

    -

    Created: 2024-07-21 So 15:56

    +

    Created: 2024-07-21 So 17:11

    Validate

    diff --git a/profile/home-manager/home.nix b/profile/home-manager/home.nix new file mode 100644 index 0000000..ed88849 --- /dev/null +++ b/profile/home-manager/home.nix @@ -0,0 +1,111 @@ +{ config, pkgs, lib, fetchFromGitHub, ... }: + +{ + programs.home-manager.enable = true; + home.username = "swarsel"; + home.homeDirectory = "/home/swarsel"; + + home.stateVersion = "23.05"; # Please read the comment before changing. + + stylix.image = ../../wallpaper/surfacewp.png; + << theme>> + + nixpkgs = { + config = { + allowUnfree = true; + allowUnfreePredicate = (_: true); + }; + }; + services.xcape = { + enable = true; + mapExpression = { + Control_L = "Escape"; + }; + }; + #keyboard config + home.keyboard.layout = "us"; + + sops.age.sshKeyPaths = [ "${config.home.homeDirectory}/.ssh/sops" ]; + + # waybar config + programs.waybar.settings.mainBar.cpu.format = "{icon0} {icon1} {icon2} {icon3}"; + + programs.waybar.settings.mainBar.temperature.hwmon-path = "/sys/devices/platform/coretemp.0/hwmon/hwmon3/temp3_input"; + programs.waybar.settings.mainBar.modules-right = [ + "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" + "temperature" + "custom/left-arrow-light" + "disk" + "custom/left-arrow-dark" + "memory" + "custom/left-arrow-light" + "cpu" + "custom/left-arrow-dark" + "tray" + "custom/left-arrow-light" + "clock#2" + "custom/left-arrow-dark" + "clock#1" + ]; + services.blueman-applet.enable = true; + home.packages = with pkgs; [ + # nixgl.auto.nixGLDefault + evince + # nodejs_20 + + # messaging + # we use gomuks for RAM preservation, but keep schildi around for files and images + ]; + + programs.zsh.initExtra = " +export GPG_TTY=\"$(tty)\" +export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) +gpgconf --launch gpg-agent + "; + + # sway config + wayland.windowManager.sway = { + config = rec { + input = { + "*" = { + xkb_layout = "us"; + xkb_options = "ctrl:nocaps,grp:win_space_toggle"; + xkb_variant = "altgr-intl"; + }; + "type:touchpad" = { + dwt = "enabled"; + tap = "enabled"; + natural_scroll = "enabled"; + middle_emulation = "enabled"; + }; + }; + + output = { + eDP-1 = { + mode = "2160x1440@59.955Hz"; + scale = "1"; + bg = "~/.dotfiles/wallpaper/surfacewp.png fill"; + }; + }; + + keybindings = + let + inherit (config.wayland.windowManager.sway.config) modifier; + in + { }; + + startup = [ + ]; + + }; + + }; +}