-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
84 lines (79 loc) · 2.36 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
{
description = "Pizero's NixOS Flake";
inputs = {
# os
nixpkgs.url = "git+https://mirrors.tuna.tsinghua.edu.cn/git/nixpkgs.git/?ref=nixos-unstable";
# nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-cosmic = {
url = "github:lilyinstarlight/nixos-cosmic";
inputs.nixpkgs.follows = "nixpkgs";
};
# nix-on-droid
home-manager-stable = {
url = "github:nix-community/home-manager/release-24.05";
inputs.nixpkgs.follows = "nixpkgs-stable";
};
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-24.05";
nix-on-droid = {
url = "github:nix-community/nix-on-droid/testing";
inputs.nixpkgs.follows = "nixpkgs-stable";
inputs.home-manager.follows = "home-manager-stable";
};
};
outputs =
all@{
# nur,
nixpkgs,
nixos-cosmic,
home-manager,
nixpkgs-stable,
nix-on-droid,
home-manager-stable,
...
}:
{
# Used with `nixos-rebuild --flake .#<hostname>`
# nixosConfigurations."<hostname>".config.system.build.toplevel must be a derivation
nixosConfigurations."nixos-to-go" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
# nur.nixosModules.nur
nixos-cosmic.nixosModules.default
./hosts/nixos-to-go/configuration.nix
home-manager.nixosModules.home-manager
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.pizero = import ./home/nixos-to-go.nix;
backupFileExtension = "bku";
};
}
];
};
nixOnDroidConfigurations.pizero-phone = nix-on-droid.lib.nixOnDroidConfiguration {
pkgs = import nixpkgs-stable {
system = "aarch64-linux";
overlays = [
nix-on-droid.overlays.default
# add other overlays
];
};
modules = [
./hosts/nix-on-droid/default.nix
{
home-manager = {
backupFileExtension = "hm-bak";
useGlobalPkgs = true;
config = ./home/nix-on-droid.nix;
};
}
];
home-manager-path = home-manager-stable.outPath;
};
};
}