nixos-config/config/modules/system76-pc.nix

163 lines
4.1 KiB
Nix
Raw Normal View History

2024-07-26 23:28:04 +00:00
{ config, pkgs, ... }:
{
hardware.system76.enableAll = true;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nixpkgs.config.allowUnfree = true;
nixpkgs.config.permittedInsecurePackages = [
"electron-25.9.0"
];
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.systemd-boot.consoleMode = "auto";
2024-07-26 23:28:04 +00:00
boot.loader.efi.canTouchEfiVariables = true;
boot.initrd.systemd.enable = true;
boot.kernelParams = [ "quiet" ];
boot.plymouth.enable = true;
2024-07-27 00:08:19 +00:00
boot.plymouth.themePackages = with pkgs; [ plymouth-vortex-ubuntu-theme ];
2024-07-27 00:09:19 +00:00
boot.plymouth.theme = "vortex-ubuntu";
2024-07-26 23:28:04 +00:00
# Enable networking
networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "America/New_York";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
# Enable the X11 windowing system.
services.xserver.enable = true;
# Enable the GNOME Desktop Environment.
services.xserver.displayManager.gdm.enable = true;
services.xserver.desktopManager.gnome.enable = true;
# Configure keymap in X11
services.xserver.xkb = {
layout = "us";
variant = "";
};
2024-07-28 23:30:05 +00:00
# List packages installed in system profile. To search, run:
environment.systemPackages = with pkgs; [
2024-07-30 22:01:36 +00:00
cacert
2024-07-28 23:30:05 +00:00
direnv
dxvk
envsubst
font-manager
gparted
mesa
vulkan-extension-layer
];
2024-07-27 00:20:25 +00:00
# Hardware
hardware.graphics.enable = true;
2024-07-30 22:04:29 +00:00
hardware.graphics.enable32Bit = true; # For 32 bit applications
2024-07-30 22:01:36 +00:00
2024-07-27 00:20:25 +00:00
hardware.graphics.extraPackages = [
pkgs.intel-media-driver
];
hardware.graphics.extraPackages32 = [
pkgs.intel-media-driver
pkgs.pkgsi686Linux.libva
];
2024-07-27 00:38:50 +00:00
hardware.pulseaudio.enable = false;
2024-07-27 00:20:25 +00:00
hardware.bluetooth.enable = true;
2024-07-27 00:38:21 +00:00
services.blueman.enable = true;
2024-07-27 00:20:25 +00:00
2024-07-26 23:28:04 +00:00
# Enable CUPS to print documents.
services.printing.enable = true;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
2024-07-27 00:38:50 +00:00
pulse.enable = true;
2024-07-26 23:28:04 +00:00
};
2024-08-15 17:49:30 +00:00
# Enable Syncthing
2024-08-15 18:48:50 +00:00
services.syncthing = {
enable = true;
dataDir = "/home/alex";
openDefaultPorts = true;
configDir = "/home/alex/.config/syncthing";
user = "alex";
group = "users";
guiAddress = "127.0.0.1:8384";
settings = {
overrideDevices = true;
overrideFolders = true;
devices = {
2024-08-16 13:50:18 +00:00
"atauno" = {
id = "TXSURD2-XCKOLDG-DJ76OOK-JZXOE3Q-XXTNOIM-XR5LB2B-YWBV2ER-6KRFIQN";
autoAcceptFolders = true;
};
"iphone15" = {
id = "BW4OYWY-RIS2AX4-67UPRS6-2SPHGVQ-TNOGVCK-B3XG5TW-VT3CUZZ-YVH2NQN";
autoAcceptFolders = true;
};
"ipad9" = {
id = "LTGMW37-RAVNIDW-GXNOFTZ-4OQEBR6-APXYVWH-7VZU6SH-CWNJV72-334HUAJ";
autoAcceptFolders = true;
};
"nixos76" = {
id = "------";
autoAcceptFolders = true;
};
"oneplus8t" = {
id = "JIYG5UP-UHTO7KA-FDSIGQV-ON7YJXO-3JDAUNV-V6NJMCH-HWNOPBS-MXHHLAG";
autoAcceptFolders = true;
};
"thelio76" = {
id = "PZGASVL-XWQRFHI-MD2YC2I-UAJIR5B-KC34AA7-3BXN322-2IB7AO4-JPYIQAD";
autoAcceptFolders = true;
};
2024-08-15 18:48:50 +00:00
};
folders = {
"vaults" = {
id = "bbqnm-caya2";
path = "/home/alex/Git/obsidian-vaults";
2024-08-16 13:50:18 +00:00
devices = [ "atauno" "iphone15" "ipad9" "oneplus8t" ];
2024-08-15 18:48:50 +00:00
versioning = {
type = "staggered";
params = {
cleanInterval = "3600";
maxAge = "15768000";
};
};
};
};
};
};
2024-08-15 17:49:30 +00:00
2024-07-26 23:28:04 +00:00
# Define a user account. Don't forget to set a password with passwd.
users.users.alex = {
isNormalUser = true;
description = "Alex";
2024-08-04 17:11:11 +00:00
extraGroups = [
"networkmanager"
"wheel"
"libvirtd" # for qemu vms
"plugdev" # for android adb
];
2024-07-26 23:28:04 +00:00
};
}