prepare tron

This commit is contained in:
Till 2024-07-10 16:57:40 +02:00
parent 02fc28ca3e
commit ed005e7881
4 changed files with 80 additions and 4 deletions

View file

@ -23,9 +23,23 @@
./system/btrbk.nix
./system/yubikey.nix
./system/alt.nix
./system/lisa.nix
];
};
tron = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; };
modules = [
{
networking.hostName = "tron";
}
./system
./system/hardware-tron.nix
./system/gnome.nix
./system/btrbk.nix
./system/yubikey.nix
];
};
romulus = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; };
modules = [

View file

@ -4,7 +4,7 @@
top = "btm --battery";
linkbox = "ln -s (pwd) ~/box/";
rloft = "tmux source-file ~/.config/tmux/rloft.conf";
liftbox = "rsync -vaL --delete ~/box/ tstraube@login.server.uni-frankfurt.de:box/";
liftbox = "ssh tstraube@login.server.uni-frankfurt.de \"rm -r box/*\" && scp -vr ~/box/ tstraube@login.server.uni-frankfurt.de:box/";
ktiubox = "rsync -vaL --delete ~/box/ root@ktiu.net:/var/www/html/box/";
ymd = "date +'%Y-%m-%d'";
pulluni = "ssh tstraube@login.server.uni-frankfurt.de \"cd uni-tstraube && git pull\"";
@ -20,7 +20,7 @@
showc = "chromium-browser -app=https://user.uni-frankfurt.de/~tstraube/c/";
castget = "castget -prvC ~/.config/castget/castget.conf";
castsync = "rsync -va --remove-source-files --progress --stats ~/.local/share/podcasts/ /run/media/till/CLIP\\ JAM/Podcasts/";
musicsync = "rsync -va --progress --stats ~/media/music/sync/ /run/media/till/CLIP\\ JAM/Music/";
musicsync = "rsync -va --ignore-existing --progress --stats ~/media/music/sync/ /run/media/till/CLIP\\ JAM/Music/";
cb = "cd $(sed 's|^file://||' /home/till/.config/gtk-3.0/bookmarks | fzf --height 10% --reverse)";
univpn = "secret-tool lookup server uni-frankfurt.de account tstraube | sudo openconnect --config=/home/till/.config/openconnect/config --passwd-on-stdin";
v = "nvim";

View file

@ -147,7 +147,7 @@
set mbox='+Erledigt'
set my_junk='+Junk'
set postponed='+Drafts'
set record='+Gesendet'
set record='+Sent'
set trash='+Trash'
set crypt_auto_pgp
unset crypt_auto_smime

62
system/hardware-tron.nix Normal file
View file

@ -0,0 +1,62 @@
{ config, lib, pkgs, modulesPath, ... }:
let
subvolume = {
# device = "/dev/disk/by-uuid/6a0d25d4-0253-4467-85cc-ab3e0ef71f54";
fsType = "btrfs";
};
in
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "sdhci_pci" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" "v4l2loopback" ];
boot.extraModulePackages = [ config.boot.kernelPackages.v4l2loopback ];
boot.initrd.luks.devices."cryptroot" = {
# device = "/dev/disk/by-uuid/eaad533f-8586-4002-9c53-5aecf8e7abd8";
allowDiscards = true;
};
fileSystems."/" = subvolume // {
options = [ "subvol=root" "compress=zstd" "discard=async" ];
};
# the following subvolumes are automatically mounted and won't be snapshotted:
# /home/till/.local/share/Steam
# /home/till/.local/share/Trash
# /home/till/.cache
# /home/till/tmp
# /home/till/.mozilla/firefox/till/storage
# /home/till/.config/Mattermost/Cache
# /home/till/.config/Mattermost/Code\ Cache
fileSystems."/nix" = subvolume // {
options = [ "subvol=nix" "compress=zstd" "noatime" "discard=async" ];
};
fileSystems."/home" = subvolume // {
options = [ "subvol=home" "compress=zstd" "discard=async" ];
};
fileSystems."/boot" = {
# device = "/dev/disk/by-uuid/7362-C4C4";
fsType = "vfat";
};
swapDevices = [{
device = "/swapfile";
size = 8 * 1045;
}];
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.trackpoint.enable = true;
boot.kernelParams = [ "psmouse.elantech_smbus=0" ];
}