This commit is contained in:
Tao Tien 2025-06-18 00:31:22 -07:00
parent 51409b72dc
commit e8366cc6cc
9 changed files with 677 additions and 662 deletions

View file

@ -1,105 +1,105 @@
{pkgs, ...}: { {pkgs, ...}: {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
# act # act
# asm-lsp # asm-lsp
# bash-language-server # bash-language-server
# digital # digital
# etcher # etcher
# fontforge # fontforge
# freecad # freecad
# git-cliff # git-cliff
# lua-language-server # lua-language-server
# lychee # link checker # lychee # link checker
# markdown-oxide # markdown lsp # markdown-oxide # markdown lsp
# quickemu # quickemu
# radicle-node # radicle-node
# vulkan-loader # vulkan-loader
b3sum b3sum
delta delta
devenv devenv
direnv direnv
gh gh
hyperfine hyperfine
jujutsu jujutsu
just just
lldb lldb
mask mask
mprocs mprocs
nomachine-client nomachine-client
presenterm presenterm
qFlipper qFlipper
qemu qemu
sd sd
sshfs sshfs
taplo # toml lsp taplo # toml lsp
tio tio
tokei # repo code stats tokei # repo code stats
typos typos
# # databases # # databases
# sqlite # sqlite
# sqls # sqls
# sqlx-cli # sqlx-cli
# sea-orm-cli # sea-orm-cli
# rainfrog # rainfrog
# # arduino # # arduino
# arduino-language-server # arduino-language-server
# arduino-cli # arduino-cli
# pkgsCross.avr.buildPackages.gcc # pkgsCross.avr.buildPackages.gcc
# avrdude # avrdude
# ravedude # ravedude
# c # c
clang clang
clang-tools clang-tools
gcc gcc
gdb gdb
gnumake gnumake
# nix # nix
nil nil
alejandra alejandra
# python # python
# pypy3 # pypy3
python3 python3
uv uv
ruff ruff
# rust # rust
cargo-binstall cargo-binstall
bacon bacon
cargo-expand cargo-expand
cargo-feature cargo-feature
cargo-generate cargo-generate
cargo-watch cargo-watch
elf2uf2-rs elf2uf2-rs
flip-link flip-link
mdbook mdbook
mold-wrapped mold-wrapped
probe-rs probe-rs
rustup rustup
rusty-man rusty-man
sccache sccache
trunk trunk
wasm-bindgen-cli wasm-bindgen-cli
]; ];
hardware.flipperzero.enable = true; hardware.flipperzero.enable = true;
services.udev.extraRules = '' services.udev.extraRules = ''
SUBSYSTEM == "tty", GROUP="dialout", ATTRS{interface}=="Black Magic GDB Server", SYMLINK+="ttyBmpGdb" SUBSYSTEM == "tty", GROUP="dialout", ATTRS{interface}=="Black Magic GDB Server", SYMLINK+="ttyBmpGdb"
SUBSYSTEM == "tty", GROUP="dialout", ATTRS{interface}=="Black Magic UART Port", SYMLINK+="ttyBmpTarg" SUBSYSTEM == "tty", GROUP="dialout", ATTRS{interface}=="Black Magic UART Port", SYMLINK+="ttyBmpTarg"
''; '';
virtualisation.docker = { virtualisation.docker = {
enable = true; enable = true;
storageDriver = "btrfs"; storageDriver = "btrfs";
}; };
# virtualisation.docker.rootless = { # virtualisation.docker.rootless = {
# enable = true; # enable = true;
# setSocketVariable = true; # setSocketVariable = true;
# }; # };
users.extraGroups.docker.members = ["tao"]; users.extraGroups.docker.members = ["tao"];
} }

View file

@ -10,24 +10,24 @@
# else false; # else false;
# in # in
{ {
# programs.noisetorch.enable = true; # programs.noisetorch.enable = true;
# aagl.url = "github:ezKEa/aagl-gtk-on-nix"; # aagl.url = "github:ezKEa/aagl-gtk-on-nix";
# aagl.inputs.nixpkgs.follows = "nixpkgs"; # aagl.inputs.nixpkgs.follows = "nixpkgs";
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
# parsec-bin # parsec-bin
# yuzu # nintendo can suck the shit out of my asshole # yuzu # nintendo can suck the shit out of my asshole
gamemode gamemode
heroic heroic
lutris lutris
mangohud mangohud
prismlauncher prismlauncher
protonup-qt protonup-qt
r2modman r2modman
wine wine
temurin-jre-bin-17 temurin-jre-bin-17
graalvm-ce graalvm-ce
]; ];
networking.firewall.allowedTCPPorts = [25565]; networking.firewall.allowedTCPPorts = [25565];

View file

