-
Notifications
You must be signed in to change notification settings - Fork 2
/
flake.nix
80 lines (74 loc) · 2.72 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
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-21.05";
nixpkgs-unstable.url = "github:nixos/nixpkgs/master";
# nixos-specific
home-manager.url = "github:mhuesch/home-manager/release-21.05";
mobile-nixos = {
url = github:NixOS/mobile-nixos;
flake = false;
};
mobile-nixos-ppp = {
url = github:samueldr-wip/mobile-nixos-wip/wip/pinephone-pro;
flake = false;
};
};
outputs = inputs @ { nixpkgs, nixpkgs-unstable, home-manager, mobile-nixos, mobile-nixos-ppp, ... }:
let
system = "aarch64-linux";
defaultUserName = "dev";
in
{
nixosConfigurations =
{
########################################################################
pinephone =
########################################################################
nixpkgs.lib.nixosSystem {
inherit system;
modules = [
(import ./configuration-pinephone.nix defaultUserName)
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.${defaultUserName} = import ./hm-user.nix;
}
(import "${mobile-nixos}/lib/configuration.nix" {
device = "pine64-pinephone";
})
];
};
########################################################################
pinephonepro =
########################################################################
nixpkgs.lib.nixosSystem {
inherit system;
modules = [
(import ./configuration-pinephonepro.nix defaultUserName)
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.${defaultUserName} = import ./hm-user.nix;
}
(import "${mobile-nixos}/lib/configuration.nix" {
device = "pine64-pinephone";
})
];
};
};
pinephone-disk-image =
(import "${mobile-nixos}/lib/eval-with-configuration.nix" {
configuration = [ (import ./configuration-pinephone.nix defaultUserName) ];
device = "pine64-pinephone";
pkgs = nixpkgs.legacyPackages.${system};
}).outputs.disk-image;
pinephonepro-disk-image =
(import "${mobile-nixos-ppp}/lib/eval-with-configuration.nix" {
configuration = [ (import ./configuration-pinephonepro.nix defaultUserName) ];
device = "pine64-pinephonepro";
pkgs = nixpkgs.legacyPackages.${system};
}).outputs.disk-image;
};
}