Working on reshuffling
This commit is contained in:
+14
-17
@@ -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
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Top-level option (toggle)
|
||||
options = {
|
||||
mySystem = {
|
||||
desktop = {
|
||||
fonts = {
|
||||
enable = lib.mkEnableOption "Enable nerd-fonts";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
{ # The function defining the NixOS module
|
||||
flake.nixosModules.fonts = { config, lib, pkgs, ... }:
|
||||
|
||||
# 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
|
||||
];
|
||||
{
|
||||
# Define an enable option
|
||||
options.mySystem.desktop.fonts.enable =
|
||||
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
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
@@ -1,22 +1,19 @@
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Top-level option (toggle)
|
||||
options = {
|
||||
mySystem = {
|
||||
desktop = {
|
||||
fonts = {
|
||||
enable = lib.mkEnableOption "Enable nerd-fonts";
|
||||
};
|
||||
};
|
||||
{ # The function defining the NixOS module
|
||||
flake.nixosModules.fonts = { config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Define an enable option
|
||||
options.mySystem.desktop.fonts.enable =
|
||||
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
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user