44 lines
1.0 KiB
Nix
44 lines
1.0 KiB
Nix
{
|
|
description = "My flake for my infrastructure";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-25.05";
|
|
nixpkgs-unstable.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
|
};
|
|
|
|
outputs =
|
|
{
|
|
nixpkgs,
|
|
...
|
|
}@inputs:
|
|
let
|
|
system = builtins.currentSystem;
|
|
lib = nixpkgs.lib;
|
|
pkgs = import nixpkgs {
|
|
inherit system;
|
|
config.allowUnfree = true;
|
|
};
|
|
pkgsUnstable = import inputs.nixpkgs-unstable {
|
|
inherit system;
|
|
config.allowUnfree = true;
|
|
};
|
|
in
|
|
{
|
|
# this allows you to access `pkgsUnstable` anywhere in your config
|
|
_module.args.pkgsUnstable = import inputs.nixpkgsUnstable {
|
|
inherit (pkgs.stdenv.hostPlatform) system;
|
|
inherit (config.nixpkgs) config;
|
|
};
|
|
|
|
nixosConfigurations = {
|
|
test-nixos = lib.nixosSystem {
|
|
specialArgs = {
|
|
inherit inputs;
|
|
hostname = "test-nixos";
|
|
};
|
|
modules = [ ./configuration.nix ];
|
|
};
|
|
};
|
|
};
|
|
}
|