Enable compatibility with NixOS 24.05
This commit is contained in:
parent
710cdfc130
commit
52389b6606
4 changed files with 21 additions and 7 deletions
|
@ -7,7 +7,12 @@ let
|
||||||
sparseCheckout = [ "!/*" "/chrome" "/content" ];
|
sparseCheckout = [ "!/*" "/chrome" "/content" ];
|
||||||
hash = lib.fakeHash;
|
hash = lib.fakeHash;
|
||||||
};
|
};
|
||||||
in lib.mkIf osConfig.hardware.graphics.enable {
|
|
||||||
|
graphical =
|
||||||
|
if lib.versionAtLeast osConfig.stateVersion "24.11"
|
||||||
|
then osConfig.hardware.graphics.enable
|
||||||
|
else osConfig.hardware.opengl.enable;
|
||||||
|
in lib.mkIf graphical {
|
||||||
programs.firefox = {
|
programs.firefox = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.firefox;
|
package = pkgs.firefox;
|
||||||
|
|
2
home.nix
2
home.nix
|
@ -306,7 +306,7 @@ inputs: { config, lib, pkgs, osConfig, ... }: {
|
||||||
enable = osConfig.hardware.gpgSmartcards.enable;
|
enable = osConfig.hardware.gpgSmartcards.enable;
|
||||||
enableSshSupport = true;
|
enableSshSupport = true;
|
||||||
pinentryPackage =
|
pinentryPackage =
|
||||||
if osConfig.hardware.graphics.enable
|
if osConfig.hardware.graphics.enable or osConfig.hardware.opengl.enable
|
||||||
then pkgs.pinentry-gtk2
|
then pkgs.pinentry-gtk2
|
||||||
else pkgs.pinentry-curses;
|
else pkgs.pinentry-curses;
|
||||||
};
|
};
|
||||||
|
|
12
module.nix
12
module.nix
|
@ -1,10 +1,14 @@
|
||||||
inputs: user: { config, lib, pkgs, ... }: {
|
inputs: user: { config, lib, pkgs, ... }:
|
||||||
|
let
|
||||||
|
graphical =
|
||||||
|
if lib.versionAtLeast config.stateVersion "24.11"
|
||||||
|
then config.hardware.graphics.enable
|
||||||
|
else config.hardware.opengl.enable;
|
||||||
|
in {
|
||||||
imports = [ inputs.home-manager.nixosModules.home-manager ];
|
imports = [ inputs.home-manager.nixosModules.home-manager ];
|
||||||
|
|
||||||
environment.etc."xkb/symbols/greedy" =
|
environment.etc."xkb/symbols/greedy" =
|
||||||
lib.mkIf config.hardware.graphics.enable {
|
lib.mkIf graphical { source = ./greedy.xkb; };
|
||||||
source = ./greedy.xkb;
|
|
||||||
};
|
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
useUserPackages = lib.mkDefault true;
|
useUserPackages = lib.mkDefault true;
|
||||||
|
|
|
@ -19,7 +19,12 @@ let
|
||||||
wpctl = "${osConfig.services.pipewire.wireplumber.package}/bin/wpctl";
|
wpctl = "${osConfig.services.pipewire.wireplumber.package}/bin/wpctl";
|
||||||
xdg-open = "${pkgs.xdg-utils}/bin/xdg-open";
|
xdg-open = "${pkgs.xdg-utils}/bin/xdg-open";
|
||||||
};
|
};
|
||||||
in lib.mkIf osConfig.hardware.graphics.enable {
|
|
||||||
|
graphical =
|
||||||
|
if lib.versionAtLeast osConfig.stateVersion "24.11"
|
||||||
|
then osConfig.hardware.graphics.enable
|
||||||
|
else osConfig.hardware.opengl.enable;
|
||||||
|
in lib.mkIf graphical {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
# Image processing
|
# Image processing
|
||||||
oxipng
|
oxipng
|
||||||
|
|
Reference in a new issue