Beacon config, beacon integration into emacs
This commit is contained in:
@@ -7,10 +7,22 @@
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
"${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix"
|
||||
"${modulesPath}/virtualisation/disk-image.nix"
|
||||
suiteModules.nixos.attic
|
||||
];
|
||||
|
||||
image.format = "raw";
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"usb_storage"
|
||||
"uas"
|
||||
"ahci"
|
||||
"nvme"
|
||||
"usbhid"
|
||||
"sd_mod"
|
||||
];
|
||||
|
||||
nixpkgs.hostPlatform = "x86_64-linux";
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nixpkgs.config.cudaSupport = true;
|
||||
@@ -28,11 +40,13 @@
|
||||
];
|
||||
};
|
||||
|
||||
security.sudo.wheelNeedsPassword = false;
|
||||
|
||||
networking.hostName = "beacon";
|
||||
time.timeZone = "Asia/Jerusalem";
|
||||
|
||||
# NetworkManager is enabled by installation-cd-minimal; configure WiFi + static IP
|
||||
# via a keyfile so it activates automatically on boot.
|
||||
networking.networkmanager.enable = true;
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
networking.useDHCP = false;
|
||||
environment.etc."NetworkManager/system-connections/Zakobar.nmconnection" = {
|
||||
mode = "0600";
|
||||
@@ -62,47 +76,27 @@
|
||||
'';
|
||||
};
|
||||
|
||||
# Storage drive (ext4, label "storage") provides persistent nix store and data dir.
|
||||
# Prerequisites — run once on the storage drive before first boot:
|
||||
# mkfs.ext4 -L storage /dev/sdX
|
||||
# mount /dev/sdX /mnt/storage
|
||||
# mkdir -p /mnt/storage/nix-rw/store /mnt/storage/nix-rw/work /mnt/storage/data
|
||||
# umount /mnt/storage
|
||||
# The drive is required to boot; boot halts if it is not plugged in.
|
||||
fileSystems."/mnt/storage" = {
|
||||
device = "/dev/disk/by-label/storage";
|
||||
fsType = "ext4";
|
||||
neededForBoot = true;
|
||||
options = ["noatime"];
|
||||
# Swap is created on first boot after boot.growPartition expands the root
|
||||
# partition to the full drive size. Non-blocking: a failure just means no
|
||||
# swap on this boot (retried next boot once the partition has grown).
|
||||
systemd.services.beacon-swap = {
|
||||
description = "Create and activate swapfile";
|
||||
after = ["systemd-growfs@-.service" "local-fs.target"];
|
||||
wantedBy = ["multi-user.target"];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
};
|
||||
script = ''
|
||||
if [ ! -f /swapfile ]; then
|
||||
dd if=/dev/zero of=/swapfile bs=1M count=16384 status=progress
|
||||
chmod 600 /swapfile
|
||||
${pkgs.util-linux}/bin/mkswap /swapfile
|
||||
fi
|
||||
${pkgs.util-linux}/bin/swapon /swapfile
|
||||
'';
|
||||
};
|
||||
|
||||
# Redirect the live CD's tmpfs rw-store to the storage drive so nix store
|
||||
# writes survive across boots and don't consume RAM.
|
||||
fileSystems."/nix/.rw-store" = lib.mkForce {
|
||||
device = "/mnt/storage/nix-rw";
|
||||
fsType = "none";
|
||||
options = ["bind"];
|
||||
depends = ["/mnt/storage"];
|
||||
neededForBoot = true;
|
||||
};
|
||||
|
||||
fileSystems."/data" = {
|
||||
device = "/mnt/storage/data";
|
||||
fsType = "none";
|
||||
options = ["bind"];
|
||||
depends = ["/mnt/storage"];
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/mnt/storage/swapfile";
|
||||
size = 16384;
|
||||
}
|
||||
];
|
||||
|
||||
# Ensure ext4 is available in initrd for the storage drive
|
||||
boot.initrd.kernelModules = ["ext4"];
|
||||
|
||||
# NVIDIA RTX 4050 — Ada Lovelace supports open kernel modules
|
||||
services.xserver.videoDrivers = ["nvidia"];
|
||||
hardware.nvidia = {
|
||||
@@ -112,7 +106,7 @@
|
||||
};
|
||||
hardware.graphics.enable = true;
|
||||
|
||||
services.getty.autologinUser = lib.mkForce "aner";
|
||||
services.getty.autologinUser = "aner";
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
@@ -135,8 +129,15 @@
|
||||
rsync
|
||||
tmux
|
||||
vim
|
||||
wget
|
||||
rclone
|
||||
pciutils
|
||||
nvtopPackages.nvidia
|
||||
cudaPackages.cudatoolkit
|
||||
cudaPackages.cudnn
|
||||
cudaPackages.nccl
|
||||
python3
|
||||
direnv
|
||||
];
|
||||
|
||||
azos.attic.enable = true;
|
||||
|
||||
+28
-5
@@ -22,7 +22,11 @@
|
||||
suiteModules.nixos.attic
|
||||
];
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
efiSupport = true;
|
||||
device = "nodev";
|
||||
};
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
nixpkgs = {
|
||||
@@ -71,7 +75,7 @@
|
||||
users.users.aner = {
|
||||
isNormalUser = true;
|
||||
description = "Aner Zakobar";
|
||||
extraGroups = ["networkmanager" "wheel" "audio" "video"];
|
||||
extraGroups = ["networkmanager" "wheel" "audio" "video" "seat" "input"];
|
||||
packages = with pkgs; [];
|
||||
};
|
||||
|
||||
@@ -91,11 +95,29 @@
|
||||
};
|
||||
|
||||
specialisation = {
|
||||
hyprland = {
|
||||
steam-big-picture = {
|
||||
configuration = {
|
||||
home-manager.users.aner = {pkgs, ...}: {
|
||||
environment.systemPackages = [pkgs.sway];
|
||||
environment.etc."sway-steam.conf".text = ''
|
||||
output * bg #000000 solid_color
|
||||
default_border none
|
||||
default_floating_border none
|
||||
exec ${pkgs.dbus}/bin/dbus-run-session -- ${pkgs.bash}/bin/bash -c "steam -tenfoot; ${pkgs.sway}/bin/swaymsg exit"
|
||||
'';
|
||||
services.seatd.enable = true;
|
||||
services.greetd.settings = lib.mkForce {
|
||||
terminal.vt = 1;
|
||||
default_session = {
|
||||
command = "${pkgs.tuigreet}/bin/tuigreet --time --user-menu --cmd '/home/aner/.login.sh'";
|
||||
user = "greeter";
|
||||
};
|
||||
initial_session = {
|
||||
command = "${pkgs.sway}/bin/sway --config /etc/sway-steam.conf";
|
||||
user = "aner";
|
||||
};
|
||||
};
|
||||
home-manager.users.aner = {lib, ...}: {
|
||||
azos.suites.exwm.enable = lib.mkForce false;
|
||||
azos.suites.hyprland.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -111,6 +133,7 @@
|
||||
killall
|
||||
brightnessctl
|
||||
exfatprogs
|
||||
gamescope
|
||||
];
|
||||
|
||||
fonts.enableDefaultPackages = true;
|
||||
|
||||
Reference in New Issue
Block a user