{ moduleWithSystem, inputs, ... }: { flake.nixosModules.foot = moduleWithSystem ({self', ...}: { environment.systemPackages = with self'.packages; [ foot ]; }); # PerSystem, gives access to self' and inputs', as well as some helper functions perSystem = {pkgs, ...}: { # Simple wrapper for foot, sets background color to bright red packages.foot = let fira-mono = pkgs.nerd-fonts.fira-mono; font-config = pkgs.makeFontsConf { fontDirectories = [fira-mono]; }; in inputs.wrappers.wrappers.foot.wrap { inherit pkgs; env."FONTCONFIG_FILE" = "${font-config}"; settings = { main.font = "FiraMono Nerd Font:size=18"; }; }; }; }