-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathflake.nix
42 lines (35 loc) · 1.06 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{
description = "Home Manager configuration";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, home-manager }:
let
# Values you should modify
username = "change-me-plz"; # $USER
system = "aarch64-darwin"; # x86_64-linux, aarch64-multiplatform, etc.
stateVersion = "22.11"; # See https://nixos.org/manual/nixpkgs/stable for most recent
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
];
};
};
}