Skip to content

Commit 13a366a

Browse files
committed
nixos-iso -> nixos-gnome, kernel: zen -> cachyos
Signed-off-by: John Titor <50095635+JohnRTitor@users.noreply.github.com>
1 parent 8db48ee commit 13a366a

File tree

9 files changed

+293
-135
lines changed

9 files changed

+293
-135
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ git clone https://github.com/JohnRTitor/nix-iso.git
2424
cd nix-iso
2525
```
2626

27-
* For building full graphical ISO
27+
* For building full GNOME ISO
2828

29-
```shell
30-
env NIXPKGS_ALLOW_BROKEN=1 nix build .#nixosConfigurations.nixos-iso.config.system.build.isoImage --impure
29+
```bash
30+
env NIXPKGS_ALLOW_BROKEN=1 nix build .#nixosConfigurations.nixos-gnome.config.system.build.isoImage --impure
3131
```
3232

3333
* For building minimal ISO

common.nix

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
inputs,
3+
lib,
4+
pkgs,
5+
...
6+
}: {
7+
imports = [
8+
inputs.chaotic.nixosModules.default
9+
];
10+
11+
nixpkgs.config.allowUnfree = true;
12+
# Set environment variable for allowing non-free packages
13+
environment.sessionVariables = {
14+
NIXPKGS_ALLOW_UNFREE = "1";
15+
};
16+
17+
nix.settings.experimental-features = [
18+
"nix-command"
19+
"flakes"
20+
]; # enable nix command and flakes
21+
22+
nixpkgs.overlays = [
23+
(final: prev: {
24+
bcachefs-tools = inputs.bcachefs-tools.packages.${pkgs.system}.bcachefs-tools;
25+
})
26+
];
27+
28+
boot.kernelPackages = pkgs.linuxPackages_cachyos;
29+
30+
boot.zfs.package = lib.mkOverride 99 pkgs.zfs_cachyos;
31+
32+
environment.systemPackages = with pkgs; [
33+
# Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
34+
vim
35+
git
36+
curl
37+
parted
38+
efibootmgr
39+
];
40+
41+
# Wireless network and wired network is enabled by default
42+
}

cosmic/cosmic.nix

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# This module defines a NixOS installation CD that contains GNOME.
2+
3+
{ lib, inputs, ... }:
4+
5+
{
6+
imports = [
7+
"${inputs.nixpkgs}/nixos/modules/installer/cd-dvd/channel.nix"
8+
"${inputs.nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-graphical-base.nix"
9+
];
10+
11+
isoImage.edition = lib.mkDefault "cosmic";
12+
13+
services.desktopManager.cosmic = {
14+
enable = true;
15+
xwayland.enable = true;
16+
};
17+
18+
services.displayManager.cosmic-greeter.enable = true;
19+
20+
services.displayManager.autoLogin = {
21+
enable = true;
22+
user = "nixos";
23+
};
24+
}

flake.lock

Lines changed: 157 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,59 @@
1-
# This is a basic NixOS flake template for a live ISO image
2-
# that can be used to install NixOS on a system.
3-
# ISO can be built using
4-
# `nix build .#nixosConfigurations.nixos-iso.config.system.build.isoImage` - Graphical ISO
5-
# `nix build .#nixosConfigurations.nixos-minimal.config.system.build.isoImage` - Minimal ISO
6-
# Make sure to enable flakes and nix-command on the host system, before building the ISO
7-
# Resulting image can be found in ./result/iso/ directory
81
{
92
description = "Unstable NixOS custom installation media";
3+
4+
# Main sources and repositories
105
inputs = {
11-
nixpkgs.url = "nixpkgs/nixos-unstable";
12-
bcachefs-tools.url = "github:koverstreet/bcachefs-tools";
6+
nixpkgs.url = "nixpkgs/nixos-unstable"; # Unstable NixOS system (default)
7+
bcachefs-tools = {
8+
url = "github:koverstreet/bcachefs-tools";
9+
inputs.nixpkgs.follows = "nixpkgs";
10+
};
11+
12+
# Don't add follows nixpkgs, else will cause local rebuilds
13+
chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable"; # Bleeding edge packages from chaotic nyx, especially CachyOS kernel
1314
};
15+
1416
outputs = {
1517
self,
1618
nixpkgs,
19+
chaotic,
1720
...
1821
} @ inputs: let
1922
system = "x86_64-linux"; # change arch here
2023

2124
specialArgs = {
22-
inherit system;
2325
inherit inputs;
2426
};
2527
in {
2628
formatter.${system} = nixpkgs.legacyPackages.${system}.alejandra;
29+
2730
## GRAPHICAL ISO ##
28-
nixosConfigurations.nixos-iso = nixpkgs.lib.nixosSystem {
31+
nixosConfigurations.nixos-gnome = nixpkgs.lib.nixosSystem {
2932
inherit system;
3033
modules = [
31-
"${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-graphical-gnome.nix"
32-
"${nixpkgs}/nixos/modules/installer/cd-dvd/channel.nix"
33-
./graphical-configuration.nix
34+
./gnome
3435
];
3536
inherit specialArgs;
3637
};
38+
3739
## MINIMAL ISO ##
3840
nixosConfigurations.nixos-minimal = nixpkgs.lib.nixosSystem {
3941
inherit system;
4042
modules = [
41-
"${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix"
42-
./minimal-configuration.nix
43+
./minimal
4344
];
4445
inherit specialArgs;
4546
};
4647
};
4748

48-
# Add nix community cache
49+
# Allows the user to use our cache when using `nix run <thisFlake>`.
4950
nixConfig = {
5051
extra-substituters = [
52+
"https://nyx.chaotic.cx/"
5153
"https://nix-community.cachix.org"
5254
];
5355
extra-trusted-public-keys = [
56+
"nyx.chaotic.cx-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8="
5457
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
5558
];
5659
};

0 commit comments

Comments
 (0)