home-manager/flake.nix

139 lines
3.2 KiB
Nix

{
description = "Home Manager configuration of kristian";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
# 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.11";
inputs.nixpkgs.follows = "nixpkgs";
};
nur = {
url = "github:nix-community/NUR";
};
wallpaper = {
url = "github:lunik1/nix-wallpaper";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-index-database = {
url = "github:Mic92/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
vscode-extensions = {
url = "github:nix-community/nix-vscode-extensions";
inputs.nixpkgs.follows = "nixpkgs";
};
spicetify = {
url = "github:the-argus/spicetify-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
starc = {
url = "git+https://git.krsnik.at/Kristian/starc-flake.git";
inputs.nixpkgs.follows = "nixpkgs";
};
scanned-image-extractor = {
url = "git+https://git.krsnik.at/Kristian/scanned-image-extractor.git";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
self,
nixpkgs,
# nixpkgs-unstable,
# nixpkgs-master,
home-manager,
nur,
wallpaper,
nix-index-database,
vscode-extensions,
spicetify,
starc,
scanned-image-extractor,
}: let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in {
formatter.${system} = pkgs.alejandra;
homeConfigurations = let
commonModules = [
./systems/common
{
_module.args = {
inherit spicetify;
wallpaper = wallpaper.packages.${system}.default;
libs = import ./libs;
};
}
spicetify.homeManagerModule
nur.nixosModules.nur
nix-index-database.hmModules.nix-index
{
programs.nix-index-database.comma.enable = true;
}
{
nixpkgs.overlays = [
vscode-extensions.overlays.default
starc.overlays.default
scanned-image-extractor.overlays.default
# ( # 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;
# };
# }
# )
];
}
];
in {
pc = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules =
[
./systems/pc
]
++ commonModules;
};
laptop = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules =
[
./systems/laptop
]
++ commonModules;
};
};
devShells.${system}.default = pkgs.mkShellNoCC {
packages = [
pkgs.dconf2nix
];
};
};
}