-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
88 lines (74 loc) · 2.21 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
85
86
87
88
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixos-cosmic = {
url = "github:lilyinstarlight/nixos-cosmic";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{
self,
nixpkgs,
nixos-cosmic,
}:
let
forAllSystems = nixpkgs.lib.genAttrs [
"x86_64-linux"
"aarch64-linux"
];
in
{
legacyPackages = forAllSystems (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
cosmicIso =
let
nixosConfig = nixpkgs.lib.nixosSystem {
modules = [
(
{
lib,
pkgs,
modulesPath,
...
}:
{
imports = [
nixos-cosmic.nixosModules.default
"${builtins.toString modulesPath}/installer/cd-dvd/installation-cd-graphical-base.nix"
];
boot.loader.grub.memtest86.enable = lib.mkForce false;
hardware.pulseaudio.enable = lib.mkForce false;
isoImage.edition = lib.mkForce "cosmic";
nixpkgs.hostPlatform = system;
services = {
desktopManager.cosmic.enable = true;
displayManager = {
autoLogin = {
enable = true;
user = "nixos";
};
cosmic-greeter.enable = true;
};
flatpak.enable = true;
xserver.excludePackages = [ pkgs.xterm ];
};
system.stateVersion = lib.trivial.release;
}
)
];
};
in
nixosConfig.config.system.build.isoImage
// {
closure = nixosConfig.config.system.build.isoImage;
inherit (nixosConfig) config pkgs;
};
}
);
};
}