home-manager/flake.nix

120 lines
2.9 KiB
Nix
Raw Normal View History

2023-07-23 03:04:32 +00:00
{
description = "Home Manager configuration of kristian";
inputs = {
2023-12-03 20:06:22 +00:00
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
2023-08-03 18:49:58 +00:00
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-master.url = "github:nixos/nixpkgs/master";
2023-08-26 16:35:30 +00:00
2023-07-23 03:04:32 +00:00
home-manager = {
2023-12-03 20:06:22 +00:00
url = "github:nix-community/home-manager/release-23.11";
2023-07-23 03:04:32 +00:00
inputs.nixpkgs.follows = "nixpkgs";
};
# Nix User Repository
2023-08-03 18:49:58 +00:00
nur.url = "github:nix-community/NUR";
2023-07-23 03:04:32 +00:00
2023-07-31 18:47:35 +00:00
# Wallpaper
2023-08-03 18:49:58 +00:00
wallpaper.url = "github:lunik1/nix-wallpaper";
# Nix index
nix-index-database = {
url = "github:Mic92/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
# VSCode Extensions
vscode-extensions.url = "github:nix-community/nix-vscode-extensions";
2024-01-25 12:09:27 +00:00
# Story Architect
starc = {
url = "git+https://git.krsnik.at/Kristian/starc-flake.git";
inputs.nixpkgs.follows = "nixpkgs";
};
2023-07-23 03:04:32 +00:00
};
outputs = {
self,
nixpkgs,
2023-07-31 18:08:25 +00:00
nixpkgs-unstable,
nixpkgs-master,
2023-07-23 03:04:32 +00:00
home-manager,
nur,
2023-07-31 18:47:35 +00:00
wallpaper,
nix-index-database,
vscode-extensions,
2024-01-25 12:09:27 +00:00
starc,
2023-08-25 13:48:30 +00:00
}: let
2023-07-23 03:04:32 +00:00
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in {
2023-08-26 16:35:30 +00:00
formatter.${system} = pkgs.alejandra;
2023-07-31 18:08:25 +00:00
2023-09-30 14:16:07 +00:00
homeConfigurations = let
commonModules = [
./systems/common
{
_module.args.wallpaper = wallpaper.packages.${system}.default;
_module.args.vscode-extensions = vscode-extensions.extensions.${system};
}
nur.nixosModules.nur
nix-index-database.hmModules.nix-index
{
programs.nix-index-database.comma.enable = true;
}
{
nixpkgs.overlays = [
( # https://github.com/nix-community/home-manager/issues/1538#issuecomment-706627100
final: prev: {
unstable = import nixpkgs-unstable {
system = final.system;
config.allowUnfreePredicate = _: true;
};
master = import nixpkgs-master {
system = final.system;
config.allowUnfreePredicate = _: true;
};
2024-01-25 12:09:27 +00:00
# own programs
starc = starc.packages.${system}.default;
2023-09-30 14:16:07 +00:00
}
)
( # Overrides davinci-resolve with the unstable version because of https://github.com/NixOS/nixpkgs/pull/246074
final: prev: {davinci-resolve = final.master.davinci-resolve;}
)
];
}
];
in {
pc = home-manager.lib.homeManagerConfiguration {
2023-07-23 03:04:32 +00:00
inherit pkgs;
modules =
[
./systems/pc
]
2023-09-30 14:16:07 +00:00
++ commonModules;
};
2023-07-31 18:08:25 +00:00
laptop = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
2023-07-23 03:04:32 +00:00
modules =
2023-08-27 19:20:47 +00:00
[
./systems/laptop
]
2023-09-30 14:16:07 +00:00
++ commonModules;
2023-07-23 03:04:32 +00:00
};
};
devShells.${system}.default = pkgs.mkShellNoCC {
packages = [
pkgs.dconf2nix
];
};
2023-07-23 03:04:32 +00:00
};
}