63 lines
1.6 KiB
Nix
63 lines
1.6 KiB
Nix
#
|
|
# flake.nix *
|
|
# ├─ ./hosts
|
|
# │ └─ default.nix
|
|
# ├─ ./darwin
|
|
# │ └─ default.nix
|
|
# └─ ./nix
|
|
# └─ default.nix
|
|
#
|
|
{
|
|
description = "Nix, NixOS and Nix Darwin System Flake Configuration";
|
|
|
|
inputs =
|
|
# References Used by Flake
|
|
{
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05"; # Stable Nix Packages (Default)
|
|
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; # Unstable Nix Packages
|
|
|
|
home-manager = {
|
|
# User Environment Manager
|
|
url = "github:nix-community/home-manager/release-23.05";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
nur = {
|
|
# NUR Community Packages
|
|
url = "github:nix-community/NUR"; # Requires "nur.nixosModules.nur" to be added to the host modules
|
|
};
|
|
|
|
hyprland = {
|
|
# Official Hyprland Flake
|
|
url = "github:hyprwm/Hyprland"; # Requires "hyprland.nixosModules.default" to be added the host modules
|
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
|
};
|
|
};
|
|
|
|
outputs = inputs @ {
|
|
self,
|
|
nixpkgs,
|
|
nixpkgs-unstable,
|
|
home-manager,
|
|
nur,
|
|
hyprland,
|
|
...
|
|
}:
|
|
# Function telling flake which inputs to use
|
|
let
|
|
vars = {
|
|
# Variables Used In Flake
|
|
user = "ghoscht";
|
|
location = "$HOME/.setup";
|
|
terminal = "alacritty";
|
|
editor = "nvim";
|
|
};
|
|
in {
|
|
nixosConfigurations = ( # NixOS Configurations
|
|
import ./hosts {
|
|
inherit (nixpkgs) lib;
|
|
inherit inputs nixpkgs nixpkgs-unstable home-manager nur hyprland vars; # Inherit inputs
|
|
}
|
|
);
|
|
};
|
|
}
|