-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathflake.nix
78 lines (73 loc) · 2.25 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
{
description = "Pep's darwin system";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
darwin.url = "github:lnl7/nix-darwin/master";
darwin.inputs.nixpkgs.follows = "nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
nur.url = "github:nix-community/NUR";
devenv.url = "github:cachix/devenv/latest";
devenv.inputs.nixpkgs.follows = "nixpkgs";
};
nixConfig = {
extra-trusted-public-keys = [
"nixpkgs-terraform.cachix.org-1:8Sit092rIdAVENA3ZVeH9hzSiqI/jng6JiCrQ1Dmusw="
"devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw="
"pepo.cachix.org-1:8sELuSHMV0vqHtuvnzKh3DCzb/+u+PtCY4Gl6V2blCg="
];
extra-substituters = [
"https://devenv.cachix.org"
"https://nixpkgs-terraform.cachix.org"
"https://pepo.cachix.org"
];
};
outputs =
{
darwin,
home-manager,
nur,
...
}@inputs:
{
devShells = import ./dev_shells inputs;
darwinConfigurations = {
"buque" =
let
system = "aarch64-darwin";
devenv = inputs.devenv.packages.${system}.devenv;
hostname = "buque";
common = [
home-manager.darwinModules.home-manager
{
nixpkgs.overlays = [ nur.overlay ];
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.pepo = import ./home.nix;
home-manager.extraSpecialArgs = {
inherit devenv;
};
}
];
in
darwin.lib.darwinSystem rec {
inherit system;
modules =
common
++ [ ./darwin-configuration.nix ]
++ [
(
{ ... }:
{
networking.hostName = "buque";
}
)
];
};
# Building the flakes require root privileges to update the HOSTNAME
# and then be able to nix build ".#HOSTNAME"
# TODO build the flake also for nixos
};
};
}