This commit is contained in:
2025-06-22 11:31:31 -04:00
16 changed files with 383 additions and 86 deletions

View File

@@ -0,0 +1,30 @@
{ pkgs, inputs, ... }: {
imports = [
./hardware-configuration.nix
"${inputs.nixpkgs}/nixos/modules/profiles/headless.nix"
"${inputs.nixpkgs}/nixos/modules/profiles/minimal.nix"
./podman.nix
./container-registry.nix
./test.nix
# ./microvm-configuration.nix
# ./k3s.nix
];
nix.settings.experimental-features = [ "nix-command" "flakes" ];
environment.systemPackages = with pkgs; [
git
btop
tmux
oci-cli
];
boot.tmp.cleanOnBoot = true;
# zramSwap.enable = true;
networking.hostName = "pericyte";
networking.domain = "";
services.openssh.enable = true;
users.users.root.openssh.authorizedKeys.keys = [''ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDOaNNSV/wurGA8D7bT+WX4UlHdKqd9SFfVXvSalvHag5qYDPUIsGGkqSNj1dcong9qxrC8y7G7ybWhwRKTKXInXrq6EO4JkVkCSbVqrq8gIv66upsKltvmf0esiOdrpRgHoiup8JKaX93aUT27rykReT39mFwkJZDoD4ViNiK7QmbgDC/9pyGDSJykreSnBoxtczox8Zi+pwN8XMI4nRVdV9hppXMpj38/O3Qaq+oXdHJ2MVNy9D+TqxYofstFbzpJpEb2xA4QYnq/VVJFk8VaZlg3qxelwBJ1GNZO8TMkLA+6b07D3aISyEIQAONviNktPwRPiw903hsDyeKDunDx ssh-key-2025-03-31'' ];
system.stateVersion = "25.05";
}

View File

@@ -0,0 +1,6 @@
{ pkgs, ... }: {
services.dockerRegistry = {
enable = true;
package = pkgs.distribution;
};
}

View File

@@ -0,0 +1,18 @@
{ modulesPath, ... }:
{
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
boot.loader.grub = {
efiSupport = true;
efiInstallAsRemovable = true;
device = "nodev";
};
fileSystems."/boot" = { device = "/dev/disk/by-uuid/FCE4-1F46"; fsType = "vfat"; };
fileSystems."/" = { device = "/dev/sda1"; fsType = "ext4"; };
swapDevices = [
{
device = "/swapfile";
}
];
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "xen_blkfront" "vmw_pvscsi" ];
boot.initrd.kernelModules = [ "nvme" ];
}

19
machines/pericyte/k3s.nix Normal file
View File

@@ -0,0 +1,19 @@
{ pkgs, ... }: {
networking.firewall = {
allowedTCPPorts = [
6443 # k3s: required so that pods can reach the API server (running on port 6443 by default)
# 2379 # k3s, etcd clients: required if using a "High Availability Embedded etcd" configuration
# 2380 # k3s, etcd peers: required if using a "High Availability Embedded etcd" configuration
];
allowedUDPPorts = [
# 8472 # k3s, flannel: required if using multi-node for inter-node networking
];
};
services.k3s = {
enable = true;
role = "server";
extraFlags = toString [
# "--debug" # Optionally add additional args to k3s
];
};
}

View File

@@ -0,0 +1,6 @@
{ pkgs, ... }: {
microvm.autostart = [
"vm-starbot"
"vm-starbot-dev"
];
}

View File

@@ -0,0 +1,21 @@
{ pkgs, ... }: {
# Enable common container config files in /etc/containers
virtualisation.containers.enable = true;
virtualisation = {
podman = {
enable = true;
# Required for containers under podman-compose to be able to talk to each other.
defaultNetwork.settings.dns_enabled = true;
};
};
# Useful other development tools
environment.systemPackages = with pkgs; [
dive # look into docker image layers
skopeo # Inspect images
podlet # create quadlets (systemd units)
podman-tui # status of containers in the terminal
podman-compose # start group of containers for dev
];
}

View File

@@ -0,0 +1,32 @@
{ pkgs, ... }: {
users.groups.peertube = { };
users.users.peertube = {
isSystemUser = true;
group = "peertube";
home = "/var/lib/peertube";
createHome = true;
uid = 2342;
subUidRanges = [
{
count = 65536;
startUid = 2147483646;
}
];
subGidRanges = [
{
count = 65536;
startGid = 2147483647;
}
];
};
virtualisation.oci-containers = {
backend = "podman";
# containers.peertube = {
# image = "chocobozzz/peertube:latest";
# ports = [ ];
# podman = {
# user = "peertube";
# };
# };
};
}

View File

