Add os config for moon. move many options to ./os/common.nix

This commit is contained in:
ant 2025-06-10 13:00:57 +02:00
parent db84d7b8e3
commit 63f4c416d8
5 changed files with 226 additions and 74 deletions

73
os/moon.nix Normal file
View file

@ -0,0 +1,73 @@
{ config, pkgs, pkgs-unstable, ... }:
{
imports = [ # Include the results of the hardware scan.
./moon-hardware-configuration.nix
./common.nix
];
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "moon";
boot.kernelPackages = pkgs.linuxPackages_zen;
services.xserver.videoDrivers = [ "amdgpu" ];
hardware.graphics = {
enable = true;
extraPackages = [ pkgs.amdvlk ];
extraPackages32 = [ pkgs.driversi686Linux.amdvlk ];
};
programs.steam.enable = true;
hardware.bluetooth.enable = true;
hardware.bluetooth.powerOnBoot = true;
# Define a user account. Don't forget to set a password with passwd.
programs.fish.enable = true;
users.users.ant = {
isNormalUser = true;
shell = pkgs.fish;
description = "ant";
extraGroups = [ "networkmanager" "wheel" "video" ];
packages = with pkgs; [ ];
};
# Enable the OpenSSH daemon.
services.openssh = {
enable = true;
settings.PasswordAuthentication = false;
};
# Open ports in the firewall.
networking.firewall.allowedTCPPorts = [
42000 # warpinator
42001 # warpinator
8080
];
networking.firewall.allowedUDPPorts = [
42000 # warpinator
42001 # warpinator
];
networking.firewall.allowedTCPPortRanges = [{
from = 1714;
to = 1764;
} # KDE Connect
];
networking.firewall.allowedUDPPortRanges = [{
from = 1714;
to = 1764;
} # KDE Connect
];
networking.hosts = { "90.52.247.64" = [ "home" ]; };
programs.nix-ld.enable = true;
programs.nix-ld.libraries = with pkgs; [
mesa
];
system.stateVersion = "24.05"; # Did you read the comment?
}