This commit is contained in:
Jan-Bulthuis committed 2025-05-13 14:26:22 +02:00
1 parent 760815da50
commit 5e23488cae
42 files changed
+2205 -144

No files matched your search

-63
View File
@@ -1,63 +0,0 @@
{ lib, ... }:
{
imports = [
# Import environment
../default.nix
];
config = {
# State version
system.stateVersion = "24.05";
# Machine hostname
networking.hostName = "20212060";
# Enabled modules
modules = {
base.desktop.enable = true;
bluetooth.enable = true;
power-saving.enable = false;
networkmanager.enable = true;
grdp.enable = true;
printing.enable = true;
};
# Hardware configuration
hardware.enableRedistributableFirmware = true;
boot.initrd.availableKernelModules = [
"xhci_pci"
"nvme"
"usb_storage"
"sd_mod"
"rtsx_pci_sdmmc"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
hardware.cpu.intel.updateMicrocode = true;
# Filesystems
fileSystems."/" = {
device = "/dev/disk/by-uuid/3b91eaeb-ea95-4bea-8dc1-f55af7502d23";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/46BF-DE2C";
fsType = "vfat";
options = [
"fmask=0077"
"dmask=0077"
];
};
# Swapfile
swapDevices = [
{
device = "/var/lib/swapfile";
size = 16 * 1024;
}
];
};
}
-73
View File
@@ -1,73 +0,0 @@
{
pkgs,
...
}:
pkgs.stdenv.mkDerivation {
pname = "dina-psfu";
version = "1.0.0";
src = pkgs.fetchzip {
url = "https://www.dcmembers.com/jibsen/download/61/?wpdmdl=61";
hash = "sha256-JK+vnOyhAbwT825S+WKbQuWgRrfZZHfyhaMQ/6ljO8s=";
extension = "zip";
stripRoot = false;
};
buildInputs = with pkgs; [
bdf2psf
fontforge
];
buildPhase = ''
# Get the base Dina font
cp BDF/Dina_r400-9.bdf ./dina.bdf
# Set the AVERAGE_WIDTH property on the font
sed 's/STARTPROPERTIES 16/STARTPROPERTIES 17\
AVERAGE_WIDTH 70/' ./dina.bdf > ./dina-mod.bdf
# Reencode the font from code page CP1252 (Windows) to unicode
fontforge -lang=ff -c "Open(\"dina-mod.bdf\"); Reencode(\"win\", 1); Reencode(\"iso10646-1\"); Generate(\"dina-enc.bdf\")"
mv dina-enc-*.bdf dina-enc.bdf
# Move the artsy characters around
sed -i 's/STARTCHAR uni000E$/STARTCHAR uni2518/' ./dina-enc.bdf
sed -i 's/ENCODING 14$/ENCODING 9496/' ./dina-enc.bdf
sed -i 's/STARTCHAR uni000F$/STARTCHAR uni2514/' ./dina-enc.bdf
sed -i 's/ENCODING 15$/ENCODING 9492/' ./dina-enc.bdf
sed -i 's/STARTCHAR uni0010$/STARTCHAR uni250C/' ./dina-enc.bdf
sed -i 's/ENCODING 16$/ENCODING 9484/' ./dina-enc.bdf
sed -i 's/STARTCHAR uni0011$/STARTCHAR uni2510/' ./dina-enc.bdf
sed -i 's/ENCODING 17$/ENCODING 9488/' ./dina-enc.bdf
sed -i 's/STARTCHAR uni0012$/STARTCHAR uni2500/' ./dina-enc.bdf
sed -i 's/ENCODING 18$/ENCODING 9472/' ./dina-enc.bdf
sed -i 's/STARTCHAR uni0013$/STARTCHAR uni2502/' ./dina-enc.bdf
sed -i 's/ENCODING 19$/ENCODING 9474/' ./dina-enc.bdf
sed -i 's/STARTCHAR uni0014$/STARTCHAR uni2524/' ./dina-enc.bdf
sed -i 's/ENCODING 20$/ENCODING 9508/' ./dina-enc.bdf
sed -i 's/STARTCHAR uni0015$/STARTCHAR uni2534/' ./dina-enc.bdf
sed -i 's/ENCODING 21$/ENCODING 9524/' ./dina-enc.bdf
sed -i 's/STARTCHAR uni0016$/STARTCHAR uni251C/' ./dina-enc.bdf
sed -i 's/ENCODING 22$/ENCODING 9500/' ./dina-enc.bdf
sed -i 's/STARTCHAR uni0017$/STARTCHAR uni252C/' ./dina-enc.bdf
sed -i 's/ENCODING 23$/ENCODING 9516/' ./dina-enc.bdf
sed -i 's/STARTCHAR uni0018$/STARTCHAR uni253C/' ./dina-enc.bdf
sed -i 's/ENCODING 24$/ENCODING 9532/' ./dina-enc.bdf
sed -i 's/STARTCHAR uni0019$/STARTCHAR uni2592/' ./dina-enc.bdf
sed -i 's/ENCODING 25$/ENCODING 9618/' ./dina-enc.bdf
# Create the equivalents file
touch empty.equivalents
# Convert the bdf to psf
bdf2psf --fb ./dina-enc.bdf \
./empty.equivalents \
${pkgs.bdf2psf}/share/bdf2psf/fontsets/Uni2.512 \
512 ./dina.psfu ./dina.sfm
'';
installPhase = ''
install -Dm644 -t $out/share/consolefonts dina.psfu
'';
}
+370
View File
@@ -0,0 +1,370 @@
{
lib,
config,
pkgs,
...
}:
{
config = (
lib.recursiveUpdate
{
# State version
home.stateVersion = "24.05";
# TODO: Move into modules
home.packages = with pkgs; [
libreoffice-still
remmina
pinentry
thunderbird
signal-desktop
prusa-slicer
freecad-wayland
inkscape
ente-auth
bitwarden
carla
baobab
gnome-calculator
nautilus
];
# desktop.development = "river-light";
desktop.enable = true;
desktop.environments = {
river-dark = {
name = "River Dark";
type = "custom";
config = { };
extraConfig = {
modules = {
# Desktop environment
river.enable = true;
waylock.enable = true;
waybar.enable = true;
mako.enable = true;
foot.enable = true;
rofi-rbw.enable = true;
};
# TODO: Remove everything below, it is here out of convenience and should be elsewhere
xdg.portal = {
enable = true;
config.common.default = [
"wlr"
"gtk"
];
extraPortals = with pkgs; [
xdg-desktop-portal-gtk
xdg-desktop-portal-wlr
];
};
# Color scheme
desktop.theming.background = {
image = {
url = "https://i.postimg.cc/tTB3dM3T/1382899.png";
hash = "sha256-kStcwAtK2vxitU6uaQtZTA5iFS8k0iXkFwinY2M8wQE=";
};
themed = true;
inverted = false;
};
desktop.theming.themes.catppuccin = {
enable = true;
flavor = "mocha";
};
};
};
river-light = {
name = "River Light";
type = "custom";
config = { };
extraConfig = {
modules = {
# Desktop environment
river.enable = true;
waylock.enable = true;
waybar.enable = true;
mako.enable = true;
foot.enable = true;
rofi-rbw.enable = true;
};
# TODO: Remove everything below, it is here out of convenience and should be elsewhere
xdg.portal = {
enable = true;
config.common.default = [
"wlr"
"gtk"
];
extraPortals = with pkgs; [
xdg-desktop-portal-gtk
xdg-desktop-portal-wlr
];
};
# Color scheme
desktop.theming.background = {
image = {
url = "https://raw.githubusercontent.com/dharmx/walls/refs/heads/main/digital/a_drawing_of_a_spider_on_a_white_surface.png";
hash = "sha256-eCEjM7R9yeHNhZZtvHjrgkfwT25JA7FeMoVwnQ887CQ=";
};
themed = true;
inverted = false;
};
desktop.theming.themes.catppuccin = {
enable = true;
flavor = lib.mkForce "latte";
};
};
};
gnome = {
name = "Gnome";
type = "custom";
config = { };
extraConfig = {
programs = {
gnome-shell.enable = true;
};
desktop = {
initScript = ''
${pkgs.gnome-session}/bin/gnome-session
'';
session = {
type = "wayland";
desktop = "GNOME";
};
};
modules.river.enable = lib.mkForce false;
# TODO: Remove everything below, it is here out of convenience and should be elsewhere
xdg.portal = {
enable = true;
config.common.default = [
"gnome"
"gtk"
];
extraPortals = with pkgs; [
xdg-desktop-portal-gnome
xdg-desktop-portal-gtk
];
};
home.packages = [
# Core utilities
pkgs.epiphany
pkgs.gnome-text-editor
pkgs.gnome-calendar
pkgs.gnome-characters
pkgs.gnome-clocks
pkgs.gnome-console
pkgs.gnome-contacts
pkgs.gnome-font-viewer
pkgs.gnome-logs
pkgs.gnome-maps
pkgs.gnome-music
pkgs.gnome-system-monitor
pkgs.gnome-weather
pkgs.loupe
pkgs.gnome-connections
pkgs.simple-scan
pkgs.snapshot
pkgs.totem
pkgs.yelp
# Optional packages
pkgs.adwaita-icon-theme
pkgs.gnome-backgrounds
pkgs.gnome-bluetooth
pkgs.gnome-color-manager
pkgs.gnome-control-center
pkgs.gnome-shell-extensions
pkgs.gnome-tour # GNOME Shell detects the .desktop file on first log-in.
pkgs.gnome-user-docs
pkgs.glib # for gsettings program
pkgs.gnome-menus
pkgs.gtk3.out # for gtk-launch program
pkgs.xdg-user-dirs # Update user dirs as described in https://freedesktop.org/wiki/Software/xdg-user-dirs/
pkgs.xdg-user-dirs-gtk # Used to create the default bookmarks
# Fonts
pkgs.cantarell-fonts
pkgs.dejavu_fonts
pkgs.source-code-pro # Default monospace font in 3.32
pkgs.source-sans
# Other stuff
pkgs.gnome-session
];
};
};
};
# Pipewire roc sink
xdg.configFile."pipewire/pipewire.conf.d/60-roc-sink.conf" = {
text = ''
context.modules = [
{
name = "libpipewire-module-roc-sink"
args = {
fec.code = "rs8m"
remote.ip = "10.20.60.251"
remote.source.port = 10001
remote.repair.port = 10002
sink.name = "Roc Sink"
sink.props.node.name = "roc-sink"
}
}
]
'';
};
# Enabled modules
modules = {
# Communication
whatsapp.enable = true;
discord.enable = true;
# Browser
firefox = {
enable = true;
default = false;
};
qutebrowser = {
enable = true;
default = true;
};
# Gaming
steam.enable = true;
# modrinth.enable = true;
# es-de.enable = true; # TODO: Fix, again
retroarch.enable = true;
ryujinx.enable = true;
# Media
spotify.enable = true;
feishin.enable = true;
# Tools
git = {
enable = true;
user = "Jan-Bulthuis";
email = "git@bulthuis.dev";
# TODO: Move
ignores = [
".envrc"
".direnv"
"flake.nix"
"flake.lock"
];
};
btop.enable = true;
fish.enable = true;
bluetuith.enable = false;
winbox.enable = true;
obsidian.enable = true;
zathura.enable = true;
eduvpn.enable = true;
keyring.enable = true;
scripts.enable = true;
xpra = {
enable = true;
hosts = [
"mixer@10.20.60.251"
];
};
# Development
neovim.enable = true;
vscode.enable = true;
docker.enable = true;
matlab.enable = true;
mathematica.enable = true;
# Languages
haskell.enable = false;
js.enable = true;
nix.enable = true;
rust.enable = true;
python.enable = true;
cpp.enable = true;
tex.enable = true;
jupyter.enable = true;
# Enable unfree
unfree.enable = true;
};
# Theme configuration
desktop.theming =
let
fontpkgs = config.desktop.theming.fonts.pkgs;
in
lib.mkDefault {
# Fonts
fonts.serif = fontpkgs."DejaVu Serif";
fonts.sansSerif = fontpkgs."DejaVu Sans";
fonts.monospace = fontpkgs."Dina";
fonts.emoji = fontpkgs."Noto Color Emoji";
fonts.interface = fontpkgs."Dina";
fonts.extraFonts = [ ];
# Color scheme
themes.catppuccin = {
enable = true;
flavor = "mocha";
};
};
}
{
# Default desktop environment
modules = {
# Desktop environment
river.enable = true;
waylock.enable = true;
waybar.enable = true;
mako.enable = true;
foot.enable = true;
rofi-rbw.enable = true;
};
# TODO: Remove everything below, it is here out of convenience and should be elsewhere
xdg.portal = {
enable = true;
config.common.default = lib.mkDefault [
"wlr"
"gtk"
];
extraPortals =
with pkgs;
lib.mkDefault [
xdg-desktop-portal-gtk
xdg-desktop-portal-wlr
];
};
# Color scheme
desktop.theming.background = lib.mkDefault {
image = {
url = "https://i.postimg.cc/tTB3dM3T/1382899.png";
hash = "sha256-kStcwAtK2vxitU6uaQtZTA5iFS8k0iXkFwinY2M8wQE=";
};
themed = true;
inverted = false;
};
desktop.theming.themes.catppuccin = {
enable = true;
flavor = "mocha";
};
}
);
}