Skip to content

Instantly share code, notes, and snippets.

@heywoodlh
Created July 8, 2024 18:57
Show Gist options
  • Save heywoodlh/3c5500a1063fb5b2b3cd236e638ac6ec to your computer and use it in GitHub Desktop.
Save heywoodlh/3c5500a1063fb5b2b3cd236e638ac6ec to your computer and use it in GitHub Desktop.
NixOS flake
{
description = "example nixos flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs@{ self,
nixpkgs,
home-manager,
... }:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
in {
# nixos targets
packages.nixosConfigurations = {
nixos-machine-1 = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = inputs;
modules = [
./nixos/configuration.nix
{
# Additional NixOS configuration goes here
}
];
};
};
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment