aboutsummaryrefslogtreecommitdiffhomepage
path: root/nix
diff options
context:
space:
mode:
authorTristan DaniĆ«l Maat <[email protected]>2023-08-23 02:23:00 +0200
committerMihai Fufezan <[email protected]>2023-08-23 13:32:06 +0300
commit4d14edd8a53389b2583a00da1484bec4408d9207 (patch)
treec6898f611545bfac8177cd2940ee2452c8657438 /nix
parent3576ee61f1d893a0848e2d3c8cb501ca6a12ce24 (diff)
downloadHyprland-4d14edd8a53389b2583a00da1484bec4408d9207.tar.gz
Hyprland-4d14edd8a53389b2583a00da1484bec4408d9207.zip
nix module: Fix attempted workaround for option name change
`system.stateVersion` is about *system state*, i.e., stuff that was created by old software versions on users' machines, like SQL databases that have moved to a different directory or such. It will not help figure out whether an option has been renamed.
Diffstat (limited to 'nix')
-rw-r--r--nix/module.nix10
1 files changed, 6 insertions, 4 deletions
diff --git a/nix/module.nix b/nix/module.nix
index 2dd173c3..98789d15 100644
--- a/nix/module.nix
+++ b/nix/module.nix
@@ -2,6 +2,7 @@ inputs: {
config,
lib,
pkgs,
+ options,
...
}:
with lib; let
@@ -62,10 +63,11 @@ in {
config = mkIf cfg.enable {
environment.systemPackages = [cfg.finalPackage];
- fonts =
- if versionOlder config.system.stateVersion "23.11"
- then {enableDefaultFonts = mkDefault true;}
- else {enableDefaultPackages = mkDefault true;};
+ # NixOS changed the name of this attribute between NixOS 23.05 and
+ # 23.11
+ fonts = if builtins.hasAttr "enableDefaultPackages" options.fonts
+ then {enableDefaultPackages = mkDefault true;}
+ else {enableDefaultFonts = mkDefault true;};
hardware.opengl.enable = mkDefault true;