2024-08-02 17:55:48 -04:00
|
|
|
{ config, pkgs, ... }:
|
2024-05-07 18:02:59 -04:00
|
|
|
let
|
2024-06-24 14:26:41 -04:00
|
|
|
# Do not change this value! This tracks when NixOS was installed on your system.
|
|
|
|
stateVersion = "24.05";
|
2024-07-06 12:50:45 -04:00
|
|
|
hostName = "Shura";
|
2024-06-24 14:26:41 -04:00
|
|
|
|
2024-05-07 18:02:59 -04:00
|
|
|
# Copy bluetooth device configs
|
|
|
|
shure-aonic-bluetooth = pkgs.writeText "info" (
|
|
|
|
builtins.readFile ./bluetooth/shure-aonic-bluetooth-params
|
|
|
|
);
|
|
|
|
mano-touchpad-bluetooth = pkgs.writeText "info" (
|
|
|
|
builtins.readFile ./bluetooth/mano-touchpad-bluetooth-params
|
|
|
|
);
|
2024-05-29 19:50:11 -04:00
|
|
|
vitrix-pdp-pro-bluetooth = pkgs.writeText "info" (
|
|
|
|
builtins.readFile ./bluetooth/vitrix-pdp-pro-params
|
|
|
|
);
|
2024-02-29 09:53:34 -05:00
|
|
|
|
2024-05-07 18:02:59 -04:00
|
|
|
# Use gremlin user's monitor configuration for GDM (desktop monitor primary). See https://discourse.nixos.org/t/gdm-monitor-configuration/6356/4
|
|
|
|
monitorsXmlContent = builtins.readFile ./monitors.xml;
|
|
|
|
monitorsConfig = pkgs.writeText "gdm_monitors.xml" monitorsXmlContent;
|
2024-02-29 09:53:34 -05:00
|
|
|
in
|
|
|
|
{
|
2024-05-07 18:02:59 -04:00
|
|
|
imports = [ ./hardware-configuration.nix ];
|
2024-02-29 09:53:34 -05:00
|
|
|
|
2024-06-24 14:26:41 -04:00
|
|
|
system.stateVersion = stateVersion;
|
2024-07-06 12:50:45 -04:00
|
|
|
networking.hostName = hostName;
|
2024-02-29 09:53:34 -05:00
|
|
|
|
2024-08-29 14:01:33 -04:00
|
|
|
custom-fonts.Freight-Pro.enable = true;
|
|
|
|
|
2024-06-24 11:38:28 -04:00
|
|
|
aux.system = {
|
2024-05-07 18:02:59 -04:00
|
|
|
apps = {
|
2024-05-23 23:50:42 -04:00
|
|
|
development.enable = true;
|
2024-05-07 18:02:59 -04:00
|
|
|
dj.enable = true;
|
|
|
|
gaming.enable = true;
|
|
|
|
media.enable = true;
|
|
|
|
office.enable = true;
|
|
|
|
recording.enable = true;
|
|
|
|
social.enable = true;
|
2024-07-29 17:11:12 -04:00
|
|
|
writing.enable = true;
|
2024-05-07 18:02:59 -04:00
|
|
|
};
|
2024-06-24 14:26:41 -04:00
|
|
|
|
|
|
|
# Configure the bootloader.
|
|
|
|
bootloader = {
|
|
|
|
enable = true;
|
|
|
|
secureboot.enable = true;
|
|
|
|
tpm2.enable = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
# Change the default text editor. Options are "emacs", "nano", or "vim".
|
|
|
|
editor = "nano";
|
|
|
|
|
|
|
|
# Enable GPU support.
|
2024-06-24 13:08:18 -04:00
|
|
|
gpu.amd.enable = true;
|
2024-06-24 14:26:41 -04:00
|
|
|
|
|
|
|
packages = with pkgs; [
|
|
|
|
boinc # Boinc client
|
2024-07-16 17:03:05 -04:00
|
|
|
keepassxc # Use native instead of Flatpak due to weird performance issues
|
2024-06-24 14:26:41 -04:00
|
|
|
];
|
|
|
|
|
2024-08-29 09:14:27 -04:00
|
|
|
# Enable support for primary RAID array (just in case)
|
2024-09-06 15:26:40 -04:00
|
|
|
raid.storage.enable = true;
|
2024-08-29 09:14:27 -04:00
|
|
|
|
2024-08-16 16:49:08 -04:00
|
|
|
# Keep old generations for two weeks.
|
|
|
|
retentionPeriod = "14d";
|
2024-06-24 14:26:41 -04:00
|
|
|
|
2024-06-25 14:13:15 -04:00
|
|
|
services = {
|
|
|
|
# Run daily automatic updates.
|
|
|
|
autoUpgrade = {
|
|
|
|
enable = true;
|
|
|
|
configDir = config.secrets.nixConfigFolder;
|
|
|
|
onCalendar = "daily";
|
|
|
|
user = config.users.users.aires.name;
|
|
|
|
};
|
2024-08-23 14:16:18 -04:00
|
|
|
netdata = {
|
2024-08-23 14:49:27 -04:00
|
|
|
# FIXME: getting an error "remote node response is not understood, is it Netdata?". Disabling for now
|
|
|
|
enable = false;
|
2024-08-23 14:16:18 -04:00
|
|
|
type = "child";
|
|
|
|
url = config.secrets.services.netdata.url;
|
|
|
|
auth.apiKey = config.secrets.services.netdata.apiKey;
|
|
|
|
};
|
2024-06-25 14:13:15 -04:00
|
|
|
# Install virtual machine management tools
|
|
|
|
virtualization = {
|
|
|
|
enable = true;
|
|
|
|
host = {
|
|
|
|
user = "aires";
|
|
|
|
vmBuilds = {
|
|
|
|
enable = true;
|
|
|
|
cores = 4;
|
|
|
|
ram = 4096;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2024-06-24 12:24:21 -04:00
|
|
|
};
|
2024-05-07 18:02:59 -04:00
|
|
|
ui = {
|
2024-06-24 15:37:10 -04:00
|
|
|
flatpak = {
|
|
|
|
# Enable Flatpak support.
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
# Define Flatpak packages to install.
|
|
|
|
packages = [
|
|
|
|
"com.github.tchx84.Flatseal"
|
|
|
|
"com.github.wwmm.easyeffects"
|
|
|
|
"md.obsidian.Obsidian"
|
2024-06-26 13:19:06 -04:00
|
|
|
"org.mozilla.firefox"
|
2024-06-24 15:37:10 -04:00
|
|
|
];
|
2024-07-15 08:48:17 -04:00
|
|
|
|
|
|
|
useBindFS = true;
|
2024-06-24 15:37:10 -04:00
|
|
|
};
|
2024-06-26 13:19:06 -04:00
|
|
|
desktops.gnome = {
|
|
|
|
enable = true;
|
|
|
|
tripleBuffering.enable = true;
|
|
|
|
};
|
2024-05-07 18:02:59 -04:00
|
|
|
};
|
|
|
|
users = {
|
|
|
|
aires = {
|
|
|
|
enable = true;
|
2024-09-03 11:53:45 -04:00
|
|
|
services.syncthing.enable = true;
|
2024-05-07 18:02:59 -04:00
|
|
|
};
|
|
|
|
gremlin = {
|
|
|
|
enable = true;
|
2024-09-03 11:53:45 -04:00
|
|
|
services.syncthing.enable = true;
|
2024-05-07 18:02:59 -04:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2024-02-29 09:53:34 -05:00
|
|
|
|
2024-05-07 18:02:59 -04:00
|
|
|
# Move files into target system
|
|
|
|
systemd.tmpfiles.rules = [
|
|
|
|
# Use gremlin user's monitor config for GDM (defined above)
|
|
|
|
"L+ /run/gdm/.config/monitors.xml - - - - ${monitorsConfig}"
|
2024-02-29 09:53:34 -05:00
|
|
|
|
2024-05-07 18:02:59 -04:00
|
|
|
# Install Bluetooth device profiles
|
|
|
|
"d /var/lib/bluetooth/AC:50:DE:9F:AB:88/ 0700 root root" # First, make sure the directory exists
|
|
|
|
"L+ /var/lib/bluetooth/AC:50:DE:9F:AB:88/00:0E:DD:72:2F:0C/info - - - - ${shure-aonic-bluetooth}"
|
|
|
|
"L+ /var/lib/bluetooth/AC:50:DE:9F:AB:88/F8:5D:3C:7D:9A:00/info - - - - ${mano-touchpad-bluetooth}"
|
2024-05-29 19:50:11 -04:00
|
|
|
"L+ /var/lib/bluetooth/AC:50:DE:9F:AB:88/00:34:30:47:37:AB/info - - - - ${vitrix-pdp-pro-bluetooth}"
|
2024-05-07 18:02:59 -04:00
|
|
|
];
|
2024-02-29 09:53:34 -05:00
|
|
|
|
|
|
|
}
|