Nix : Use different way to include applefont.

This commit is contained in:
Dmitry Voronin 2024-02-25 19:51:42 +03:00
parent 31b4ed7a7e
commit c81dc44422
3 changed files with 21 additions and 15 deletions

View file

@ -1,13 +1,8 @@
{ {
description = "Apple fonts."; description = "Apple fonts.";
inputs = { outputs = { nixpkgs, system } @inputs:
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs } @inputs:
let let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
lib = nixpkgs.lib; lib = nixpkgs.lib;
in { in {

View file

@ -6,7 +6,6 @@
url = "git+https://git.voronind.com/voronind/linux.git"; url = "git+https://git.voronind.com/voronind/linux.git";
flake = false; flake = false;
}; };
applefonts.url = "git+file:.?dir=./.config/linux/system/derivation/apple_font";
# Nvim plugins. # Nvim plugins.
nvimAlign = { nvimAlign = {
@ -87,7 +86,7 @@
}; };
}; };
outputs = { self, nixpkgs, dotfiles, applefonts, ... } @inputs: rec { outputs = { self, nixpkgs, dotfiles, ... } @inputs: rec {
# Constant values. # Constant values.
nixosModules.const = { nixosModules.const = {
hashedPassword = "$y$j9T$oqCB16i5E2t1t/HAWaFd5.$tTaHtAcifXaDVpTcRv.yH2/eWKxKE9xM8KcqXHfHrD7"; # Use `mkpasswd`. hashedPassword = "$y$j9T$oqCB16i5E2t1t/HAWaFd5.$tTaHtAcifXaDVpTcRv.yH2/eWKxKE9xM8KcqXHfHrD7"; # Use `mkpasswd`.
@ -121,6 +120,14 @@
./module/common/Wallpaper.nix ./module/common/Wallpaper.nix
]; ];
# Apple fonts flake.
# applefont-flake = import ./derivation/applefont/flake.nix;
# applefont-outputs = applefont-flake.outputs {
# inherit nixpkgs;
# inherit system;
# };
# applefont = applefont-outputs.packages.system.default;
# Function to create a host. # Function to create a host.
mkHost = { system, hostname, modules }: nixpkgs.lib.nixosSystem { mkHost = { system, hostname, modules }: nixpkgs.lib.nixosSystem {
inherit system; inherit system;
@ -135,6 +142,10 @@
specialArgs.const = self.nixosModules.const; specialArgs.const = self.nixosModules.const;
specialArgs.flake = self; specialArgs.flake = self;
specialArgs.inputs = inputs; specialArgs.inputs = inputs;
specialArgs.applefont = ((import ./derivation/applefont/flake.nix).outputs {
inherit nixpkgs;
inherit system;
}).packages.${system}.default;
}; };
# List of all hosts bellow. # List of all hosts bellow.

View file

@ -1,6 +1,6 @@
{ pkgs, inputs, ... }: { { pkgs, specialArgs, ... }: rec {
fonts.packages = with pkgs; [ fonts.packages = with pkgs; [
inputs.applefonts.packages.${pkgs.system}.default specialArgs.applefont
(nerdfonts.override { fonts = [ "Terminus" ]; }) (nerdfonts.override { fonts = [ "Terminus" ]; })
]; ];
} }