Working on reshuffling

This commit is contained in:
2026-03-19 12:12:50 +00:00
parent 2ef92b69df
commit 452f894248
2 changed files with 28 additions and 34 deletions
+14 -17
View File
@@ -978,24 +978,21 @@ This file installs and configures fonts
#+BEGIN_SRC nix :tangle generated/modules/desktop/fonts.nix :noweb tangle :mkdirp yes :eval never-html #+BEGIN_SRC nix :tangle generated/modules/desktop/fonts.nix :noweb tangle :mkdirp yes :eval never-html
{ lib, pkgs, ... }: { lib, pkgs, ... }:
{ { # The function defining the NixOS module
# Top-level option (toggle) flake.nixosModules.fonts = { config, lib, pkgs, ... }:
options = {
mySystem = {
desktop = {
fonts = {
enable = lib.mkEnableOption "Enable nerd-fonts";
};
};
};
};
# Apply configuration if enabled {
config = lib.mkIf (config.mySystem.desktop.fonts.enable or false) { # Define an enable option
fonts.packages = with pkgs; [ options.mySystem.desktop.fonts.enable =
nerd-fonts.iosevka lib.mkEnableOption "Enable nerd-fonts";
nerd-fonts.fira-code
]; # Only apply config if enabled
config = lib.mkIf (config.mySystem.desktop.fonts.enable or false) {
fonts.packages = with pkgs; [
nerd-fonts.iosevka
nerd-fonts.fira-code
];
};
}; };
} }
#+END_SRC #+END_SRC
+14 -17
View File
@@ -1,22 +1,19 @@
{ lib, pkgs, ... }: { lib, pkgs, ... }:
{ { # The function defining the NixOS module
# Top-level option (toggle) flake.nixosModules.fonts = { config, lib, pkgs, ... }:
options = {
mySystem = { {
desktop = { # Define an enable option
fonts = { options.mySystem.desktop.fonts.enable =
enable = lib.mkEnableOption "Enable nerd-fonts"; lib.mkEnableOption "Enable nerd-fonts";
};
}; # Only apply config if enabled
config = lib.mkIf (config.mySystem.desktop.fonts.enable or false) {
fonts.packages = with pkgs; [
nerd-fonts.iosevka
nerd-fonts.fira-code
];
}; };
}; };
# Apply configuration if enabled
config = lib.mkIf (config.mySystem.desktop.fonts.enable or false) {
fonts.packages = with pkgs; [
nerd-fonts.iosevka
nerd-fonts.fira-code
];
};
} }