nix-starter-configs/flake.nix

51 lines
1.6 KiB
Nix
Raw Normal View History

2021-12-16 12:28:43 -08:00
{
description = "You new nix config";
inputs = {
# Nixpkgs
2021-12-16 12:28:43 -08:00
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
2022-05-22 15:31:56 -07:00
hardware.url = "github:nixos/nixos-hardware";
2021-12-16 12:28:43 -08:00
# Home manager
2021-12-16 12:28:43 -08:00
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
};
2022-05-22 15:31:56 -07:00
outputs = { nixpkgs, home-manager, ... }@inputs:
let
# Bring some functions into scope (from builtins and other flakes)
inherit (nixpkgs.lib) nixosSystem;
inherit (home-manager.lib) homeManagerConfiguration;
in
rec {
# System configurations
# Accessible via 'nixos-rebuild'
nixosConfigurations = {
# FIXME: Replace with your hostname
your-hostname = nixosSystem {
system = "x86_64-linux";
2022-05-22 15:31:56 -07:00
# >> Main NixOS configuration file <<
modules = [ ./nixos/configuration.nix ];
# Make our inputs available to the config (for importing modules)
specialArgs = { inherit inputs; };
};
2021-12-16 12:28:43 -08:00
};
# Home configurations
# Accessible via 'home-manager'
homeConfigurations = {
# FIXME: Replace with your username@hostname
"your-name@your-hostname" = homeManagerConfiguration rec {
# FIXME: Replace with your username
username = "your-name";
homeDirectory = "/home/${username}";
system = "x86_64-linux";
# >> Main home-manager configuration file <<
configuration = ./home-manager/home.nix;
# Make our inputs available to the config (for importing modules)
extraSpecialArgs = { inherit inputs; };
};
2021-12-16 12:28:43 -08:00
};
};
2021-12-16 12:28:43 -08:00
}