Nix flakes explained

Поделиться
HTML-код
  • Опубликовано: 10 фев 2025
  • Enabling flakes:
    nixos.wiki/wik... - commands are here
    Creating a flake:
    $ nix flake init
    Updating a flake:
    $ nix flake update
    Flake:
    ```
    {
    description = "my epic vims collection";
    inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
    };
    outputs = { self, nixpkgs }:
    let
    system = "x86_64-linux";
    pkgs = nixpkgs.legacyPackages.${system};
    in
    {
    bob =
    pkgs.mkShell
    {
    buildInputs = [
    pkgs.neovim
    pkgs.vim
    ];
    shellHook = ''
    echo "hello mom"
    '';
    };
    };
    }
    ```
    (yes, I know I could push it to github, but I'm extra lazy today)

Комментарии • 105