dotfiles.nix/nixos/fuchsia/configuration.nix

105 lines
2.1 KiB
Nix
Raw Normal View History

2024-01-21 21:03:57 +08:00
{ pkgs, ... }:
2023-04-03 22:41:22 +08:00
2024-01-14 06:29:18 +08:00
{
2023-04-03 22:41:22 +08:00
imports = [
2024-01-14 06:29:18 +08:00
../common/global
2024-01-14 06:29:18 +08:00
../common/users/sajenim
2024-06-03 21:10:23 +08:00
../common/users/sajenim/samba
2024-06-03 20:58:34 +08:00
../common/users/sajenim/steam
2024-01-21 21:03:57 +08:00
../common/optional/key.nix
2023-04-03 22:41:22 +08:00
2024-04-01 10:04:53 +08:00
./services
2023-04-03 22:41:22 +08:00
./hardware-configuration.nix
];
2023-04-07 06:51:34 +08:00
boot = {
kernelPackages = pkgs.linuxPackages_latest;
2024-01-14 06:29:18 +08:00
kernelParams = [
# Enable amdgpu driver sysfs API that allows fine grain control of GPU
"amdgpu.ppfeaturemask=0xffffffff"
];
2023-04-07 06:51:34 +08:00
kernelModules = [ "i2c-dev" "i2c-piix4" ];
initrd.kernelModules = [ "amdgpu" ];
};
hardware = {
2024-01-01 07:18:03 +08:00
bluetooth = {
enable = true;
powerOnBoot = true;
};
2023-04-07 06:51:34 +08:00
pulseaudio = {
enable = true;
2024-01-14 06:29:18 +08:00
support32Bit = true;
2024-02-13 22:58:20 +08:00
extraConfig = "load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1";
2023-04-07 06:51:34 +08:00
};
opengl = {
enable = true;
# Vulkan
driSupport = true;
driSupport32Bit = true;
# OpenCL
extraPackages = with pkgs; [
2024-05-07 20:42:35 +08:00
rocmPackages.clr.icd
2023-04-07 06:51:34 +08:00
];
};
};
networking = {
hostName = "fuchsia";
networkmanager.enable = true;
};
2023-04-03 22:41:22 +08:00
2023-04-07 06:51:34 +08:00
programs = {
zsh.enable = true;
2024-01-16 21:11:59 +08:00
direnv.enable = true;
2024-02-13 22:57:42 +08:00
adb.enable = true;
2023-04-07 06:51:34 +08:00
};
services = {
2024-05-07 20:42:56 +08:00
# Enable necessary udev rules.
2023-04-07 06:51:34 +08:00
udev.packages = with pkgs; [
openrgb
qmk-udev-rules
];
2024-05-07 20:42:56 +08:00
# Setup our display server.
2023-04-07 06:51:34 +08:00
xserver = {
enable = true;
xkb.layout = "au";
2023-04-07 06:51:34 +08:00
videoDrivers = [ "amdgpu" ];
2023-05-02 08:52:44 +08:00
displayManager.startx.enable = true;
2023-04-03 22:41:22 +08:00
};
2024-05-07 20:43:15 +08:00
libinput = {
2024-05-07 20:43:15 +08:00
enable = true;
mouse = { accelProfile = "flat"; };
2024-05-07 20:43:15 +08:00
};
# Get up and running with large language models locally.
# ollama = {
# enable = true;
# package = pkgs.unstable.ollama;
# acceleration = "rocm";
# # environmentVariables = {
# # HSA_OVERRIDE_GFX_VERSION = "10.3.0";
# # };
# };
2024-05-07 20:42:56 +08:00
# Enable a few other services.
2024-01-01 07:19:17 +08:00
ratbagd.enable = true;
2024-01-21 21:03:57 +08:00
pcscd.enable = true;
2023-04-03 22:41:22 +08:00
};
2024-05-07 20:42:56 +08:00
# Use docker instead of podman for our containers.
2023-04-07 06:51:34 +08:00
virtualisation.docker = {
2023-04-03 22:41:22 +08:00
enable = true;
2023-04-07 06:51:34 +08:00
liveRestore = false;
};
2023-04-03 22:41:22 +08:00
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = "22.11";
}