Add custom font management and multimedia video editing support
Enhanced the configuration by introducing a custom font management system, allowing for the installation of additional fonts. Updated multimedia settings to include video editing applications, enabling users to manage multimedia and video editing packages more effectively. Removed the deprecated fonts module to streamline the configuration.
This commit is contained in:
@@ -72,6 +72,7 @@
|
|||||||
};
|
};
|
||||||
nixpkgs.config = {
|
nixpkgs.config = {
|
||||||
allowUnfree = true;
|
allowUnfree = true;
|
||||||
|
allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "corefonts" ];
|
||||||
permittedInsecurePackages = [
|
permittedInsecurePackages = [
|
||||||
"aspnetcore-runtime-wrapped-6.0.36"
|
"aspnetcore-runtime-wrapped-6.0.36"
|
||||||
"aspnetcore-runtime-6.0.36"
|
"aspnetcore-runtime-6.0.36"
|
||||||
@@ -165,6 +166,39 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
fonts.fontconfig.enable = true;
|
fonts = {
|
||||||
|
fontconfig.enable = true;
|
||||||
|
packages = let
|
||||||
|
customFonts = pkgs.stdenvNoCC.mkDerivation {
|
||||||
|
name = "custom-fonts";
|
||||||
|
src = inputs.fonts;
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/share/fonts
|
||||||
|
find $src -type f \( \
|
||||||
|
-name "*.ttf" -o \
|
||||||
|
-name "*.otf" -o \
|
||||||
|
-name "*.woff" -o \
|
||||||
|
-name "*.woff2" \
|
||||||
|
\) -exec cp {} $out/share/fonts/ \;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
in
|
||||||
|
builtins.attrValues {
|
||||||
|
inherit customFonts;
|
||||||
|
inherit (pkgs)
|
||||||
|
symbola
|
||||||
|
comic-neue
|
||||||
|
cascadia-code
|
||||||
|
corefonts
|
||||||
|
;
|
||||||
|
inherit (pkgs.nerd-fonts)
|
||||||
|
caskaydia-cove
|
||||||
|
open-dyslexic
|
||||||
|
comic-shanns-mono
|
||||||
|
iosevka
|
||||||
|
agave
|
||||||
|
;
|
||||||
|
};
|
||||||
|
};
|
||||||
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
|
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,10 +9,10 @@
|
|||||||
apps = {
|
apps = {
|
||||||
art.enable = true;
|
art.enable = true;
|
||||||
art.users = "bearded_dragonn";
|
art.users = "bearded_dragonn";
|
||||||
fonts.enable = true;
|
|
||||||
fonts.users = "bearded_dragonn";
|
|
||||||
gaming.enable = true;
|
gaming.enable = true;
|
||||||
gaming.users = "bearded_dragonn";
|
gaming.users = "bearded_dragonn";
|
||||||
|
multimedia.videoEditing.enable = true;
|
||||||
|
multimedia.videoEditing.users = "bearded_dragonn";
|
||||||
};
|
};
|
||||||
dev = {
|
dev = {
|
||||||
nix.enable = true;
|
nix.enable = true;
|
||||||
@@ -50,18 +50,12 @@
|
|||||||
hashedPasswordFile = config.sops.secrets.derek-password.path;
|
hashedPasswordFile = config.sops.secrets.derek-password.path;
|
||||||
packages = builtins.attrValues {
|
packages = builtins.attrValues {
|
||||||
inherit (pkgs)
|
inherit (pkgs)
|
||||||
davinci-resolve
|
|
||||||
shotcut
|
|
||||||
pitivi
|
|
||||||
bottles
|
bottles
|
||||||
vscode
|
vscode
|
||||||
nextcloud-client
|
nextcloud-client
|
||||||
firefox
|
firefox
|
||||||
warp
|
warp
|
||||||
;
|
;
|
||||||
inherit (pkgs.kdePackages)
|
|
||||||
kdenlive
|
|
||||||
;
|
|
||||||
};
|
};
|
||||||
extraGroups = [
|
extraGroups = [
|
||||||
"audio"
|
"audio"
|
||||||
|
|||||||
@@ -21,7 +21,6 @@
|
|||||||
secureHost = false;
|
secureHost = false;
|
||||||
stylix.enable = true;
|
stylix.enable = true;
|
||||||
emacs.enable = true;
|
emacs.enable = true;
|
||||||
apps.fonts.enable = true;
|
|
||||||
shell.tools.enable = true;
|
shell.tools.enable = true;
|
||||||
services.network.enable = true;
|
services.network.enable = true;
|
||||||
dev = {
|
dev = {
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ in
|
|||||||
apps = enableList mkEnabled [
|
apps = enableList mkEnabled [
|
||||||
"art"
|
"art"
|
||||||
"dictionaries"
|
"dictionaries"
|
||||||
"fonts"
|
|
||||||
"gaming"
|
"gaming"
|
||||||
"switch"
|
"switch"
|
||||||
"internet"
|
"internet"
|
||||||
|
|||||||
@@ -1,44 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
inputs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
customFonts = pkgs.stdenvNoCC.mkDerivation {
|
|
||||||
name = "custom-fonts";
|
|
||||||
src = inputs.fonts;
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out/share/fonts
|
|
||||||
find $src -type f \( \
|
|
||||||
-name "*.ttf" -o \
|
|
||||||
-name "*.otf" -o \
|
|
||||||
-name "*.woff" -o \
|
|
||||||
-name "*.woff2" \
|
|
||||||
\) -exec cp {} $out/share/fonts/ \;
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.my.apps.fonts.enable = lib.mkEnableOption "additional fonts and typography";
|
|
||||||
config = lib.mkIf config.my.apps.fonts.enable {
|
|
||||||
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "corefonts" ];
|
|
||||||
fonts.packages = builtins.attrValues {
|
|
||||||
inherit customFonts;
|
|
||||||
inherit (pkgs)
|
|
||||||
symbola
|
|
||||||
comic-neue
|
|
||||||
cascadia-code
|
|
||||||
corefonts
|
|
||||||
;
|
|
||||||
inherit (pkgs.nerd-fonts)
|
|
||||||
caskaydia-cove
|
|
||||||
open-dyslexic
|
|
||||||
comic-shanns-mono
|
|
||||||
iosevka
|
|
||||||
agave
|
|
||||||
;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -5,6 +5,30 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
let
|
||||||
|
cfg = config.my.apps.multimedia;
|
||||||
|
attrValuesIf = cond: attrs: if cond then builtins.attrValues attrs else [ ];
|
||||||
|
multimediaPackages = attrValuesIf cfg.enable {
|
||||||
|
inherit (pkgs)
|
||||||
|
curtail # image compressor
|
||||||
|
easyeffects # equalizer
|
||||||
|
identity # compare images or videos
|
||||||
|
mousai # poor man shazam
|
||||||
|
shortwave # listen to world radio
|
||||||
|
tagger # tag music files
|
||||||
|
;
|
||||||
|
};
|
||||||
|
videoEditingPackages = attrValuesIf cfg.videoEditing.enable {
|
||||||
|
inherit (pkgs)
|
||||||
|
davinci-resolve
|
||||||
|
shotcut
|
||||||
|
pitivi
|
||||||
|
;
|
||||||
|
inherit (pkgs.kdePackages)
|
||||||
|
kdenlive
|
||||||
|
;
|
||||||
|
};
|
||||||
|
in
|
||||||
{
|
{
|
||||||
options.my.apps.multimedia = {
|
options.my.apps.multimedia = {
|
||||||
enable = lib.mkEnableOption "multimedia applications and media players";
|
enable = lib.mkEnableOption "multimedia applications and media players";
|
||||||
@@ -13,21 +37,19 @@
|
|||||||
default = config.my.toggleUsers.apps;
|
default = config.my.toggleUsers.apps;
|
||||||
description = "Users to install multimedia packages for";
|
description = "Users to install multimedia packages for";
|
||||||
};
|
};
|
||||||
|
videoEditing = {
|
||||||
|
enable = lib.mkEnableOption "video editing applications";
|
||||||
|
users = lib.mkOption {
|
||||||
|
type = lib.types.either lib.types.str (lib.types.listOf lib.types.str);
|
||||||
|
default = config.my.toggleUsers.apps;
|
||||||
|
description = "Users to install video editing packages for";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
config = lib.mkIf config.my.apps.multimedia.enable {
|
config = lib.mkIf (cfg.enable || cfg.videoEditing.enable) {
|
||||||
users.users =
|
users.users = lib.mkMerge [
|
||||||
let
|
(inputs.self.lib.mkUserPackages lib cfg.users multimediaPackages)
|
||||||
packages = builtins.attrValues {
|
(inputs.self.lib.mkUserPackages lib cfg.videoEditing.users videoEditingPackages)
|
||||||
inherit (pkgs)
|
];
|
||||||
curtail # image compressor
|
|
||||||
easyeffects # equalizer
|
|
||||||
identity # compare images or videos
|
|
||||||
mousai # poor man shazam
|
|
||||||
shortwave # listen to world radio
|
|
||||||
tagger # tag music files
|
|
||||||
;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
inputs.self.lib.mkUserPackages lib config.my.apps.multimedia.users packages;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user