2024-05-07 22:02:59 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
let
|
2024-06-24 18:26:41 +00:00
|
|
|
# Do not change this value! This tracks when NixOS was installed on your system.
|
|
|
|
stateVersion = "24.05";
|
|
|
|
|
2024-05-07 22:02:59 +00:00
|
|
|
# Copy bluetooth device configs
|
|
|
|
shure-aonic-bluetooth = pkgs.writeText "info" (
|
|
|
|
builtins.readFile ./bluetooth/shure-aonic-bluetooth-params
|
|
|
|
);
|
|
|
|
xbox-elite-bluetooth = pkgs.writeText "info" (
|
|
|
|
builtins.readFile ./bluetooth/xbox-elite-controller-bluetooth-params
|
|
|
|
);
|
|
|
|
mano-touchpad-bluetooth = pkgs.writeText "info" (
|
|
|
|
builtins.readFile ./bluetooth/mano-touchpad-bluetooth-params
|
|
|
|
);
|
2024-05-29 23:50:11 +00:00
|
|
|
vitrix-pdp-pro-bluetooth = pkgs.writeText "info" (
|
|
|
|
builtins.readFile ./bluetooth/vitrix-pdp-pro-params
|
|
|
|
);
|
2024-02-29 14:53:34 +00:00
|
|
|
|
2024-05-07 22:02:59 +00: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 14:53:34 +00:00
|
|
|
in
|
|
|
|
{
|
2024-05-07 22:02:59 +00:00
|
|
|
imports = [ ./hardware-configuration.nix ];
|
2024-02-29 14:53:34 +00:00
|
|
|
|
2024-06-24 18:26:41 +00:00
|
|
|
system.stateVersion = stateVersion;
|
2024-02-29 14:53:34 +00:00
|
|
|
|
2024-06-24 15:38:28 +00:00
|
|
|
aux.system = {
|
2024-05-07 22:02:59 +00:00
|
|
|
apps = {
|
2024-05-24 03:50:42 +00:00
|
|
|
development.enable = true;
|
2024-05-07 22:02:59 +00:00
|
|
|
dj.enable = true;
|
|
|
|
gaming.enable = true;
|
|
|
|
media.enable = true;
|
|
|
|
office.enable = true;
|
|
|
|
recording.enable = true;
|
|
|
|
social.enable = true;
|
2024-06-19 18:00:17 +00:00
|
|
|
writing = {
|
|
|
|
enable = true;
|
2024-06-24 16:24:21 +00:00
|
|
|
languagetool.enable = true;
|
2024-06-19 18:00:17 +00:00
|
|
|
};
|
2024-05-07 22:02:59 +00:00
|
|
|
};
|
2024-06-24 18:26:41 +00:00
|
|
|
|
|
|
|
# Configure the bootloader.
|
|
|
|
bootloader = {
|
|
|
|
enable = true;
|
|
|
|
secureboot.enable = true;
|
|
|
|
tpm2.enable = true;
|
|
|
|
};
|
|
|
|
|
2024-07-01 13:48:14 +00:00
|
|
|
# Partition disks using Disko
|
|
|
|
disko = {
|
|
|
|
enable = false;
|
|
|
|
primaryDiskID = "nvme-eui.ace42e0025b66c912ee4ac0000000001";
|
|
|
|
swapFile = {
|
|
|
|
enable = true;
|
|
|
|
size = "16G";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-06-24 18:26:41 +00:00
|
|
|
# Change the default text editor. Options are "emacs", "nano", or "vim".
|
|
|
|
editor = "nano";
|
|
|
|
|
|
|
|
# Enable GPU support.
|
2024-06-24 17:08:18 +00:00
|
|
|
gpu.amd.enable = true;
|
2024-06-24 18:26:41 +00:00
|
|
|
|
|
|
|
packages = with pkgs; [
|
|
|
|
boinc # Boinc client
|
|
|
|
];
|
|
|
|
|
|
|
|
# Keep old generations for one week.
|
2024-06-24 18:01:51 +00:00
|
|
|
retentionPeriod = "7d";
|
2024-06-24 18:26:41 +00:00
|
|
|
|
2024-06-25 18:13:15 +00:00
|
|
|
services = {
|
|
|
|
# Run daily automatic updates.
|
|
|
|
autoUpgrade = {
|
|
|
|
enable = true;
|
|
|
|
configDir = config.secrets.nixConfigFolder;
|
|
|
|
onCalendar = "daily";
|
|
|
|
user = config.users.users.aires.name;
|
|
|
|
};
|
|
|
|
# Install virtual machine management tools
|
|
|
|
virtualization = {
|
|
|
|
enable = true;
|
|
|
|
host = {
|
|
|
|
user = "aires";
|
|
|
|
vmBuilds = {
|
|
|
|
enable = true;
|
|
|
|
cores = 4;
|
|
|
|
ram = 4096;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2024-06-24 16:24:21 +00:00
|
|
|
};
|
2024-05-07 22:02:59 +00:00
|
|
|
ui = {
|
2024-06-24 19:37:10 +00:00
|
|
|
flatpak = {
|
|
|
|
# Enable Flatpak support.
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
# Define Flatpak packages to install.
|
|
|
|
packages = [
|
|
|
|
"com.github.tchx84.Flatseal"
|
|
|
|
"com.github.wwmm.easyeffects"
|
|
|
|
"md.obsidian.Obsidian"
|
|
|
|
"org.keepassxc.KeePassXC"
|
2024-06-26 17:19:06 +00:00
|
|
|
"org.mozilla.firefox"
|
2024-06-24 19:37:10 +00:00
|
|
|
];
|
|
|
|
};
|
2024-06-26 17:19:06 +00:00
|
|
|
desktops.gnome = {
|
|
|
|
enable = true;
|
|
|
|
tripleBuffering.enable = true;
|
|
|
|
};
|
2024-05-07 22:02:59 +00:00
|
|
|
};
|
|
|
|
users = {
|
|
|
|
aires = {
|
|
|
|
enable = true;
|
|
|
|
services.syncthing = {
|
|
|
|
enable = true;
|
|
|
|
enableTray = false; # Recent versions of STT don't recognize Gnome's tray. Uninstalling for now.
|
|
|
|
};
|
|
|
|
};
|
|
|
|
gremlin = {
|
|
|
|
enable = true;
|
|
|
|
services.syncthing = {
|
|
|
|
enable = true;
|
|
|
|
enableTray = false;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2024-02-29 14:53:34 +00:00
|
|
|
|
2024-05-07 22:02:59 +00: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 14:53:34 +00:00
|
|
|
|
2024-05-07 22:02:59 +00: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/F4:6A:D7:3A:16:75/info - - - - ${xbox-elite-bluetooth}"
|
|
|
|
"L+ /var/lib/bluetooth/AC:50:DE:9F:AB:88/F8:5D:3C:7D:9A:00/info - - - - ${mano-touchpad-bluetooth}"
|
2024-05-29 23:50:11 +00: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 22:02:59 +00:00
|
|
|
];
|
2024-02-29 14:53:34 +00:00
|
|
|
|
|
|
|
}
|