Serenity/flake.nix

76 lines
2 KiB
Nix

{
description = "Serenity's NixOS configuration";
inputs = {
# Nixpkgs and hardware specific configs
nixpkgs.url = "nixpkgs/nixos-23.11";
nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
# nixos user repository ? :o
nur.url "git:nix-community/NUR";
# nix gaming ?
# nix-gaming.url = "github:fufexan/nix-gaming";
# declarative dots
home-manager = {
url = "github:nix-community/home-manager/release-23.11";
inputs.nixpkgs.follows = "nixpkgs";
};
# window manager (ricer friendly)
hyprland = {
url = "github:hyprwm/Hyprland";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
self,
nixpkgs,
nixpkgs-unstable,
nixos-hardware,
home-manager,
hyprland,,
... }:
let
system = "x86_64-linux";
overlay-unstable = final: prev: {
unstable = import nixpkgs-unstable {
inherit system;
config.allowUnfree = true;
};
};
home-manager-config = toplevel: [
home-manager.nixosModules.home-manager # Home manager go brrrr
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
# ASK AKESI ABOUT EASIER WAY TO LOAD ALL USERS MAYBE?
# home-manager.users.serenity = toplevel;
# Optionally, use home-manager.extraSpecialArgs to pass
# arguments to home.nix
}
];
overlay-flake-pkgs = final: prev: {
};
common-modules = [
({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable overlay-flake-pkgs ]; })
];
in
{
nixosConfigurations = {
proserpina = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit hyprland; };
modules = [
./hosts/proserpina/configuration.nix # Load muir main nix config
# nixos-hardware.nixosModules.$MODEL
] ++ home-manager-config (import ./home/home.nix) ++ common-modules;
};
};
};
}