@ -22,6 +22,11 @@
where = "/mnt/uwuraid/everything"; where = "/mnt/uwuraid/everything";
}) })
(opts (opts
// {
what = "//100.97.47.81/downloads";
where = "/mnt/uwuraid/downloads";
})
(opts
// { // {
what = "//100.97.47.81/media"; what = "//100.97.47.81/media";
where = "/mnt/uwuraid/media"; where = "/mnt/uwuraid/media";
@ -54,6 +59,7 @@
(opts // {where = "/mnt/uwuraid/anime";}) (opts // {where = "/mnt/uwuraid/anime";})
(opts // {where = "/mnt/uwuraid/backup";}) (opts // {where = "/mnt/uwuraid/backup";})
(opts // {where = "/mnt/uwuraid/everything";}) (opts // {where = "/mnt/uwuraid/everything";})
(opts // {where = "/mnt/uwuraid/downloads";})
(opts // {where = "/mnt/uwuraid/media";}) (opts // {where = "/mnt/uwuraid/media";})
# (opts // {where = "/mnt/uwuraid/isos";}) # (opts // {where = "/mnt/uwuraid/isos";})
(opts // {where = "/mnt/uwuraid/photos";}) (opts // {where = "/mnt/uwuraid/photos";})

View file

@ -1,14 +1,14 @@
let let
# get these from /etc/ssh # get these from /etc/ssh
NOcomputer = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPv53GM1uDDOdRxIlHmpf6x2y13yT5bFDNyrgDGLAR1l"; NOcomputer = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPv53GM1uDDOdRxIlHmpf6x2y13yT5bFDNyrgDGLAR1l";
NOlaptop = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILtdTREsBxzg/8s0lVCwL+r18qMP8glxAKaKEg+71I6m"; NOlaptop = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILtdTREsBxzg/8s0lVCwL+r18qMP8glxAKaKEg+71I6m";
NOmom = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGdPvIo0P00I27i9XQFngsklw/dSyoFs7EgRt7RvkbSq"; NOmom = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGdPvIo0P00I27i9XQFngsklw/dSyoFs7EgRt7RvkbSq";
NObangers = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGFLjWigGCzbpumo0WA8xXR0PAxSifyocOMNTFqfFLOq"; NObangers = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGFLjWigGCzbpumo0WA8xXR0PAxSifyocOMNTFqfFLOq";
systems = [NOcomputer NOlaptop NOmom NObangers]; systems = [NOcomputer NOlaptop NOmom NObangers];
in { in {
"uwuraid.age".publicKeys = systems; "uwuraid.age".publicKeys = systems;
"syncthing-NOcomputer.age".publicKeys = systems; "syncthing-NOcomputer.age".publicKeys = systems;
"syncthing-NOlaptop.age".publicKeys = systems; "syncthing-NOlaptop.age".publicKeys = systems;
"syncthing-uwuraid.age".publicKeys = systems; "syncthing-uwuraid.age".publicKeys = systems;
"password-tao.age".publicKeys = systems; "password-tao.age".publicKeys = systems;
} }

View file

@ -88,6 +88,7 @@
users.users.root.openssh.authorizedKeys.keys = [ users.users.root.openssh.authorizedKeys.keys = [
]; ];
programs.ssh.startAgent = true; programs.ssh.startAgent = true;
services.gnome.gcr-ssh-agent.enable = false;
services.printing.enable = lib.mkDefault true; services.printing.enable = lib.mkDefault true;
services.printing.drivers = with pkgs; lib.mkDefault [gutenprint gutenprintBin]; services.printing.drivers = with pkgs; lib.mkDefault [gutenprint gutenprintBin];

View file

@ -1,64 +1,64 @@
{ {
config, config,
pkgs, pkgs,
lib, lib,
... ...
}: { }: {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
raspberrypi-eeprom raspberrypi-eeprom
]; ];
programs.partition-manager.enable = false; programs.partition-manager.enable = false;
services.printing.enable = false; services.printing.enable = false;
i18n.inputMethod.enable = false; i18n.inputMethod.enable = false;
services.desktopManager.plasma6.enable = false; services.desktopManager.plasma6.enable = false;
hardware.raspberry-pi."4" = { hardware.raspberry-pi."4" = {
apply-overlays-dtmerge.enable = true; apply-overlays-dtmerge.enable = true;
bluetooth.enable = true; bluetooth.enable = true;
fkms-3d.enable = true; fkms-3d.enable = true;
};
age.secrets.password-tao.file = ../secrets/syncthing-uwuraid.age;
users.users.tao = {
isNormalUser = true;
hashedPasswordFile = config.age.secrets.password-tao.path;
extraGroups = ["audio" "video" "wheel" "libvirtd" "dialout" "game"];
shell = pkgs.nushell;
};
boot.loader.systemd-boot.enable = false;
boot.loader.efi.canTouchEfiVariables = false;
# Configure for modesetting in the device tree
fileSystems = {
"/" = {
device = "/dev/disk/by-label/NIXOS_SD";
fsType = "ext4";
options = ["noatime"];
}; };
};
nix.buildMachines = [ age.secrets.password-tao.file = ../secrets/syncthing-uwuraid.age;
{ users.users.tao = {
hostName = "nolaptop"; isNormalUser = true;
systems = ["x86_64-linux" "i686-linux"]; hashedPasswordFile = config.age.secrets.password-tao.path;
supportedFeatures = [ extraGroups = ["audio" "video" "wheel" "libvirtd" "dialout" "game"];
"benchmark" shell = pkgs.nushell;
"big-parallel" };
"gccarch-znver4"
"kvm"
"nixos-test"
];
}
];
nix.extraOptions = ''
builders-use-substitutes = true
'';
nix.distributedBuilds = true;
networking.hostName = "NObangers"; boot.loader.systemd-boot.enable = false;
nixpkgs.hostPlatform = "aarch64-linux"; boot.loader.efi.canTouchEfiVariables = false;
system.stateVersion = "23.11";
# Configure for modesetting in the device tree
fileSystems = {
"/" = {
device = "/dev/disk/by-label/NIXOS_SD";
fsType = "ext4";
options = ["noatime"];
};
};
nix.buildMachines = [
{
hostName = "nolaptop";
systems = ["x86_64-linux" "i686-linux"];
supportedFeatures = [
"benchmark"
"big-parallel"
"gccarch-znver4"
"kvm"
"nixos-test"
];
}
];
nix.extraOptions = ''
builders-use-substitutes = true
'';
nix.distributedBuilds = true;
networking.hostName = "NObangers";
nixpkgs.hostPlatform = "aarch64-linux";
system.stateVersion = "23.11";
} }

View file

@ -1,8 +1,8 @@
{ {
lib, lib,
config, config,
pkgs, pkgs,
... ...
}: }:
# let # let
# boostless = pkgs.pipewire.overrideAttrs (old: { # boostless = pkgs.pipewire.overrideAttrs (old: {
@ -13,110 +13,110 @@
# }); # });
# in # in
{ {
environment.etc."alsa-card-profile/analog-input-internal-mic.conf".source = ../extras/analog-input-internal-mic.conf; environment.etc."alsa-card-profile/analog-input-internal-mic.conf".source = ../extras/analog-input-internal-mic.conf;
hardware.opengl.extraPackages = with pkgs; [ hardware.opengl.extraPackages = with pkgs; [
amdvlk amdvlk
]; ];
hardware.opengl.extraPackages32 = with pkgs; [ hardware.opengl.extraPackages32 = with pkgs; [
driversi686Linux.amdvlk driversi686Linux.amdvlk
]; ];
services.xserver.videoDrivers = [ services.xserver.videoDrivers = [
"amdgpu" "amdgpu"
]; ];
# services.pipewire.wireplumber.extraConfig = { # services.pipewire.wireplumber.extraConfig = {
# "wireplumber.settings" = { # "wireplumber.settings" = {
# "device.routes.default-source-volume" = 0.42; # "device.routes.default-source-volume" = 0.42;
# }; # };
# }; # };
services.rsyslogd = { services.rsyslogd = {
enable = true; enable = true;
extraConfig = '' extraConfig = ''
module(load="imudp") module(load="imudp")
input(type="imudp" port="514") input(type="imudp" port="514")
THENAS.* -/var/log/THENAS THENAS.* -/var/log/THENAS
'';
};
# nixpkgs.overlays = [
# (final: prev: {
# libinput = prev.libinput.overrideAttrs (old: {
# patches =
# (old.patches or [])
# ++ [
# ../extras/libinput-delay.patch
# ];
# });
# })
# ];
environment.systemPackages = with pkgs; [
fw-ectool
framework-tool
nvtopPackages.amd
lact
];
systemd.services.lactd.wantedBy = ["multi-user.target"];
services.fwupd.enable = true;
services.tailscale.useRoutingFeatures = "client";
systemd.services."backlight@backlight:amdgpu_bl2".enable = false;
nix.buildMachines = [
{
hostName = "nocomputer";
systems = ["x86_64-linux" "i686-linux"];
supportedFeatures = [
"benchmark"
"big-parallel"
"gccarch-znver4"
"kvm"
"nixos-test"
];
}
];
nix.extraOptions = ''
builders-use-substitutes = true
''; '';
}; nix.distributedBuilds = true;
# nixpkgs.overlays = [ services.udev.extraRules = ''
# (final: prev: { # ACTION=="add", SUBSYSTEM=="backlight", RUN+="${pkgs.coreutils}/bin/chgrp video /sys/class/backlight/%k/brightness"
# libinput = prev.libinput.overrideAttrs (old: { # ACTION=="add", SUBSYSTEM=="backlight", RUN+="${pkgs.coreutils}/bin/chmod g+w /sys/class/backlight/%k/brightness"
# patches =
# (old.patches or [])
# ++ [
# ../extras/libinput-delay.patch
# ];
# });
# })
# ];
environment.systemPackages = with pkgs; [ ACTION=="add|change", SUBSYSTEM=="usb", DRIVERS=="usb", ATTRS{idVendor}=="32ac", ATTRS{idProduct}=="0012", ATTR{power/wakeup}="disabled"
fw-ectool ACTION=="add|change", KERNEL=="i2c", SUBSYSTEM=="i2c", DEVPATH=="/sys/devices/platform/AMDI0010:03/i2c-1/i2c-PIXA3854:00", ATTR{power/wakeup}="disabled"
framework-tool
nvtopPackages.amd
lact
];
systemd.services.lactd.wantedBy = ["multi-user.target"]; # ACTION=="add", SUBSYSTEM=="acpi", DRIVERS=="button", ATTRS{hid}=="PNP0C0D", ATTR{power/wakeup}="disabled"
# ACTION=="add", SUBSYSTEM=="serio", DRIVERS=="atkbd", ATTR{power/wakeup}="disabled"
# ACTION=="add", SUBSYSTEM=="i2c", DRIVERS=="i2c_hid_acpi", ATTRS{name}=="PIXA3854:00", ATTR{power/wakeup}="disabled"
'';
services.fwupd.enable = true; services.fprintd.enable = true;
services.tailscale.useRoutingFeatures = "client";
systemd.services."backlight@backlight:amdgpu_bl2".enable = false;
nix.buildMachines = [ boot.kernelPackages = pkgs.linuxPackages_latest;
{ # boot.initrd.availableKernelModules = [
hostName = "nocomputer"; # "nvme"
systems = ["x86_64-linux" "i686-linux"]; # "sd_mod"
supportedFeatures = [ # "thunderbolt"
"benchmark" # "usb_storage"
"big-parallel" # "xhci_pci"
"gccarch-znver4" # "usbhid"
"kvm" # "uas"
"nixos-test" # ];
]; boot.kernelParams = [
} "amdgpu.abmlevel=1"
]; # "amdgpu.dcdebugmask=0x400"
nix.extraOptions = '' # "mem_sleep_default=deep"
builders-use-substitutes = true ];
''; # boot.kernelModules = ["kvm-amd"];
nix.distributedBuilds = true; boot.kernelModules = ["amdgpu"];
powerManagement.cpuFreqGovernor = "powersave";
systemd.sleep.extraConfig = "HibernateDelaySec=360m";
services.udev.extraRules = '' networking.hostName = "NOlaptop";
# ACTION=="add", SUBSYSTEM=="backlight", RUN+="${pkgs.coreutils}/bin/chgrp video /sys/class/backlight/%k/brightness"
# ACTION=="add", SUBSYSTEM=="backlight", RUN+="${pkgs.coreutils}/bin/chmod g+w /sys/class/backlight/%k/brightness"
ACTION=="add|change", SUBSYSTEM=="usb", DRIVERS=="usb", ATTRS{idVendor}=="32ac", ATTRS{idProduct}=="0012", ATTR{power/wakeup}="disabled"
ACTION=="add|change", KERNEL=="i2c", SUBSYSTEM=="i2c", DEVPATH=="/sys/devices/platform/AMDI0010:03/i2c-1/i2c-PIXA3854:00", ATTR{power/wakeup}="disabled"
# ACTION=="add", SUBSYSTEM=="acpi", DRIVERS=="button", ATTRS{hid}=="PNP0C0D", ATTR{power/wakeup}="disabled"
# ACTION=="add", SUBSYSTEM=="serio", DRIVERS=="atkbd", ATTR{power/wakeup}="disabled"
# ACTION=="add", SUBSYSTEM=="i2c", DRIVERS=="i2c_hid_acpi", ATTRS{name}=="PIXA3854:00", ATTR{power/wakeup}="disabled"
'';
services.fprintd.enable = true;
boot.kernelPackages = pkgs.linuxPackages_latest;
# boot.initrd.availableKernelModules = [
# "nvme"
# "sd_mod"
# "thunderbolt"
# "usb_storage"
# "xhci_pci"
# "usbhid"
# "uas"
# ];
boot.kernelParams = [
"amdgpu.abmlevel=1"
# "amdgpu.dcdebugmask=0x400"
# "mem_sleep_default=deep"
];
# boot.kernelModules = ["kvm-amd"];
boot.kernelModules = ["amdgpu"];
powerManagement.cpuFreqGovernor = "powersave";
systemd.sleep.extraConfig = "HibernateDelaySec=360m";
networking.hostName = "NOlaptop";
} }

View file

@ -1,162 +1,162 @@
{ {
inputs, inputs,
config, config,
pkgs, pkgs,
lib, lib,
... ...
}: { }: {
users.users.tao.packages = with pkgs; [ users.users.tao.packages = with pkgs; [
# boxxy # boxxy
calibre calibre
# carapace # carapace
# cloud-hypervisor # cloud-hypervisor
# davinci-resolve # davinci-resolve
# fractal # fractal
# freerdp # freerdp
# inputs.plasma-manager.packages.${pkgs.system}.default # inputs.plasma-manager.packages.${pkgs.system}.default
# jellyfin-mpv-shim # jellyfin-mpv-shim
# libsForQt5.kcharselect # libsForQt5.kcharselect
# mendeley # mendeley
# piper # piper
# slack # slack
# tectonic # tectonic
# texlab # texlab
# thunderbird # thunderbird
# wkhtmltopdf # wkhtmltopdf
appimage-run appimage-run
aspell aspell
aspellDicts.en aspellDicts.en
bottles bottles
darktable darktable
deluge deluge
discord discord
freecad-wayland freecad-wayland
gocryptfs gocryptfs
gurk-rs gurk-rs
jellyfin-media-player jellyfin-media-player
# kdePackages.plasma-vault # kdePackages.plasma-vault
keepassxc keepassxc
# leetcode-cli # leetcode-cli
man-pages man-pages
man-pages-posix man-pages-posix
miniserve miniserve
mousai mousai
nix-output-monitor nix-output-monitor
nixos-anywhere nixos-anywhere
nufmt nufmt
nushell nushell
nvd nvd
obs-studio obs-studio
oculante oculante
onlyoffice-bin onlyoffice-bin
pandoc pandoc
pipe-rename pipe-rename
prusa-slicer prusa-slicer
qmk qmk
qmk-udev-rules qmk-udev-rules
qmk_hid qmk_hid
ripgrep-all ripgrep-all
signal-desktop signal-desktop
slack slack
snapper snapper
starship starship
syncthingtray syncthingtray
taskwarrior3 taskwarrior3
tinymist tinymist
toastify toastify
typst typst
usbutils usbutils
vial vial
wezterm wezterm
wl-clipboard-rs wl-clipboard-rs
yt-dlp yt-dlp
zathura zathura
zellij zellij
zoom-us zoom-us
zoxide zoxide
]; ];
programs.adb.enable = true; programs.adb.enable = true;
programs.kdeconnect.enable = true; programs.kdeconnect.enable = true;
environment.shells = with pkgs; [nushell]; environment.shells = with pkgs; [nushell];
# virtualisation.libvirtd.enable = true; # virtualisation.libvirtd.enable = true;
# virtualisation.libvirtd.qemu.swtpm.enable = true; # virtualisation.libvirtd.qemu.swtpm.enable = true;
# virtualisation.spiceUSBRedirection.enable = true; # virtualisation.spiceUSBRedirection.enable = true;
# programs.virt-manager.enable = true; # programs.virt-manager.enable = true;
# virtualisation.virtualbox.host = { # virtualisation.virtualbox.host = {
# enable = true; # enable = true;
# enableExtensionPack = true; # enableExtensionPack = true;
# }; # };
# nixpkgs.overlays = [ # nixpkgs.overlays = [
# (final: prev: { # (final: prev: {
# options.services.snapper.configs = prev.options.services.snapper.configs.overrideAttrs (old: { # options.services.snapper.configs = prev.options.services.snapper.configs.overrideAttrs (old: {
# configOptions.FSTYPE = lib.mkOption { # configOptions.FSTYPE = lib.mkOption {
# type = lib.types.enum ["btrfs" "bcachefs"]; # type = lib.types.enum ["btrfs" "bcachefs"];
# }; # };
# }); # });
# }) # })
# ]; # ];
disabledModules = ["services/misc/snapper.nix"]; disabledModules = ["services/misc/snapper.nix"];
imports = [../extras/snapper.nix]; imports = [../extras/snapper.nix];
services.snapper.configs = { services.snapper.configs = {
home = { home = {
SUBVOLUME = "/home"; SUBVOLUME = "/home";
# FSTYPE = "bcachefs"; # FSTYPE = "bcachefs";
FSTYPE = FSTYPE =
if lib.strings.hasPrefix "NOlaptop" (builtins.readFile /etc/hostname) if lib.strings.hasPrefix "NOlaptop" (builtins.readFile /etc/hostname)
then "bcachefs" then "bcachefs"
else "btrfs"; else "btrfs";
ALLOW_USERS = ["tao"]; ALLOW_USERS = ["tao"];
TIMELINE_CREATE = true; TIMELINE_CREATE = true;
TIMELINE_CLEANUP = true; TIMELINE_CLEANUP = true;
TIMELINE_LIMIT_HOURLY = 5; TIMELINE_LIMIT_HOURLY = 5;
TIMELINE_LIMIT_DAILY = 7; TIMELINE_LIMIT_DAILY = 7;
};
}; };
}; services.snapper.snapshotInterval = "*:0/5";
services.snapper.snapshotInterval = "*:0/5";
hardware.keyboard.qmk.enable = true; hardware.keyboard.qmk.enable = true;
services.udev.extraRules = '' services.udev.extraRules = ''
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0660", GROUP="users", TAG+="uaccess", TAG+="udev-acl" KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0660", GROUP="users", TAG+="uaccess", TAG+="udev-acl"
''; '';
# services.ratbagd.enable = true; # services.ratbagd.enable = true;
boot.extraModulePackages = with config.boot.kernelPackages; [ boot.extraModulePackages = with config.boot.kernelPackages; [
v4l2loopback v4l2loopback
]; ];
boot.extraModprobeConfig = '' boot.extraModprobeConfig = ''
options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1 options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1
''; '';
fonts.packages = with pkgs; [ fonts.packages = with pkgs; [
# (nerdfonts.override {fonts = ["FiraCode"];}) # (nerdfonts.override {fonts = ["FiraCode"];})
nerd-fonts.fira-code nerd-fonts.fira-code
noto-fonts-cjk-sans noto-fonts-cjk-sans
noto-fonts-cjk-serif noto-fonts-cjk-serif
noto-fonts-color-emoji noto-fonts-color-emoji
ibm-plex ibm-plex
cooper-hewitt cooper-hewitt
]; ];
documentation.enable = true; documentation.enable = true;
# age.secrets.password-tao.file = ../secrets/syncthing-uwuraid.age; # age.secrets.password-tao.file = ../secrets/syncthing-uwuraid.age;
users.users.tao = { users.users.tao = {
isNormalUser = true; isNormalUser = true;
# hashedPasswordFile = config.age.secrets.password-tao.path; # hashedPasswordFile = config.age.secrets.password-tao.path;
extraGroups = ["audio" "video" "wheel" "libvirtd" "dialout" "game"]; extraGroups = ["audio" "video" "wheel" "libvirtd" "dialout" "game"];
shell = pkgs.nushell; shell = pkgs.nushell;
}; };
age.secrets.syncthing-NOcomputer.file = ../secrets/syncthing-NOcomputer.age; age.secrets.syncthing-NOcomputer.file = ../secrets/syncthing-NOcomputer.age;
age.secrets.syncthing-NOlaptop.file = ../secrets/syncthing-NOlaptop.age; age.secrets.syncthing-NOlaptop.file = ../secrets/syncthing-NOlaptop.age;
age.secrets.syncthing-uwuraid.file = ../secrets/syncthing-uwuraid.age; age.secrets.syncthing-uwuraid.file = ../secrets/syncthing-uwuraid.age;
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.verbose = true; home-manager.verbose = true;
home-manager.backupFileExtension = ".hm-bak"; home-manager.backupFileExtension = ".hm-bak";
home-manager.users.tao = import ./tao/HOME.nix {inherit inputs pkgs lib config;}; home-manager.users.tao = import ./tao/HOME.nix {inherit inputs pkgs lib config;};
} }

View file

@ -1,261 +1,269 @@
{ {
config, config,
pkgs, pkgs,
inputs, inputs,
lib, lib,
... ...
}: let }: let
cargoFile = builtins.readFile ./cargo.toml; cargoFile = builtins.readFile ./cargo.toml;
cargoConfig = builtins.replaceStrings ["/path/to/sccache" "/path/to/mold"] ["${pkgs.sccache}/bin/sccache" "${pkgs.mold}/bin/mold}"] cargoFile; cargoConfig = builtins.replaceStrings ["/path/to/sccache" "/path/to/mold"] ["${pkgs.sccache}/bin/sccache" "${pkgs.mold}/bin/mold}"] cargoFile;
age.secrets.syncthing-NOcomputer.file = ../secrets/syncthing-NOcomputer.age; age.secrets.syncthing-NOcomputer.file = ../secrets/syncthing-NOcomputer.age;
age.secrets.syncthing-NOlaptop.file = ../secrets/syncthing-NOlaptop.age; age.secrets.syncthing-NOlaptop.file = ../secrets/syncthing-NOlaptop.age;
age.secrets.syncthing-uwuraid.file = ../secrets/syncthing-uwuraid.age; age.secrets.syncthing-uwuraid.file = ../secrets/syncthing-uwuraid.age;
in { in {
imports = [ imports = [
./boxxy.nix ./boxxy.nix
(import ./helix.nix {inherit pkgs inputs;}) (import ./helix.nix {inherit pkgs inputs;})
# ./plasma.nix # ./plasma.nix
# ./firefox.nix # ./firefox.nix
]; ];
# home.sessionPath = [ # home.sessionPath = [
# "/home/tao/.cargo/bin" # "/home/tao/.cargo/bin"
# ]; # ];
home.file.".cargo/config.toml".text = cargoConfig; home.file.".cargo/config.toml".text = cargoConfig;
home.file.".config/autostart" = { home.file.".config/autostart" = {
source = ./autostart; source = ./autostart;
recursive = true; recursive = true;
};
home.file.".config/direnv/lib/".source = ./direnv;
home.file.".config/direnv/lib/".recursive = true;
programs = {
bacon = {
enable = true;
settings.jobs.default = {
command = [
"cargo"
"clippy"
"--"
"-A"
"clippy::bool_to_int_with_if"
"-A"
"clippy::collapsible_else_if"
"-A"
"clippy::collapsible_if"
"-A"
"clippy::derive_partial_eq_without_eq"
"-A"
"clippy::get_first"
"-A"
"clippy::if_same_then_else"
"-A"
"clippy::len_without_is_empty"
"-A"
"clippy::map_entry"
"-A"
"clippy::while_let_on_iterator"
];
need_stdout = false;
};
}; };
home.file.".config/direnv/lib/".source = ./direnv;
home.file.".config/direnv/lib/".recursive = true;
programs = { bat = {
bacon = { enable = true;
enable = true; config = {
settings.jobs.default = { theme = "gruvbox-dark";
command = [ };
"cargo" };
"clippy"
"--" bottom = {
"-A" enable = true;
"clippy::bool_to_int_with_if" settings = {
"-A" color = "gruvbox";
"clippy::collapsible_else_if" flags = {
"-A" battery =
"clippy::collapsible_if" # if lib.strings.hasPrefix "NOlaptop" (builtins.readFile /etc/hostname)
"-A" # then true
"clippy::derive_partial_eq_without_eq" # else false;
"-A" true;
"clippy::get_first" hide_time = true;
"-A" enable_gpu = true;
"clippy::if_same_then_else"
"-A"
"clippy::len_without_is_empty"
"-A"
"clippy::map_entry"
"-A"
"clippy::while_let_on_iterator"
];
need_stdout = false;
};
}; };
};
};
bat = { direnv = {
enable = true; enable = true;
config = { enableNushellIntegration = true;
theme = "gruvbox-dark"; nix-direnv.enable = true;
}; };
jujutsu = {
enable = true;
settings = {
user = {
name = "Tao Tien";
email = "29749622+taotien@users.noreply.github.com";
}; };
ui = {
bottom = { default-command = "log";
enable = true;
settings = {
color = "gruvbox";
flags = {
battery =
# if lib.strings.hasPrefix "NOlaptop" (builtins.readFile /etc/hostname)
# then true
# else false;
true;
hide_time = true;
enable_gpu = true;
};
};
}; };
};
# package = inputs.jujutsu.packages.${pkgs.system}.default;
};
direnv = { git = {
enable = true; enable = true;
enableNushellIntegration = true; userName = "Tao Tien";
nix-direnv.enable = true; userEmail = "29749622+taotien@users.noreply.github.com";
# extraConfig = {
# };
ignores = [
"/target"
".direnv"
];
};
nushell = {
enable = true;
configFile.source = ./nushell/config.nu;
envFile.source = ./nushell/env.nu;
# extraConfig = builtins.readFile ./nushell/stuff.nu;
extraConfig = lib.concatStrings (map builtins.readFile (map (x: ./nushell/extras/. + x) (map (x: "/" + x) (builtins.attrNames (builtins.readDir ./nushell/extras)))));
};
ssh = {
enable = true;
addKeysToAgent = "yes";
compression = true;
matchBlocks = {
"stargate" = {
hostname = "stargate.cs.usfca.edu";
user = "tltien";
forwardAgent = true;
identityFile = "/home/tao/.ssh/id_ed25519";
}; };
"griffin" = {
jujutsu = { hostname = "griffin.cs.usfca.edu";
enable = true; user = "tltien";
settings = { forwardAgent = true;
user = { identityFile = "/home/tao/.ssh/id_ed25519";
name = "Tao Tien"; # proxyCommand = "ssh griffin.cs.usfca.edu";
email = "29749622+taotien@users.noreply.github.com";
};
ui = {
default-command = "log";
};
};
# package = inputs.jujutsu.packages.${pkgs.system}.default;
}; };
"github" = {
git = { hostname = "github.com";
enable = true; forwardAgent = true;
userName = "Tao Tien"; identityFile = "/home/tao/.ssh/id_ed25519";
userEmail = "29749622+taotien@users.noreply.github.com";
# extraConfig = {
# };
ignores = [
"/target"
".direnv"
];
}; };
# "uwuraid" = {
nushell = { # hostname = "uwuraid";
enable = true; # user = "root";
configFile.source = ./nushell/config.nu; # # extraOptions = ["-t" "cd /mnt/user; exet \$SHELL -l"];
envFile.source = ./nushell/env.nu; # # requesttty = true;
# extraConfig = builtins.readFile ./nushell/stuff.nu; # # identityFile = "/home/tao/.ssh/id_ed25519";
extraConfig = lib.concatStrings (map builtins.readFile (map (x: ./nushell/extras/. + x) (map (x: "/" + x) (builtins.attrNames (builtins.readDir ./nushell/extras))))); # proxyCommand = "ssh -t root@uwuraid cd /mnt/user; exec \\$SHELL -l";
};
ssh = {
enable = true;
addKeysToAgent = "yes";
compression = true;
matchBlocks = {
"stargate" = {
hostname = "stargate.cs.usfca.edu";
user = "tltien";
forwardAgent = true;
identityFile = "/home/tao/.ssh/id_ed25519";
};
"griffin" = {
hostname = "griffin.cs.usfca.edu";
user = "tltien";
forwardAgent = true;
identityFile = "/home/tao/.ssh/id_ed25519";
# proxyCommand = "ssh griffin.cs.usfca.edu";
};
"github" = {
hostname = "github.com";
forwardAgent = true;
identityFile = "/home/tao/.ssh/id_ed25519";
};
};
};
starship = {
enable = true;
enableNushellIntegration = true;
settings = builtins.fromTOML (builtins.readFile ./starship.toml);
};
# taskwarrior = {
# enable = true;
# package = pkgs.taskwarrior3;
# dataLocation = "/home/tao/sync";
# }; # };
};
wezterm = {
enable = true;
extraConfig = builtins.readFile ./wezterm.lua;
};
zathura = {
enable = true;
options = {
selection-clipboard = "clipboard";
};
};
zellij = {
enable = true;
settings = {};
};
zoxide = {
enable = true;
enableNushellIntegration = true;
};
}; };
services = { starship = {
pueue = { enable = true;
enable = true; enableNushellIntegration = true;
settings = {}; settings = builtins.fromTOML (builtins.readFile ./starship.toml);
};
# taskwarrior = {
# enable = true;
# package = pkgs.taskwarrior3;
# dataLocation = "/home/tao/sync";
# };
wezterm = {
enable = true;
extraConfig = builtins.readFile ./wezterm.lua;
};
zathura = {
enable = true;
options = {
selection-clipboard = "clipboard";
};
};
zellij = {
enable = true;
settings = {};
};
zoxide = {
enable = true;
enableNushellIntegration = true;
};
};
services = {
pueue = {
enable = true;
settings = {};
};
};
services.syncthing = {
enable = true;
# user = "tao";
# dataDir = "/home/tao/sync";
# configDir = "/home/tao/.config/syncthing";
overrideDevices = true;
overrideFolders = true;
# openDefaultPorts = true;
settings = {
devices = {
# we do a lil anti-patterns https://github.com/ryantm/agenix?tab=readme-ov-file#builtinsreadfile-anti-pattern
# bootstrap by commenting out devices first and rebuild switch impurely
"nocomputer".id = builtins.readFile config.age.secrets.syncthing-NOcomputer.path;
"nolaptop".id = builtins.readFile config.age.secrets.syncthing-NOlaptop.path;
"uwuraid".id = builtins.readFile config.age.secrets.syncthing-uwuraid.path;
};
folders = let
devs = [
"nocomputer"
"nolaptop"
"uwuraid"
];
in {
# "documents" = {
# path = "/home/tao/documents";
# devices = devs;
# };
"pictures" = {
path = "/home/tao/pictures";
devices = devs;
}; };
}; "projects" = {
path = "/home/tao/projects";
services.syncthing = { devices = devs;
enable = true;
# user = "tao";
# dataDir = "/home/tao/sync";
# configDir = "/home/tao/.config/syncthing";
overrideDevices = true;
overrideFolders = true;
# openDefaultPorts = true;
settings = {
devices = {
# we do a lil anti-patterns https://github.com/ryantm/agenix?tab=readme-ov-file#builtinsreadfile-anti-pattern
# bootstrap by commenting out devices first and rebuild switch impurely
"nocomputer".id = builtins.readFile config.age.secrets.syncthing-NOcomputer.path;
"nolaptop".id = builtins.readFile config.age.secrets.syncthing-NOlaptop.path;
"uwuraid".id = builtins.readFile config.age.secrets.syncthing-uwuraid.path;
};
folders = let
devs = [
"nocomputer"
"nolaptop"
"uwuraid"
];
in {
# "documents" = {
# path = "/home/tao/documents";
# devices = devs;
# };
"pictures" = {
path = "/home/tao/pictures";
devices = devs;
};
"projects" = {
path = "/home/tao/projects";
devices = devs;
};
"school" = {
path = "/home/tao/school";
devices = devs;
};
"sync" = {
path = "/home/tao/sync";
devices = devs;
};
# "work" = {
# path = "/home/tao/work";
# devices = devs;
# };
};
}; };
"school" = {
path = "/home/tao/school";
devices = devs;
};
"sync" = {
path = "/home/tao/sync";
devices = devs;
};
# "work" = {
# path = "/home/tao/work";
# devices = devs;
# };
};
}; };
};
xdg.userDirs = { xdg.userDirs = {
desktop = "desktop"; desktop = "desktop";
documents = "documents"; documents = "documents";
download = "downloads"; download = "downloads";
music = "music"; music = "music";
pictures = "pictures"; pictures = "pictures";
templates = "templates"; templates = "templates";
videos = "videos"; videos = "videos";
publicShare = null; publicShare = null;
createDirectories = true; createDirectories = true;
enable = true; enable = true;
}; };
home.username = "tao"; home.username = "tao";
home.homeDirectory = "/home/tao"; home.homeDirectory = "/home/tao";
home.stateVersion = "23.11"; home.stateVersion = "23.11";
} }