home-manager/flake.nix
2023-07-31 20:47:35 +02:00

82 lines
2.2 KiB
Nix

{
description = "Home Manager configuration of kristian";
inputs = {
nixpkgs.url = github:nixos/nixpkgs/nixos-23.05;
nixpkgs-unstable.url = github:nixos/nixpkgs/nixos-unstable;
nixpkgs-master.url = github:nixos/nixpkgs/master;
home-manager = {
url = github:nix-community/home-manager/release-23.05;
inputs.nixpkgs.follows = "nixpkgs";
};
# Hyprland Window Manager
hyprland.url = github:hyprwm/Hyprland;
# Nix User Repository
nur.url = github:nix-community/NUR;
# Zig
zig.url = github:mitchellh/zig-overlay;
# Wallpaper
wallpaper.url = github:lunik1/nix-wallpaper;
};
outputs = {
self,
nixpkgs,
nixpkgs-unstable,
nixpkgs-master,
home-manager,
hyprland,
nur,
zig,
wallpaper,
} @ inputs: let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in {
formatter.${system} = nixpkgs.legacyPackages.${system}.alejandra;
homeConfigurations = {
kristian = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
./home
{
_module.args.wallpaper = wallpaper.packages.${system}.default;
}
hyprland.homeManagerModules.default
nur.nixosModules.nur
{
nixpkgs.overlays = [
hyprland.overlays.default # Adds waybar-hyprland
zig.overlays.default # Adds zig
( # https://github.com/nix-community/home-manager/issues/1538#issuecomment-706627100
final: prev: {
unstable = import inputs.nixpkgs-unstable {
system = final.system;
config = {allowUnfreePredicate = _: true;};
};
#master = import inputs.nixpkgs-master {
# system = final.system;
# config = {allowUnfreePredicate = (_: true);};
#};
}
)
( # Overrides davinci-resolve with the unstable version because of https://github.com/NixOS/nixpkgs/pull/246074
final: prev: {davinci-resolve = final.unstable.davinci-resolve;}
)
];
}
];
};
};
};
}