forked from Gaming-Linux-FR/GLF-OS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
59 lines (54 loc) · 3.13 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
{
inputs = { nixpkgs.url = "nixpkgs/nixos-24.11"; };
outputs = { nixpkgs, ... } @ inputs:
let system = "x86_64-linux";
in
rec
{
iso = nixosConfigurations."glf-installer".config.system.build.isoImage;
nixosConfigurations = {
"glf-installer" = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; }; inherit system;
modules = [
"${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-gnome.nix"
"${nixpkgs}/nixos/modules/installer/cd-dvd/channel.nix"
./nix-cfg/configuration.nix
{
nixpkgs.overlays = [
(self: super: {
calamares-nixos-extensions = super.calamares-nixos-extensions.overrideAttrs (oldAttrs: {
postInstall = ''
cp ${./patches/calamares-nixos-extensions/modules/nixos/main.py} $out/lib/calamares/modules/nixos/main.py
cp -r ${./patches/calamares-nixos-extensions/config/settings.conf} $out/share/calamares/settings.conf
cp -r ${./patches/calamares-nixos-extensions/config/modules/packagechooser.conf} $out/share/calamares/modules/packagechooser.conf
cp -r ${./patches/calamares-nixos-extensions/branding/nixos/show.qml} $out/share/calamares/branding/nixos/show.qml
cp -r ${./patches/calamares-nixos-extensions/branding/nixos/white.png} $out/share/calamares/branding/nixos/white.png
cp -r ${./patches/calamares-nixos-extensions/branding/nixos/base.png} $out/share/calamares/branding/nixos/base.png
cp -r ${./patches/calamares-nixos-extensions/branding/nixos/fast.png} $out/share/calamares/branding/nixos/fast.png
cp -r ${./patches/calamares-nixos-extensions/branding/nixos/gaming.png} $out/share/calamares/branding/nixos/gaming.png
cp -r ${./patches/calamares-nixos-extensions/branding/nixos/logo-glf-os.svg} $out/share/calamares/branding/nixos/logo-glf-os.svg
cp -r ${./patches/calamares-nixos-extensions/branding/nixos/branding.desc} $out/share/calamares/branding/nixos/branding.desc
'';
});
})
];
}
({ config, ... }: {
isoImage = {
# change default partition name (cannot exceed 32 bytes)
# volumeID = nixpkgs.lib.mkDefault "glfos${nixpkgs.lib.optionalString (config.isoImage.edition != "") "-${config.isoImage.edition}"}-${config.system.nixos.release}";
volumeID = nixpkgs.lib.mkDefault "glfos-${config.system.nixos.version}";
includeSystemBuildDependencies = false;
storeContents = [ config.system.build.toplevel ];
squashfsCompression = "zstd -Xcompression-level 22";
contents = [{
source = ./nix-cfg;
target = "/nix-cfg";
}];
};
})
];
};
};
};
}