@@ -3,7 +3,7 @@ in
{
imports = [
# Install Apps Detactable by Spotlight
./app-fix.nix
# ./app-fix.nix
# Tiling Window Manager
./yabai.nix
# Shortcuts babe, not Automator
@@ -13,6 +13,10 @@ in
nixpkgs.config.allowUnfree = true;
# nix.package = pkgs.nixUnstable;
nix.settings.auto-optimise-store = false;
nix.settings.trusted-users = [
"root"
"universelaptop"
];
users.users.universelaptop = {
name = "universelaptop";
@@ -55,7 +59,9 @@ in
services.emacs = {
# Emacsclient behaving weirdly
# enable = true;
package = pkgs.me-emacs;
package = pkgs.me-emacs.override {
withNativeCompilation = false;
};
};
environment.variables = {
@@ -140,7 +146,10 @@ in
];
environment.systemPackages = (with pkgs; [
me-emacs
(me-emacs.override {
withNativeCompilation = false;
})
svgbob
(aspellWithDicts (p: with p;[
en
en-computers

View File

@@ -0,0 +1,18 @@
(libresprite.overrideAttrs (old: {
src = pkgs.fetchFromGitHub {
owner = "LibreSprite";
repo = "LibreSprite";
rev = "c99d3666b17ff731824e3eccc79cf3ec48564ad5";
fetchSubmodules = true;
sha256 = "sha256-mdMdHQvl6Mt0oisZ4c/Wk6dvklq3Iyz05brbFxSIaj0=";
};
patches = [];
buildInputs = old.buildInputs ++ (with pkgs; [
libarchive
tinyxml-2
]);
postPatch = ''
sed -i -e 's/if(''${CMAKE_SYSTEM_NAME} MATCHES "Darwin")/if(FALSE)/' CMakeLists.txt
'';
meta.broken = false;
}))

View File

@@ -2,7 +2,7 @@
services.skhd = {
enable = true;
skhdConfig = ''
cmd + shift - e : open '${pkgs.me-emacs}/Applications/Emacs.app'
cmd + shift - e : open '${(pkgs.me-emacs.override {withNativeCompilation = false;})}/Applications/Emacs.app'
cmd + shift + ctrl - e : kitty -d ~ -1
'';
};

View File

@@ -2,11 +2,7 @@
nixpkgs.overlays = [
(final: prev: {
st = prev.st.override {
conf = builtins.readFile (pkgs.substituteAll {
src = ./dwm/st-config.def.h;
env = {
};
});
conf = builtins.readFile (pkgs.replaceVars ./dwm/st-config.def.h {});
};
})
];
@@ -18,21 +14,18 @@
emacsclient --create-frame --alternate-editor=""
'';
in pkgs.dwm.override {
conf = pkgs.substituteAll {
src = ./dwm/config.h;
env = {
dmenucmd="${pkgs.dmenu}/bin/dmenu_run";
termcmd="${pkgs.st}/bin/st";
editcmd="${launch_emacs}";
playcmd=pkgs.writeScript "playerctl-play-pause" ''
#!${pkgs.bash}/bin/bash
${pkgs.playerctl}/bin/playerctl play-pause
'';
scrncmd=pkgs.writeScript "screenshot-region" ''
#!${pkgs.bash}/bin/bash
${pkgs.maim}/bin/maim -o -s | ${pkgs.xclip}/bin/xclip -sel clip -t image/png
'';
};
conf = pkgs.replaceVars ./dwm/config.h {
dmenucmd="${pkgs.dmenu}/bin/dmenu_run";
termcmd="${pkgs.st}/bin/st";
editcmd="${launch_emacs}";
playcmd=pkgs.writeScript "playerctl-play-pause" ''
#!${pkgs.bash}/bin/bash
${pkgs.playerctl}/bin/playerctl play-pause
'';
scrncmd=pkgs.writeScript "screenshot-region" ''
#!${pkgs.bash}/bin/bash
${pkgs.maim}/bin/maim -o -s | ${pkgs.xclip}/bin/xclip -sel clip -t image/png
'';
};
patches = [
./dwm/fullscreen.patch
@@ -56,5 +49,6 @@
dmenu
xclip
pwvucontrol
st
];
}

View File

@@ -9,7 +9,7 @@
powerManagement.finegrained = false;
nvidiaSettings = true;
open = true;
#package = config.boot.kernelPackages.nvidiaPackages.beta;
# package = config.boot.kernelPackages.nvidiaPackages.vulkan_beta;
#package = let
# rcu_patch = pkgs.fetchpatch {
# url = "https://github.com/gentoo/gentoo/raw/c64caf53/x11-drivers/nvidia-drivers/files/nvidia-drivers-470.223.02-gpl-pfn_valid.patch";

View File

@@ -24,9 +24,7 @@
nextcloud-client
libsForQt5.kdeconnect-kde
vesktop
slack
signal-desktop
discord
zoom-us
anki

View File

@@ -1,6 +1,6 @@
{ lib, config, pkgs, ... }: {
environment.systemPackages = with pkgs; [
me-emacs
emacs
texlive.combined.scheme-full
pandoc
libreoffice-qt