From 5b3a541c083317257860cf1615bb928ff6fab494 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Tue, 16 Jan 2024 08:22:43 +0000 Subject: [PATCH] Add custom Iosevka (font) build for testing before I switch --- flake.nix | 344 +++++++++++++++++++++++++++++------------------------- 1 file changed, 183 insertions(+), 161 deletions(-) diff --git a/flake.nix b/flake.nix index dd7234be..1f0b8925 100644 --- a/flake.nix +++ b/flake.nix @@ -46,171 +46,193 @@ ./hosts/${hostName}/hardware-configuration.nix home-manager.nixosModules.home-manager stylix.nixosModules.stylix - ({ config, lib, pkgs, ... }: { - boot.loader = { - systemd-boot.enable = true; - efi.canTouchEfiVariables = true; - }; - programs = { - ${shell}.enable = true; - nano = { - enable = true; - syntaxHighlight = true; - nanorc = '' - set nowrap - set tabstospaces - set tabsize 2 - ''; - }; - }; - nix = { - enable = true; - settings = { - experimental-features = [ "nix-command" "flakes" ]; - auto-optimise-store = true; - }; - channel.enable = true; - registry = { - nixpkgs.flake = nixpkgs; - nixos.flake = self; - }; - gc = { - automatic = true; - options = "--delete-older-than 7d"; - }; - optimise.automatic = true; - extraOptions = '' - keep-outputs = true - keep-derivations = true - min-free = ${toString (100 * 1024 * 1024)} - max-free = ${toString (1024 * 1024 * 1024)} - ''; - }; - nixpkgs.config.allowUnfreePredicate = pkg: - builtins.elem (lib.getName pkg) [ - "steam" - "steam-original" - "steam-run" - "nomachine-client" - ]; - system = { inherit stateVersion; }; - networking = { - inherit hostName; - firewall.enable = true; - }; - stylix = { - autoEnable = false; - targets = { - chromium.enable = true; - console.enable = true; - fish.enable = true; - }; - image = ./wallpapers/space.png; - base16Scheme = - "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml"; - override = { - scheme = - "Catppuccin Mocha, using fg and bg colours from emacs modus-vivdendi-tinted"; - base00 = "0d0e1c"; - base01 = "1d2235"; - base04 = "c6daff"; - base05 = "ffffff"; - }; - polarity = "dark"; - opacity = { - popups = 0.5; - terminal = 0.8; - }; - fonts = rec { - sizes.terminal = 12; - emoji = { - name = "Noto Color Emoji"; - package = pkgs.noto-fonts-emoji; - }; - monospace = { - name = "FiraCode Nerd Font"; - package = - (pkgs.nerdfonts.override { fonts = [ "FiraCode" ]; }); - }; - sansSerif = { - name = "Fira Sans"; - package = pkgs.fira; - }; - serif = sansSerif; - }; - homeManagerIntegration.followSystem = true; - }; - fonts = { - packages = with pkgs; [ - fira - fira-mono - fira-code - (nerdfonts.override { - fonts = [ "FiraCode" "NerdFontsSymbolsOnly" ]; - }) - emacs-all-the-icons-fonts - weather-icons - noto-fonts - noto-fonts-cjk - noto-fonts-emoji - liberation_ttf - ]; - fontconfig.enable = true; - }; - users.users = let - authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINI1dWlS16Keil0MGPWmMsBzx8F9ylfz+fRwxUr8/tZ/ ion" - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIANfkqd5lPTsSPU3SRYnAa1UjCYDmDeBTyzq5McmWlm6 xenia@Vanguard" - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ/ZSSCN5sqrA+tdoIZr5EUm5DRuBV4dQ7J+QBEtUwUU xenia@Northstar" - ]; - in { - root.openssh = { inherit authorizedKeys; }; - ${user} = { - inherit group; - isNormalUser = true; - description = "Evie Litherland-Smith"; - extraGroups = - [ "networkmanager" "wheel" "video" "input" "uinput" ]; - shell = pkgs.${shell}; - initialHashedPassword = - "$y$j9T$tHIPQt09Kf3KH2eIRze3g/$2mwSlcq27DTGvHNPJ5EP9/1CfL3bXP0F6oS/Vuffmn3"; - openssh = { inherit authorizedKeys; }; - }; - }; - home-manager = { - extraSpecialArgs = { inherit hostName; }; - useGlobalPkgs = true; - useUserPackages = true; - users = { - root = { - imports = [ ./home/default.nix ]; - home = { - inherit stateVersion; - username = "root"; - homeDirectory = "/root"; - }; - programs.home-manager.enable = true; - }; - ${user} = let - username = user; - homeDirectory = "/home/${user}"; - in { - imports = - [ ./hosts/${hostName}/home.nix ./home/default.nix ] - ++ homeModules; - home = { inherit username homeDirectory stateVersion; }; - programs.home-manager.enable = true; - xdg.userDirs = { - enable = true; - createDirectories = true; - extraConfig = { - XDG_PROJECTS_DIR = "${homeDirectory}/Projects"; + ({ config, lib, pkgs, ... }: + let + iosevka-custom = pkgs.iosevka.override { + set = "custom"; + privateBuildPlan = { + family = "Iosevka Custom"; + spacing = "normal"; + serifs = "sans"; + noCvSs = false; + exportGlyphNames = false; + variants = { inherits = "ss05"; }; + ligations = { inherits = "dlig"; }; + widths = { + Condensed = { + shape = 500; + menu = 3; + css = "condensed"; + }; + Normal = { + shape = 600; + menu = 5; + css = "normal"; }; }; }; }; - }; - }) + in { + boot.loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; + programs = { + ${shell}.enable = true; + nano = { + enable = true; + syntaxHighlight = true; + nanorc = '' + set nowrap + set tabstospaces + set tabsize 2 + ''; + }; + }; + nix = { + enable = true; + settings = { + experimental-features = [ "nix-command" "flakes" ]; + auto-optimise-store = true; + }; + channel.enable = true; + registry = { + nixpkgs.flake = nixpkgs; + nixos.flake = self; + }; + gc = { + automatic = true; + options = "--delete-older-than 7d"; + }; + optimise.automatic = true; + extraOptions = '' + keep-outputs = true + keep-derivations = true + min-free = ${toString (100 * 1024 * 1024)} + max-free = ${toString (1024 * 1024 * 1024)} + ''; + }; + nixpkgs.config.allowUnfreePredicate = pkg: + builtins.elem (lib.getName pkg) [ + "steam" + "steam-original" + "steam-run" + "nomachine-client" + ]; + system = { inherit stateVersion; }; + networking = { + inherit hostName; + firewall.enable = true; + }; + stylix = { + autoEnable = false; + targets = { + chromium.enable = true; + console.enable = true; + fish.enable = true; + }; + image = ./wallpapers/space.png; + base16Scheme = + "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml"; + override = { + scheme = + "Catppuccin Mocha, using fg and bg colours from emacs modus-vivdendi-tinted"; + base00 = "0d0e1c"; + base01 = "1d2235"; + base04 = "c6daff"; + base05 = "ffffff"; + }; + polarity = "dark"; + opacity = { + popups = 0.5; + terminal = 0.8; + }; + fonts = rec { + sizes.terminal = 12; + serif = sansSerif; + sansSerif = { + name = "Fira Sans"; + package = pkgs.fira; + }; + monospace = { + name = "FiraCode Nerd Font"; + package = + (pkgs.nerdfonts.override { fonts = [ "FiraCode" ]; }); + }; + emoji = { + name = "Noto Color Emoji"; + package = pkgs.noto-fonts-emoji; + }; + }; + homeManagerIntegration.followSystem = true; + }; + fonts = { + packages = with pkgs; [ + (nerdfonts.override { fonts = [ "NerdFontsSymbolsOnly" ]; }) + iosevka + # iosevka-custom + emacs-all-the-icons-fonts + weather-icons + noto-fonts + noto-fonts-cjk + noto-fonts-emoji + ]; + fontconfig.enable = true; + }; + users.users = let + authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINI1dWlS16Keil0MGPWmMsBzx8F9ylfz+fRwxUr8/tZ/ ion" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIANfkqd5lPTsSPU3SRYnAa1UjCYDmDeBTyzq5McmWlm6 xenia@Vanguard" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ/ZSSCN5sqrA+tdoIZr5EUm5DRuBV4dQ7J+QBEtUwUU xenia@Northstar" + ]; + in { + root.openssh = { inherit authorizedKeys; }; + ${user} = { + inherit group; + isNormalUser = true; + description = "Evie Litherland-Smith"; + extraGroups = + [ "networkmanager" "wheel" "video" "input" "uinput" ]; + shell = pkgs.${shell}; + initialHashedPassword = + "$y$j9T$tHIPQt09Kf3KH2eIRze3g/$2mwSlcq27DTGvHNPJ5EP9/1CfL3bXP0F6oS/Vuffmn3"; + openssh = { inherit authorizedKeys; }; + }; + }; + home-manager = { + extraSpecialArgs = { inherit hostName; }; + useGlobalPkgs = true; + useUserPackages = true; + users = { + root = { + imports = [ ./home/default.nix ]; + home = { + inherit stateVersion; + username = "root"; + homeDirectory = "/root"; + }; + programs.home-manager.enable = true; + }; + ${user} = let + username = user; + homeDirectory = "/home/${user}"; + in { + imports = + [ ./hosts/${hostName}/home.nix ./home/default.nix ] + ++ homeModules; + home = { inherit username homeDirectory stateVersion; }; + programs.home-manager.enable = true; + xdg.userDirs = { + enable = true; + createDirectories = true; + extraConfig = { + XDG_PROJECTS_DIR = "${homeDirectory}/Projects"; + }; + }; + }; + }; + }; + }) ] ++ systemModules ++ serviceModules; }; in {