Created
July 8, 2024 18:57
-
-
Save heywoodlh/3c5500a1063fb5b2b3cd236e638ac6ec to your computer and use it in GitHub Desktop.
NixOS flake
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
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