This commit is contained in:
2026-03-27 18:11:06 +01:00
parent be00d8eefd
commit dd8d3f26bf
160 changed files with 4732 additions and 0 deletions

14
nixos/audio.nix Normal file
View File

@@ -0,0 +1,14 @@
{ ... }:
{
services.pipewire = {
enable = true;
alsa = {
enable = true;
support32Bit = true;
pulse.enable = true;
#jack.enable = true; # audio production
};
};
security.rtkit.enable = true;
}

101
nixos/default.nix Normal file
View File

@@ -0,0 +1,101 @@
{
pkgs,
inputs,
primaryUser,
...
}:
{
imports = [
./fonts.nix
./sops.nix
./regreet.nix
./plymouth
./audio.nix
./ssh.nix
./locale.nix
./tailscale.nix
./virt.nix
./webcam.nix
];
# nix config
nix = {
settings = {
experimental-features = [
"nix-command"
"flakes"
];
max-jobs = "auto";
cores = 0;
substituters = [
"https://hyprland.cachix.org"
"https://nix-community.cachix.org"
];
trusted-public-keys = [
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
};
# Garbage collection
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 30d";
};
};
# Disable Docs
documentation = {
enable = true;
doc.enable = false; # Skip large documentation
man.enable = true; # Keep man pages
info.enable = false; # Skip info pages
};
nixpkgs.config = {
allowUnfree = true;
};
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.${primaryUser} = {
imports = [ ../home ];
};
extraSpecialArgs = { inherit inputs primaryUser; };
};
programs = {
fish.enable = true;
hyprland = {
enable = true;
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
};
steam.enable = true;
dconf.enable = true;
appimage = {
enable = true;
binfmt = true;
};
};
security = {
pam.services.swaylock = { };
polkit.enable = true;
apparmor.enable = true;
};
users.users.${primaryUser} = {
home = "/home/${primaryUser}";
shell = pkgs.fish;
isNormalUser = true;
openssh.authorizedKeys.keyFiles = [ ./ssh-key ];
extraGroups = [
"wheel"
"video"
"audio"
"libvirtd"
];
};
}

8
nixos/fonts.nix Normal file
View File

@@ -0,0 +1,8 @@
{ pkgs, ... }:
{
fonts.packages = with pkgs; [
nerd-fonts.fira-code
nerd-fonts.fira-mono
nerd-fonts.hack
];
}

18
nixos/locale.nix Normal file
View File

@@ -0,0 +1,18 @@
{ ... }:
{
time.timeZone = "Europe/Berlin";
i18n = {
defaultLocale = "en_US.UTF-8";
extraLocaleSettings = {
LC_ADDRESS = "de_DE.UTF-8";
LC_IDENTIFICATION = "de_DE.UTF-8";
LC_MEASUREMENT = "de_DE.UTF-8";
LC_MONETARY = "de_DE.UTF-8";
LC_NAME = "de_DE.UTF-8";
LC_NUMERIC = "de_DE.UTF-8";
LC_PAPER = "de_DE.UTF-8";
LC_TELEPHONE = "de_DE.UTF-8";
LC_TIME = "de_DE.UTF-8";
};
};
}

View File

