-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflake.nix
88 lines (83 loc) · 2.43 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
87
88
{
description = "system configurations";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixos.url = "github:NixOs/nixpkgs/nixos-24.11";
flake-utils.url = "github:numtide/flake-utils";
easy-purescript-nix.url = "github:justinwoo/easy-purescript-nix";
nix-darwin.url = "github:LnL7/nix-darwin";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
home-manager = {
url = "github:nix-community/home-manager/release-24.11";
# url = "github:nix-community/home-manager";
# url = "github:nix-community/home-manager/release-24.05";
inputs.nixpkgs.follows = "nixos";
};
};
outputs =
inputs@{
nixpkgs,
nixos,
flake-utils,
home-manager,
easy-purescript-nix,
nix-darwin,
poetry2nix,
...
}:
{
darwinConfigurations = rec {
"saikoro" = nix-darwin.lib.darwinSystem {
modules = [ ./saikoro/default.nix ];
specialArgs = { inherit inputs; };
};
RY0KG7652H = nix-darwin.lib.darwinSystem {
modules = [ ./sentry-laptop/home.nix ];
specialArgs = { inherit inputs; };
};
RY0KG7652H-2 = RY0KG7652H;
};
homeConfigurations.home = home-manager.lib.homeManagerConfiguration {
pkgs = import nixos { system = "x86_64-linux"; };
modules = [
./excalibur/home.nix
];
extraSpecialArgs = { inherit inputs; };
};
nixosConfigurations = {
excalibur = nixos.lib.nixosSystem {
system = "x86_64-linux";
modules = [
/etc/nixos/configuration.nix
./excalibur/host.nix
];
};
};
}
//
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
config =
(pkgs.lib.evalModules {
modules = [
./modules/shell.nix
./modules/python.nix
./modules/purescript.nix
{
_module.args = { inherit pkgs inputs; };
environment.development.enable = true;
programs.python.default = pkgs.python311;
}
];
}).config;
in
{
devShells.default = pkgs.mkShell {
inherit (config) shellHook buildInputs;
name = "nix-machines development shell";
};
}
);
}