Watch
1
0
Fork
You've already forked chitin
0

bankruptcy

no more dendritic pattern, no more flake-parts, no more Home Manager
This commit is contained in:
asnev 2026-11-23 15:02:03 +07:00
commit 7c4592d086
Signed by: asnev
SSH key fingerprint: SHA256:8hagYq9hDUuS5clQ78FKhIoQDvg5crdkYMHX+3g7wB4
42 changed files with 354 additions and 768 deletions

View file

@ -1,7 +0,0 @@
Copyright 2026 asnev
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View file

@ -1,42 +0,0 @@
![Banner image. Photographic snippet showing foliage of green moss accompanied by a few small, frail, white mushrooms, resembling umbrellas for tiny people residing within the dew-dripped leaves.](assets/cover.jpg "banner image")
# chitin
asnev's [NixOS](https://nixos.org/) configuration
## paradigm
uses [flake-parts](https://flake.parts/)' in-built modules system for less schema boilerplate, though shared infra-wide values (available via the `systemConstants` attrs argument) are configured in generic Nix so as to work across all modules, not just top-level ones.
## graphics
only KDE Plasma has been set up so far. (TODO: declaratively configure with [plasma-manager](https://github.com/nix-community/plasma-manager))
## tree
* `assets/` - media and binary assets
* `modules/` - flake modules (auto-imported with [import-tree](https://github.com/denful/import-tree))
* `flake/` - infra-related Nix flake logic
* `nixos/` - NixOS configurations that apply to all hosts and users
* `programs/` - system-wide packages and programs
* `home/` - user environment management via [Home Manager](https://github.com/nix-community/home-manager) (installed as a NixOS module)
* `hosts/` - per-host specific configuration
* `packages/` - additional package overlays
* `shells/` - TUI niceties (maybe `devshells` too?)
## musings
* "why `chitin`? why give your configuration files a name at all?"
* because it's fun. and i wanted to use a distantly related web-like word for it. my affinity for fungi made me randomly one day decide that i'd name it after [chitin](https://en.wikipedia.org/wiki/Chitin), the primary molecule giving strength to mycelium networks.
* "did an AI help write-"
* [No](https://www.sheeeeeeeep.art/software-in-current-era.html).
## licences
[MIT Licence](LICENSE) for the code, [Unsplash Licence](https://unsplash.com/license) for the banner image, courtesy of [iamateapot](https://unsplash.com/photos/a-mushroom-growing-in-a-forest-CRHNiHXXFIs) with edits from me.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

240
configuration.nix Normal file
View file

@ -0,0 +1,240 @@
# configuration.nix --- common NixOS configuration module
# Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
{ inputs, pkgs, ... }:
{
# Module imports -----
imports = [
./hardware-configuration.nix
];
# Nix -----
nix = {
optimise.automatic = true;
settings = {
experimental-features = [ "nix-command" "flakes" ];
auto-optimise-store = true;
};
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 14d";
};
};
# nixpkgs -----
nixpkgs = {
config.allowUnfree = true;
# `pkgs.unstable.<name>` overlay
overlays = [
(final: prev: {
unstable = import inputs.unstable {
inherit (final) config;
inherit (final.stdenv.hostPlatform) system;
};
})
];
};
# Boot -----
boot = {
kernelPackages = pkgs.linuxPackages_latest;
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
timeout = 2;
};
};
# Hardware -----
hardware = {
bluetooth.enable = true;
sane.enable = true;
sane.extraBackends = [ pkgs.epsonscan2 ];
graphics.enable = true;
graphics.enable32Bit = true;
enableRedistributableFirmware = true;
};
# Networking -----
networking = {
networkmanager.enable = true;
firewall.enable = true;
};
# Locale -----
time.timeZone = "Asia/Jakarta";
i18n.defaultLocale = "en_GB.UTF-8";
console.font = "Lat2-Terminus16";
console.useXkbConfig = true;
# Services -----
services = {
xserver.enable = true;
xserver.xkb.layout = "us";
printing.enable = true;
printing.drivers = [ pkgs.epson-escpr ];
fwupd.enable = true;
locate.enable = true;
openssh.enable = false;
# Audio ---
pipewire.enable = true;
pipewire = {
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
# Touchpad ---
libinput.enable = true;
};
# Security -----
security = {
sudo.enable = false;
doas.enable = true;
doas.extraRules = [{
groups = [ "wheel" ];
keepEnv = true;
persist = true;
}];
};
# Environment -----
environment = {
# System packages -----
systemPackages = let
stablePackages = with pkgs; [
# Utilities
nh wget stow tmux file mc mtr gnupg ddate testdisk tree htop fastfetch
plocate traceroute rlwrap wl-clipboard entr unzip ffmpeg imagemagick
# Utilities (oxidised)
fd tlrc dysk dust hyperfine fzf
# Utilities (GUI)
firmware-updater pavucontrol gnome-disk-utility
# Development
python315
];
unstablePackages = with pkgs.unstable; [
# Text editors
nano vim-classic emacs-nox
# Development
git lazygit
];
in stablePackages ++ unstablePackages;
# System variables -----
variables = {};
};
# Fonts -----
fonts = {
packages = let
coreFonts = with pkgs; [ cantarell-fonts roboto corefonts ];
i18nFonts = with pkgs; [
noto-fonts noto-fonts-cjk-sans noto-fonts-cjk-serif
noto-fonts-color-emoji noto-fonts-monochrome-emoji
unifont unifont_upper unifont-csur
];
nerdFonts = with pkgs.nerd-fonts; [ iosevka fira-code ];
in coreFonts ++ i18nFonts ++ nerdFonts;
fontconfig = {
antialias = true;
subpixel.rgba = "rgb";
hinting.enable = true;
defaultFonts = {
serif = [ "Noto Serif" ];
sansSerif = [ "Cantarell" ];
monospace = [ "Iosevka Nerd Font" ];
emoji = [ "Noto Color Emoji" ];
};
};
};
# Users -----
users = {
mutableUsers = true;
defaultUserShell = pkgs.fish;
users.coyote = {
description = "coyote";
isNormalUser = true;
home = "/home/coyote";
createHome = true;
uid = 1000;
group = "users";
extraGroups = [
"wheel" "networkmanager" "lp" "scanner"
"video" "render" "input" "audio" "kvm"
];
# User packages ---
packages = let
stablePackages = with pkgs; [
# Productivity
libreoffice-fresh karp keepassxc pdfarranger
# Multimedia
vlc haruna subtitlecomposer kid3 furnace corrscope tenacity
# Editing
kdePackages.kdenlive
# Games
osu-lazer-bin pcsx2 ppsspp
# Wine
(bottles.override {removeWarningPopup = true;})
];
unstablePackages = with pkgs.unstable; [
# Internet
vivaldi proton-vpn yt-dlp
];
in stablePackages ++ unstablePackages;
};
};
# Programs -----
programs = {
nix-ld = {
enable = true;
libraries = with pkgs; [ fuse e2fsprogs ];
};
fish = {
enable = true;
};
direnv = {
enable = true;
nix-direnv.enable = true;
};
obs-studio = {
enable = true;
enableVirtualCamera = true;
};
};
}
# end of configuration.nix file

109
flake.lock generated
View file

@ -1,103 +1,25 @@
{
"nodes": {
"flake-file": {
"locked": {
"lastModified": 1792905615,
"narHash": "sha256-KdGEzlRQPHBbNPD+AChjry8eWEx0TCrGKy1Hkacj+bA=",
"owner": "denful",
"repo": "flake-file",
"rev": "7b08dbc223bb1a758a515aad9653a6bf196bc772",
"type": "github"
},
"original": {
"owner": "denful",
"repo": "flake-file",
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1793576659,
"narHash": "sha256-V1h85lUaJBQoHFrB2vpXZOE0Ju1MYSnIpsehoVZYlDo=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "ea2630b7470978622c7689a1ff75d2b389175399",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1794251182,
"narHash": "sha256-R2sZBXiOJo3HAnvTiVkbbHDJy//JMlAwUKEiPbfqPXk=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "6eb2d33d1d0c95a37ef6443c88e6c1686012ee8b",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-26.05",
"repo": "home-manager",
"type": "github"
}
},
"import-tree": {
"locked": {
"lastModified": 1788467110,
"narHash": "sha256-ljEMTXP/rH0tOvDzc9gzwww6KcHRPRnEHzd9lK48V7s=",
"owner": "vic",
"repo": "import-tree",
"rev": "eb1b52eaecc57f7c136d07ae8a93e724dfecac46",
"type": "github"
},
"original": {
"owner": "vic",
"repo": "import-tree",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1794552581,
"narHash": "sha256-C0bP9ShRkxihpkAiWel93+JypO7ls9usnHRtK2VLvWA=",
"rev": "f1e5c356f35d07e7b71a6b5e6c9338e0b029e0c0",
"lastModified": 1795258312,
"narHash": "sha256-pLM4uV148b0eRALcfeaBoiw7K2M77XPihI0iNzxytAw=",
"rev": "94c3211b0ee8ba969a3f12eb4aff8ba0f72971dd",
"type": "tarball",
"url": "https://releases.nixos.org/nixos/26.05/nixos-26.05.14234.f1e5c356f35d/nixexprs.tar.zst"
"url": "https://releases.nixos.org/nixos/26.05/nixos-26.05.14979.94c3211b0ee8/nixexprs.tar.zst"
},
"original": {
"type": "tarball",
"url": "https://channels.nixos.org/nixos-26.05/nixexprs.tar.zst"
}
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1793504054,
"narHash": "sha256-ThkfL3D/FhCiZFc9+3BtxwuMmpuK+/bGtXCSo1+yVew=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "7851ba61fd862b277cb6a9cef37394bc18bb94e4",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
"root": {
"inputs": {
"nixpkgs": "nixpkgs",
"unstable": "unstable"
}
},
"nixpkgs-unstable": {
"unstable": {
"locked": {
"lastModified": 315532800,
"narHash": "sha256-JiTUXdoNJNvdD+fjVlftWiLKJfHut3cIi8j2HXL9kT4=",
@ -108,19 +30,6 @@
"type": "tarball",
"url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.11pre1108556.6dadaf4375be/nixexprs.tar.zst"
}
},
"root": {
"inputs": {
"flake-file": "flake-file",
"flake-parts": "flake-parts",
"home-manager": "home-manager",
"import-tree": "import-tree",
"nixpkgs": "nixpkgs",
"nixpkgs-lib": [
"nixpkgs-unstable"
],
"nixpkgs-unstable": "nixpkgs-unstable"
}
}
},
"root": "root",

View file

@ -1,18 +1,39 @@
# DO-NOT-EDIT. This file was auto-generated using github:denful/flake-file.
# Use `nix run .#write-flake` to regenerate it.
{
outputs = inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } (inputs.import-tree ./modules);
# flake.nix --- Nix flake entry file
/*
MIT Licence Notice --- Copyright 2026 asnev
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
{
inputs = {
flake-file.url = "github:denful/flake-file";
flake-parts.url = "github:hercules-ci/flake-parts";
home-manager = {
url = "github:nix-community/home-manager/release-26.05";
inputs.nixpkgs.follows = "nixpkgs";
};
import-tree.url = "github:vic/import-tree";
nixpkgs.url = "https://channels.nixos.org/nixos-26.05/nixexprs.tar.zst";
nixpkgs-lib.follows = "nixpkgs-unstable";
nixpkgs-unstable.url = "https://releases.nixos.org/nixpkgs/nixpkgs-26.11pre1108556.6dadaf4375be/nixexprs.tar.zst";
# last updated: 2026-11-23 07:54 UTC
unstable.url = "https://releases.nixos.org/nixpkgs/nixpkgs-26.11pre1125912.93a9ed0a8660/nixexprs.tar.zst";
};
outputs = { self, nixpkgs, unstable, ... } @ inputs: {
nixosConfigurations."phostron" = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; };
modules = [ ./phostron.nix ];
};
};
}
# end of flake.nix file

View file

@ -0,0 +1,33 @@
# Do not modify this file! It was generated by ‘nixos-generate-config’
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "ehci_pci" "xhci_pci" "sdhci_pci" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/24fb172c-c29f-40c3-ae4d-ff652358563a";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/DFC9-994A";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/91d96247-85c3-4e0a-93a2-5632b96179b6"; }
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -1,16 +0,0 @@
{
inputs,
systemConstants,
...
}: {
flake-file.inputs = {
flake-parts.url = "github:hercules-ci/flake-parts";
};
imports = [
inputs.flake-parts.flakeModules.modules
inputs.flake-parts.flakeModules.easyOverlay
];
systems = systemConstants.infraSystems;
}

View file

@ -1,5 +0,0 @@
{
perSystem = {pkgs, ...}: {
formatter = pkgs.alejandra;
};
}

View file

@ -1,12 +0,0 @@
{inputs, ...}: {
imports = [
inputs.flake-file.flakeModules.default
];
flake-file.inputs = {
flake-file.url = "github:denful/flake-file";
import-tree.url = "github:vic/import-tree";
};
flake-file.outputs = "inputs: inputs.flake-parts.lib.mkFlake {inherit inputs;} (inputs.import-tree ./modules)";
}

View file

@ -1,37 +0,0 @@
{
flake.modules.homeManager.primaryUser = {pkgs, ...}: {
home.packages = with pkgs; [
# internet
unstable.vivaldi
proton-vpn
# productivity
libreoffice-fresh
karp
keepassxc
pdfarranger
unstable.emacs
# multimedia
vlc
haruna
subtitlecomposer
kid3
unstable.yt-dlp
# music
furnace
corrscope
tenacity
# editing
kdePackages.kdenlive
# games
osu-lazer-bin
pcsx2
ppsspp
# wine
(bottles.override {removeWarningPopup = true;})
# development
unstable.guile
# misc.
fastfetch
];
};
}

View file

@ -1,15 +0,0 @@
{
flake.modules.homeManager.primaryUser = {pkgs, ...}: {
programs.obs-studio = {
enable = true;
plugins = with pkgs.obs-studio-plugins; [
input-overlay
droidcam-obs
];
};
};
flake.modules.nixos.primaryUser = {
programs.obs-studio.enableVirtualCamera = true;
};
}

View file

@ -1,9 +0,0 @@
{
flake.modules.nixos.phostron = {
config,
lib,
...
}: {
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
};
}

View file

@ -1,22 +0,0 @@
{
flake.modules.nixos.phostron = {
boot = {
initrd = {
availableKernelModules = [
"nvme"
"ehci_pci"
"xhci_pci"
"usbhid"
"usb_storage"
"sd_mod"
"sdhci_pci"
];
kernelModules = [];
};
kernelModules = ["kvm-amd"];
extraModulePackages = [];
};
};
}

View file

@ -1,25 +0,0 @@
{
inputs,
self,
systemConstants,
...
}: {
flake.modules.nixos.phostron = {lib, ...}: {
networking.hostName = systemConstants.phostronHostname;
nixpkgs.hostPlatform = lib.mkDefault systemConstants.phostronHostPlatform;
system.stateVersion = systemConstants.phostronStateVersion;
};
flake.nixosConfigurations.phostron = inputs.nixpkgs.lib.nixosSystem {
modules = with self.modules.nixos; [
base
phostron
sddm
kdePlasma
homeManagerModule
fish
primaryUser
];
};
}

View file

@ -1,19 +0,0 @@
{
flake.modules.nixos.phostron = {
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/24fb172c-c29f-40c3-ae4d-ff652358563a";
fsType = "ext4";
};
"/boot" = {
device = "/dev/disk/by-uuid/DFC9-994A";
fsType = "vfat";
options = ["fmask=0077" "dmask=0077"];
};
};
swapDevices = [{device = "/dev/disk/by-uuid/91d96247-85c3-4e0a-93a2-5632b96179b6";}];
zramSwap.enable = true;
};
}

View file

@ -1,9 +0,0 @@
{
flake.modules.nixos.phostron = {
hardware = {
graphics.enable = true;
graphics.enable32Bit = true;
enableRedistributableFirmware = true;
};
};
}

View file

@ -1,5 +0,0 @@
{
flake.modules.nixos.phostron = {
services.fstrim.enable = true;
};
}

View file

@ -1,18 +0,0 @@
{
flake.modules.nixos.base = {
nix = {
settings = {
experimental-features = ["nix-command" "flakes"];
auto-optimise-store = true;
};
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 14d";
};
optimise.automatic = true;
};
};
}

View file

@ -1,11 +0,0 @@
{
flake.modules.nixos.base = {
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
};
}

Some files were not shown because too many files have changed in this diff Show more