-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
86 lines (81 loc) · 2.55 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
{
description = "soulomoon's systems";
inputs = {
nixvim = {
url = "github:soulomoon/nixvim-1/559f212dcedf60e7b3e5812da76bfdf3b9479420";
# inputs.nixpkgs.follows = "nixpkgs";
};
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-24.05-darwin";
vscode-server.url = "github:nix-community/nixos-vscode-server";
neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
unstable.url = "github:nixos/nixpkgs-channels/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs";
};
darwin = {
url = "github:lnl7/nix-darwin/master";
inputs.nixpkgs.follows = "nixpkgs";
};
# flake utils
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, home-manager, darwin, unstable, vscode-server, neovim-nightly-overlay, nixvim, flake-utils, ... }@inputs:
let
overlays = [
neovim-nightly-overlay.overlays.default
];
in
{
nixosConfigurations.nixosDesk = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules =
[
./nixosDesk/configuration.nix
];
};
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules =
[
./nixos/configuration.nix
vscode-server.nixosModules.default
({ config, pkgs, ... }: {
services.vscode-server.enable = true;
})
];
};
darwinConfigurations.aress-mbp = darwin.lib.darwinSystem {
system = "aarch64-darwin";
modules =
[
./darwin/configuration.nix
];
};
nixpkgs.config = {
allowUnfree = true;
};
} //
flake-utils.lib.eachDefaultSystem (system:
{
packages.homeConfigurations."ares" = home-manager.lib.homeManagerConfiguration {
pkgs = import nixpkgs { inherit system; };
extraSpecialArgs = { inherit inputs; };
modules = [
./home/home.nix
{ _module.args = { inherit system; }; }
{ nixpkgs.overlays = overlays; }
{
home = {
username = "ares";
# set home directory based on system mac or linux
homeDirectory = if system == "aarch64-darwin" then "/Users/ares" else "/home/ares";
packages = [
nixvim.packages.${system}.default
];
};
}
];
};
});
}