move machine specific files to their own directory
Some checks failed
/ build-all (push) Failing after 2s

This commit is contained in:
ant 2025-09-01 22:42:42 +02:00
parent 058d223259
commit 34e8ea67fc
5 changed files with 7 additions and 7 deletions

133
os/basado/configuration.nix Normal file
View file

@ -0,0 +1,133 @@
{ config, pkgs, ... }:
let sshKeys = with (import ../sshKeys.nix); [
moon
];
in
{
imports = [
./hardware-configuration.nix
../common.nix
../common-graphics.nix
(import ../remote-disk-unlock.nix sshKeys)
];
boot.loader = {
grub = {
enable = true;
efiSupport = true;
device = "nodev";
configurationLimit = 20;
};
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/boot";
};
};
# unlock over ssh
# boot.initrd = {
# availableKernelModules = [ "igb" ];
# network = {
# enable = true;
# udhcpc = {
# enable = true;
# extraArgs = [ "--background" "--retries" "1" ];
# };
# flushBeforeStage2 = true;
# ssh = {
# enable = true;
# port = 22;
# authorizedKeys = [
# "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKCTCKcHgCZOlGeCEz0+HcoYMyXzFy3l3igsG+nhMC8Z ant@moon "
# ];
# # hostKeys = [ "/etc/secrets/initrd/ssh_host_ed25519_key" ];
# hostKeys = [ "/etc/ssh/ssh_host_ed25519_key" ];
# };
# postCommands = ''
# # Automatically ask for the password on SSH login
# echo 'cryptsetup-askpass || echo "Unlock was successful; exiting SSH session" && exit 1' >> /root/.profile
# '';
# };
# };
hardware.bluetooth.enable = true; # enables support for Bluetooth
hardware.bluetooth.powerOnBoot = true; # powers up the default Bluetooth controller on boot
swapDevices = [{
device = "/var/lib/swapfile";
size = 64 * 1024;
}];
boot.kernelParams = [ "quiet" "amd_iommu=on" ];
boot.supportedFilesystems = [ "ntfs" ];
networking.hostName = "basado"; # Define your hostname.
users.users.ant = {
isNormalUser = true;
shell = pkgs.fish;
description = "ant";
extraGroups =
[ "networkmanager" "wheel" "video" "libvirtd" "msr" "docker" ];
packages = with pkgs; [ ];
};
users.users.anvaure = {
isNormalUser = true;
shell = pkgs.fish;
extraGroups =
[ "networkmanager" "video" "libvirtd" "msr" "docker" ];
packages = with pkgs; [ ];
};
fileSystems."/home/ant/disk1" = {
device = "/dev/disk/by-uuid/3c0cd1c9-a7d1-4e6b-834a-297a0c10f11a";
fsType = "ext4";
};
fileSystems."/home/ant/disk2" = {
device = "/dev/disk/by-uuid/519c0a56-fab0-408e-bc8f-23f63ad618c7";
fsType = "ext4";
};
# NVIDIA
services.xserver.videoDrivers = [ "nvidia" ];
hardware.nvidia = {
package = config.boot.kernelPackages.nvidiaPackages.beta;
modesetting.enable = true;
powerManagement.enable = false;
powerManagement.finegrained = false;
open = true;
nvidiaSettings = false;
};
services.openssh = {
enable = true;
settings.X11Forwarding = true;
settings.PasswordAuthentication = false;
openFirewall = true;
};
virtualisation.docker = { enable = true; };
virtualisation.libvirtd.enable = true;
programs.virt-manager.enable = true;
services.ollama = {
enable = true;
acceleration = "cuda";
};
services.open-webui = {
enable = true;
};
services.immich.enable = true;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.05"; # Did you read the comment?
services.udev.packages = [
pkgs.android-udev-rules
];
}

View file

@ -0,0 +1,51 @@
# 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 = [ "xhci_pci" "ahci" "nvme" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/f1848c14-f0c2-4753-8493-03489322459a";
fsType = "ext4";
};
boot.initrd.luks.devices."luks-805f30ed-2c7b-494b-ac87-e9542d479a77".device = "/dev/disk/by-uuid/805f30ed-2c7b-494b-ac87-e9542d479a77";
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/3DAD-3605";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
fileSystems."/home/ant/disk2" =
{ device = "/dev/disk/by-uuid/519c0a56-fab0-408e-bc8f-23f63ad618c7";
fsType = "ext4";
};
fileSystems."/home/ant/disk1" =
{ device = "/dev/disk/by-uuid/3c0cd1c9-a7d1-4e6b-834a-297a0c10f11a";
fsType = "ext4";
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp9s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp8s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}