Skip to content

dibenzepin/flakes-mirror

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flakes

feature image showing some emojis with the Apple Color Emoji font

fumnanya's personal flake registry of Stuff I'm Not Legally Allowed to Put on Nixpkgs™. 1

mostly just consists of fonts and flake templates using direnv + nix-direnv:

usage:

to make things easier, you can set a registry and use it in place of the git+... url:

$ nix registry add fum git+https://codeberg.org/fumnanya/flakes 
$ nix flake init -t "fum#rust"

using a template is easy, just nix flake init -t ... and direnv allow:

$ mkdir project
$ cd project
$ nix flake init -t "git+https://codeberg.org/fumnanya/flakes#rust"
$ direnv allow
$ cargo init

using a package is slightly more involved: first, add the repo to your inputs:

# in flake.nix

inputs = {
  # add this 👇
  fum.url = "git+https://codeberg.org/fumnanya/flakes";
};

if you're using NixOS, add inputs to specialArgs:

# in flake.nix

           # bind it here 👇
outputs = { self, ... }@inputs: {
  nixosConfigurations.hostname = nixpkgs.lib.nixosSystem {
    specialArgs = { inherit inputs; }; # 👈 add it here
  }
}

...then add the packages to your fonts:

# in configuration.nix

{ inputs, ... }: {
  fonts.packages = with inputs.fum.packages.${pkgs.system}; [
    helvetica
    apple-color-emoji
  ];
}

with Home Manager, you need to pass it in with extraSpecialArgs:

# in flake.nix

           # bind it here 👇
outputs = { self, ... }@inputs: {
  nixosConfigurations.hostname = nixpkgs.lib.nixosSystem {
    modules = [
      home-manager.nixosModules.home-manager
        {                              # add it here 👇
          home-manager.extraSpecialArgs = { inherit inputs; };
        }
    ];
  }
}

and add whatever you need to your packages:

# in home.nix

{ inputs, ... }: {
  home.packages = with inputs.fum.packages.${pkgs.system}; [
    helvetica
    apple-color-emoji
  ];
}

notes

if you use the Apple Color Emoji font, you probably want to set it up to override others...Nix and Home Manager have options for this:

# in configuration.nix or home.nix

fonts.fontconfig = {
  enable = true; # excl. to HM
  defaultFonts = {
    emoji = [ "Apple Color Emoji" ];
  };
};

# exclusive to Home Manager...
# ...makes it work better on non-NixOS
targets.genericLinux.enable = true;

you can also modify your fontconfig to do this instead, an example is here.

Footnotes

  1. see NixOS/nixpkgs#261100.

About

mirror of https://codeberg.org/fumnanya/flakes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published