@@ -0,0 +1,36 @@
{ pkgs, ... }:
let
mikuTheme = pkgs.stdenv.mkDerivation {
name = "plymouth-theme-miku";
src = ./miku;
installPhase = ''
mkdir -p $out/share/plymouth/themes/miku/frames
cp miku.plymouth $out/share/plymouth/themes/miku/
cp miku.script $out/share/plymouth/themes/miku/
cp images/frames/*.png $out/share/plymouth/themes/miku/frames/
'';
};
in
{
boot = {
plymouth = {
enable = true;
theme = "miku";
themePackages = [
mikuTheme
];
};
# Enable "Silent boot"
consoleLogLevel = 3;
initrd.verbose = false;
kernelParams = [
"quiet"
"splash"
"boot.shell_on_fail"
"udev.log_priority=3"
"rd.systemd.show_status=auto"
];
loader.timeout = 0;
};
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@@ -0,0 +1,8 @@
[Plymouth Theme]
Name=Miku
Description=Hatsune Miku Dancing
ModuleName=Script
[script]
ImageDir=/usr/share/plymouth/themes/miku
ScriptFile=/usr/share/plymouth/themes/miku/miku.script

View File

@@ -0,0 +1,30 @@
# Screen dimensions
screen_width = Window.GetWidth();
screen_height = Window.GetHeight();
# Load frames
frame_count = 53;
frames = [];
for (i = 0; i < frame_count; i++) {
num = String(i);
if (i < 10) num = "000" + num;
else if (i < 100) num = "00" + num;
else num = "0" + num;
frames[i] = Image("frames/frame_" + num + ".png");
}
# Position centered
x = (screen_width - 498) / 2;
y = (screen_height - 498) / 2;
# Animation state
current_frame = 0;
fun refresh_callback() {
sprite = Sprite(frames[current_frame]);
sprite.SetX(x);
sprite.SetY(y);
current_frame = (current_frame + 1) % frame_count;
}
Plymouth.SetRefreshFunction(refresh_callback);

66
nixos/regreet.nix Normal file
View File

@@ -0,0 +1,66 @@
{
lib,
...
}:
{
environment.etc = {
"greetd/background.png".source = ../assets/wallpapers/lucy_with_cat.png;
"greetd/environments".text = ''
Hyprland
niri-session
fish
'';
};
programs.regreet = {
enable = true;
cageArgs = [
"-s"
"-m"
"last"
];
settings = {
background = {
path = "/etc/greetd/background.png";
fit = "Fill";
};
GTK = {
application_prefer_dark_theme = true;
cursor_theme_name = lib.mkForce "catppuccin-mocha-dark";
font_name = lib.mkForce "FiraCode Nerd Font Propo 12";
icon_theme_name = lib.mkForce "Papirus-Dark";
theme_name = lib.mkForce "catppuccin-mocha-standard-mauve-dark";
};
commands = {
reboot = [
"systemctl"
"reboot"
];
poweroff = [
"systemctl"
"poweroff"
];
x11_prefix = [
"startx"
"/usr/bin/env"
];
};
appearance = {
greeting_msg = "Hey there!";
};
widget.clock = {
format = "%A %d.%m.%Y %T";
resolution = "500ms";
timezone = "Europe/Berlin";
label_width = 150;
};
};
};
}

18
nixos/sops.nix Normal file
View File

@@ -0,0 +1,18 @@
{ primaryUser, ... }:
{
sops = {
defaultSopsFile = ../secrets/secrets.yaml;
defaultSopsFormat = "yaml";
age.keyFile = "/home/phil/.config/sops/age/keys.txt";
secrets = {
GROQ_API_KEY = { };
OPENWEATHER_API_KEY = { };
ssh_private_key = {
path = "/home/${primaryUser}/.ssh/ssh";
owner = primaryUser;
mode = "0600";
};
};
};
}

1
nixos/ssh-key Normal file
View File

@@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEuYuGhqRC/QLoRBH91c3DG5JHlAdRLQsvde18k5ipY2 phil@cyperpunk.de

14
nixos/ssh.nix Normal file
View File

@@ -0,0 +1,14 @@
{ ... }:
{
services.openssh = {
enable = true;
openFirewall = true;
settings = {
PasswordAuthentication = false;
PermitRootLogin = "no";
};
};
programs.ssh.startAgent = true;
}

7
nixos/tailscale.nix Normal file
View File

@@ -0,0 +1,7 @@
{ ... }:
{
services.tailscale = {
enable = true;
openFirewall = true;
};
}

20
nixos/virt.nix Normal file
View File

@@ -0,0 +1,20 @@
{ pkgs, ... }:
{
virtualisation.libvirtd.enable = true;
boot.binfmt.emulatedSystems = [
"aarch64-linux"
"riscv64-linux"
];
environment.systemPackages = with pkgs; [
qemu
quickemu
quickgui
nemu
];
systemd.tmpfiles.rules = [
"L+ /var/lib/qemu/firmware - - - - ${pkgs.qemu}/share/qemu/firmware"
];
environment.etc."qemu/bridge.conf".text = ''
allow br0
'';
}

27
nixos/webcam.nix Normal file
View File

@@ -0,0 +1,27 @@
{ pkgs, ... }:
{
services.udev.extraRules = ''
ACTION=="add", \
SUBSYSTEM=="usb", \
ATTR{idVendor}=="04a9", \
ATTR{idProduct}=="31ea", \
RUN+="systemctl restart webcam"
'';
systemd.services.webcam = {
enable = true;
description = "Canon Camera Webcam";
script = ''
${pkgs.gphoto2}/bin/gphoto2 --stdout --capture-movie | \
${pkgs.ffmpeg}/bin/ffmpeg \
-i - \
-vcodec rawvideo \
-pix_fmt yuv420p \
-threads 0 \
-framerate 30 \
-f v4l2 \
/dev/video0
'';
wantedBy = [ "multi-user.target" ];
};
}