diff --git a/lib/nixos/configuration.nix b/lib/nixos/configuration.nix index d7ade67..29a7e50 100644 --- a/lib/nixos/configuration.nix +++ b/lib/nixos/configuration.nix @@ -6,11 +6,11 @@ }: { pkgs, ... }: let - theme = import "${self}/lib/theme" { inherit pkgs; }; - username = "opdavies"; in { + imports = [ ../../modules/mixins/fonts.nix ]; + nixpkgs.config = { allowUnfree = true; @@ -214,31 +214,6 @@ in users.defaultUserShell = "/etc/profiles/per-user/${username}/bin/zsh"; - fonts = { - fontconfig = { - enable = true; - defaultFonts = { - monospace = [ theme.fonts.monospace.name ]; - }; - }; - - packages = - with pkgs; - [ - (nerdfonts.override { - fonts = [ - "AnonymousPro" - "FiraCode" - "GeistMono" - "IntelOneMono" - "Iosevka" - "JetBrainsMono" - ]; - }) - ] - ++ [ theme.fonts.monospace.package ]; - }; - zramSwap.enable = true; nix = { diff --git a/modules/mixins/fonts.nix b/modules/mixins/fonts.nix new file mode 100644 index 0000000..b4ed19e --- /dev/null +++ b/modules/mixins/fonts.nix @@ -0,0 +1,31 @@ +{ pkgs, ... }: + +let + theme = import ../../lib/theme { inherit pkgs; }; +in +{ + fonts = { + fontconfig = { + enable = true; + defaultFonts = { + monospace = [ theme.fonts.monospace.name ]; + }; + }; + + packages = + with pkgs; + [ + (nerdfonts.override { + fonts = [ + "AnonymousPro" + "FiraCode" + "GeistMono" + "IntelOneMono" + "Iosevka" + "JetBrainsMono" + ]; + }) + ] + ++ [ theme.fonts.monospace.package ]; + }; +}