Files
home/flake.nix
2024-07-30 09:18:07 +01:00

42 lines
944 B
Nix

{
description = "Home Manager configuration for ppetru";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs-24.05";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, home-manager }:
let
username = "ppetru";
system = "x64_64-linux";
stateVersion = "24.05";
pkgs = import nixpkgs {
inherit system;
config = {
allowUnfree = true;
};
};
homeDirPrefix = if pkgs.stdenv.hostPlatform.isDarwin then "/Users" else "/home";
homeDirectory = "/${homeDirPrefix}/${username}";
home = (import ./home.nix {
inherit homeDirectory pkgs stateVersion system username;
});
in {
homeConfigurations.${username} = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
home
];
};
};
}