forked from O-Huo/nixhome
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathflake.nix
More file actions
70 lines (66 loc) · 1.74 KB
/
flake.nix
File metadata and controls
70 lines (66 loc) · 1.74 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
{
description = "My Nix environment";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs";
};
nixvim = {
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
};
catppuccin.url = "github:catppuccin/nix";
vscode-server.url = "github:nix-community/nixos-vscode-server";
nur.url = "github:nix-community/nur";
};
outputs =
{
nixpkgs,
home-manager,
nixvim,
vscode-server,
nur,
catppuccin,
...
}@inputs:
let
pkgsX86 = import nixpkgs {
system = "x86_64-linux";
};
pkgsArm = import nixpkgs {
system = "aarch64-darwin";
};
# Import shells function properly
importShells = pkgs: import ./shells.nix pkgs;
in
{
packages = home-manager.packages; # Support bootstrapping Home Manager.
nixosConfigurations = {
"adsl-ssd" = nixpkgs.lib.nixosSystem {
modules = [
nur.modules.nixos.default
vscode-server.nixosModules.default
./hosts/adsl-ssd
];
};
};
homeConfigurations = {
"hao@linux" = home-manager.lib.homeManagerConfiguration {
pkgs = pkgsX86;
modules = [
./programs/accounts/hao.nix
./home.nix
nixvim.homeModules.nixvim
catppuccin.homeModules.catppuccin
];
extraSpecialArgs = { inherit inputs; };
};
};
# Properly structure devShells
devShells = {
"x86_64-linux" = importShells pkgsX86;
"aarch64-darwin" = importShells pkgsArm;
};
};
}