-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate_binary_cache.sh
More file actions
executable file
·122 lines (114 loc) · 4.27 KB
/
create_binary_cache.sh
File metadata and controls
executable file
·122 lines (114 loc) · 4.27 KB
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
#!/usr/bin/env bash
set -e
cat >./flake.nix <<MAIN_FLAKE
{
description = "FoxFlake";
inputs = {
foxflake.url = "git+file://${PWD}/foxflake-${1}";
nixpkgs.follows = "foxflake/nixpkgs";
};
outputs = { foxflake, nixpkgs, ... }:
let
pkgs = import nixpkgs { config.allowUnfree = true; system = "x86_64-linux"; };
system = "x86_64-linux";
in
rec
{
nixosConfigurations = {
"foxflake-${1}-cosmic" = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
foxflake.nixosModules.default
{
foxflake.environment.type = "cosmic";
foxflake.system.bundles = [ "full" ];
foxflake.system.packages = with pkgs; [ ];
foxflake.nvidia.enable = false;
boot.loader.grub = { enable = true; device = "/dev/sda"; useOSProber = true; };
fileSystems."/" = { device = "/dev/sda1"; fsType = "ext4"; };
}
];
};
"foxflake-${1}-cosmic-nvidia" = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
foxflake.nixosModules.default
{
foxflake.environment.type = "cosmic";
foxflake.system.bundles = [ "full" ];
foxflake.system.packages = with pkgs; [ ];
foxflake.nvidia.enable = true;
boot.loader.grub = { enable = true; device = "/dev/sda"; useOSProber = true; };
fileSystems."/" = { device = "/dev/sda1"; fsType = "ext4"; };
}
];
};
"foxflake-${1}-gnome" = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
foxflake.nixosModules.default
{
foxflake.environment.type = "gnome";
foxflake.system.bundles = [ "full" ];
foxflake.system.packages = with pkgs; [ ];
foxflake.nvidia.enable = false;
boot.loader.grub = { enable = true; device = "/dev/sda"; useOSProber = true; };
fileSystems."/" = { device = "/dev/sda1"; fsType = "ext4"; };
}
];
};
"foxflake-${1}-gnome-nvidia" = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
foxflake.nixosModules.default
{
foxflake.environment.type = "gnome";
foxflake.system.bundles = [ "full" ];
foxflake.system.packages = with pkgs; [ ];
foxflake.nvidia.enable = true;
boot.loader.grub = { enable = true; device = "/dev/sda"; useOSProber = true; };
fileSystems."/" = { device = "/dev/sda1"; fsType = "ext4"; };
}
];
};
"foxflake-${1}-plasma" = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
foxflake.nixosModules.default
{
foxflake.environment.type = "plasma";
foxflake.system.bundles = [ "full" ];
foxflake.system.packages = with pkgs; [ ];
foxflake.nvidia.enable = false;
boot.loader.grub = { enable = true; device = "/dev/sda"; useOSProber = true; };
fileSystems."/" = { device = "/dev/sda1"; fsType = "ext4"; };
}
];
};
"foxflake-${1}-plasma-nvidia" = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
foxflake.nixosModules.default
{
foxflake.environment.type = "plasma";
foxflake.system.bundles = [ "full" ];
foxflake.system.packages = with pkgs; [ ];
foxflake.nvidia.enable = true;
boot.loader.grub = { enable = true; device = "/dev/sda"; useOSProber = true; };
fileSystems."/" = { device = "/dev/sda1"; fsType = "ext4"; };
}
];
};
};
};
}
MAIN_FLAKE
git add flake.nix
git clone -b ${1} https://github.com/sebanc/foxflake.git ./foxflake-${1}
nix flake update --flake ./foxflake-${1}
for environment in "cosmic" "gnome" "plasma"; do
for nvidia in "" "-nvidia"; do
nix build --no-link --max-jobs 2 .#nixosConfigurations.foxflake-${1}-${environment}${nvidia}.config.system.build.toplevel
done
done
cp ./foxflake-${1}/flake.lock /home/runner/work/foxflake/foxflake/foxflake-${1}-flake.lock