chore: update flake
Some checks are pending
Flake check / Check flake (push) Waiting to run

This commit is contained in:
Leon Schwarzäugl 2025-09-15 15:55:39 +02:00
parent 0848f04326
commit 04ab8d309f
Signed by: swarsel
GPG key ID: 26A54C31F2A4FD84
18 changed files with 2546 additions and 451 deletions

View file

@ -454,7 +454,8 @@ A short overview over each input and what it does:
url = "github:dj95/zjstatus"; url = "github:dj95/zjstatus";
}; };
fw-fanctrl = { fw-fanctrl = {
url = "github:TamtamHero/fw-fanctrl/packaging/nix"; # url = "github:TamtamHero/fw-fanctrl/packaging/nix";
url = "github:Swarsel/fw-fanctrl/packaging/nix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
nix-darwin = { nix-darwin = {
@ -1207,7 +1208,7 @@ Lastly, in the =perSystem= attribute set, we see that it is actually passed some
devshells.default = { devshells.default = {
packages = [ packages = [
(builtins.trace "alarm: we pinned nix_2_24 because of https://github.com/shlevy/nix-plugins/issues/20" pkgs.nixVersions.nix_2_24) # Always use the nix version from this flake's nixpkgs version, so that nix-plugins (below) doesn't fail because of different nix versions. # (builtins.trace "alarm: we pinned nix_2_24 because of https://github.com/shlevy/nix-plugins/issues/20" pkgs.nixVersions.nix_2_24) # Always use the nix version from this flake's nixpkgs version, so that nix-plugins (below) doesn't fail because of different nix versions.
pkgs.git pkgs.git
pkgs.just pkgs.just
pkgs.age pkgs.age
@ -1476,7 +1477,7 @@ On the structure of overlays: as you notice, all of the attributes within overla
nativeMessagingHosts = [ nativeMessagingHosts = [
prev.tridactyl-native prev.tridactyl-native
prev.browserpass prev.browserpass
prev.plasma5Packages.plasma-browser-integration # prev.plasma5Packages.plasma-browser-integration
]; ];
}; };
@ -1859,7 +1860,7 @@ My work machine. Built for more security, this is the gold standard of my config
:CUSTOM_ID: h:567c0055-f5f7-4e53-8f13-d767d7166e9d :CUSTOM_ID: h:567c0055-f5f7-4e53-8f13-d767d7166e9d
:END: :END:
#+begin_src nix-ts :tangle hosts/nixos/pyramid/default.nix #+begin_src nix-ts :tangle hosts/nixos/pyramid/default.nix
{ self, config, inputs, lib, minimal, ... }: { self, config, inputs, lib, minimal, ... }:
let let
primaryUser = config.swarselsystems.mainUser; primaryUser = config.swarselsystems.mainUser;
in in
@ -1873,6 +1874,17 @@ My work machine. Built for more security, this is the gold standard of my config
]; ];
# swarselservices.homebox = {
# enable = true;
# package = pkgs.dev.homebox;
# settings = {
# HBOX_OPTIONS_ALLOW_REGISTRATION = "false";
# # HBOX_STORAGE_DATA = "/test";
# # HBOX_STORAGE_CONN_STRING = "file:///lolna";
# HBOX_STORAGE_PREFIX_PATH = null;
# };
# };
swarselprofiles = { swarselprofiles = {
personal = lib.mkIf (!minimal) true; personal = lib.mkIf (!minimal) true;
work = lib.mkIf (!minimal) true; work = lib.mkIf (!minimal) true;
@ -3319,12 +3331,16 @@ TODO: cleanup this mess
channel.enable = false; channel.enable = false;
package = pkgs.nixVersions.nix_2_28; package = pkgs.nixVersions.nix_2_28;
extraOptions = '' extraOptions = ''
plugin-files = ${pkgs.nix-plugins.overrideAttrs (o: { plugin-files = ${pkgs.nix-plugins}/lib/nix/plugins
buildInputs = [pkgs.nixVersions.nix_2_28 pkgs.boost];
patches = (o.patches or []) ++ [ ../nix/nix-plugins.patch ];
})}/lib/nix/plugins
extra-builtins-file = ${../nix/extra-builtins.nix} extra-builtins-file = ${../nix/extra-builtins.nix}
''; '';
# extraOptions = ''
# plugin-files = ${pkgs.nix-plugins.overrideAttrs (o: {
# buildInputs = [pkgs.nixVersions.nix_2_28 pkgs.boost];
# patches = (o.patches or []) ++ [ ../nix/nix-plugins.patch ];
# })}/lib/nix/plugins
# extra-builtins-file = ${../nix/extra-builtins.nix}
# '';
settings.experimental-features = [ "nix-command" "flakes" ]; settings.experimental-features = [ "nix-command" "flakes" ];
}; };
@ -4097,7 +4113,7 @@ A breakdown of the flags being set:
}; };
nix = { nix = {
package = pkgs.nixVersions.nix_2_28; package = pkgs.nixVersions.nix_2_30;
settings = { settings = {
experimental-features = [ experimental-features = [
"nix-command" "nix-command"
@ -4108,19 +4124,21 @@ A breakdown of the flags being set:
]; ];
trusted-users = [ "@wheel" "${config.swarselsystems.mainUser}" ]; trusted-users = [ "@wheel" "${config.swarselsystems.mainUser}" ];
}; };
# extraOptions = ''
# plugin-files = ${pkgs.nix-plugins}/lib/nix/plugins
# extra-builtins-file = ${self + /nix/extra-builtins.nix}
# '';
extraOptions = '' extraOptions = ''
plugin-files = ${pkgs.nix-plugins.overrideAttrs (o: { plugin-files = ${pkgs.nix-plugins}/lib/nix/plugins
buildInputs = [pkgs.nixVersions.nix_2_28 pkgs.boost];
patches = (o.patches or []) ++ ["${self}/nix/nix-plugins.patch"];
})}/lib/nix/plugins
extra-builtins-file = ${self + /nix/extra-builtins.nix} extra-builtins-file = ${self + /nix/extra-builtins.nix}
'' + lib.optionalString (!minimal) '' '' + lib.optionalString (!minimal) ''
!include ${config.sops.secrets.github-api-token.path} !include ${config.sops.secrets.github-api-token.path}
''; '';
# extraOptions = ''
# plugin-files = ${pkgs.nix-plugins.overrideAttrs (o: {
# buildInputs = [pkgs.nixVersions.nix_2_28 pkgs.boost];
# patches = (o.patches or []) ++ ["${self}/nix/nix-plugins.patch"];
# })}/lib/nix/plugins
# extra-builtins-file = ${self + /nix/extra-builtins.nix}
# '' + lib.optionalString (!minimal) ''
# !include ${config.sops.secrets.github-api-token.path}
# '';
}; };
system.stateVersion = lib.mkDefault "23.05"; system.stateVersion = lib.mkDefault "23.05";
@ -5838,13 +5856,13 @@ This snipped is added to the activation script that is run after every rebuild a
pkgs.nvd pkgs.nvd
]; ];
system.activationScripts.diff = { # system.activationScripts.diff = {
supportsDryActivation = true; # supportsDryActivation = true;
text = '' # text = ''
${pkgs.nvd}/bin/nvd --color=always --nix-bin-dir=${pkgs.nix}/bin diff \ # ${pkgs.nvd}/bin/nvd --color=always --nix-bin-dir=${pkgs.nix}/bin diff \
/run/current-system "$systemConfig" # /run/current-system "$systemConfig"
''; # '';
}; # };
}; };
} }
#+end_src #+end_src
@ -5913,11 +5931,11 @@ This allows me to use screen sharing on Wayland. The implementation is a bit cru
config = lib.mkIf config.swarselmodules.xdg-portal { config = lib.mkIf config.swarselmodules.xdg-portal {
xdg.portal = { xdg.portal = {
enable = true; enable = true;
# config = { config = {
# common = { common = {
# default = "wlr"; default = "wlr";
# }; };
# }; };
wlr.enable = true; wlr.enable = true;
wlr.settings.screencast = { wlr.settings.screencast = {
output_name = "eDP-1"; output_name = "eDP-1";
@ -5987,9 +6005,9 @@ This turns off the display when the lid is closed.
{ {
options.swarselmodules.lid = lib.mkEnableOption "lid config"; options.swarselmodules.lid = lib.mkEnableOption "lid config";
config = lib.mkIf config.swarselmodules.lid { config = lib.mkIf config.swarselmodules.lid {
services.logind = { services.logind.settings.Login = {
lidSwitch = "suspend"; HandleLidSwitch = "suspend";
lidSwitchDocked = "ignore"; HandleLidSwitchDocked = "ignore";
}; };
services.acpid = { services.acpid = {
enable = true; enable = true;
@ -10792,14 +10810,18 @@ Again, we adapt =nix= to our needs, enable the home-manager command for non-NixO
options.swarselmodules.general = lib.mkEnableOption "general nix settings"; options.swarselmodules.general = lib.mkEnableOption "general nix settings";
config = lib.mkIf config.swarselmodules.general { config = lib.mkIf config.swarselmodules.general {
nix = lib.mkIf (!config.swarselsystems.isNixos) { nix = lib.mkIf (!config.swarselsystems.isNixos) {
package = lib.mkForce pkgs.nixVersions.nix_2_28; package = lib.mkForce pkgs.nixVersions.nix_2_30;
extraOptions = '' extraOptions = ''
plugin-files = ${pkgs.nix-plugins.overrideAttrs (o: { plugin-files = ${pkgs.nix-plugins}/lib/nix/plugins
buildInputs = [pkgs.nixVersions.nix_2_28 pkgs.boost];
patches = (o.patches or []) ++ ["${self}/nix/nix-plugins.patch"];
})}/lib/nix/plugins
extra-builtins-file = ${self + /nix/extra-builtins.nix} extra-builtins-file = ${self + /nix/extra-builtins.nix}
''; '';
# extraOptions = ''
# plugin-files = ${pkgs.nix-plugins.overrideAttrs (o: {
# buildInputs = [pkgs.nixVersions.nix_2_28 pkgs.boost];
# patches = (o.patches or []) ++ ["${self}/nix/nix-plugins.patch"];
# })}/lib/nix/plugins
# extra-builtins-file = ${self + /nix/extra-builtins.nix}
# '';
settings = { settings = {
experimental-features = [ experimental-features = [
"nix-command" "nix-command"
@ -10986,7 +11008,7 @@ This holds packages that I can use as provided, or with small modifications (as
# spotify # spotify
vesktop # discord client vesktop # discord client
# nextcloud-client # enables a systemd service that I do not want # nextcloud-client # enables a systemd service that I do not want
stable.spotify-player spotify-player
element-desktop element-desktop
nicotine-plus nicotine-plus
stable.transmission_3 stable.transmission_3
@ -11206,54 +11228,66 @@ I use sops-nix to handle secrets that I want to have available on my machines at
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. 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.
#+begin_src nix-ts :tangle modules/home/common/ssh.nix #+begin_src nix-ts :tangle modules/home/common/ssh.nix
{ lib, config, ... }: { lib, config, ... }:
{ {
options.swarselmodules.ssh = lib.mkEnableOption "ssh settings"; options.swarselmodules.ssh = lib.mkEnableOption "ssh settings";
config = lib.mkIf config.swarselmodules.ssh { config = lib.mkIf config.swarselmodules.ssh {
programs.ssh = { programs.ssh = {
enable = true; enable = true;
forwardAgent = true; enableDefaultConfig = false;
extraConfig = '' extraConfig = ''
SetEnv TERM=xterm-256color SetEnv TERM=xterm-256color
ServerAliveInterval 20 ServerAliveInterval 20
''; '';
matchBlocks = { matchBlocks = {
"pfsense" = { "*" = {
hostname = "192.168.1.1"; forwardAgent = true;
user = "root"; addKeysToAgent = "no";
}; compression = false;
"bakery" = { serverAliveInterval = 0;
hostname = "192.168.1.136"; serverAliveCountMax = 3;
user = "root"; hashKnownHosts = false;
}; userKnownHostsFile = "~/.ssh/known_hosts";
"winters" = { controlMaster = "no";
hostname = "192.168.178.24"; controlPath = "~/.ssh/master-%r@%n:%p";
user = "root"; controlPersist = "no";
}; };
"minecraft" = { "pfsense" = {
hostname = "130.61.119.129"; hostname = "192.168.1.1";
user = "opc"; user = "root";
}; };
"milkywell" = { "bakery" = {
hostname = "193.122.53.173"; hostname = "192.168.1.136";
user = "root"; user = "root";
}; };
"moonside" = { "winters" = {
hostname = "130.61.238.239"; hostname = "192.168.178.24";
user = "root"; user = "root";
}; };
"songdiver" = { "minecraft" = {
hostname = "89.168.100.65"; hostname = "130.61.119.129";
user = "ubuntu"; user = "opc";
}; };
"pkv" = { "milkywell" = {
hostname = "46.232.248.161"; hostname = "193.122.53.173";
user = "root"; user = "root";
};
"moonside" = {
hostname = "130.61.238.239";
user = "root";
};
"songdiver" = {
hostname = "89.168.100.65";
user = "ubuntu";
};
"pkv" = {
hostname = "46.232.248.161";
user = "root";
};
}; };
}; };
}; };
}; }
}
#+end_src #+end_src
**** Theme (stylix) **** Theme (stylix)
@ -13465,7 +13499,7 @@ Currently, I am too lazy to explain every option here, but most of it is very se
{ app_id = "pavucontrol"; } { app_id = "pavucontrol"; }
{ app_id = "syncthingtray"; } { app_id = "syncthingtray"; }
{ app_id = "Element"; } { app_id = "Element"; }
{ class = "1Password"; } { app_id = "1Password"; }
{ app_id = "com.nextcloud.desktopclient.nextcloud"; } { app_id = "com.nextcloud.desktopclient.nextcloud"; }
{ title = "(?:Open|Save) (?:File|Folder|As)"; } { title = "(?:Open|Save) (?:File|Folder|As)"; }
{ title = "^Add$"; } { title = "^Add$"; }
@ -14045,7 +14079,8 @@ This service changes the screen hue at night. I am not sure if that really does
config = lib.mkIf config.swarselmodules.${moduleName} { config = lib.mkIf config.swarselmodules.${moduleName} {
programs.spicetify = { programs.spicetify = {
enable = true; enable = true;
spotifyPackage = pkgs.stable24_11.spotify; # spotifyPackage = pkgs.stable24_11.spotify;
spotifyPackage = pkgs.spotify;
enabledExtensions = with spicePkgs.extensions; [ enabledExtensions = with spicePkgs.extensions; [
fullAppDisplay fullAppDisplay
shuffle shuffle
@ -15009,7 +15044,7 @@ In short, the options defined here are passed to the modules systems using =_mod
browserpass browserpass
clearurls clearurls
darkreader darkreader
enhancer-for-youtube # enhancer-for-youtube
istilldontcareaboutcookies istilldontcareaboutcookies
translate-web-pages translate-web-pages
ublock-origin ublock-origin
@ -15022,7 +15057,7 @@ In short, the options defined here are passed to the modules systems using =_mod
enhanced-github enhanced-github
unpaywall unpaywall
don-t-fuck-with-paste don-t-fuck-with-paste
plasma-integration # plasma-integration
noscript noscript
# configure a shortcut 'ctrl+shift+c' with behaviour 'do nothing' in order to disable the dev console shortcut # configure a shortcut 'ctrl+shift+c' with behaviour 'do nothing' in order to disable the dev console shortcut

2519
flake.lock generated

File diff suppressed because it is too large Load diff

View file

@ -62,7 +62,8 @@
url = "github:dj95/zjstatus"; url = "github:dj95/zjstatus";
}; };
fw-fanctrl = { fw-fanctrl = {
url = "github:TamtamHero/fw-fanctrl/packaging/nix"; # url = "github:TamtamHero/fw-fanctrl/packaging/nix";
url = "github:Swarsel/fw-fanctrl/packaging/nix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
nix-darwin = { nix-darwin = {

View file

@ -12,6 +12,17 @@ in
]; ];
# swarselservices.homebox = {
# enable = true;
# package = pkgs.dev.homebox;
# settings = {
# HBOX_OPTIONS_ALLOW_REGISTRATION = "false";
# # HBOX_STORAGE_DATA = "/test";
# # HBOX_STORAGE_CONN_STRING = "file:///lolna";
# HBOX_STORAGE_PREFIX_PATH = null;
# };
# };
swarselprofiles = { swarselprofiles = {
personal = lib.mkIf (!minimal) true; personal = lib.mkIf (!minimal) true;
work = lib.mkIf (!minimal) true; work = lib.mkIf (!minimal) true;

View file

@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head> <head>
<!-- 2025-08-25 Mo 22:51 --> <!-- 2025-09-15 Mo 15:55 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<title>SwarselSystems: NixOS + Emacs Configurationo</title> <title>SwarselSystems: NixOS + Emacs Configurationo</title>
@ -822,7 +822,7 @@
</div> </div>
</div> </div>
<p> <p>
<b>This file has 93926 words spanning 24087 lines and was last revised on 2025-08-25 22:51:17 +0200.</b> <b>This file has 94377 words spanning 24139 lines and was last revised on 2025-09-15 15:55:25 +0200.</b>
</p> </p>
<p> <p>
@ -891,7 +891,7 @@ This section defines my Emacs configuration. For a while, I considered to use ry
</p> </p>
<p> <p>
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: 2025-08-25 22:51:17 +0200) My emacs is built using the emacs-overlay nix flake, which builds a bleeding edge emacs on wayland (pgtk) with utilities like treesitter support. By executing the below source block, the current build setting can be updated at any time, and you can see my most up-to-date build options (last updated: 2025-09-15 15:55:25 +0200)
</p></li> </p></li>
</ul> </ul>
@ -903,7 +903,7 @@ system-configuration-options
</div> </div>
<pre class="example"> <pre class="example">
--prefix=/nix/store/6gy60bnwvzbvvmg10vqcnhrjnnrpi4y8-emacs-git-pgtk-20250808.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 --without-xwidgets --with-dbus --with-selinux --prefix=/nix/store/4gbb3sfa5p6l3lhhnf0khvfj6w7qbqk5-emacs-git-pgtk-20250914.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 --without-xwidgets --with-dbus --with-selinux
</pre> </pre>
@ -1380,7 +1380,8 @@ This provides devshell support for flake-parts</li>
url = "github:dj95/zjstatus"; url = "github:dj95/zjstatus";
}; };
fw-fanctrl = { fw-fanctrl = {
url = "github:TamtamHero/fw-fanctrl/packaging/nix"; # url = "github:TamtamHero/fw-fanctrl/packaging/nix";
url = "github:Swarsel/fw-fanctrl/packaging/nix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
nix-darwin = { nix-darwin = {
@ -2209,7 +2210,7 @@ Lastly, in the <code>perSystem</code> attribute set, we see that it is actually
devshells.default = { devshells.default = {
packages = [ packages = [
(builtins.trace "alarm: we pinned nix_2_24 because of https://github.com/shlevy/nix-plugins/issues/20" pkgs.nixVersions.nix_2_24) # Always use the nix version from this flake's nixpkgs version, so that nix-plugins (below) doesn't fail because of different nix versions. # (builtins.trace "alarm: we pinned nix_2_24 because of https://github.com/shlevy/nix-plugins/issues/20" pkgs.nixVersions.nix_2_24) # Always use the nix version from this flake's nixpkgs version, so that nix-plugins (below) doesn't fail because of different nix versions.
pkgs.git pkgs.git
pkgs.just pkgs.just
pkgs.age pkgs.age
@ -2518,7 +2519,7 @@ in
nativeMessagingHosts = [ nativeMessagingHosts = [
prev.tridactyl-native prev.tridactyl-native
prev.browserpass prev.browserpass
prev.plasma5Packages.plasma-browser-integration # prev.plasma5Packages.plasma-browser-integration
]; ];
}; };
@ -2931,7 +2932,7 @@ My work machine. Built for more security, this is the gold standard of my config
<h6 id="h:567c0055-f5f7-4e53-8f13-d767d7166e9d"><span class="section-number-6">3.1.2.1.1.</span> Main Configuration</h6> <h6 id="h:567c0055-f5f7-4e53-8f13-d767d7166e9d"><span class="section-number-6">3.1.2.1.1.</span> Main Configuration</h6>
<div class="outline-text-6" id="text-h:567c0055-f5f7-4e53-8f13-d767d7166e9d"> <div class="outline-text-6" id="text-h:567c0055-f5f7-4e53-8f13-d767d7166e9d">
<div class="org-src-container"> <div class="org-src-container">
<pre class="src src-nix-ts">{ self, config, inputs, lib, minimal, ... }: <pre class="src src-nix-ts">{ self, config, inputs, lib, minimal, ... }:
let let
primaryUser = config.swarselsystems.mainUser; primaryUser = config.swarselsystems.mainUser;
in in
@ -2945,6 +2946,16 @@ in
]; ];
# swarselservices.homebox = {
# enable = true;
# package = pkgs.dev.homebox;
# settings = {
# HBOX_OPTIONS_ALLOW_REGISTRATION = "false";
# # HBOX_STORAGE_DATA = "/test";
# # HBOX_STORAGE_CONN_STRING = "file:///lolna";
# HBOX_STORAGE_PREFIX_PATH = null;
# };
# };
swarselprofiles = { swarselprofiles = {
personal = lib.mkIf (!minimal) true; personal = lib.mkIf (!minimal) true;
@ -4429,12 +4440,16 @@ in
channel.enable = false; channel.enable = false;
package = pkgs.nixVersions.nix_2_28; package = pkgs.nixVersions.nix_2_28;
extraOptions = '' extraOptions = ''
plugin-files = ${pkgs.nix-plugins.overrideAttrs (o: { plugin-files = ${pkgs.nix-plugins}/lib/nix/plugins
buildInputs = [pkgs.nixVersions.nix_2_28 pkgs.boost];
patches = (o.patches or []) ++ [ ../nix/nix-plugins.patch ];
})}/lib/nix/plugins
extra-builtins-file = ${../nix/extra-builtins.nix} extra-builtins-file = ${../nix/extra-builtins.nix}
''; '';
# extraOptions = ''
# plugin-files = ${pkgs.nix-plugins.overrideAttrs (o: {
# buildInputs = [pkgs.nixVersions.nix_2_28 pkgs.boost];
# patches = (o.patches or []) ++ [ ../nix/nix-plugins.patch ];
# })}/lib/nix/plugins
# extra-builtins-file = ${../nix/extra-builtins.nix}
# '';
settings.experimental-features = [ "nix-command" "flakes" ]; settings.experimental-features = [ "nix-command" "flakes" ];
}; };
@ -5229,7 +5244,7 @@ in
}; };
nix = { nix = {
package = pkgs.nixVersions.nix_2_28; package = pkgs.nixVersions.nix_2_30;
settings = { settings = {
experimental-features = [ experimental-features = [
"nix-command" "nix-command"
@ -5240,19 +5255,21 @@ in
]; ];
trusted-users = [ "@wheel" "${config.swarselsystems.mainUser}" ]; trusted-users = [ "@wheel" "${config.swarselsystems.mainUser}" ];
}; };
# extraOptions = ''
# plugin-files = ${pkgs.nix-plugins}/lib/nix/plugins
# extra-builtins-file = ${self + /nix/extra-builtins.nix}
# '';
extraOptions = '' extraOptions = ''
plugin-files = ${pkgs.nix-plugins.overrideAttrs (o: { plugin-files = ${pkgs.nix-plugins}/lib/nix/plugins
buildInputs = [pkgs.nixVersions.nix_2_28 pkgs.boost];
patches = (o.patches or []) ++ ["${self}/nix/nix-plugins.patch"];
})}/lib/nix/plugins
extra-builtins-file = ${self + /nix/extra-builtins.nix} extra-builtins-file = ${self + /nix/extra-builtins.nix}
'' + lib.optionalString (!minimal) '' '' + lib.optionalString (!minimal) ''
!include ${config.sops.secrets.github-api-token.path} !include ${config.sops.secrets.github-api-token.path}
''; '';
# extraOptions = ''
# plugin-files = ${pkgs.nix-plugins.overrideAttrs (o: {
# buildInputs = [pkgs.nixVersions.nix_2_28 pkgs.boost];
# patches = (o.patches or []) ++ ["${self}/nix/nix-plugins.patch"];
# })}/lib/nix/plugins
# extra-builtins-file = ${self + /nix/extra-builtins.nix}
# '' + lib.optionalString (!minimal) ''
# !include ${config.sops.secrets.github-api-token.path}
# '';
}; };
system.stateVersion = lib.mkDefault "23.05"; system.stateVersion = lib.mkDefault "23.05";
@ -7060,13 +7077,13 @@ This snipped is added to the activation script that is run after every rebuild a
pkgs.nvd pkgs.nvd
]; ];
system.activationScripts.diff = { # system.activationScripts.diff = {
supportsDryActivation = true; # supportsDryActivation = true;
text = '' # text = ''
${pkgs.nvd}/bin/nvd --color=always --nix-bin-dir=${pkgs.nix}/bin diff \ # ${pkgs.nvd}/bin/nvd --color=always --nix-bin-dir=${pkgs.nix}/bin diff \
/run/current-system "$systemConfig" # /run/current-system "$systemConfig"
''; # '';
}; # };
}; };
} }
</pre> </pre>
@ -7141,11 +7158,11 @@ This allows me to use screen sharing on Wayland. The implementation is a bit cru
config = lib.mkIf config.swarselmodules.xdg-portal { config = lib.mkIf config.swarselmodules.xdg-portal {
xdg.portal = { xdg.portal = {
enable = true; enable = true;
# config = { config = {
# common = { common = {
# default = "wlr"; default = "wlr";
# }; };
# }; };
wlr.enable = true; wlr.enable = true;
wlr.settings.screencast = { wlr.settings.screencast = {
output_name = "eDP-1"; output_name = "eDP-1";
@ -7222,9 +7239,9 @@ This turns off the display when the lid is closed.
{ {
options.swarselmodules.lid = lib.mkEnableOption "lid config"; options.swarselmodules.lid = lib.mkEnableOption "lid config";
config = lib.mkIf config.swarselmodules.lid { config = lib.mkIf config.swarselmodules.lid {
services.logind = { services.logind.settings.Login = {
lidSwitch = "suspend"; HandleLidSwitch = "suspend";
lidSwitchDocked = "ignore"; HandleLidSwitchDocked = "ignore";
}; };
services.acpid = { services.acpid = {
enable = true; enable = true;
@ -12101,14 +12118,18 @@ in
options.swarselmodules.general = lib.mkEnableOption "general nix settings"; options.swarselmodules.general = lib.mkEnableOption "general nix settings";
config = lib.mkIf config.swarselmodules.general { config = lib.mkIf config.swarselmodules.general {
nix = lib.mkIf (!config.swarselsystems.isNixos) { nix = lib.mkIf (!config.swarselsystems.isNixos) {
package = lib.mkForce pkgs.nixVersions.nix_2_28; package = lib.mkForce pkgs.nixVersions.nix_2_30;
extraOptions = '' extraOptions = ''
plugin-files = ${pkgs.nix-plugins.overrideAttrs (o: { plugin-files = ${pkgs.nix-plugins}/lib/nix/plugins
buildInputs = [pkgs.nixVersions.nix_2_28 pkgs.boost];
patches = (o.patches or []) ++ ["${self}/nix/nix-plugins.patch"];
})}/lib/nix/plugins
extra-builtins-file = ${self + /nix/extra-builtins.nix} extra-builtins-file = ${self + /nix/extra-builtins.nix}
''; '';
# extraOptions = ''
# plugin-files = ${pkgs.nix-plugins.overrideAttrs (o: {
# buildInputs = [pkgs.nixVersions.nix_2_28 pkgs.boost];
# patches = (o.patches or []) ++ ["${self}/nix/nix-plugins.patch"];
# })}/lib/nix/plugins
# extra-builtins-file = ${self + /nix/extra-builtins.nix}
# '';
settings = { settings = {
experimental-features = [ experimental-features = [
"nix-command" "nix-command"
@ -12307,7 +12328,7 @@ This holds packages that I can use as provided, or with small modifications (as
# spotify # spotify
vesktop # discord client vesktop # discord client
# nextcloud-client # enables a systemd service that I do not want # nextcloud-client # enables a systemd service that I do not want
stable.spotify-player spotify-player
element-desktop element-desktop
nicotine-plus nicotine-plus
stable.transmission_3 stable.transmission_3
@ -12546,12 +12567,24 @@ It is very convenient to have SSH aliases in place for machines that I use. This
config = lib.mkIf config.swarselmodules.ssh { config = lib.mkIf config.swarselmodules.ssh {
programs.ssh = { programs.ssh = {
enable = true; enable = true;
forwardAgent = true; enableDefaultConfig = false;
extraConfig = '' extraConfig = ''
SetEnv TERM=xterm-256color SetEnv TERM=xterm-256color
ServerAliveInterval 20 ServerAliveInterval 20
''; '';
matchBlocks = { matchBlocks = {
"*" = {
forwardAgent = true;
addKeysToAgent = "no";
compression = false;
serverAliveInterval = 0;
serverAliveCountMax = 3;
hashKnownHosts = false;
userKnownHostsFile = "~/.ssh/known_hosts";
controlMaster = "no";
controlPath = "~/.ssh/master-%r@%n:%p";
controlPersist = "no";
};
"pfsense" = { "pfsense" = {
hostname = "192.168.1.1"; hostname = "192.168.1.1";
user = "root"; user = "root";
@ -14893,7 +14926,7 @@ Currently, I am too lazy to explain every option here, but most of it is very se
{ app_id = "pavucontrol"; } { app_id = "pavucontrol"; }
{ app_id = "syncthingtray"; } { app_id = "syncthingtray"; }
{ app_id = "Element"; } { app_id = "Element"; }
{ class = "1Password"; } { app_id = "1Password"; }
{ app_id = "com.nextcloud.desktopclient.nextcloud"; } { app_id = "com.nextcloud.desktopclient.nextcloud"; }
{ title = "(?:Open|Save) (?:File|Folder|As)"; } { title = "(?:Open|Save) (?:File|Folder|As)"; }
{ title = "^Add$"; } { title = "^Add$"; }
@ -15475,7 +15508,8 @@ in
config = lib.mkIf config.swarselmodules.${moduleName} { config = lib.mkIf config.swarselmodules.${moduleName} {
programs.spicetify = { programs.spicetify = {
enable = true; enable = true;
spotifyPackage = pkgs.stable24_11.spotify; # spotifyPackage = pkgs.stable24_11.spotify;
spotifyPackage = pkgs.spotify;
enabledExtensions = with spicePkgs.extensions; [ enabledExtensions = with spicePkgs.extensions; [
fullAppDisplay fullAppDisplay
shuffle shuffle
@ -16474,7 +16508,7 @@ In short, the options defined here are passed to the modules systems using <code
browserpass browserpass
clearurls clearurls
darkreader darkreader
enhancer-for-youtube # enhancer-for-youtube
istilldontcareaboutcookies istilldontcareaboutcookies
translate-web-pages translate-web-pages
ublock-origin ublock-origin
@ -16487,7 +16521,7 @@ In short, the options defined here are passed to the modules systems using <code
enhanced-github enhanced-github
unpaywall unpaywall
don-t-fuck-with-paste don-t-fuck-with-paste
plasma-integration # plasma-integration
noscript noscript
# configure a shortcut 'ctrl+shift+c' with behaviour 'do nothing' in order to disable the dev console shortcut # configure a shortcut 'ctrl+shift+c' with behaviour 'do nothing' in order to disable the dev console shortcut
@ -25717,11 +25751,29 @@ Here lies defined the readme for GitHub and Forgejo:
- Below is a small list of tips that should be helpful if you are new to the nix ecosystem: - Below is a small list of tips that should be helpful if you are new to the nix ecosystem:
- Temporarily install any package using `nix shell nixpkgs#&lt;PACKAGE_NAME&gt;` - this can be e.g. useful if you accidentally removed home-manager from your packages on a non-NixOS machine. Alternatively, use [comma](https://github.com/nix-community/comma) - Temporarily install any package using `nix shell nixpkgs#&lt;PACKAGE_NAME&gt;` - this can be e.g. useful if you accidentally removed home-manager from your packages on a non-NixOS machine.
- if you need multiple packages, you can do `nix shell nixpkgs#{&lt;pkg1&gt;,&lt;pkg2&gt;,&lt;pkg3&gt;}`.
- you can set `nix.registry` to add more flakes to your registry. I use this to add a `n` shorthand to `nixpkgs`, which allows me to do `nix shell n#{&lt;pkg1&gt;,&lt;pkg2&gt;,&lt;pkg3&gt;}`.
- Alternatively, use [comma](https://github.com/nix-community/comma)
- More info on `nix [...]` commands: https://nixos.org/manual/nix/stable/command-ref/new-cli/nix - More info on `nix [...]` commands: https://nixos.org/manual/nix/stable/command-ref/new-cli/nix
- some examples:
- `nix flake update &lt;input-name&gt;` lets you update a specific input only.
- `nix repl &lt;your flake path&gt;` gives quick insight into your written configuration.
- `nix eval &lt;your flake path&gt;#&lt;config attribute&gt;` quickly returns an attribute in your written configuration
- `nix fmt` formats your flake using the formatter specified under `formatter` in your `flake.nix`
- When you are trying to setup a new configuration part, [GitHub code search](https://github.com/search?q=language%3ANix&amp;type=code) can really help you to find a working configuration. Just filter for `.nix` files and the options you are trying to set up. - When you are trying to setup a new configuration part, [GitHub code search](https://github.com/search?q=language%3ANix&amp;type=code) can really help you to find a working configuration. Just filter for `.nix` files and the options you are trying to set up.
- getting packages at a different version than your target (or not packaged at all) can be done in most cases easily with fetchFromGithub (https://ryantm.github.io/nixpkgs/builders/fetchers/) - getting packages at a different version than your target (or not packaged at all) can be done in most cases easily with fetchFromGithub (https://ryantm.github.io/nixpkgs/builders/fetchers/)
- you can easily install old revisions of packages using https://lazamar.co.uk/nix-versions/. You can conveniently spawn a shell with a chosen package available using `vershell &lt;NIXPKGS_REVISION&gt; &lt;PACKAGE&gt;`. Just make sure to pick a revision that has flakes enabled, otherwise you will need the legacy way of spawning the shell (see the link for more info) - you can easily install old revisions of packages using https://lazamar.co.uk/nix-versions/. You can conveniently spawn a shell with a chosen package available using `vershell &lt;NIXPKGS_REVISION&gt; &lt;PACKAGE&gt;`. Just make sure to pick a revision that has flakes enabled, otherwise you will need the legacy way of spawning the shell (see the link for more info)
- when developing modules in a dev branch of another flake, you can use `--override-input` to temporarily use the local directory as the flake source.
- including `nixosConfig ? config` in your module arguments is a smart way of enabling a module to pull in config from NixOS or home-manager config, no matter if it is a NixOS system or not.
- you can have a quick cli evaluation for nix commands with e.g. `nixpgks.lib` available using `nix-instantiate --strict --eval --expr "let lib = import &lt;nixpkgs/lib&gt;; in &lt;expression&gt;"`.
- if you are looking for a specific library, `nix-locate` makes it easy to look for them.
- to look at the dependencies pulled in by a tool, use `nix-tree`
- to find out which derivation uses another derivation, use `nix store --query --referrers &lt;derivation&gt;`
- to get a neat overview of your config changes in recent generations, use `nix profile diff-closures --profile /nix/var/nix/profiles/system`
- to get instead the changes since the last boot, use `nix profile diff-closures /run/*-system`
- if you just need the generation numbers, use `sudo nix-env --list-generations --profile /nix/var/nix/profiles/system`
- to then switch to another generation, you can use `sudo nix-env --switch-generation &lt;generation number&gt; -p /nix/var/nix/profiles/system` followed by `sudo /nix/var/nix/profiles/system/bin/switch-to-configuration switch`
- These links are your best friends: - These links are your best friends:
- The nix documentation: https://nix.dev/ - The nix documentation: https://nix.dev/
@ -26154,7 +26206,7 @@ similarly, there exists an version that starts from the right.
</div> </div>
<div id="postamble" class="status"> <div id="postamble" class="status">
<p class="author">Author: Leon Schwarzäugl</p> <p class="author">Author: Leon Schwarzäugl</p>
<p class="date">Created: 2025-08-25 Mo 22:51</p> <p class="date">Created: 2025-09-15 Mo 15:55</p>
<p class="validation"><a href="https://validator.w3.org/check?uri=referer">Validate</a></p> <p class="validation"><a href="https://validator.w3.org/check?uri=referer">Validate</a></p>
</div> </div>
</body> </body>

View file

@ -49,12 +49,16 @@ in
channel.enable = false; channel.enable = false;
package = pkgs.nixVersions.nix_2_28; package = pkgs.nixVersions.nix_2_28;
extraOptions = '' extraOptions = ''
plugin-files = ${pkgs.nix-plugins.overrideAttrs (o: { plugin-files = ${pkgs.nix-plugins}/lib/nix/plugins
buildInputs = [pkgs.nixVersions.nix_2_28 pkgs.boost];
patches = (o.patches or []) ++ [ ../nix/nix-plugins.patch ];
})}/lib/nix/plugins
extra-builtins-file = ${../nix/extra-builtins.nix} extra-builtins-file = ${../nix/extra-builtins.nix}
''; '';
# extraOptions = ''
# plugin-files = ${pkgs.nix-plugins.overrideAttrs (o: {
# buildInputs = [pkgs.nixVersions.nix_2_28 pkgs.boost];
# patches = (o.patches or []) ++ [ ../nix/nix-plugins.patch ];
# })}/lib/nix/plugins
# extra-builtins-file = ${../nix/extra-builtins.nix}
# '';
settings.experimental-features = [ "nix-command" "flakes" ]; settings.experimental-features = [ "nix-command" "flakes" ];
}; };

View file

@ -81,7 +81,7 @@
# spotify # spotify
vesktop # discord client vesktop # discord client
# nextcloud-client # enables a systemd service that I do not want # nextcloud-client # enables a systemd service that I do not want
stable.spotify-player spotify-player
element-desktop element-desktop
nicotine-plus nicotine-plus
stable.transmission_3 stable.transmission_3

View file

@ -6,14 +6,18 @@ in
options.swarselmodules.general = lib.mkEnableOption "general nix settings"; options.swarselmodules.general = lib.mkEnableOption "general nix settings";
config = lib.mkIf config.swarselmodules.general { config = lib.mkIf config.swarselmodules.general {
nix = lib.mkIf (!config.swarselsystems.isNixos) { nix = lib.mkIf (!config.swarselsystems.isNixos) {
package = lib.mkForce pkgs.nixVersions.nix_2_28; package = lib.mkForce pkgs.nixVersions.nix_2_30;
extraOptions = '' extraOptions = ''
plugin-files = ${pkgs.nix-plugins.overrideAttrs (o: { plugin-files = ${pkgs.nix-plugins}/lib/nix/plugins
buildInputs = [pkgs.nixVersions.nix_2_28 pkgs.boost];
patches = (o.patches or []) ++ ["${self}/nix/nix-plugins.patch"];
})}/lib/nix/plugins
extra-builtins-file = ${self + /nix/extra-builtins.nix} extra-builtins-file = ${self + /nix/extra-builtins.nix}
''; '';
# extraOptions = ''
# plugin-files = ${pkgs.nix-plugins.overrideAttrs (o: {
# buildInputs = [pkgs.nixVersions.nix_2_28 pkgs.boost];
# patches = (o.patches or []) ++ ["${self}/nix/nix-plugins.patch"];
# })}/lib/nix/plugins
# extra-builtins-file = ${self + /nix/extra-builtins.nix}
# '';
settings = { settings = {
experimental-features = [ experimental-features = [
"nix-command" "nix-command"

View file

@ -8,7 +8,8 @@ in
config = lib.mkIf config.swarselmodules.${moduleName} { config = lib.mkIf config.swarselmodules.${moduleName} {
programs.spicetify = { programs.spicetify = {
enable = true; enable = true;
spotifyPackage = pkgs.stable24_11.spotify; # spotifyPackage = pkgs.stable24_11.spotify;
spotifyPackage = pkgs.spotify;
enabledExtensions = with spicePkgs.extensions; [ enabledExtensions = with spicePkgs.extensions; [
fullAppDisplay fullAppDisplay
shuffle shuffle

View file

@ -4,12 +4,24 @@
config = lib.mkIf config.swarselmodules.ssh { config = lib.mkIf config.swarselmodules.ssh {
programs.ssh = { programs.ssh = {
enable = true; enable = true;
forwardAgent = true; enableDefaultConfig = false;
extraConfig = '' extraConfig = ''
SetEnv TERM=xterm-256color SetEnv TERM=xterm-256color
ServerAliveInterval 20 ServerAliveInterval 20
''; '';
matchBlocks = { matchBlocks = {
"*" = {
forwardAgent = true;
addKeysToAgent = "no";
compression = false;
serverAliveInterval = 0;
serverAliveCountMax = 3;
hashKnownHosts = false;
userKnownHostsFile = "~/.ssh/known_hosts";
controlMaster = "no";
controlPath = "~/.ssh/master-%r@%n:%p";
controlPersist = "no";
};
"pfsense" = { "pfsense" = {
hostname = "192.168.1.1"; hostname = "192.168.1.1";
user = "root"; user = "root";

View file

@ -262,7 +262,7 @@ in
{ app_id = "pavucontrol"; } { app_id = "pavucontrol"; }
{ app_id = "syncthingtray"; } { app_id = "syncthingtray"; }
{ app_id = "Element"; } { app_id = "Element"; }
{ class = "1Password"; } { app_id = "1Password"; }
{ app_id = "com.nextcloud.desktopclient.nextcloud"; } { app_id = "com.nextcloud.desktopclient.nextcloud"; }
{ title = "(?:Open|Save) (?:File|Folder|As)"; } { title = "(?:Open|Save) (?:File|Folder|As)"; }
{ title = "^Add$"; } { title = "^Add$"; }

View file

@ -2,9 +2,9 @@
{ {
options.swarselmodules.lid = lib.mkEnableOption "lid config"; options.swarselmodules.lid = lib.mkEnableOption "lid config";
config = lib.mkIf config.swarselmodules.lid { config = lib.mkIf config.swarselmodules.lid {
services.logind = { services.logind.settings.Login = {
lidSwitch = "suspend"; HandleLidSwitch = "suspend";
lidSwitchDocked = "ignore"; HandleLidSwitchDocked = "ignore";
}; };
services.acpid = { services.acpid = {
enable = true; enable = true;

View file

@ -7,12 +7,12 @@
pkgs.nvd pkgs.nvd
]; ];
system.activationScripts.diff = { # system.activationScripts.diff = {
supportsDryActivation = true; # supportsDryActivation = true;
text = '' # text = ''
${pkgs.nvd}/bin/nvd --color=always --nix-bin-dir=${pkgs.nix}/bin diff \ # ${pkgs.nvd}/bin/nvd --color=always --nix-bin-dir=${pkgs.nix}/bin diff \
/run/current-system "$systemConfig" # /run/current-system "$systemConfig"
''; # '';
}; # };
}; };
} }

View file

@ -4,11 +4,11 @@
config = lib.mkIf config.swarselmodules.xdg-portal { config = lib.mkIf config.swarselmodules.xdg-portal {
xdg.portal = { xdg.portal = {
enable = true; enable = true;
# config = { config = {
# common = { common = {
# default = "wlr"; default = "wlr";
# }; };
# }; };
wlr.enable = true; wlr.enable = true;
wlr.settings.screencast = { wlr.settings.screencast = {
output_name = "eDP-1"; output_name = "eDP-1";

View file

@ -61,7 +61,7 @@ in
}; };
nix = { nix = {
package = pkgs.nixVersions.nix_2_28; package = pkgs.nixVersions.nix_2_30;
settings = { settings = {
experimental-features = [ experimental-features = [
"nix-command" "nix-command"
@ -72,19 +72,21 @@ in
]; ];
trusted-users = [ "@wheel" "${config.swarselsystems.mainUser}" ]; trusted-users = [ "@wheel" "${config.swarselsystems.mainUser}" ];
}; };
# extraOptions = ''
# plugin-files = ${pkgs.nix-plugins}/lib/nix/plugins
# extra-builtins-file = ${self + /nix/extra-builtins.nix}
# '';
extraOptions = '' extraOptions = ''
plugin-files = ${pkgs.nix-plugins.overrideAttrs (o: { plugin-files = ${pkgs.nix-plugins}/lib/nix/plugins
buildInputs = [pkgs.nixVersions.nix_2_28 pkgs.boost];
patches = (o.patches or []) ++ ["${self}/nix/nix-plugins.patch"];
})}/lib/nix/plugins
extra-builtins-file = ${self + /nix/extra-builtins.nix} extra-builtins-file = ${self + /nix/extra-builtins.nix}
'' + lib.optionalString (!minimal) '' '' + lib.optionalString (!minimal) ''
!include ${config.sops.secrets.github-api-token.path} !include ${config.sops.secrets.github-api-token.path}
''; '';
# extraOptions = ''
# plugin-files = ${pkgs.nix-plugins.overrideAttrs (o: {
# buildInputs = [pkgs.nixVersions.nix_2_28 pkgs.boost];
# patches = (o.patches or []) ++ ["${self}/nix/nix-plugins.patch"];
# })}/lib/nix/plugins
# extra-builtins-file = ${self + /nix/extra-builtins.nix}
# '' + lib.optionalString (!minimal) ''
# !include ${config.sops.secrets.github-api-token.path}
# '';
}; };
system.stateVersion = lib.mkDefault "23.05"; system.stateVersion = lib.mkDefault "23.05";

View file

@ -77,7 +77,7 @@
browserpass browserpass
clearurls clearurls
darkreader darkreader
enhancer-for-youtube # enhancer-for-youtube
istilldontcareaboutcookies istilldontcareaboutcookies
translate-web-pages translate-web-pages
ublock-origin ublock-origin
@ -90,7 +90,7 @@
enhanced-github enhanced-github
unpaywall unpaywall
don-t-fuck-with-paste don-t-fuck-with-paste
plasma-integration # plasma-integration
noscript noscript
# configure a shortcut 'ctrl+shift+c' with behaviour 'do nothing' in order to disable the dev console shortcut # configure a shortcut 'ctrl+shift+c' with behaviour 'do nothing' in order to disable the dev console shortcut

View file

@ -48,7 +48,7 @@
devshells.default = { devshells.default = {
packages = [ packages = [
(builtins.trace "alarm: we pinned nix_2_24 because of https://github.com/shlevy/nix-plugins/issues/20" pkgs.nixVersions.nix_2_24) # Always use the nix version from this flake's nixpkgs version, so that nix-plugins (below) doesn't fail because of different nix versions. # (builtins.trace "alarm: we pinned nix_2_24 because of https://github.com/shlevy/nix-plugins/issues/20" pkgs.nixVersions.nix_2_24) # Always use the nix version from this flake's nixpkgs version, so that nix-plugins (below) doesn't fail because of different nix versions.
pkgs.git pkgs.git
pkgs.just pkgs.just
pkgs.age pkgs.age

View file

@ -20,7 +20,7 @@ in
nativeMessagingHosts = [ nativeMessagingHosts = [
prev.tridactyl-native prev.tridactyl-native
prev.browserpass prev.browserpass
prev.plasma5Packages.plasma-browser-integration # prev.plasma5Packages.plasma-browser-integration
]; ];
}; };