1
0
Fork 0
nix-configuration/systems/x86_64-linux/Shura/default.nix

123 lines
2.9 KiB
Nix
Raw Permalink Normal View History

2024-12-06 18:04:47 +00:00
{
config,
options,
2024-12-06 18:04:47 +00:00
namespace,
pkgs,
2024-12-06 18:04:47 +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";
hostName = "Shura";
2024-06-24 18:26:41 +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
{
imports = [ ./hardware-configuration.nix ];
2024-02-29 14:53:34 +00:00
2024-06-24 18:26:41 +00:00
system.stateVersion = stateVersion;
networking.hostName = hostName;
2024-02-29 14:53:34 +00:00
2024-12-06 18:04:47 +00:00
${namespace} = {
apps = {
2024-05-24 03:50:42 +00:00
development.enable = true;
gaming.enable = true;
2024-12-06 18:04:47 +00:00
media = {
enable = true;
mixxx.enable = true;
};
office.enable = true;
recording.enable = true;
social.enable = true;
2024-07-29 21:11:12 +00:00
writing.enable = true;
};
2024-06-24 18:26:41 +00:00
# Configure the bootloader.
bootloader = {
enable = true;
secureboot.enable = true;
tpm2.enable = true;
};
custom-fonts.Freight-Pro.enable = config.${namespace}.users.gremlin.enable;
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; [
keepassxc # Use native instead of Flatpak due to weird performance issues
2024-06-24 18:26:41 +00:00
];
# Enable support for primary RAID array (just in case)
raid.storage.enable = true;
# Keep one week of generations.
nix.retention = "7d";
2024-06-24 18:26:41 +00:00
powerManagement.enable = true;
2024-06-25 18:13:15 +00:00
services = {
# Run daily automatic updates.
autoUpgrade = {
enable = true;
configDir = config.${namespace}.secrets.nixConfigFolder;
2024-06-25 18:13:15 +00:00
onCalendar = "daily";
operation = "boot";
2024-06-25 18:13:15 +00:00
user = config.users.users.aires.name;
};
syncthing = {
enable = true;
home = "/home/aires/.config/syncthing";
2024-12-13 15:38:23 +00:00
tray.enable = true;
user = "aires";
web.enable = true;
};
2024-12-09 15:18:30 +00:00
tor = {
enable = true;
browser.enable = true;
snowflake-proxy.enable = true;
};
2024-06-25 18:13:15 +00:00
virtualization = {
enable = true;
host = {
user = "aires";
vmBuilds = {
enable = true;
cores = 4;
ram = 4096;
};
};
};
2024-06-24 16:24:21 +00:00
};
ui = {
flatpak = {
enable = true;
useBindFS = true;
packages = options.${namespace}.ui.flatpak.packages.default;
};
2024-11-18 16:10:20 +00:00
desktops.gnome.enable = true;
};
users = {
aires.enable = true;
gremlin.enable = true;
};
};
2024-02-29 14:53:34 +00:00
# Mount Gremlin's Notes folder
2024-11-25 19:01:47 +00:00
fileSystems."/home/gremlin/Documents/Notes" = {
2024-11-27 15:18:00 +00:00
device = "/home/aires/Documents/Notes";
options = [ "bind" ];
};
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
}