{"id":18980586,"url":"https://github.com/snowfallorg/flake","last_synced_at":"2025-07-06T07:02:49.847Z","repository":{"id":82459859,"uuid":"559636364","full_name":"snowfallorg/flake","owner":"snowfallorg","description":"Simplify Nix Flakes on the command line.","archived":false,"fork":false,"pushed_at":"2024-05-25T22:20:56.000Z","size":104,"stargazers_count":108,"open_issues_count":3,"forks_count":5,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-24T18:52:28.624Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/snowfallorg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-30T18:14:51.000Z","updated_at":"2025-02-26T11:06:23.000Z","dependencies_parsed_at":"2024-02-14T10:30:21.310Z","dependency_job_id":"d0dc5be9-abf8-45fe-9370-f0a35204b9b6","html_url":"https://github.com/snowfallorg/flake","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snowfallorg%2Fflake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snowfallorg%2Fflake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snowfallorg%2Fflake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snowfallorg%2Fflake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/snowfallorg","download_url":"https://codeload.github.com/snowfallorg/flake/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248299029,"owners_count":21080450,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T16:07:11.478Z","updated_at":"2025-04-10T21:22:29.447Z","avatar_url":"https://github.com/snowfallorg.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"# Snowfall Flake\n\n\u003ca href=\"https://nixos.wiki/wiki/Flakes\" target=\"_blank\"\u003e\n\t\u003cimg alt=\"Nix Flakes Ready\" src=\"https://img.shields.io/static/v1?logo=nixos\u0026logoColor=d8dee9\u0026label=Nix%20Flakes\u0026labelColor=5e81ac\u0026message=Ready\u0026color=d8dee9\u0026style=for-the-badge\"\u003e\n\u003c/a\u003e\n\u003ca href=\"https://github.com/snowfallorg/lib\" target=\"_blank\"\u003e\n\t\u003cimg alt=\"Built With Snowfall\" src=\"https://img.shields.io/static/v1?label=Built%20With\u0026labelColor=5e81ac\u0026message=Snowfall\u0026color=d8dee9\u0026style=for-the-badge\"\u003e\n\u003c/a\u003e\n\n\u003cp\u003e\n\u003c!--\n\tThis paragraph is not empty, it contains an em space (UTF-8 8195) on the next line in order\n\tto create a gap in the page.\n--\u003e\n  \n\u003c/p\u003e\n\n\u003e Simplified Nix Flakes on the command line.\n\n## Installation\n\n### Nix Profile\n\nYou can install this package imperatively with the following command.\n\n```bash\nnix profile install github:snowfallorg/flake\n```\n\n### Nix Configuration\n\nYou can install this package by adding it as an input to your Nix Flake.\n\n```nix\n{\n\tdescription = \"My system flake\";\n\n\tinputs = {\n\t\tnixpkgs.url = \"github:nixos/nixpkgs/nixos-22.05\";\n\t\tunstable.url = \"github:nixos/nixpkgs/nixos-unstable\";\n\n\t\t# Snowfall Lib is not required, but will make configuration easier for you.\n\t\tsnowfall-lib = {\n\t\t\turl = \"github:snowfallorg/lib\";\n\t\t\tinputs.nixpkgs.follows = \"nixpkgs\";\n\t\t};\n\n\t\tsnowfall-flake = {\n\t\t\turl = \"github:snowfallorg/flake\";\n\t\t\t# Flake requires some packages that aren't on 22.05, but are available on unstable.\n\t\t\tinputs.nixpkgs.follows = \"unstable\";\n\t\t};\n\t};\n\n\toutputs = inputs:\n\t\tinputs.snowfall-lib.mkFlake {\n\t\t\tinherit inputs;\n\t\t\tsrc = ./.;\n\n\t\t\toverlays = with inputs; [\n\t\t\t\t# Use the overlay provided by this flake.\n\t\t\t\tsnowfall-flake.overlay\n\n\t\t\t\t# There is also a named overlay, though the output is the same.\n\t\t\t\tsnowfall-flake.overlays.\"package/flake\"\n\t\t\t];\n\t\t};\n}\n```\n\nIf you've added the overlay from this flake, then in your system configuration you\ncan add the `snowfallorg.flake` package.\n\n```nix\n{ pkgs }:\n\n{\n\tenvironment.systemPackages = with pkgs; [\n\t\tsnowfallorg.flake\n\t];\n}\n```\n\n## Usage\n\n### `flake new`\n\nCreate new projects from flake templates.\n\n```bash\n# Create a new flake and directory my-project with the default template.\nflake new my-project\n\n# Create a new flake and directory my-project with a custom template.\nflake new my-project --template github:snowfallorg/templates#package\n\n# Create a new flake and directory my-project with a template selected from a list.\nflake new my-project --pick\n```\n\n### `flake init`\n\nInitialize a flake in an existing project.\n\n```bash\n# Create a new flake in the current directory with the default template.\nflake init\n\n# Create a new flake in the current directory with a custom template.\nflake init --template github:snowfallorg/templates#package\n\n# Create a new flake in the current directory with a template selected from a list.\nflake init --pick\n```\n\n### `flake dev`\n\nRun development shells.\n\n```bash\n# Open the default development shell of the flake in the current directory.\nflake dev\n\n# Open a specific development shell of the flake in the current directory.\nflake dev my-shell\n\n# Open a development shell from a specific flake.\nflake dev github:snowfall/dotbox#dotbox\n\n# Pick a development shell from the current directory.\nflake dev --pick\n\n# Pick a development shell from a specific flake.\nflake dev github:snowfall/dotbox --pick\n```\n\n### `flake run`\n\nRun apps from Nix Flakes.\n\n```bash\n# Run the default app of the flake in the current directory.\nflake run\n\n# Run a specific app of the flake in the current directory.\nflake run my-package\n\n# Run a specific app from a specific flake.\nflake run github:snowfall/dotbox#dotbox\n\n# Pick an app to run from the current directory.\nflake run --pick\n\n# Pick an app to run from a specific flake.\nflake run github:snowfall/dotbox --pick\n```\n\n### `flake build`\n\nBuild packages from Nix Flakes.\n\n```bash\n# Build the default package of the flake in the current directory.\nflake build\n\n# Build a specific package of the flake in the current directory.\nflake build my-package\n\n# Build a package from a specific flake.\nflake build github:snowfall/dotbox#dotbox\n\n# Pick a package to build from the current directory.\nflake build --pick\n\n# Pick a package to build from a specific flake.\nflake build github:snowfall/dotbox --pick\n```\n\n### `flake switch`\n\nRebuild and switch system configuration with support for both NixOS and nix-darwin.\n\n```bash\n# Switch to configuration with the same hostname from the flake in the current directory.\nflake switch\n\n# Switch to specific configuration from the flake in the current directory.\nflake switch my-system\n\n# Pick a configuration to switch to from the flake in the current directory.\nflake switch --pick\n\n# Switch to configuration from a specific flake.\nflake switch github:jakehamilton/config#bismuth\n\n# Pick configuration from a specific flake.\nflake switch github:jakehamilton/config --pick\n```\n\n### `flake test`\n\nTest a system configuration\n\n```bash\nflake test\n\nDESCRIPTION\n\n  Test a system configuration with support for both NixOS and nix-darwin.\n\nUSAGE\n\n  $ flake test \u003cname\u003e [options]\n\nOPTIONS\n\n  --help, -h                          Show this help message\n  --debug                             Show debug messages\n  --show-trace                        Show a trace when a Nix command fails\n\nEXAMPLES\n\n  # Test a configuration with the same hostname from the flake in the current directory.\n  $ flake test\n\n  # Test a specific configuration from the flake in the current directory.\n  $ flake test my-system\n\n  # Pick a configuration to test from the flake in the current directory.\n  $ flake test --pick\n\n  # Test a configuration from a specific flake.\n  $ flake test github:jakehamilton/config#bismuth\n\n  # Pick configuration from a specific flake.\n  $ flake test github:jakehamilton/config --pick\n```\n\n### `flake boot`\n\nUpdate the system's bootable generations.\n\n```bash\nflake boot\n\nDESCRIPTION\n\n  Set a NixOS configuration as the bootable system.\n\nUSAGE\n\n  $ flake boot \u003cname\u003e [options]\n\nOPTIONS\n\n  --help, -h                          Show this help message\n  --debug                             Show debug messages\n  --show-trace                        Show a trace when a Nix command fails\n\nEXAMPLES\n\n  # Boot a configuration with the same hostname from the flake in the current directory.\n  $ flake boot\n\n  # Boot a specific configuration from the flake in the current directory.\n  $ flake boot my-system\n\n  # Pick a configuration to boot from the flake in the current directory.\n  $ flake boot --pick\n\n  # Boot a configuration from a specific flake.\n  $ flake boot github:jakehamilton/config#bismuth\n\n  # Pick configuration from a specific flake.\n  $ flake boot github:jakehamilton/config --pick\n```\n\n### `flake show`\n\nShow flake outputs.\n\n```bash\nflake show\n\nDESCRIPTION\n\n  Show the outputs of a Nix Flake.\n\nUSAGE\n\n  $ flake show \u003cname\u003e [options]\n\nOPTIONS\n\n  --help, -h                          Show this help message\n  --debug                             Show debug messages\n  --show-trace                        Show a trace when a Nix command fails\n\nEXAMPLES\n\n  # Show outputs from the flake in the current directory.\n  $ flake show\n\n  # Show outputs from a specific flake.\n  $ flake show github:jakehamilton/config\n```\n\n### `flake update`\n\nUpdate a Nix Flake's inputs.\n\n```bash\n# Update all flake inputs.\nflake update\n\n# Update one or more specific inputs.\nflake update nixpkgs snowfall-lib\n\n# Pick inputs to update from a list.\nflake update --pick\n```\n\n### `flake build-\u003ctarget\u003e`\n\nBuild a NixOS, nix-darwin, and other types of systems.\n\n\u003e See `flake build-system --help` for more information.\n\n```bash\n# Build the system with the same hostname from the flake in the current directory.\nflake build-system\n\n# Build the NixOS system with the same hostname from the flake in the current directory.\nflake build-nixos\n\n# Build a specific nix-darwin system from the flake in the current directory.\nflake build-darwin my-system\n\n# Build the system with the same hostname from a specific flake.\nflake build-system github:jakehamilton/config#bismuth\n\n# Pick and build a system from the flake in the current directory\nflake build-system --pick\n\n# Pick and build a system from a specific flake.\nflake build-system github:jakehamilton/config --pick\n\n# Build a specific ISO from the flake in the current directory.\nflake build-iso my-iso-system\n```\n\n### `flake option`\n\nShow NixOS options from Nix Flakes.\n\n```bash\n\n\nflake option\n\nDESCRIPTION\n\n  Show NixOS options from Nix Flakes.\n\nUSAGE\n\n  flake option [option] [options]\n  flake option \u003chostname\u003e [option] [options]\n  flake option \u003cflake-uri\u003e [option] [options]\n\nOPTIONS\n\n  --pick, -p                          Pick options from a list\n\n  --help, -h                          Show this help message\n  --debug                             Show debug messages\n  --show-trace                        Show a trace when a Nix command fails\n\nEXAMPLES\n\n  # Show options for the current host in the current directory.\n  $ flake option\n\n  # Show options for a specific host.\n  $ flake option my-host\n\n  # Show a specific option for a specific host.\n  $ flake option my-host services.openssh\n\n  # Show options for a flake's host.\n  $ flake option github:jakehamilton/config#bismuth\n\n  # Show a specific option for a flake's host.\n  $ flake option github:jakehamilton/config#bismuth services.openssh\n\n  # Pick options for the flake in the current directory.\n  $ flake option --pick\n\n  # Pick options from a specific flake.\n  $ flake option github:jakehamilton/config --pick\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnowfallorg%2Fflake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsnowfallorg%2Fflake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnowfallorg%2Fflake/lists"}