mirror of
https://gitlab.com/ahoneybun/nix-configs.git
synced 2025-05-12 11:14:02 -06:00
Update configuration.nix
This commit is contained in:
parent
3668175388
commit
837f244655
1 changed files with 90 additions and 25 deletions
|
@ -4,7 +4,6 @@
|
|||
imports =
|
||||
[
|
||||
./hardware-configuration.nix
|
||||
#./home-assistant.nix
|
||||
];
|
||||
|
||||
boot.loader = {
|
||||
|
@ -12,51 +11,80 @@
|
|||
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
|
||||
|
||||
boot.swraid = {
|
||||
enable = true;
|
||||
mdadmConf = ''
|
||||
ARRAY /dev/md/edi:DATA metadata=1.2 UUID=f0384881:84c12f70:3dcad802:653ccc30
|
||||
MAILADDR root
|
||||
'';
|
||||
# fileSystems = {
|
||||
# "/mnt/DATA" = {
|
||||
# device = "/dev/md127";
|
||||
# };
|
||||
# };
|
||||
|
||||
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 = [{
|
||||
nix.buildMachines = [{
|
||||
hostName = "localhost";
|
||||
systems = ["x86_64-linux"
|
||||
"aarch64-linux"];
|
||||
supportedFeatures = ["kvm" "nixos-test" "big-parallel" "benchmark"];
|
||||
supportedFeatures = [ "kvm" "nixos-test" "big-parallel" "benchmark" ];
|
||||
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;
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue