Update configuration.nix

This commit is contained in:
Aaron Honeycutt 2024-12-05 15:45:57 +00:00
parent 3668175388
commit 837f244655

View file

@ -4,7 +4,6 @@
imports =
[
./hardware-configuration.nix
#./home-assistant.nix
];
boot.loader = {
@ -12,30 +11,32 @@
efi.canTouchEfiVariables = true;
};
## Disabled as the drives may not be there when I install the OS.
# boot.swraid = {
# enable = true;
# mdadmConf = ''
# ARRAY /dev/md/edi:DATA metadata=1.2 UUID=f0384881:84c12f70:3dcad802:653ccc30
# MAILADDR root
# '';
# };
boot.kernelParams = [ "console=tty0" ];
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
# You can find the swraid ARRAY information with this command
# sudo mdadm --detail --scan >> mdadm.conf
# Now just copy that information into the line
## Disabled as the drives may not be there when I install the OS.
# The MAILADDR is to fix a warning for swraid
# fileSystems = {
# "/mnt/DATA" = {
# device = "/dev/md127";
# };
# };
boot.swraid = {
enable = true;
mdadmConf = ''
ARRAY /dev/md/edi:DATA metadata=1.2 UUID=f0384881:84c12f70:3dcad802:653ccc30
MAILADDR root
'';
nix.settings = {
experimental-features = [ "nix-command" "flakes" ];
extra-platforms = [ "aarch64-linux" ];
};
fileSystems = {
"/home/aaronh/DATA" = {
device = "/dev/md127";
};
};
nix.settings.extra-platforms = [ "aarch64-linux" ];
nix.buildMachines = [{
hostName = "localhost";
systems = ["x86_64-linux"
@ -44,19 +45,46 @@
maxJobs = 8;
}];
nixpkgs.config.allowUnfree = true;
# Define user accounts
users.users.aaronh = {
description = "Aaron Honeycutt";
home = "/home/aaronh";
extraGroups = [ "wheel" "networkmanager" "adm"];
extraGroups = [ "wheel" "networkmanager" "adm" "video" ];
isNormalUser = true;
hashedPassword = "$6$aAcbLtqiqzySifls$jdKMOQjoWITHD/dWNNZVUH/qNc6aoJ7v4zYofi0U7IJSVTbmOfChS3mzaJbp57AodjdPNKPrnrip8Nlh2Qanx.";
};
networking.hostName = "EDI";
# Install some packages
environment.systemPackages =
with pkgs;
[
bottom
busybox
byobu
cloudflared
ffmpeg-full
freshfetch
git
git-lfs
tmux
zola
];
hardware.graphics = {
enable = true;
};
networking.hostName = "edi";
networking.firewall = {
enable = true;
allowedTCPPorts = [ 80 443 3000 8096 8123 ];
# 2342 = PhotoPrism
# 3000 = Hydra
# 5000 = Kavita
# 8096 = Jellyfin
# 11434 = Ollama
allowedTCPPorts = [ 80 443 2342 3000 5000 8096 9091 11434 ];
};
nixpkgs.config.permittedInsecurePackages = [
@ -69,11 +97,48 @@
PermitRootLogin = "no";
};
# Services
services.hydra = {
enable = true;
hydraURL = "localhost:3000";
buildMachinesFiles = [ "/etc/nix/machines" ];
notificationSender = "hydra@localhost";
useSubstitutes = true;
};
services.ollama = {
enable = true;
acceleration = "rocm";
environmentVariables =
{
OLLAMA_HOST = "0.0.0.0";
};
};
services.tailscale.enable = true;
## These are disabled currently as I am testing this.
# systemd.services.git-update = {
# enable = true;
# description = "update website git";
# serviceConfig = {
# ExecStart = "/run/current-system/sw/bin/git -C /mnt/DATA/Website/ahoneybun.net pull";
# };
# wantedBy = [ "multi-user.target" ];
# };
# systemd.services.zola-build = {
# enable = true;
# description = "rebuild zola website";
# serviceConfig = {
# ExecStart = "/run/current-system/sw/bin/zola -r /mnt/DATA/Website/ahoneybun.net build";
# };
# wantedBy = [ "multi-user.target" ];
# };
# System
system.stateVersion = "24.11";
system.autoUpgrade.enable = true;
}