diff --git a/SwarselSystems.org b/SwarselSystems.org index ab7fff4..2bfd13f 100644 --- a/SwarselSystems.org +++ b/SwarselSystems.org @@ -2066,6 +2066,8 @@ New setup for the SP3, this time using NixOS - another machine will take over th :END: My new main machine. +This is basically just adjusted to the core count, path to the =hwmon= (this was very bothersome on this machine due to changing address), as well as making use of the top-row function keys. + #+begin_src nix :tangle profiles/fourside/default.nix @@ -2074,12 +2076,17 @@ My new main machine. imports = [ inputs.nixos-hardware.nixosModules.lenovo-thinkpad-p14s-amd-gen2 + ./hardware-configuration.nix ./nixos.nix + + ../optional/nixos/steam.nix + ../optional/nixos/virtualbox.nix + inputs.home-manager.nixosModules.home-manager { home-manager.users.swarsel.imports = outputs.mixedModules ++ [ - ./home.nix + ../optional/home/gaming.nix ] ++ (builtins.attrValues outputs.homeManagerModules); } ]++ (builtins.attrValues outputs.nixosModules); @@ -2095,6 +2102,11 @@ My new main machine. # ------ ----- # | DP-4 | |eDP-1| # ------ ----- + + swarselsystems = { + wallpaper = ../../wallpaper/lenovowp.png; + }; + home-manager.users.swarsel.swarselsystems = { isLaptop = true; isNixos = true; @@ -2194,18 +2206,7 @@ Mostly just sets some opened ports for several games, enables virtualbox (which }; }; - virtualisation.virtualbox = { - host = { - enable = true; - enableExtensionPack = true; - }; - # leaving this here for future notice. setting guest.enable = true will make 'restarting sysinit-reactivation.target' take till timeout on nixos-rebuild switch - guest = { - enable = false; - }; - }; - stylix.image = ../../wallpaper/lenovowp.png; hardware = { graphics = { @@ -2224,12 +2225,6 @@ Mostly just sets some opened ports for several games, enables virtualbox (which }; }; - programs.steam = { - enable = true; - extraCompatPackages = [ - pkgs.proton-ge-bin - ]; - }; # Configure keymap in X11 (only used for login) @@ -2250,13 +2245,6 @@ Mostly just sets some opened ports for several games, enables virtualbox (which environment.systemPackages = with pkgs; [ - # gog games installing - heroic - # minecraft - temurin-bin-17 - (prismlauncher.override { - glfw = pkgs.glfw-wayland-minecraft; - }) ]; system.stateVersion = "23.05"; @@ -2266,34 +2254,6 @@ Mostly just sets some opened ports for several games, enables virtualbox (which #+end_src -***** Home Manager -:PROPERTIES: -:CUSTOM_ID: h:85f7110c-2f25-4506-b64a-fce29f29d0d0 -:END: - -This is basically just adjusted to the core count, path to the =hwmon= (this was very bothersome on this machine due to changing address), as well as making use of the top-row function keys. - -#+begin_src nix :noweb yes :tangle profiles/fourside/home.nix - { config, pkgs, lib, ... }: with lib; - { - - wayland.windowManager.sway = { - config = rec { - # update for actual inputs here, - - # workspaceOutputAssign = [ - # { output = "eDP-1"; workspace = "1:一"; } - # { output = "DP-4"; workspace = "2:二"; } - # ]; - - - - }; - }; - } - -#+end_src - **** Winters (Framwork Laptop 16) :PROPERTIES: :CUSTOM_ID: h:6c6e9261-dfa1-42d8-ab2a-8b7c227be6d9 @@ -4428,11 +4388,25 @@ Modules that need to be loaded on the NixOS level. Note that these will not be a #+begin_src nix :tangle modules/nixos/default.nix { - + wallpaper = import ./wallpaper.nix; } #+end_src +***** Wallpaper + +#+begin_src nix :tangle modules/nixos/wallpaper.nix + { lib, ... }: + + { + options.swarselsystems.wallpaper = lib.mkOption { + type = lib.types.path; + default = ""; + }; + } + +#+end_src + **** home-manager @@ -4445,6 +4419,7 @@ Modules that need to be loaded on the NixOS level. Note that these will not be a nixos = import ./nixos.nix; waybar = import ./waybar.nix; startup = import ./startup.nix; + wallpaper = import ./wallpaper.nix; } #+end_src @@ -4639,14 +4614,29 @@ in } #+end_src -** Common NixOS +***** Wallpaper + +#+begin_src nix :tangle modules/home/wallpaper.nix + { lib, ... }: + + { + options.swarselsystems.wallpaper = lib.mkOption { + type = lib.types.path; + default = ""; + }; + } + +#+end_src + +** NixOS +*** Common :PROPERTIES: :CUSTOM_ID: h:1c1250cd-e9b4-4715-8d9f-eb09e64bfc7f :END: These are system-level settings specific to NixOS machines. All settings that are required on all machines go here. -*** Imports, enable home-manager module +**** Imports, enable home-manager module :PROPERTIES: :CUSTOM_ID: h:45e4315b-0929-4c47-b65a-c8f0a685f4df :END: @@ -4692,12 +4682,12 @@ First, we enable the use of =home-manager= as a NixoS module #+end_src -*** General +**** General :PROPERTIES: :CUSTOM_ID: h:5a114da6-ef8d-404d-b31b-b51472908e77 :END: -**** Setup login keymap +***** Setup login keymap :PROPERTIES: :CUSTOM_ID: h:7248f338-8cad-4443-9060-deae7955b26f :END: @@ -4716,7 +4706,7 @@ Next, we setup the keymap in case we are not in a graphical session. At this poi } #+end_src -**** Make users non-mutable +***** Make users non-mutable :PROPERTIES: :CUSTOM_ID: h:48959890-fbc7-4d28-b33c-f33e028ab473 :END: @@ -4739,7 +4729,7 @@ This ensures that all user-configuration happens here in the config file. } #+end_src -**** Environment setup +***** Environment setup :PROPERTIES: :CUSTOM_ID: h:f4006367-0965-4b4f-a3b0-45f63b07d2b8 :END: @@ -4765,7 +4755,7 @@ Next, we will setup some environment variables that need to be set on the system } #+end_src -**** Enable PolicyKit +***** Enable PolicyKit :PROPERTIES: :CUSTOM_ID: h:e2d40df9-0026-4caa-8476-9dc2353055a1 :END: @@ -4779,7 +4769,7 @@ Needed for control over system-wide privileges etc. } #+end_src -**** Enable automatic garbage collection +***** Enable automatic garbage collection :PROPERTIES: :CUSTOM_ID: h:9a3b7f1f-d0c3-417e-a262-c920fb25f3ee :END: @@ -4798,7 +4788,7 @@ The nix store fills up over time, until =/boot/efi= is filled. This snippet clea } #+end_src -**** Enable automatic store optimisation +***** Enable automatic store optimisation :PROPERTIES: :CUSTOM_ID: h:97a2b9f7-c835-4db8-a0e9-e923bab69ee8 :END: @@ -4816,7 +4806,7 @@ This enables hardlinking identical files in the nix store, to save on disk space #+end_src -**** Reduce systemd timeouts +***** Reduce systemd timeouts :PROPERTIES: :CUSTOM_ID: h:12858442-c129-4aa1-9c9c-a0916e36b302 :END: @@ -4834,7 +4824,7 @@ There is a persistent bug over Linux kernels that makes the user wait 1m30s on s } #+end_src -**** Hardware settings +***** Hardware settings :PROPERTIES: :CUSTOM_ID: h:1fa7cf61-5c03-43a3-a7f0-3d6ee246b31b :END: @@ -4870,7 +4860,7 @@ Enable OpenGL, Sound, Bluetooth and various drivers. } #+end_src -**** Common network settings +***** Common network settings :PROPERTIES: :CUSTOM_ID: h:7d696b64-debe-4a95-80b5-1e510156a6c6 :END: @@ -5087,7 +5077,7 @@ Here I only enable =networkmanager=. Most of the 'real' network config is done i } #+end_src -**** Time, locale settings +***** Time, locale settings :PROPERTIES: :CUSTOM_ID: h:852d59ab-63c3-4831-993d-b5e23b877796 :END: @@ -5119,7 +5109,7 @@ Setup timezone and locale. I want to use the US layout, but have the rest adapte } #+end_src -*** sops +**** sops :PROPERTIES: :CUSTOM_ID: h:d87d80fd-2ac7-4f29-b338-0518d06b4deb :END: @@ -5167,28 +5157,31 @@ I use sops-nix to handle secrets that I want to have available on my machines at } #+end_src -*** Theme (stylix) +**** Theme (stylix) By default, [[https://github.com/danth/stylix][stylix]] wants to style GRUB as well. However, I think that looks horrible. =theme= is defined in [[#h:5bc1b0c9-dc59-4c81-b5b5-e60699deda78][Theme (stylix)]]. #+begin_src nix :noweb yes :tangle profiles/common/nixos/stylix.nix - { pkgs, home-manager, ... }: - { - stylix = { - <> - targets.grub.enable = false; # the styling makes grub more ugly - }; - home-manager.users.swarsel = { - stylix.targets = { - emacs.enable = false; - waybar.enable = false; - }; - }; - } + { inputs, pkgs, home-manager, config, ... }: + { + stylix = { + <> + targets.grub.enable = false; # the styling makes grub more ugly + image = config.swarselsystems.wallpaper; + }; + home-manager.users.swarsel = { + stylix= { + targets = { + emacs.enable = false; + waybar.enable = false; + }; + }; + }; + } #+end_src -*** System Packages +**** System Packages :PROPERTIES: :CUSTOM_ID: h:0e7e8bea-ec58-499c-9731-09dddfc39532 :END: @@ -5279,7 +5272,7 @@ Mostly used to install some compilers and lsp's that I want to have available wh } #+end_src -*** Programs (including zsh setup) +**** Programs (including zsh setup) :PROPERTIES: :CUSTOM_ID: h:2bbf5f31-246d-4738-925f-eca40681f7b6 :END: @@ -5297,7 +5290,7 @@ Some programs profit from being installed through dedicated NixOS settings on sy } #+end_src -**** zsh +***** zsh Do not touch this. #+begin_src nix :tangle profiles/common/nixos/zsh.nix @@ -5309,7 +5302,7 @@ Do not touch this. environment.pathsToLink = [ "/share/zsh" ]; } #+end_src -**** syncthing +***** syncthing #+begin_src nix :tangle profiles/common/nixos/syncthing.nix @@ -5360,14 +5353,14 @@ Do not touch this. } #+end_src -*** Services +**** Services :PROPERTIES: :CUSTOM_ID: h:79f3258f-ed9d-434d-b50a-e58d57ade2a7 :END: 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. -**** blueman +***** blueman :PROPERTIES: :CUSTOM_ID: h:b91df05b-113d-4d09-93d1-b271e5b76810 :END: @@ -5381,10 +5374,10 @@ Enables the blueman service including the nice system tray icon. } #+end_src -**** Network devices +***** Network devices In this section we enable compatibility with several network devices I have at home, mainly printers and scanners. -***** Scanners +****** Scanners :PROPERTIES: :CUSTOM_ID: h:fae5939e-22ac-4532-a10e-0b86013d20ce :END: @@ -5402,7 +5395,7 @@ This allows me to use my big scanner/printer's scanning function over the networ #+end_src -***** Printers +****** Printers :PROPERTIES: :CUSTOM_ID: h:8c13df62-c6d9-4a0a-83be-d77e71628f0b :END: @@ -5427,7 +5420,7 @@ This allows me to use my big scanner/printer's printing function over the networ }; #+end_src -***** Avahi (device discovery) +****** Avahi (device discovery) Avahi is the service used for the network discovery. @@ -5441,7 +5434,7 @@ Avahi is the service used for the network discovery. } #+end_src -**** enable GVfs +***** enable GVfs :PROPERTIES: :CUSTOM_ID: h:f101daa2-604d-4553-99e2-f64b9c207f51 :END: @@ -5455,7 +5448,7 @@ This is being set to allow myself to use all functions of nautilus in NixOS } #+end_src -**** interception-tools: Make CAPS work as ESC/CTRL +***** interception-tools: Make CAPS work as ESC/CTRL :PROPERTIES: :CUSTOM_ID: h:08d213d5-a9f4-4309-8635-ba557b01dc7d :END: @@ -5495,7 +5488,7 @@ This is a super-convenient package that lets my remap my =CAPS= key to =ESC= if } #+end_src -*** Hardware compatibility settings (Yubikey, Ledger) - udev rules +**** Hardware compatibility settings (Yubikey, Ledger) - udev rules :PROPERTIES: :CUSTOM_ID: h:7a89b5e3-b700-4167-8b14-2b8172f33936 :END: @@ -5525,7 +5518,7 @@ Also, this is a good place to setup the udev rules. } #+end_src -*** System Login +**** System Login :PROPERTIES: :CUSTOM_ID: h:eae45839-223a-4027-bce3-e26e092c9096 :END: @@ -5555,12 +5548,49 @@ This section houses the greetd related settings. I do not really want to use a d ''; } #+end_src +*** Optional -** Common Home-Manager +**** steam + +#+begin_src nix :tangle profiles/optional/nixos/steam.nix + { pkgs, ... }: + { + + programs.steam = { + enable = true; + extraCompatPackages = [ + pkgs.proton-ge-bin + ]; + }; + } + + +#+end_src + +**** VirtualBox + +#+begin_src nix :tangle profiles/optional/nixos/virtualbox.nix + { ... }: + { + virtualisation.virtualbox = { + host = { + enable = true; + enableExtensionPack = true; + }; + # leaving this here for future notice. setting guest.enable = true will make 'restarting sysinit-reactivation.target' take till timeout on nixos-rebuild switch + guest = { + enable = false; + }; + }; +} +#+end_src + +** Home-manager +*** Common :PROPERTIES: :CUSTOM_ID: h:f0a6b5e0-2157-4522-b5e1-3f0abd91c05e :END: -*** Imports +**** Imports This section sets up all the imports that are used in the home-manager section. @@ -5625,7 +5655,7 @@ This section sets up all the imports that are used in the home-manager section. } #+end_src -*** Installed packages +**** Installed packages :PROPERTIES: :CUSTOM_ID: h:893a7f33-7715-415b-a895-2687ded31c18 :END: @@ -5636,7 +5666,7 @@ Also, I define some useful shell scripts here. Programming languages and default lsp's are defined here: [[#h:0e7e8bea-ec58-499c-9731-09dddfc39532][System Packages]] -**** Packaged +***** Packaged :PROPERTIES: :CUSTOM_ID: h:6ef9bb5f-c5ee-496e-86e2-d8d271a34d75 :END: @@ -5704,20 +5734,6 @@ Programming languages and default lsp's are defined here: [[#h:0e7e8bea-ec58-499 qmk qmk-udev-rules - # games - lutris - wine - libudev-zero - dwarfs - fuse-overlayfs - # steam - # steam-run - patchelf - gamescope - vulkan-tools - moonlight-qt - ns-usbloader - # firefox related tridactyl-native @@ -5806,7 +5822,7 @@ Programming languages and default lsp's are defined here: [[#h:0e7e8bea-ec58-499 #+end_src -**** Self-defined +***** Self-defined :PROPERTIES: :CUSTOM_ID: h:96cbea91-ff13-4120-b8a9-496b2fa96e70 :END: @@ -5967,7 +5983,7 @@ Programming languages and default lsp's are defined here: [[#h:0e7e8bea-ec58-499 #+end_src -*** sops +**** sops :PROPERTIES: :CUSTOM_ID: h:d87d80fd-2ac7-4f29-b338-0518d06b4deb :END: @@ -5999,7 +6015,7 @@ I use sops-nix to handle secrets that I want to have available on my machines at } #+end_src -*** SSH Machines +**** SSH Machines :PROPERTIES: :CUSTOM_ID: h:edd6720e-1f90-40bf-b6f9-30a19d4cae08 :END: @@ -6106,7 +6122,7 @@ It is very convenient to have SSH aliases in place for machines that I use. This } #+end_src -*** Theme (stylix) +**** Theme (stylix) :PROPERTIES: :CUSTOM_ID: h:a92318cd-413e-4e78-a478-e63b09df019c :END: @@ -6122,6 +6138,7 @@ This section has been notably empty ever since switching to stylix. Only Emacs i { stylix = lib.mkIf (!config.swarselsystems.isNixos) { <> + image = config.swarselsystems.wallpaper; targets = { emacs.enable = false; waybar.enable = false; @@ -6130,7 +6147,7 @@ This section has been notably empty ever since switching to stylix. Only Emacs i } #+end_src -*** Desktop Entries +**** Desktop Entries :PROPERTIES: :CUSTOM_ID: h:867556e6-5a24-4c43-9d47-3edca2f16488 :END: @@ -6190,7 +6207,7 @@ TODO: Non-NixOS machines (=sp3) should not use these by default, but instead the } #+end_src -*** Linking dotfiles +**** Linking dotfiles :PROPERTIES: :CUSTOM_ID: h:5ef03803-e150-41bc-b603-e80d60d96efc :END: @@ -6236,7 +6253,7 @@ Also, we link some files to the users XDG configuration home: } #+end_src -*** Sourcing environment variables +**** Sourcing environment variables :PROPERTIES: :CUSTOM_ID: h:4486b02f-4fb8-432b-bfa2-2e786206341d :END: @@ -6250,14 +6267,14 @@ Also, we link some files to the users XDG configuration home: } #+end_src -*** Programs +**** Programs :PROPERTIES: :CUSTOM_ID: h:070a75ce-e209-4cda-aa25-e979bbf75d47 :END: This houses the configurations for all programs managed by home-manager. -**** General Programs: bottom, imv, sioyek, bat, carapace, wlogout, swayr, yt-dlp, mpv, jq, nix-index, ripgrep, pandoc, fzf +***** General Programs: bottom, imv, sioyek, bat, carapace, wlogout, swayr, yt-dlp, mpv, jq, nix-index, ripgrep, pandoc, fzf :PROPERTIES: :CUSTOM_ID: h:f0e0b580-2e1c-4ca6-a983-f05d3ebbbcde :END: @@ -6286,7 +6303,7 @@ This section is for programs that require no further configuration. zsh Integrat } #+end_src -*** nix-index +**** 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. @@ -6313,7 +6330,7 @@ nix-index provides a way to find out which packages are provided by which deriva } #+end_src -*** password-store +**** password-store :PROPERTIES: :CUSTOM_ID: h:ac0e5e62-0dbf-4782-9a96-9e558eae86ae :END: @@ -6333,7 +6350,7 @@ Enables password store with the =pass-otp= extension which allows me to store an } #+end_src -*** direnv +**** direnv :PROPERTIES: :CUSTOM_ID: h:1ab84307-b3fb-4c32-9def-4b89a53a8547 :END: @@ -6350,7 +6367,7 @@ Enables direnv, which I use for nearly all of my nix dev flakes. } #+end_src -*** eza +**** eza :PROPERTIES: :CUSTOM_ID: h:1bd6b0c7-f201-43e2-9624-6c50de00a1f6 :END: @@ -6372,7 +6389,7 @@ Eza provides me with a better =ls= command and some other useful aliases. } #+end_src -*** git +**** git :PROPERTIES: :CUSTOM_ID: h:419675ec-3310-438e-80ae-9eaa798a319d :END: @@ -6421,7 +6438,7 @@ Here I set up my git config, automatic signing of commits, useful aliases for my } #+end_src -*** Fuzzel +**** Fuzzel :PROPERTIES: :CUSTOM_ID: h:069cabf3-df14-49ba-8d17-75f2bcf34fbf :END: @@ -6445,7 +6462,7 @@ Here I only need to set basic layout options - the rest is being managed by styl } #+end_src -*** Starship +**** Starship :PROPERTIES: :CUSTOM_ID: h:55212502-c8f6-43af-ae99-55c8377ef34e :END: @@ -6561,7 +6578,7 @@ Starship makes my =zsh= look cooler! I have symbols for most programming languag } #+end_src -*** Kitty +**** Kitty :PROPERTIES: :CUSTOM_ID: h:5f1287db-d2e8-49aa-8c58-730129c7795c :END: @@ -6585,7 +6602,7 @@ The theme is handled by stylix. } #+end_src -*** zsh +**** zsh :PROPERTIES: :CUSTOM_ID: h:91dd4cc4-aada-4e74-be23-0cc69ed85af5 :END: @@ -6648,7 +6665,7 @@ Here we set some aliases (some of them should be shellApplications instead) as w } #+end_src -*** Mail +**** Mail :PROPERTIES: :CUSTOM_ID: h:506d01fc-c20b-473a-ac78-bce4b53fe0e3 :END: @@ -6792,7 +6809,7 @@ Normally I use 4 mail accounts - here I set them all up. Three of them are Googl } #+end_src -*** Home-manager: Emacs +**** Home-manager: Emacs :PROPERTIES: :CUSTOM_ID: h:c05d1b64-7110-4151-b436-46bc447113b4 :END: @@ -6858,7 +6875,7 @@ Lastly, I am defining some more packages here that the parser has problems findi } #+end_src -*** Waybar +**** Waybar :PROPERTIES: :CUSTOM_ID: h:0bf51f63-01c0-4053-a591-7f0c5697c690 :END: @@ -7077,7 +7094,7 @@ The rest of this configuration is found here: } #+end_src -*** Firefox +**** Firefox :PROPERTIES: :CUSTOM_ID: h:fbec0bd4-690b-4f79-8b2b-a40263760a96 :END: @@ -7191,14 +7208,14 @@ I used to build the firefox addon =bypass-paywalls-clean= myself here, but the m } #+end_src -*** Services +**** Services :PROPERTIES: :CUSTOM_ID: h:387c3a82-1fb1-4c0f-8051-874e2acb8804 :END: Services that can be defined through home-manager should be defined here. -**** gnome-keyring +***** gnome-keyring :PROPERTIES: :CUSTOM_ID: h:cb812c8a-247c-4ce5-a00c-59332c2f5fb9 :END: @@ -7215,7 +7232,7 @@ Used for storing sessions in e.g. Nextcloud } #+end_src -**** KDE Connect +***** KDE Connect :PROPERTIES: :CUSTOM_ID: h:be6afd89-9e1e-40b6-8542-5c07a0ab780d :END: @@ -7232,7 +7249,7 @@ This enables phone/computer communication, including sending clipboard, files et } #+end_src -**** Mako +***** Mako :PROPERTIES: :CUSTOM_ID: h:99d05729-df35-4958-9940-3319d6a41359 :END: @@ -7275,7 +7292,7 @@ The `extraConfig` section here CANNOT be reindented. This has something to do wi } #+end_src -*** Sway +**** Sway :PROPERTIES: :CUSTOM_ID: h:02df9dfc-d1af-4a37-a7a0-d8da0af96a20 :END: @@ -7571,7 +7588,7 @@ Currently, I am too lazy to explain every option here, but most of it is very se } #+end_src -*** gpg-agent +**** gpg-agent #+begin_src nix :tangle profiles/common/home/gpg-agent.nix { pkgs, ... }: @@ -7591,6 +7608,42 @@ Currently, I am too lazy to explain every option here, but most of it is very se } #+end_src +*** Optional + +**** Gaming + +#+begin_src nix :tangle profiles/optional/home/gaming.nix + + { pkgs, ... }: + + { + home.packages = with pkgs; [ + lutris + wine + libudev-zero + dwarfs + fuse-overlayfs + # steam + # steam-run + patchelf + gamescope + vulkan-tools + moonlight-qt + ns-usbloader + + # gog games installing + heroic + + # minecraft + temurin-bin-17 + (prismlauncher.override { + glfw = pkgs.glfw-wayland-minecraft; + }) + ]; + } + +#+end_src + ** flake.nix template :PROPERTIES: :CUSTOM_ID: h:aee5ec75-7ca6-40d8-b6ac-a3e7e33a474b diff --git a/index.html b/index.html index 0ea71e5..3e5e2f7 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 @@ -
  • 3.2. Overlays, packages, and modules +
  • 3.2. Overlays, packages, and modules
  • -
  • 3.3. Common NixOS +
  • 3.3. NixOS
  • -
  • 3.4. Common Home-Manager +
  • 3.4. Home-manager
  • 3.5. flake.nix template @@ -340,7 +310,7 @@
    • 4.4.1. Org Mode
    • 4.4.2. Nix Mode
    • -
    • 4.4.3. nixpkgs-fmt
    • +
    • 4.4.3. nixpkgs-fmt
    • 4.4.4. Markdown Mode
    • 4.4.5. Olivetti
    • 4.4.6. darkroom
    • @@ -400,7 +370,7 @@

      -This file has 42684 words spanning 11525 lines and was last revised on 2024-07-25 16:01:11 +0200. +This file has 42747 words spanning 11578 lines and was last revised on 2024-07-25 16:53:03 +0200.

      @@ -450,7 +420,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 16:01:11 +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:53:03 +0200)

    @@ -1060,8 +1030,8 @@ mixedModules = [ -
    -

    2.3.3. General (outputs)

    +
    +

    2.3.3. General (outputs)

    @@ -2440,7 +2410,7 @@ in
     
  • -
  • Home-manager only
    +
  • Home-manager only
    1. Home manager
      @@ -2834,8 +2804,10 @@ New setup for the SP3, this time using NixOS - another machine will take over th

      My new main machine. +This is basically just adjusted to the core count, path to the hwmon (this was very bothersome on this machine due to changing address), as well as making use of the top-row function keys.

      +
       { inputs, outputs, config, ... }:
      @@ -2843,12 +2815,17 @@ My new main machine.
       
         imports = [
           inputs.nixos-hardware.nixosModules.lenovo-thinkpad-p14s-amd-gen2
      +
           ./hardware-configuration.nix
           ./nixos.nix
      +
      +    ../optional/nixos/steam.nix
      +    ../optional/nixos/virtualbox.nix
      +
           inputs.home-manager.nixosModules.home-manager
           {
             home-manager.users.swarsel.imports = outputs.mixedModules ++ [
      -        ./home.nix
      +        ../optional/home/gaming.nix
             ] ++ (builtins.attrValues outputs.homeManagerModules);
           }
         ]++ (builtins.attrValues outputs.nixosModules);
      @@ -2864,6 +2841,11 @@ My new main machine.
         #  ------   -----
         # | DP-4 | |eDP-1|
         #  ------   -----
      +
      +  swarselsystems = {
      +    wallpaper = ../../wallpaper/lenovowp.png;
      +  };
      +
         home-manager.users.swarsel.swarselsystems = {
           isLaptop = true;
           isNixos = true;
      @@ -2964,18 +2946,7 @@ Mostly just sets some opened ports for several games, enables virtualbox (which
           };
         };
       
      -  virtualisation.virtualbox = {
      -    host = {
      -      enable = true;
      -      enableExtensionPack = true;
      -    };
      -    # leaving this here for future notice. setting guest.enable = true will make 'restarting sysinit-reactivation.target' take till timeout on nixos-rebuild switch
      -    guest = {
      -      enable = false;
      -    };
      -  };
       
      -  stylix.image = ../../wallpaper/lenovowp.png;
       
         hardware = {
           graphics = {
      @@ -2994,12 +2965,6 @@ Mostly just sets some opened ports for several games, enables virtualbox (which
           };
         };
       
      -  programs.steam = {
      -    enable = true;
      -    extraCompatPackages = [
      -      pkgs.proton-ge-bin
      -    ];
      -  };
       
         # Configure keymap in X11 (only used for login)
       
      @@ -3020,13 +2985,6 @@ Mostly just sets some opened ports for several games, enables virtualbox (which
       
       
         environment.systemPackages = with pkgs; [
      -    # gog games installing
      -    heroic
      -    # minecraft
      -    temurin-bin-17
      -    (prismlauncher.override {
      -      glfw = pkgs.glfw-wayland-minecraft;
      -    })
         ];
       
         system.stateVersion = "23.05";
      @@ -3034,35 +2992,6 @@ Mostly just sets some opened ports for several games, enables virtualbox (which
       
       }
       
      -
      -
      -
      -
    2. -
    3. Home Manager
      -
      -

      -This is basically just adjusted to the core count, path to the hwmon (this was very bothersome on this machine due to changing address), as well as making use of the top-row function keys. -

      - -
      -
      { config, pkgs, lib, ... }: with lib;
      -    {
      -
      -      wayland.windowManager.sway = {
      -        config = rec {
      -          # update for actual inputs here,
      -
      -          # workspaceOutputAssign = [
      -          #   { output = "eDP-1"; workspace = "1:一"; }
      -          #   { output = "DP-4"; workspace = "2:二"; }
      -          # ];
      -
      -
      -
      -        };
      -      };
      -    }
      -
       
      @@ -5446,8 +5375,8 @@ in
    -
    -

    3.2. Overlays, packages, and modules

    +
    +

    3.2. Overlays, packages, and modules

    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. @@ -5466,8 +5395,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.

  • -
    -

    3.2.1. Packages

    +
    +

    3.2.1. Packages

    @@ -5477,8 +5406,8 @@ _ : rec { }
     
    -
    -

    3.2.2. Overlays

    +
    +

    3.2.2. Overlays

    @@ -5511,15 +5440,15 @@ _ : rec { }
     
    -
    -

    3.2.3. Modules

    +
    +

    3.2.3. Modules

    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.

      -
    1. NixOS
      +
    2. NixOS

      Modules that need to be loaded on the NixOS level. Note that these will not be available on systems that are not running NixOS @@ -5527,13 +5456,31 @@ Modules that need to be loaded on the NixOS level. Note that these will not be a

      {
      -
      +  wallpaper = import ./wallpaper.nix;
       }
      +
      +
      +
      +
        +
      1. Wallpaper
        +
        +
        +
        { lib, ... }:
        +
        +{
        +  options.swarselsystems.wallpaper = lib.mkOption {
        +      type = lib.types.path;
        +      default = "";
        +    };
        +  }
        +
         
      2. -
      3. home-manager
        +
      +
    3. +
    4. home-manager
      {
      @@ -5544,12 +5491,13 @@ Modules that need to be loaded on the NixOS level. Note that these will not be a
         nixos = import ./nixos.nix;
         waybar = import ./waybar.nix;
         startup = import ./startup.nix;
      +  wallpaper = import ./wallpaper.nix;
       }
       
        -
      1. Laptop
        +
      2. Laptop
        { lib, config, ... }:
        @@ -5584,7 +5532,7 @@ Modules that need to be loaded on the NixOS level. Note that these will not be a
         
      3. -
      4. Hardware
        +
      5. Hardware
        { lib, ... }:
        @@ -5608,7 +5556,7 @@ Modules that need to be loaded on the NixOS level. Note that these will not be a
         
      6. -
      7. Waybar
        +
      8. Waybar
          { lib, config, ... }:
        @@ -5648,7 +5596,7 @@ in
         
      9. -
      10. Monitors
        +
      11. Monitors
        { lib, config, ... }:
        @@ -5665,7 +5613,7 @@ in
         
      12. -
      13. Input
        +
      14. Input
        { lib, config, ... }:
        @@ -5706,7 +5654,7 @@ in
         
      15. -
      16. Nixos
        +
      17. Nixos
        { lib, config, ... }:
        @@ -5728,7 +5676,7 @@ in
         
      18. -
      19. System startup
        +
      20. System startup
        { lib, config, ... }:
        @@ -5749,6 +5697,22 @@ in
             ];
           };
         }
        +
        +
        +
        +
      21. +
      22. Wallpaper
        +
        +
        +
        { lib, ... }:
        +
        +{
        +  options.swarselsystems.wallpaper = lib.mkOption {
        +      type = lib.types.path;
        +      default = "";
        +    };
        +  }
        +
         
        @@ -5758,16 +5722,20 @@ in
    -
    -

    3.3. Common NixOS

    -
    +
    +

    3.3. NixOS

    +
    +
    +
    +

    3.3.1. Common

    +

    These are system-level settings specific to NixOS machines. All settings that are required on all machines go here.

    -
    -

    3.3.1. Imports, enable home-manager module

    -
    +
      +
    1. Imports, enable home-manager module
      +

      First, we enable the use of home-manager as a NixoS module

      @@ -5812,14 +5780,13 @@ First, we enable the use of home-manager as a NixoS module
    -
    -
    -

    3.3.2. General

    -
    + +
  • General
    +
    1. Setup login keymap
      -
      +

      Next, we setup the keymap in case we are not in a graphical session. At this point, I always resort to us/altgr-intl, as it is extremly comfortable to use

      @@ -5839,7 +5806,7 @@ Next, we setup the keymap in case we are not in a graphical session. At this poi
    2. Make users non-mutable
      -
      +

      This ensures that all user-configuration happens here in the config file.

      @@ -5863,7 +5830,7 @@ This ensures that all user-configuration happens here in the config file.
    3. Environment setup
      -
      +

      Next, we will setup some environment variables that need to be set on the system-side. We apply some compatibility options for chromium apps on wayland, enable the wordlist and make metadata reading possible for my file explorer (nautilus).

      @@ -5890,7 +5857,7 @@ Next, we will setup some environment variables that need to be set on the system
    4. Enable PolicyKit
      -
      +

      Needed for control over system-wide privileges etc.

      @@ -5905,7 +5872,7 @@ Needed for control over system-wide privileges etc.
    5. 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.

      @@ -5925,7 +5892,7 @@ The nix store fills up over time, until /boot/efi is filled. This s
    6. 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.

      @@ -5944,7 +5911,7 @@ This enables hardlinking identical files in the nix store, to save on disk space
    7. Reduce systemd timeouts
      -
      +

      There is a persistent bug over Linux kernels that makes the user wait 1m30s on system shutdown due to the reason a stop job is running for session 1 of user .... I do not want to wait that long and am confident no important data is lost by doing this.

      @@ -5963,7 +5930,7 @@ There is a persistent bug over Linux kernels that makes the user wait 1m30s on s
    8. Hardware settings
      -
      +

      Enable OpenGL, Sound, Bluetooth and various drivers.

      @@ -6000,7 +5967,7 @@ Enable OpenGL, Sound, Bluetooth and various drivers.
    9. Common network settings
      -
      +

      Here I only enable networkmanager. Most of the 'real' network config is done in System specific configuration.

      @@ -6218,7 +6185,7 @@ Here I only enable networkmanager. Most of the 'real' network confi
    10. Time, locale settings
      -
      +

      Setup timezone and locale. I want to use the US layout, but have the rest adapted to my country and timezone. Also, there is an issue with running Windows/Linux dualboot on the same machine where the hardware clock desyncs between the two OS'es. We fix that bug here as well.

      @@ -6251,10 +6218,9 @@ Setup timezone and locale. I want to use the US layout, but have the rest adapte
    -
  • -
    -

    3.3.3. sops

    -
    + +
  • sops
    +

    I use sops-nix to handle secrets that I want to have available on my machines at all times. Procedure to add a new machine:

    @@ -6303,17 +6269,16 @@ I use sops-nix to handle secrets that I want to have available on my machines at
  • -
    -
    -

    3.3.4. Theme (stylix)

    -
    + +
  • Theme (stylix)
    +

    By default, stylix wants to style GRUB as well. However, I think that looks horrible. theme is defined in Theme (stylix).

    -
    { pkgs, home-manager, ... }:
    +
    { inputs, pkgs, home-manager, config, ... }:
     {
       stylix = {
     
    @@ -6362,21 +6327,23 @@ By default, stylix wants to style
         };
     
         targets.grub.enable = false; # the styling makes grub more ugly
    +    image = config.swarselsystems.wallpaper;
       };
       home-manager.users.swarsel = {
    -    stylix.targets = {
    -      emacs.enable = false;
    -      waybar.enable = false;
    +    stylix= {
    +      targets = {
    +        emacs.enable = false;
    +        waybar.enable = false;
    +      };
         };
       };
     }
     
    -
  • -
    -

    3.3.5. System Packages

    -
    + +
  • System Packages
    +

    Mostly used to install some compilers and lsp's that I want to have available when not using a devShell flake. Most other packages should go in Installed packages.

    @@ -6466,10 +6433,9 @@ Mostly used to install some compilers and lsp's that I want to have available wh
  • -
    -
    -

    3.3.6. Programs (including zsh setup)

    -
    + +
  • Programs (including zsh setup)
    +

    Some programs profit from being installed through dedicated NixOS settings on system-level; these go here. Notably the zsh setup goes here and cannot be deleted under any circumstances.

    @@ -6487,8 +6453,8 @@ Some programs profit from being installed through dedicated NixOS settings on sy
    1. -
    2. zsh
      -
      +
    3. zsh
      +

      Do not touch this.

      @@ -6505,8 +6471,8 @@ Do not touch this.
    -
  • syncthing
    -
    +
  • syncthing
    +
     { ... }:
    @@ -6559,17 +6525,16 @@ Do not touch this.
     
  • -
    -
    -

    3.3.7. Services

    -
    + +
  • Services
    +

    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
      -
      +

      Enables the blueman service including the nice system tray icon.

      @@ -6583,15 +6548,15 @@ Enables the blueman service including the nice system tray icon.
    2. -
    3. Network devices
      -
      +
    4. Network devices
      +

      In this section we enable compatibility with several network devices I have at home, mainly printers and scanners.

      1. Scanners
        -
        +

        This allows me to use my big scanner/printer's scanning function over the network.

        @@ -6610,7 +6575,7 @@ This allows me to use my big scanner/printer's scanning function over the networ
      2. Printers
        -
        +

        This allows me to use my big scanner/printer's printing function over the network. Most of the settings are driver related.

        @@ -6635,8 +6600,8 @@ services.printing = {
      3. -
      4. Avahi (device discovery)
        -
        +
      5. Avahi (device discovery)
        +

        Avahi is the service used for the network discovery.

        @@ -6656,7 +6621,7 @@ services.avahi = {
    5. enable GVfs
      -
      +

      This is being set to allow myself to use all functions of nautilus in NixOS

      @@ -6671,7 +6636,7 @@ This is being set to allow myself to use all functions of nautilus in NixOS
    6. interception-tools: Make CAPS work as ESC/CTRL
      -
      +

      This is a super-convenient package that lets my remap my CAPS key to ESC if pressed shortly, and CTRL if being held.

      @@ -6712,10 +6677,9 @@ This is a super-convenient package that lets my remap my CAPS key t
    -
  • -
    -

    3.3.8. Hardware compatibility settings (Yubikey, Ledger) - udev rules

    -
    + +
  • Hardware compatibility settings (Yubikey, Ledger) - udev rules
    +

    It makes sense to house these settings in their own section, since they are all needed really. Note that the starting of the gpg-agent is done in the sway settings, to also perform this step of the setup for non NixOS-machines at the same time.

    @@ -6750,10 +6714,9 @@ Also, this is a good place to setup the udev rules.
  • -
    -
    -

    3.3.9. System Login

    -
    + +
  • System Login
    +

    This section houses the greetd related settings. I do not really want to use a display manager, but it is useful to have setup in some ways - in my case for starting sway on system startup. Notably the default user login setting that is commented out here goes into the system specific settings, make sure to update it there

    @@ -6783,15 +6746,67 @@ This section houses the greetd related settings. I do not really want to use a d
  • + + +
    +
    +

    3.3.2. Optional

    +
    +
    +
      +
    1. steam
      +
      +
      +
      { pkgs, ... }:
      +{
      +
      +  programs.steam = {
      +    enable = true;
      +    extraCompatPackages = [
      +      pkgs.proton-ge-bin
      +    ];
      +  };
      +}
      +
      +
      +
      -
      -

      3.4. Common Home-Manager

      -
      +
    2. +
    3. VirtualBox
      +
      +
      +
        { ... }:
      +  {
      +      virtualisation.virtualbox = {
      +        host = {
      +          enable = true;
      +          enableExtensionPack = true;
      +        };
      +        # leaving this here for future notice. setting guest.enable = true will make 'restarting sysinit-reactivation.target' take till timeout on nixos-rebuild switch
      +        guest = {
      +          enable = false;
      +        };
      +      };
      +}
      +
      -
      -

      3.4.1. Imports

      -
      +
      +
    4. +
    +
    +
    +
    +

    3.4. Home-manager

    +
    +
    +
    +

    3.4.1. Common

    +
    +
    +
      +
    1. Imports
      +

      This section sets up all the imports that are used in the home-manager section.

      @@ -6858,10 +6873,9 @@ This section sets up all the imports that are used in the home-manager section.
    -
    -
    -

    3.4.2. Installed packages

    -
    + +
  • Installed packages
    +

    Here are defined some packages that I would like to use across all my machines. Most of these should not require further setup. Notably the cura package is severely outdated on nixpkgs, so I just fetch a more recent AppImage and run that instead.

    @@ -6876,7 +6890,7 @@ Programming languages and default lsp's are defined here:
  • Packaged
    -
    +
    { pkgs, ... }:
     
    @@ -6940,20 +6954,6 @@ Programming languages and default lsp's are defined here: 
     
  • Self-defined
    -
    +
    # cura
     (
    @@ -7205,10 +7205,9 @@ Programming languages and default lsp's are defined here: 
    -

    3.4.3. sops

    -
    +
  • +
  • sops
    +

    I use sops-nix to handle secrets that I want to have available on my machines at all times. Procedure to add a new machine:

    @@ -7245,10 +7244,9 @@ Since we are using the home-manager implementation here, we need to specify the
  • -
    -
    -

    3.4.4. SSH Machines

    -
    + +
  • SSH Machines
    +

    It is very convenient to have SSH aliases in place for machines that I use. This is mainly used for some server machines and some university clusters. We also enable agent forwarding to have our Yubikey SSH key accessible on the remote host.

    @@ -7354,10 +7352,9 @@ It is very convenient to have SSH aliases in place for machines that I use. This
  • -
    -
    -

    3.4.5. Theme (stylix)

    -
    + +
  • Theme (stylix)
    +

    These section allows home-manager to allow theme settings, and handles some other appearance-related settings like cursor styles. Interestingly, system icons (adwaita) still need to be setup on system-level, and will break if defined here.

    @@ -7419,6 +7416,7 @@ This section has been notably empty ever since switching to stylix. Only Emacs i }; }; + image = config.swarselsystems.wallpaper; targets = { emacs.enable = false; waybar.enable = false; @@ -7428,10 +7426,9 @@ This section has been notably empty ever since switching to stylix. Only Emacs i
  • -
    -
    -

    3.4.6. Desktop Entries

    -
    + +
  • Desktop Entries
    +

    Some programs lack a dmenu launcher - I define them myself here.

    @@ -7492,10 +7489,9 @@ TODO: Non-NixOS machines (=sp3) should not use these by default, but instead the
  • -
    -
    -

    3.4.7. Linking dotfiles

    -
    + +
  • Linking dotfiles
    +

    This section should be used in order to symlink already existing configuration files using `home.file` and setting session variables using `home.sessionVariables`.

    @@ -7545,10 +7541,9 @@ Also, we link some files to the users XDG configuration home:
  • -
    -
    -

    3.4.8. Sourcing environment variables

    -
    + +
  • Sourcing environment variables
    +
    { ... }:
     {
    @@ -7559,17 +7554,16 @@ Also, we link some files to the users XDG configuration home:
     
    -
  • -
    -

    3.4.9. Programs

    -
    + +
  • Programs
    +

    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
      -
      +

      This section is for programs that require no further configuration. zsh Integration is enabled by default for these.

      @@ -7599,10 +7593,9 @@ This section is for programs that require no further configuration. zsh Integrat
    -
  • -
    -

    3.4.10. nix-index

    -
    + +
  • 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.

    @@ -7631,10 +7624,9 @@ nix-index provides a way to find out which packages are provided by which deriva
  • -
    -
    -

    3.4.11. password-store

    -
    + +
  • password-store
    +

    Enables password store with the pass-otp extension which allows me to store and generate one-time-passwords.

    @@ -7653,10 +7645,9 @@ Enables password store with the pass-otp extension which allows me
  • -
    -
    -

    3.4.12. direnv

    -
    + +
  • direnv
    +

    Enables direnv, which I use for nearly all of my nix dev flakes.

    @@ -7672,10 +7663,9 @@ Enables direnv, which I use for nearly all of my nix dev flakes.
  • -
    -
    -

    3.4.13. eza

    -
    + +
  • eza
    +

    Eza provides me with a better ls command and some other useful aliases.

    @@ -7696,10 +7686,9 @@ Eza provides me with a better ls command and some other useful alia
  • -
    -
    -

    3.4.14. git

    -
    + +
  • git
    +

    Here I set up my git config, automatic signing of commits, useful aliases for my ost used commands (for when I am not using Magit) as well as a git template defined in Linking dotfiles.

    @@ -7747,10 +7736,9 @@ Here I set up my git config, automatic signing of commits, useful aliases for my
  • -
    -
    -

    3.4.15. Fuzzel

    -
    + +
  • Fuzzel
    +

    Here I only need to set basic layout options - the rest is being managed by stylix.

    @@ -7773,10 +7761,9 @@ Here I only need to set basic layout options - the rest is being managed by styl
  • -
    -
    -

    3.4.16. Starship

    -
    + +
  • Starship
    +

    Starship makes my zsh look cooler! I have symbols for most programming languages and toolchains, also I build my own powerline.

    @@ -7891,10 +7878,9 @@ Starship makes my zsh look cooler! I have symbols for most programm
  • -
    -
    -

    3.4.17. Kitty

    -
    + +
  • Kitty
    +

    Kitty is the terminal emulator of choice for me, it is nice to configure using nix, fast, and has a nice style.

    @@ -7919,10 +7905,9 @@ The theme is handled by stylix.
  • -
    -
    -

    3.4.18. zsh

    -
    + +
  • zsh
    +

    zsh is the most convenient shell for me and it happens to be super neat to configure within home manager.

    @@ -7986,10 +7971,9 @@ Here we set some aliases (some of them should be shellApplications instead) as w
  • -
    -
    -

    3.4.19. Mail

    -
    + +
  • Mail
    +

    Normally I use 4 mail accounts - here I set them all up. Three of them are Google accounts (sadly), which are a chore to setup. The last is just a sender account that I setup SMTP for here.

    @@ -8132,10 +8116,9 @@ accounts.email = {
  • -
    -
    -

    3.4.20. Home-manager: Emacs

    -
    + +
  • Home-manager: Emacs
    +

    By using the emacs-overlay NixOS module, I can install all Emacs packages that I want to use right through NixOS. This is done by passing my init.el file to the configuration which will then be parsed upon system rebuild, looking for use-package sections in the Elisp code. Also I define here the style of Emacs that I want to run - I am going with native Wayland Emacs here (emacs-pgtk). All of the nice options such as tree-sitter support are enabled by default, so I do not need to adjust the build process.

    @@ -8202,10 +8185,9 @@ Lastly, I am defining some more packages here that the parser has problems findi
  • -
    -
    -

    3.4.21. Waybar

    -
    + +
  • Waybar
    +

    Again I am just using the first bar option here that I was able to find good understandable documentation for. Of note is that the `cpu` section's `format` is not defined here, but in section 1 (since not every machine has the same number of cores)

    @@ -8427,10 +8409,9 @@ programs.waybar = {
  • -
    -
    -

    3.4.22. Firefox

    -
    + +
  • Firefox
    +

    Setting up firefox along with some policies that are important to me (mostly disabling telemetry related stuff as well as Pocket). I also enable some integrations that enable super useful packages, namely tridactyl and browserpass.

    @@ -8549,17 +8530,16 @@ I used to build the firefox addon bypass-paywalls-clean myself here
  • -
    -
    -

    3.4.23. Services

    -
    + +
  • Services
    +

    Services that can be defined through home-manager should be defined here.

    1. gnome-keyring
      -
      +

      Used for storing sessions in e.g. Nextcloud

      @@ -8577,7 +8557,7 @@ services.gnome-keyring = {
    2. KDE Connect
      -
      +

      This enables phone/computer communication, including sending clipboard, files etc. Sadly on Wayland many of the features are broken (like remote control).

      @@ -8595,7 +8575,7 @@ This enables phone/computer communication, including sending clipboard, files et
    3. Mako
      -
      +

      Desktop notifications!

      @@ -8641,10 +8621,9 @@ The `extraConfig` section here CANNOT be reindented. This has something to do wi
    -
  • -
    -

    3.4.24. Sway

    -
    + +
  • Sway
    +

    I am currently using SwayFX, which adds some nice effects to sway, like rounded corners and hiding the separator between title and content of a window.

    @@ -8941,10 +8920,9 @@ Currently, I am too lazy to explain every option here, but most of it is very se
  • -
    -
    -

    3.4.25. gpg-agent

    -
    + +
  • gpg-agent
    +
    { pkgs, ... }:
     {
    @@ -8964,6 +8942,51 @@ services.gpg-agent = {
     
    +
  • + +
    +
    +

    3.4.2. Optional

    +
    +
    +
      +
    1. Gaming
      +
      +
      +
      +{ pkgs, ... }:
      +
      + {
      +   home.packages = with pkgs; [
      +    lutris
      +    wine
      +    libudev-zero
      +    dwarfs
      +    fuse-overlayfs
      +    # steam
      +    # steam-run
      +    patchelf
      +    gamescope
      +    vulkan-tools
      +    moonlight-qt
      +    ns-usbloader
      +
      +    # gog games installing
      +    heroic
      +
      +    # minecraft
      +    temurin-bin-17
      +    (prismlauncher.override {
      +      glfw = pkgs.glfw-wayland-minecraft;
      +    })
      +   ];
      + }
      +
      +
      +
      +
      +
    2. +
    @@ -9978,7 +10001,7 @@ The standard Emacs behaviour for the Python process shell is a bit annoying. Thi
    -
  • 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. @@ -10011,7 +10034,7 @@ This function searches for common delimiters in region and removes them, summari

  • -
  • Nix formatters
    +
  • Nix formatters

    This formats the org code block at point in accordance to the nixpkgs-fmt formatter @@ -11584,8 +11607,8 @@ This adds a rudimentary nix-mode to Emacs. I have not really tried this out, as

  • -
    -

    4.4.3. nixpkgs-fmt

    +
    +

    4.4.3. nixpkgs-fmt

    Adds functions for formatting nix code. @@ -13600,7 +13623,7 @@ My laptop, sadly soon to be replaced by a new one, since most basic functions ar

    Author: Leon Schwarzäugl

    -

    Created: 2024-07-25 Do 16:01

    +

    Created: 2024-07-25 Do 16:53

    Validate

    diff --git a/modules/home/default.nix b/modules/home/default.nix index ddaab1e..53e3eff 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -6,4 +6,5 @@ nixos = import ./nixos.nix; waybar = import ./waybar.nix; startup = import ./startup.nix; + wallpaper = import ./wallpaper.nix; } diff --git a/modules/home/wallpaper.nix b/modules/home/wallpaper.nix new file mode 100644 index 0000000..2f44756 --- /dev/null +++ b/modules/home/wallpaper.nix @@ -0,0 +1,8 @@ +{ lib, ... }: + +{ + options.swarselsystems.wallpaper = lib.mkOption { + type = lib.types.path; + default = ""; + }; +} diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index ffcd441..09de9cb 100644 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -1 +1,3 @@ -{ } +{ + wallpaper = import ./wallpaper.nix; +} diff --git a/modules/nixos/wallpaper.nix b/modules/nixos/wallpaper.nix new file mode 100644 index 0000000..2f44756 --- /dev/null +++ b/modules/nixos/wallpaper.nix @@ -0,0 +1,8 @@ +{ lib, ... }: + +{ + options.swarselsystems.wallpaper = lib.mkOption { + type = lib.types.path; + default = ""; + }; +} diff --git a/profiles/common/home/packages.nix b/profiles/common/home/packages.nix index de856df..b8aea62 100644 --- a/profiles/common/home/packages.nix +++ b/profiles/common/home/packages.nix @@ -60,20 +60,6 @@ qmk qmk-udev-rules - # games - lutris - wine - libudev-zero - dwarfs - fuse-overlayfs - # steam - # steam-run - patchelf - gamescope - vulkan-tools - moonlight-qt - ns-usbloader - # firefox related tridactyl-native diff --git a/profiles/common/home/stylix.nix b/profiles/common/home/stylix.nix index 7312388..a9bf289 100644 --- a/profiles/common/home/stylix.nix +++ b/profiles/common/home/stylix.nix @@ -46,6 +46,7 @@ }; }; + image = config.swarselsystems.wallpaper; targets = { emacs.enable = false; waybar.enable = false; diff --git a/profiles/common/nixos/stylix.nix b/profiles/common/nixos/stylix.nix index bcb96eb..6ada752 100644 --- a/profiles/common/nixos/stylix.nix +++ b/profiles/common/nixos/stylix.nix @@ -1,4 +1,4 @@ -{ pkgs, home-manager, ... }: +{ inputs, pkgs, home-manager, config, ... }: { stylix = { @@ -47,11 +47,14 @@ }; targets.grub.enable = false; # the styling makes grub more ugly + image = config.swarselsystems.wallpaper; }; home-manager.users.swarsel = { - stylix.targets = { - emacs.enable = false; - waybar.enable = false; + stylix = { + targets = { + emacs.enable = false; + waybar.enable = false; + }; }; }; } diff --git a/profiles/fourside/default.nix b/profiles/fourside/default.nix index d6e0ddf..12b61d2 100644 --- a/profiles/fourside/default.nix +++ b/profiles/fourside/default.nix @@ -3,12 +3,17 @@ imports = [ inputs.nixos-hardware.nixosModules.lenovo-thinkpad-p14s-amd-gen2 + ./hardware-configuration.nix ./nixos.nix + + ../optional/nixos/steam.nix + ../optional/nixos/virtualbox.nix + inputs.home-manager.nixosModules.home-manager { home-manager.users.swarsel.imports = outputs.mixedModules ++ [ - ./home.nix + ../optional/home/gaming.nix ] ++ (builtins.attrValues outputs.homeManagerModules); } ] ++ (builtins.attrValues outputs.nixosModules); @@ -24,6 +29,11 @@ # ------ ----- # | DP-4 | |eDP-1| # ------ ----- + + swarselsystems = { + wallpaper = ../../wallpaper/lenovowp.png; + }; + home-manager.users.swarsel.swarselsystems = { isLaptop = true; isNixos = true; diff --git a/profiles/fourside/nixos.nix b/profiles/fourside/nixos.nix index 7cdeb8f..e3b4f8e 100644 --- a/profiles/fourside/nixos.nix +++ b/profiles/fourside/nixos.nix @@ -34,18 +34,7 @@ }; }; - virtualisation.virtualbox = { - host = { - enable = true; - enableExtensionPack = true; - }; - # leaving this here for future notice. setting guest.enable = true will make 'restarting sysinit-reactivation.target' take till timeout on nixos-rebuild switch - guest = { - enable = false; - }; - }; - stylix.image = ../../wallpaper/lenovowp.png; hardware = { graphics = { @@ -64,12 +53,6 @@ }; }; - programs.steam = { - enable = true; - extraCompatPackages = [ - pkgs.proton-ge-bin - ]; - }; # Configure keymap in X11 (only used for login) @@ -90,13 +73,6 @@ environment.systemPackages = with pkgs; [ - # gog games installing - heroic - # minecraft - temurin-bin-17 - (prismlauncher.override { - glfw = pkgs.glfw-wayland-minecraft; - }) ]; system.stateVersion = "23.05"; diff --git a/profiles/optional/home/gaming.nix b/profiles/optional/home/gaming.nix new file mode 100644 index 0000000..34174ec --- /dev/null +++ b/profiles/optional/home/gaming.nix @@ -0,0 +1,27 @@ +{ pkgs, ... }: + +{ + home.packages = with pkgs; [ + lutris + wine + libudev-zero + dwarfs + fuse-overlayfs + # steam + # steam-run + patchelf + gamescope + vulkan-tools + moonlight-qt + ns-usbloader + + # gog games installing + heroic + + # minecraft + temurin-bin-17 + (prismlauncher.override { + glfw = pkgs.glfw-wayland-minecraft; + }) + ]; +} diff --git a/profiles/optional/nixos/steam.nix b/profiles/optional/nixos/steam.nix new file mode 100644 index 0000000..85ecf47 --- /dev/null +++ b/profiles/optional/nixos/steam.nix @@ -0,0 +1,10 @@ +{ pkgs, ... }: +{ + + programs.steam = { + enable = true; + extraCompatPackages = [ + pkgs.proton-ge-bin + ]; + }; +} diff --git a/profiles/optional/nixos/virtualbox.nix b/profiles/optional/nixos/virtualbox.nix new file mode 100644 index 0000000..8564542 --- /dev/null +++ b/profiles/optional/nixos/virtualbox.nix @@ -0,0 +1,13 @@ +{ ... }: +{ + virtualisation.virtualbox = { + host = { + enable = true; + enableExtensionPack = true; + }; + # leaving this here for future notice. setting guest.enable = true will make 'restarting sysinit-reactivation.target' take till timeout on nixos-rebuild switch + guest = { + enable = false; + }; + }; +}