Skip to content

Commit 57e6464

Browse files
committed
hosts/littleroot: add nxios installer image
1 parent 33c96f6 commit 57e6464

8 files changed

Lines changed: 147 additions & 3 deletions

File tree

.github/workflows/build-nixos.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,24 @@ concurrency:
77
cancel-in-progress: true
88
group: ${{ github.workflow }}-${{ github.ref }}
99
jobs:
10+
build-littleroot:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Free Disk Space (Ubuntu)
14+
uses: jlumbroso/free-disk-space@main
15+
- name: Checkout
16+
uses: actions/checkout@v6
17+
with:
18+
fetch-depth: 1
19+
- name: Install Nix
20+
uses: DeterminateSystems/nix-installer-action@main
21+
- name: Cachix
22+
uses: cachix/cachix-action@master
23+
with:
24+
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
25+
name: edeneast
26+
- name: Build littleroot
27+
run: nix build --accept-flake-config --print-out-paths --show-trace .#nixosConfigurations.littleroot.config.system.build.toplevel
1028
build-rize:
1129
runs-on: ubuntu-latest
1230
steps:

flake.lock

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

flake.nix

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@
5050
flake-compat.follows = "flake-compat";
5151
};
5252
};
53+
disko = {
54+
url = "github:nix-community/disko";
55+
inputs.nixpkgs.follows = "nixpkgs";
56+
};
5357

5458
# Precompiled nix-index database
5559
nix-index-database = {
@@ -113,6 +117,7 @@
113117
};
114118

115119
nixConfig = {
120+
accept-flake-config = true;
116121
extra-substituters = [
117122
"https://edeneast.cachix.org"
118123
"https://nix-community.cachix.org"

hosts/littleroot/configuration.nix

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
lib,
3+
modulesPath,
4+
...
5+
}: {
6+
imports = [
7+
"${modulesPath}/installer/cd-dvd/installation-cd-graphical-gnome.nix"
8+
];
9+
10+
image.baseName = lib.mkForce "littleroot";
11+
networking.hostName = "littleroot";
12+
nixpkgs.hostPlatform = "x86_64-linux";
13+
14+
my = {
15+
nixos = {
16+
desktop.gnome.enable = true;
17+
profiles.iso.enable = true;
18+
programs.nix.enable = true;
19+
};
20+
21+
users.root.enable = true;
22+
};
23+
}

hosts/littleroot/readme.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Littleroot
2+
3+
## Overview
4+
5+
Minimal graphical NixOS installation ISO for basic system installation and recovery.
6+
7+
---
8+
9+
## Details
10+
11+
| Component | Details |
12+
| ----------- | ------------------------------ |
13+
| **Type** | Installation ISO |
14+
| **Base** | `installation-cd-graphical-gnome.nix` |
15+
| **Desktop** | GNOME |
16+
| **Purpose** | Graphical installer for new NixOS systems |
17+
| **Features** | Full GNOME desktop, Firefox browser, and NixOS installer |

modules/flake/hosts.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@
1515
modules =
1616
[
1717
path
18+
inputs.disko.nixosModules.disko
1819
inputs.home-manager.nixosModules.home-manager
19-
inputs.nixos-wsl.nixosModules.default
2020
inputs.nix-index-database.nixosModules.nix-index
21+
inputs.nixos-wsl.nixosModules.default
2122

2223
{
2324
nixpkgs = {

modules/nixos/base/default.nix

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,15 @@
2626
libnotify
2727
lm_sensors
2828
vim
29+
neovim
2930
];
3031

3132
variables = {
3233
inherit (config.my.nixos) FLAKE;
3334
NH_FLAKE = config.my.nixos.FLAKE;
3435

35-
EDITOR = "vim";
36-
VISUAL = "vim";
36+
EDITOR = "nvim";
37+
VISUAL = "nvim";
3738
};
3839
};
3940

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
{
2+
config,
3+
lib,
4+
pkgs,
5+
self,
6+
...
7+
}: {
8+
options.my.nixos.profiles.iso.enable = lib.mkEnableOption "based system configuration for ISO images";
9+
10+
config = lib.mkIf config.my.nixos.profiles.iso.enable {
11+
boot = {
12+
kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
13+
14+
supportedFilesystems = lib.mkForce [
15+
"btrfs"
16+
"vfat"
17+
"f2fs"
18+
"xfs"
19+
"ntfs"
20+
"cifs"
21+
];
22+
};
23+
24+
documentation.nixos.enable = false;
25+
environment = {
26+
etc."nixos".source = self;
27+
28+
systemPackages = with pkgs; [
29+
neovim
30+
htop
31+
lm_sensors
32+
wget
33+
];
34+
};
35+
36+
nix.distributedBuilds = lib.mkForce false;
37+
38+
programs = {
39+
direnv = {
40+
enable = true;
41+
nix-direnv.enable = true;
42+
silent = true;
43+
};
44+
45+
git = {
46+
enable = true;
47+
package = pkgs.gitMinimal;
48+
};
49+
};
50+
51+
system = {
52+
configurationRevision = self.rev or self.dirtyRev or null;
53+
switch.enable = false;
54+
};
55+
56+
users.defaultUserShell = lib.mkForce pkgs.bash;
57+
};
58+
}

0 commit comments

Comments
 (0)