Flakes: Difference between revisions
imported>Joel m fix indentation and reword installing flakes explanation |
imported>Ulysses4ever m →Input schema: don't repeat "inputs" many times |
||
Line 97: | Line 97: | ||
<syntaxHighlight lang=nix> | <syntaxHighlight lang=nix> | ||
{ | { | ||
# github example, also supported gitlab: | inputs = { | ||
# github example, also supported gitlab: | |||
nixpkgs.url = "github:Mic92/nixpkgs/master"; | |||
# git urls | |||
git-example.url = "git+https://git.somehost.tld/user/path"; | |||
# local directories (for absolute paths you can omit 'path:') | |||
directory-example.url = "path:/path/to/repo"; | |||
# Use this for non-flakes | |||
bar.url = "github:foo/bar/branch"; | |||
bar.flake = false; | |||
# Overwrite inputs in a flake | |||
# This is useful to use the same nixpkgs version in both flakes | |||
sops-nix.url = "github:Mic92/sops-nix"; | |||
sops-nix.inputs.nixpkgs.follows = "nixpkgs"; | |||
# Pin flakes to a specific revision | |||
nix-doom-emacs.url = "github:vlaci/nix-doom-emacs?rev=238b18d7b2c8239f676358634bfb32693d3706f3"; | |||
nix-doom-emacs.flake = false; | |||
} | |||
} | } | ||
</syntaxHighlight> | </syntaxHighlight> |