a
This commit is contained in:
323
README.md
323
README.md
@@ -1,318 +1,19 @@
|
|||||||
# Kris's Nix
|
# Kris's Nix
|
||||||
|
|
||||||
You should end up with:
|
<details>
|
||||||
|
<summary>Asset & Copyright Disclaimers</summary>
|
||||||
|
|
||||||
- NixOS using this repo from `/etc/nixos`
|
DELTARUNE, its trademark and all related assets are Copyright (c) Toby Fox.
|
||||||
- the automatically-created user `kris`
|
|
||||||
- the default desktop config from this flake
|
|
||||||
|
|
||||||
## What This Repo Does
|
**Non-nix packaged fonts used in the rice:**
|
||||||
|
- [8bitoperator JVE](https://fonts2u.com/8bitoperator-jve-regular.font/)
|
||||||
|
- [8-bit Operator+](https://www.1001freefonts.com/8-bit-operator.font)
|
||||||
|
- [Determination Mono](https://fontstruct.com/fontstructions/show/1349263/determination-6-1-2)
|
||||||
|
|
||||||
This repo configures:
|
### Determination Mono
|
||||||
|
- The FontStruction “Determination Mono” (https://fontstruct.com/fontstructions/show/1349263) by MVBit is licensed under a Creative Commons Attribution Share Alike license (http://creativecommons.org/licenses/by-sa/3.0/).
|
||||||
|
- “Determination Mono” was originally cloned (copied) from the FontStruction “Determination” (https://fontstruct.com/fontstructions/show/1327343) by MVBit , which is licensed under a Creative Commons Attribution Share Alike license (http://creativecommons.org/licenses/by-sa/3.0/).
|
||||||
|
- “Determination” was in turn cloned (copied) from the FontStruction “Determination” (https://fontstruct.com/fontstructions/show/1212496) by Ryan B, which is licensed under a Creative Commons Attribution Share Alike license (http://creativecommons.org/licenses/by-sa/3.0/).
|
||||||
|
|
||||||
- the default desktop machine
|
|
||||||
- a separate server host
|
|
||||||
|
|
||||||
DO NOT use `#server`, this build the server!
|
</details>
|
||||||
|
|
||||||
## Before You Start
|
|
||||||
|
|
||||||
You need:
|
|
||||||
|
|
||||||
- a NixOS installer
|
|
||||||
- internet access
|
|
||||||
- your disks partitioned and mounted
|
|
||||||
- this repo _(`git@tangled.sh:kris.darkworld.download/nix`)_
|
|
||||||
|
|
||||||
## Build a custom installer ISO
|
|
||||||
|
|
||||||
This flake now exposes an installer image with extra install tools preloaded
|
|
||||||
(`git`, `disko`, partitioning and filesystem tools).
|
|
||||||
|
|
||||||
Build it from this repo:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
nix build .#installerIso
|
|
||||||
```
|
|
||||||
|
|
||||||
The ISO is created at:
|
|
||||||
|
|
||||||
```text
|
|
||||||
./result/iso/*.iso
|
|
||||||
```
|
|
||||||
|
|
||||||
Write it to a USB stick (replace `/dev/sdX`):
|
|
||||||
|
|
||||||
```bash
|
|
||||||
sudo dd if=./result/iso/*.iso of=/dev/sdX bs=4M status=progress oflag=sync
|
|
||||||
```
|
|
||||||
|
|
||||||
Then boot from that USB and follow the install steps below.
|
|
||||||
|
|
||||||
## Disk Layout
|
|
||||||
|
|
||||||
This repo now uses `disko` for the default desktop host.
|
|
||||||
|
|
||||||
The current declarative layout is:
|
|
||||||
|
|
||||||
```text
|
|
||||||
disk = /dev/nvme0n1
|
|
||||||
ESP = 2G FAT32 mounted at /boot
|
|
||||||
root disk = remaining space as btrfs
|
|
||||||
subvols = /, /home, /nix
|
|
||||||
```
|
|
||||||
|
|
||||||
Mount options are declared in the disko config:
|
|
||||||
|
|
||||||
- `/` with `compress=zstd`
|
|
||||||
- `/home` with `compress=zstd`
|
|
||||||
- `/nix` with `compress=zstd,noatime`
|
|
||||||
|
|
||||||
If `/dev/nvme0n1` is not the disk you want to wipe and install to, edit [`hosts/default/disko.nix`](/home/ralsei/config/hosts/default/disko.nix) before running the installer.
|
|
||||||
|
|
||||||
RAHHHHH IM NOT WRITING STUFF ANYMORE PLZ JUST TRY TO FIGURE OUT THE STEPS URSELF
|
|
||||||
THX
|
|
||||||
|
|
||||||
## Fresh Install
|
|
||||||
|
|
||||||
### 1. Boot the NixOS installer
|
|
||||||
|
|
||||||
Use the normal installer ISO.
|
|
||||||
|
|
||||||
### 2. Clone the repo in the installer
|
|
||||||
|
|
||||||
From the live installer:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
nix-shell -p git
|
|
||||||
rm -rf /etc/nixos
|
|
||||||
git clone git@tangled.sh:kris.darkworld.download/nix /etc/nixos
|
|
||||||
```
|
|
||||||
|
|
||||||
### 3. Let disko partition and mount the target disk
|
|
||||||
|
|
||||||
Run:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
nix --extra-experimental-features 'nix-command flakes' run github:nix-community/disko -- --mode destroy,format,mount /etc/nixos#default
|
|
||||||
```
|
|
||||||
|
|
||||||
This will:
|
|
||||||
|
|
||||||
- partition the disk
|
|
||||||
- format it
|
|
||||||
- create the btrfs subvolumes
|
|
||||||
- mount everything under `/mnt`
|
|
||||||
|
|
||||||
This is destructive.
|
|
||||||
|
|
||||||
### 4. Generate hardware config
|
|
||||||
|
|
||||||
Run:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
nixos-generate-config --root /mnt
|
|
||||||
```
|
|
||||||
|
|
||||||
Then replace the generated target config with this repo while keeping the generated hardware file:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
cp /mnt/etc/nixos/hardware-configuration.nix /tmp/hardware-configuration.nix
|
|
||||||
rm -rf /mnt/etc/nixos
|
|
||||||
git clone git@tangled.sh:kris.darkworld.download/nix /mnt/etc/nixos
|
|
||||||
cp /tmp/hardware-configuration.nix /mnt/etc/nixos/hardware-configuration.nix
|
|
||||||
```
|
|
||||||
|
|
||||||
## Install The System
|
|
||||||
|
|
||||||
### 5. Run the install
|
|
||||||
|
|
||||||
From the live environment:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
nixos-install --flake /mnt/etc/nixos#default
|
|
||||||
```
|
|
||||||
|
|
||||||
If Nix complains about flakes:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
nix --extra-experimental-features 'nix-command flakes' run nixpkgs#nixos-install -- --flake /mnt/etc/nixos#default
|
|
||||||
```
|
|
||||||
|
|
||||||
### 6. Reboot
|
|
||||||
|
|
||||||
After install finishes:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
reboot
|
|
||||||
```
|
|
||||||
|
|
||||||
## First Boot
|
|
||||||
|
|
||||||
### 7. Log in as `kris`
|
|
||||||
|
|
||||||
The config creates the main user for you during install.
|
|
||||||
|
|
||||||
After boot, log into the installed system as:
|
|
||||||
|
|
||||||
```text
|
|
||||||
kris
|
|
||||||
```
|
|
||||||
|
|
||||||
### 8. Verify the repo location
|
|
||||||
|
|
||||||
Make sure the config is really here:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
ls /etc/nixos
|
|
||||||
```
|
|
||||||
|
|
||||||
You should see:
|
|
||||||
|
|
||||||
- `flake.nix`
|
|
||||||
- `flake.lock`
|
|
||||||
- `hosts`
|
|
||||||
- `modules`
|
|
||||||
|
|
||||||
### 9. Rebuild once from the installed system
|
|
||||||
|
|
||||||
Run:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
sudo nixos-rebuild switch --flake /etc/nixos#default
|
|
||||||
```
|
|
||||||
|
|
||||||
## Manual Restore After Install
|
|
||||||
|
|
||||||
Nix does not fully restore everything by itself. Some things still need to be
|
|
||||||
copied back manually.
|
|
||||||
|
|
||||||
### 10. Recreate normal user folders
|
|
||||||
|
|
||||||
Run:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
mkdir -p /home/kris/Pictures
|
|
||||||
mkdir -p /home/kris/Pictures/Screenshots
|
|
||||||
mkdir -p /home/kris/Pictures/Wallpapers
|
|
||||||
mkdir -p /home/kris/Pictures/Deltarune
|
|
||||||
mkdir -p /home/kris/Downloads
|
|
||||||
mkdir -p /home/kris/Desktop
|
|
||||||
mkdir -p /home/kris/Documents
|
|
||||||
mkdir -p /home/kris/Projects
|
|
||||||
```
|
|
||||||
|
|
||||||
### 11. Restore Quickshell project
|
|
||||||
|
|
||||||
This config expects the Deltarune Quickshell project here:
|
|
||||||
|
|
||||||
```text
|
|
||||||
/home/kris/Projects/DeltaruneQuickshell
|
|
||||||
```
|
|
||||||
|
|
||||||
If it is missing, restore or clone it there.
|
|
||||||
|
|
||||||
### 12. Restore non-declarative assets
|
|
||||||
|
|
||||||
Copy back these if you want the setup to look correct:
|
|
||||||
|
|
||||||
- `~/Pictures/Wallpapers`
|
|
||||||
- `~/Pictures/Deltarune`
|
|
||||||
- `~/.local/share/fonts`
|
|
||||||
- `~/.local/share/icons`
|
|
||||||
- `~/.local/share/deltarunequickshell`
|
|
||||||
|
|
||||||
Important:
|
|
||||||
|
|
||||||
- screenshots are optional
|
|
||||||
- the desktop can boot without all of this, but it will not look right
|
|
||||||
|
|
||||||
### 13. Restore private assets and secrets
|
|
||||||
|
|
||||||
If you use them, restore things like:
|
|
||||||
|
|
||||||
- SSH keys
|
|
||||||
- Git auth
|
|
||||||
- cloudflare credentials
|
|
||||||
- Bitwarden/KeePass databases
|
|
||||||
- any private art or shell assets
|
|
||||||
|
|
||||||
## Useful Commands
|
|
||||||
|
|
||||||
Rebuild:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
sudo nixos-rebuild switch --flake /etc/nixos#default
|
|
||||||
```
|
|
||||||
|
|
||||||
Update flake inputs:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
cd /etc/nixos
|
|
||||||
nix flake update
|
|
||||||
```
|
|
||||||
|
|
||||||
Check current git state:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git -C /etc/nixos status
|
|
||||||
```
|
|
||||||
|
|
||||||
## If Something Is Broken
|
|
||||||
|
|
||||||
### Quickshell missing
|
|
||||||
|
|
||||||
Make sure:
|
|
||||||
|
|
||||||
- the package is installed by Nix
|
|
||||||
- `/home/kris/Projects/DeltaruneQuickshell` exists
|
|
||||||
|
|
||||||
### Rice looks wrong
|
|
||||||
|
|
||||||
You probably forgot to restore:
|
|
||||||
|
|
||||||
- fonts
|
|
||||||
- icons/cursors
|
|
||||||
- wallpapers
|
|
||||||
- Quickshell runtime state
|
|
||||||
|
|
||||||
### Build fails because of hardware config
|
|
||||||
|
|
||||||
Make sure this file exists:
|
|
||||||
|
|
||||||
```text
|
|
||||||
/etc/nixos/hardware-configuration.nix
|
|
||||||
```
|
|
||||||
|
|
||||||
### Git push fails
|
|
||||||
|
|
||||||
Your local SSH config may be cursed. If needed, bypass system SSH config:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git -c core.sshCommand='ssh -F /dev/null' push
|
|
||||||
```
|
|
||||||
|
|
||||||
## TL;DR
|
|
||||||
|
|
||||||
If you want the shortest version:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
nix-shell -p git
|
|
||||||
rm -rf /etc/nixos
|
|
||||||
git clone git@tangled.sh:kris.darkworld.download/nix /etc/nixos
|
|
||||||
nix --extra-experimental-features 'nix-command flakes' run github:nix-community/disko -- --mode destroy,format,mount /etc/nixos#default
|
|
||||||
nixos-generate-config --root /mnt
|
|
||||||
cp /mnt/etc/nixos/hardware-configuration.nix /tmp/hardware-configuration.nix
|
|
||||||
rm -rf /mnt/etc/nixos
|
|
||||||
git clone git@tangled.sh:kris.darkworld.download/nix /mnt/etc/nixos
|
|
||||||
cp /tmp/hardware-configuration.nix /mnt/etc/nixos/hardware-configuration.nix
|
|
||||||
nixos-install --flake /mnt/etc/nixos#default
|
|
||||||
reboot
|
|
||||||
```
|
|
||||||
|
|
||||||
Then restore:
|
|
||||||
|
|
||||||
- `/home/kris/Projects/DeltaruneQuickshell`
|
|
||||||
- `~/.local/share/fonts`
|
|
||||||
- `~/.local/share/icons`
|
|
||||||
- your wallpapers and pictures
|
|
||||||
|
|||||||
@@ -226,7 +226,7 @@ windowrule {
|
|||||||
windowrule = match:class steam_proton|org\.vinegarhq\.Sober, allows_input on
|
windowrule = match:class steam_proton|org\.vinegarhq\.Sober, allows_input on
|
||||||
|
|
||||||
env = QT_QPA_PLATFORMTHEME,qt6ct
|
env = QT_QPA_PLATFORMTHEME,qt6ct
|
||||||
env = QT_STYLE_OVERRIDE,kvantum
|
env = QT_STYLE_OVERRIDE,Darkly
|
||||||
env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1
|
env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
ecosystem {
|
ecosystem {
|
||||||
enforce_permissions = true
|
enforce_permissions = false
|
||||||
}
|
}
|
||||||
|
|
||||||
permission = /nix/store/[A-Za-z0-9]+\-(wrapped-)?(grim|hyprlock|xdg-desktop-portal-hyprland|obs-studio|hyprpicker)\-.*, screencopy, allow
|
permission = /nix/store/[A-Za-z0-9]+\-(wrapped-)?(grim|hyprlock|xdg-desktop-portal-hyprland|obs-studio|hyprpicker)\-.*, screencopy, allow
|
||||||
|
|||||||
@@ -117,9 +117,12 @@ in {
|
|||||||
xdg.terminal-exec.enable = true;
|
xdg.terminal-exec.enable = true;
|
||||||
xdg.portal = {
|
xdg.portal = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
xdgOpenUsePortal = true;
|
||||||
extraPortals = [
|
extraPortals = [
|
||||||
|
pkgs.xdg-desktop-portal-gtk
|
||||||
inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland
|
inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland
|
||||||
];
|
];
|
||||||
|
config.common.default = [ "hyprland" "gtk" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
# environment.variables.XDG_SYSTEM_MONITOR = "${pkgs.htop}/bin/htop";
|
# environment.variables.XDG_SYSTEM_MONITOR = "${pkgs.htop}/bin/htop";
|
||||||
@@ -198,14 +201,21 @@ in {
|
|||||||
# we're already using arashi
|
# we're already using arashi
|
||||||
gtk.icon.enable = false;
|
gtk.icon.enable = false;
|
||||||
cursors.enable = false;
|
cursors.enable = false;
|
||||||
qt5ct.enable = true;
|
kvantum.enable = false;
|
||||||
kvantum.enable = true;
|
qt5ct.enable = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
libsForQt5.qt5ct
|
||||||
|
qt6Packages.qt6ct
|
||||||
|
darkly-qt5
|
||||||
|
darkly
|
||||||
|
];
|
||||||
|
|
||||||
qt = {
|
qt = {
|
||||||
enable = true;
|
enable = true;
|
||||||
platformTheme.name = "qtct";
|
platformTheme.name = "qtct";
|
||||||
style.name = "kvantum";
|
style.name = "Darkly";
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.zen-browser = {
|
programs.zen-browser = {
|
||||||
@@ -247,6 +257,24 @@ in {
|
|||||||
source = ../../config/hypr/xdph.conf;
|
source = ../../config/hypr/xdph.conf;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
home.file.".config/qt5ct/qt5ct.conf".text = ''
|
||||||
|
[Appearance]
|
||||||
|
color_scheme_path=${pkgs.catppuccin-qt5ct}/share/qt5ct/colors/catppuccin-mocha-blue.conf
|
||||||
|
custom_palette=true
|
||||||
|
icon_theme=Arashi
|
||||||
|
standard_dialogs=default
|
||||||
|
style=Darkly
|
||||||
|
'';
|
||||||
|
|
||||||
|
home.file.".config/qt6ct/qt6ct.conf".text = ''
|
||||||
|
[Appearance]
|
||||||
|
color_scheme_path=${pkgs.catppuccin-qt5ct}/share/qt6ct/colors/catppuccin-mocha-blue.conf
|
||||||
|
custom_palette=true
|
||||||
|
icon_theme=Arashi
|
||||||
|
standard_dialogs=default
|
||||||
|
style=Darkly
|
||||||
|
'';
|
||||||
|
|
||||||
home.file.".local/share/fonts/DotfilesFont.otf" = {
|
home.file.".local/share/fonts/DotfilesFont.otf" = {
|
||||||
source = ../../config/dotfile_deps/DotfilesFont.otf;
|
source = ../../config/dotfile_deps/DotfilesFont.otf;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -19,8 +19,6 @@
|
|||||||
NVD_BACKEND = "direct";
|
NVD_BACKEND = "direct";
|
||||||
EGL_PLATFORM = "wayland";
|
EGL_PLATFORM = "wayland";
|
||||||
VDPAU_DRIVER = "va_gl";
|
VDPAU_DRIVER = "va_gl";
|
||||||
WAYLAND_DISPLAY = "wayland-1";
|
|
||||||
DISPLAY = ":0";
|
|
||||||
XDG_CURRENT_DESKTOP = "Hyprland";
|
XDG_CURRENT_DESKTOP = "Hyprland";
|
||||||
MOZ_ENABLE_WAYLAND = "1"; # Enable Wayland for Firefox
|
MOZ_ENABLE_WAYLAND = "1"; # Enable Wayland for Firefox
|
||||||
CHROMIUM_FLAGS = "--enable-features=UseOzonePlatform --ozone-platform=wayland --enable-gpu-rasterization --enable-zero-copy"; # Enable Wayland and hardware acceleration for Chromium
|
CHROMIUM_FLAGS = "--enable-features=UseOzonePlatform --ozone-platform=wayland --enable-gpu-rasterization --enable-zero-copy"; # Enable Wayland and hardware acceleration for Chromium
|
||||||
|
|||||||
Reference in New Issue
Block a user