mirror of
https://github.com/thiloho/thiloho.github.io.git
synced 2025-11-22 02:11:35 +01:00
Add smooth scrolling and move simple markdown out of directories
This commit is contained in:
@@ -1,10 +1,6 @@
|
||||
import { defineCollection, z } from "astro:content";
|
||||
import { glob } from "astro/loaders";
|
||||
|
||||
const index = defineCollection({
|
||||
loader: glob({ pattern: "**/*.md", base: "./src/content/index" }),
|
||||
});
|
||||
|
||||
const blog = defineCollection({
|
||||
loader: glob({ pattern: "**/*.md", base: "./src/content/blog" }),
|
||||
schema: z.object({
|
||||
@@ -15,8 +11,4 @@ const blog = defineCollection({
|
||||
}),
|
||||
});
|
||||
|
||||
const legal = defineCollection({
|
||||
loader: glob({ pattern: "**/*.md", base: "./src/content/legal" }),
|
||||
});
|
||||
|
||||
export const collections = { index, blog, legal };
|
||||
export const collections = { blog };
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
title: "Steps to install NixOS on a system with ext4 and LUKS"
|
||||
description: "A guide to installing NixOS with full disk encryption using LUKS and LVM, showing the complete process from disk partitioning to system configuration."
|
||||
pubDate: "2025-01-04"
|
||||
modDate: "2025-04-27"
|
||||
---
|
||||
|
||||
## Disk layout
|
||||
@@ -18,7 +19,7 @@ sda 8:0 0 233.8G 0 disk
|
||||
|
||||
## Partitioning
|
||||
|
||||
```
|
||||
```sh
|
||||
parted /dev/sda -- mklabel gpt
|
||||
|
||||
parted /dev/sda -- mkpart ESP fat32 1MB 512MB
|
||||
@@ -30,7 +31,7 @@ parted /dev/sda -- set 1 esp on
|
||||
|
||||
## Setting up Encryption
|
||||
|
||||
```
|
||||
```sh
|
||||
cryptsetup luksFormat /dev/sda2
|
||||
|
||||
cryptsetup luksOpen /dev/sda2 cryptroot
|
||||
@@ -38,7 +39,7 @@ cryptsetup luksOpen /dev/sda2 cryptroot
|
||||
|
||||
## Setting up LVM
|
||||
|
||||
```
|
||||
```sh
|
||||
pvcreate /dev/mapper/cryptroot
|
||||
|
||||
vgcreate vg /dev/mapper/cryptroot
|
||||
@@ -50,7 +51,7 @@ lvcreate -l 100%FREE vg -n root
|
||||
|
||||
## Creating Filesystems
|
||||
|
||||
```
|
||||
```sh
|
||||
mkfs.fat -F 32 -n boot /dev/sda1
|
||||
|
||||
mkfs.ext4 -L root /dev/vg/root
|
||||
@@ -60,7 +61,7 @@ mkswap -L swap /dev/vg/swap
|
||||
|
||||
## Mounting Filesystems
|
||||
|
||||
```
|
||||
```sh
|
||||
mount /dev/vg/root /mnt
|
||||
|
||||
mkdir -p /mnt/boot
|
||||
@@ -105,7 +106,7 @@ Edit `/mnt/etc/nixos/configuration.nix`:
|
||||
|
||||
## Installation
|
||||
|
||||
```
|
||||
```sh
|
||||
nixos-install
|
||||
|
||||
reboot
|
||||
|
||||
@@ -15,7 +15,7 @@ interface Props {
|
||||
const { title, description, pubDate, modDate, slug } = Astro.props;
|
||||
---
|
||||
|
||||
<html lang="en" class="light">
|
||||
<html lang="en" class="scroll-smooth">
|
||||
<Head {title} {description} />
|
||||
<body class="flex min-h-screen flex-col">
|
||||
<Nav />
|
||||
|
||||
@@ -1,14 +1,6 @@
|
||||
---
|
||||
import PageLayout from "../layouts/PageLayout.astro";
|
||||
import { getEntry, render } from "astro:content";
|
||||
|
||||
const indexContent = await getEntry("index", "index");
|
||||
|
||||
if (!indexContent) {
|
||||
throw new Error();
|
||||
}
|
||||
|
||||
const { Content } = await render(indexContent);
|
||||
import { Content } from "../content/index.md";
|
||||
---
|
||||
|
||||
<PageLayout
|
||||
|
||||
@@ -1,14 +1,6 @@
|
||||
---
|
||||
import PageLayout from "../layouts/PageLayout.astro";
|
||||
import { getEntry, render } from "astro:content";
|
||||
|
||||
const legalContent = await getEntry("legal", "legal");
|
||||
|
||||
if (!legalContent) {
|
||||
throw new Error();
|
||||
}
|
||||
|
||||
const { Content } = await render(legalContent);
|
||||
import { Content } from "../content/legal-disclosure.md";
|
||||
---
|
||||
|
||||
<PageLayout
|
||||
|
||||
Reference in New Issue
Block a user