-
Notifications
You must be signed in to change notification settings - Fork 1
/
flake.nix
57 lines (49 loc) · 1.48 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
{
description = "Home Manager configuration";
inputs = {
nixpkgs.url = "nixpkgs/nixpkgs-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nur.url = "github:nix-community/NUR";
};
outputs = { self, nixpkgs, home-manager, nur }:
let
# Values you should modify
username = "simonzeng"; # $USER
system = "aarch64-darwin"; # x86_64-linux, aarch64-multiplatform, etc.
stateVersion = "23.11"; # See https://nixos.org/manual/nixpkgs/stable for most recent
config =
# mega ugly copy paste of system/config.nix cause idk how to import this
{
useWayland = false;
thinkpad = false;
graphical = true;
allowUnfree = true;
};
pkgs = import nixpkgs {
inherit system;
config = {
allowUnfree = config.allowUnfree;
permittedInsecurePackages = [
"electron-21.4.0"
];
};
};
lib = home-manager.lib;
homeDirPrefix = if pkgs.stdenv.hostPlatform.isDarwin then "/Users" else "/home";
homeDirectory = "/${homeDirPrefix}/${username}";
home = (import ./home.nix {
inherit homeDirectory config lib pkgs system username stateVersion nur;
});
in
{
homeConfigurations.${username} = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
home
];
};
};
}