2024-08-02 21:55:48 +00:00
|
|
|
{ config, pkgs, ... }:
|
2024-05-07 22:02:59 +00:00
|
|
|
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-07-06 16:50:45 +00:00
|
|
|
hostName = "Shura";
|
2024-06-24 18:26:41 +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-07-06 16:50:45 +00:00
|
|
|
networking.hostName = hostName;
|
2024-02-29 14:53:34 +00:00
|
|
|
|
2024-10-25 20:41:26 +00:00
|
|
|
custom-fonts.Freight-Pro.enable = config.aux.system.users.gremlin.enable;
|
2024-08-29 18:01:33 +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-07-29 21:11:12 +00:00
|
|
|
writing.enable = true;
|
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-11-06 15:42:06 +00:00
|
|
|
bluetooth.adapter = "AC:50:DE:9F:AB:88";
|
|
|
|
|
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; [
|
2024-07-16 21:03:05 +00:00
|
|
|
keepassxc # Use native instead of Flatpak due to weird performance issues
|
2024-06-24 18:26:41 +00:00
|
|
|
];
|
|
|
|
|
2024-08-29 13:14:27 +00:00
|
|
|
# Enable support for primary RAID array (just in case)
|
2024-09-06 19:26:40 +00:00
|
|
|
raid.storage.enable = true;
|
2024-08-29 13:14:27 +00:00
|
|
|
|
2024-08-16 20:49:08 +00:00
|
|
|
# Keep old generations for two weeks.
|
|
|
|
retentionPeriod = "14d";
|
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";
|
2024-11-22 15:29:35 +00:00
|
|
|
operation = "boot";
|
2024-06-25 18:13:15 +00:00
|
|
|
user = config.users.users.aires.name;
|
|
|
|
};
|
2024-08-23 18:16:18 +00:00
|
|
|
netdata = {
|
2024-10-16 20:12:40 +00:00
|
|
|
# FIXME: Disabled until I get Nginx configured to provide a streaming endpoint
|
2024-08-23 18:49:27 +00:00
|
|
|
enable = false;
|
2024-08-23 18:16:18 +00:00
|
|
|
type = "child";
|
|
|
|
url = config.secrets.services.netdata.url;
|
|
|
|
auth.apiKey = config.secrets.services.netdata.apiKey;
|
|
|
|
};
|
2024-06-25 18:13:15 +00:00
|
|
|
# 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"
|
2024-11-15 14:08:25 +00:00
|
|
|
"io.github.elevenhsoft.WebApps"
|
2024-06-24 19:37:10 +00:00
|
|
|
"md.obsidian.Obsidian"
|
2024-06-26 17:19:06 +00:00
|
|
|
"org.mozilla.firefox"
|
2024-06-24 19:37:10 +00:00
|
|
|
];
|
2024-07-15 12:48:17 +00:00
|
|
|
|
|
|
|
useBindFS = true;
|
2024-06-24 19:37:10 +00:00
|
|
|
};
|
2024-11-18 16:10:20 +00:00
|
|
|
desktops.gnome.enable = true;
|
2024-05-07 22:02:59 +00:00
|
|
|
};
|
|
|
|
users = {
|
|
|
|
aires = {
|
|
|
|
enable = true;
|
2024-11-15 21:16:22 +00:00
|
|
|
services.syncthing = {
|
|
|
|
enable = true;
|
|
|
|
enableTray = true;
|
2024-11-23 18:09:24 +00:00
|
|
|
web.enable = true;
|
2024-11-15 21:16:22 +00:00
|
|
|
};
|
2024-05-07 22:02:59 +00:00
|
|
|
};
|
2024-11-17 17:00:33 +00:00
|
|
|
gremlin.enable = true;
|
2024-05-07 22:02:59 +00:00
|
|
|
};
|
|
|
|
};
|
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
|
|
|
|
|
|
|
}
|