home-manager/flake.nix

76 lines
1.9 KiB
Nix
Raw Permalink Normal View History

{
2024-11-27 18:14:36 +01:00
description = "Home Manager configuration of Leon Wilzer";
inputs = {
2024-11-27 18:14:36 +01:00
# Specify the source of Home Manager and Nixpkgs.
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
2024-11-27 18:14:36 +01:00
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
pre-commit-hooks.url = "github:cachix/git-hooks.nix";
2024-12-25 13:24:35 +01:00
catppuccin.url = "github:catppuccin/nix";
};
2024-11-27 18:14:36 +01:00
outputs =
{
self,
nixpkgs,
home-manager,
2024-12-25 13:24:35 +01:00
catppuccin,
2024-11-27 18:14:36 +01:00
...
}@inputs:
let
supportedSystems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in
{
checks = forAllSystems (system: {
pre-commit-check = inputs.pre-commit-hooks.lib.${system}.run {
src = ./.;
hooks = {
nixfmt-rfc-style.enable = true;
};
};
});
devShells = forAllSystems (system: {
default = nixpkgs.legacyPackages.${system}.mkShell {
inherit (self.checks.${system}.pre-commit-check) shellHook;
buildInputs = self.checks.${system}.pre-commit-check.enabledPackages;
};
});
homeConfigurations."lwilzer" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
# Specify your home configuration modules here, for example,
# the path to your home.nix.
modules = [
2024-11-27 18:14:36 +01:00
./work.nix
2024-12-25 13:24:35 +01:00
catppuccin.homeManagerModules.catppuccin
2024-11-27 18:14:36 +01:00
];
# Optionally use extraSpecialArgs
# to pass through arguments to home.nix
};
homeConfigurations."leon" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
2024-11-29 00:39:33 +01:00
2024-11-27 18:14:36 +01:00
modules = [
./home.nix
2024-12-25 13:24:35 +01:00
catppuccin.homeManagerModules.catppuccin
];
};
};
}