nix-config/flake.nix

77 lines
2.1 KiB
Nix
Raw Normal View History

2023-10-13 20:52:26 +02:00
#
# 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";
};
2023-10-14 18:53:32 +02:00
split-monitor-workspaces = {
url = "github:Duckonaut/split-monitor-workspaces";
inputs.hyprland.follows = "hyprland"; # <- make sure this line is present for the plugin to work as intended
};
2023-10-13 20:52:26 +02:00
};
outputs = inputs @ {
self,
nixpkgs,
nixpkgs-unstable,
home-manager,
nur,
hyprland,
2023-10-14 18:53:32 +02:00
split-monitor-workspaces,
2023-10-13 20:52:26 +02:00
...
}:
# 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;
2023-10-14 18:53:32 +02:00
inherit inputs nixpkgs nixpkgs-unstable home-manager nur hyprland split-monitor-workspaces vars; # Inherit inputs
}
);
homeConfigurations = ( # Nix Configurations
import ./nix/home.nix {
inherit (nixpkgs) lib;
inherit inputs nixpkgs nixpkgs-unstable home-manager vars hyprland split-monitor-workspaces;
2023-10-13 20:52:26 +02:00
}
);
};
}