2021-12-16 12:28:43 -08:00
|
|
|
{
|
|
|
|
description = "You new nix config";
|
|
|
|
|
|
|
|
inputs = {
|
2022-04-24 16:35:26 -07:00
|
|
|
# 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
|
|
|
|
2022-04-24 16:35:26 -07: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:
|
2022-04-24 16:35:26 -07:00
|
|
|
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
|
2022-04-25 06:03:15 -07:00
|
|
|
your-hostname = nixosSystem {
|
2022-04-24 16:35:26 -07:00
|
|
|
system = "x86_64-linux";
|
2022-05-22 15:31:56 -07:00
|
|
|
# >> Main NixOS configuration file <<
|
|
|
|
modules = [ ./nixos/configuration.nix ];
|
2022-04-24 16:35:26 -07:00
|
|
|
# Make our inputs available to the config (for importing modules)
|
|
|
|
specialArgs = { inherit inputs; };
|
|
|
|
};
|
2021-12-16 12:28:43 -08:00
|
|
|
};
|
|
|
|
|
2022-04-24 16:35:26 -07:00
|
|
|
# Home configurations
|
|
|
|
# Accessible via 'home-manager'
|
|
|
|
homeConfigurations = {
|
|
|
|
# FIXME: Replace with your username@hostname
|
2022-04-25 06:03:15 -07:00
|
|
|
"your-name@your-hostname" = homeManagerConfiguration rec {
|
2022-04-24 16:35:26 -07:00
|
|
|
# FIXME: Replace with your username
|
2022-04-25 06:03:15 -07:00
|
|
|
username = "your-name";
|
2022-04-24 16:35:26 -07:00
|
|
|
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
|
|
|
};
|
2022-04-24 16:35:26 -07:00
|
|
|
};
|
2021-12-16 12:28:43 -08:00
|
|
|
}
|