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;
|
2022-07-08 21:44:35 -07:00
|
|
|
# We'll use x86_64-linux for everything, but you can have hosts/homes for
|
|
|
|
# different systems and architectures if you want
|
|
|
|
system = "x86_64-linux";
|
|
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
|
|
in {
|
2022-04-24 16:35:26 -07:00
|
|
|
# System configurations
|
|
|
|
# Accessible via 'nixos-rebuild'
|
|
|
|
nixosConfigurations = {
|
|
|
|
# FIXME: Replace with your hostname
|
2022-04-25 06:03:15 -07:00
|
|
|
your-hostname = nixosSystem {
|
2022-07-08 21:44:35 -07:00
|
|
|
inherit system;
|
|
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
|
|
|
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-07-08 21:44:35 -07:00
|
|
|
"your-name@your-hostname" = homeManagerConfiguration {
|
|
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
|
|
|
2022-04-24 16:35:26 -07:00
|
|
|
# >> Main home-manager configuration file <<
|
2022-07-08 21:44:35 -07:00
|
|
|
modules = [ ./home-manager/home.nix ];
|
2022-04-24 16:35:26 -07:00
|
|
|
# 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
|
|
|
}
|