nix-config/modules/nixos-common.nix

230 lines
5 KiB
Nix
Raw Normal View History

{
pkgs,
inputs,
...
}: {
# ------------ System ------------
2024-03-23 19:54:24 +00:00
imports = [
./mullvad.nix
];
programs.fish.enable = true;
users.users.tacocat = {
isNormalUser = true;
2024-04-23 04:22:49 +00:00
extraGroups = ["wheel" "networkmanager" "audio" "video" "bluetooth" "kvm" "docker" "libvirtd"];
home = "/home/tacocat";
description = "Aria Nolan";
};
boot.loader = {
efi.canTouchEfiVariables = false;
grub = {
efiSupport = true;
configurationLimit = 10;
device = "nodev";
};
};
i18n.defaultLocale = "en_US.UTF-8";
console = {
font = "Lat2-Terminus16";
keyMap = "us";
};
2024-03-30 15:41:38 +00:00
networking.networkmanager = {
enable = true;
dns = "none";
};
networking.resolvconf.extraConfig = ''
name_servers="1.1.1.1 1.0.0.1 2606:4700:4700::1111 2606:4700:4700::1001"
name_server_blacklist="129.21.3.17 129.21.4.18 2620:8d:8000:0:aba:ca:daba:ec"
'';
networking.firewall.allowedTCPPorts = [2234];
# Sound
services.pipewire = {
enable = true;
alsa.enable = true;
pulse.enable = true;
jack.enable = true;
};
# Services/Hardware
hardware.opentabletdriver.enable = true;
hardware.bluetooth.enable = true;
services.blueman.enable = true;
services.printing.enable = true;
services.geoclue2.enable = true;
services.fwupd.enable = true;
security.rtkit.enable = true;
2024-03-30 15:41:38 +00:00
# services.resolved.enable = true;
services.udisks2.enable = true;
2024-01-26 22:13:17 +00:00
services.pcscd.enable = true;
2024-01-11 02:05:37 +00:00
services.openssh = {
enable = true;
settings.PasswordAuthentication = false;
};
2024-03-22 03:52:03 +00:00
services.mpd = {
enable = true;
user = "tacocat";
musicDirectory = "/data/music";
startWhenNeeded = true;
extraConfig = ''
audio_output {
type "pipewire"
name "Pipewire sound server"
}
2024-04-05 13:03:59 +00:00
replaygain "track"
2024-03-22 03:52:03 +00:00
'';
2024-04-10 17:25:00 +00:00
};
2024-03-22 03:52:03 +00:00
systemd.services.mpd.environment = {
# https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/609
XDG_RUNTIME_DIR = "/run/user/1000";
# User-id must match above user. MPD will look inside this directory for
# the PipeWire socket.
};
2024-01-22 20:28:29 +00:00
virtualisation.docker.enable = true;
2024-04-23 04:22:49 +00:00
virtualisation.libvirtd.enable = true;
2024-01-27 21:13:40 +00:00
services.udev.extraRules = ''
# 0d28:0204 DAPLink
SUBSYSTEM=="usb", ATTR{idVendor}=="0d28", ATTR{idProduct}=="0204", MODE:="666"
'';
2024-01-23 02:17:53 +00:00
services.syncthing = {
enable = true;
2024-01-26 19:14:46 +00:00
user = "tacocat";
dataDir = "/home/tacocat";
configDir = "/home/tacocat/.config/syncthing";
2024-01-25 20:39:50 +00:00
settings = {
devices = {
bicep = {
2024-01-26 19:17:00 +00:00
id = "3EPQMGY-4ZY2MCG-A43QZ5E-IKZ3CL4-AD25LCZ-YNMZTVS-OCSMU54-ZTGFYAR";
2024-01-25 20:39:50 +00:00
autoAcceptFolders = true;
};
jwst = {
2024-01-26 19:16:28 +00:00
id = "7LY5XXK-4F7MKFG-6ZCP5QH-24WT3LX-NODOWUP-JXRFAKP-MARTKOA-QJRW3QM";
2024-01-25 20:39:50 +00:00
autoAcceptFolders = true;
};
2024-01-26 21:39:34 +00:00
echo = {
id = "LW6Z6CI-PDKQUZG-725FF6F-GUZ6GH2-SFHVXVZ-37YJUC4-7ZW4EMP-TC4REAZ";
autoAcceptFolders = true;
};
2024-01-23 02:17:53 +00:00
};
2024-01-25 20:39:50 +00:00
folders = {
"/data/homework" = {
id = "homework";
2024-01-26 21:39:34 +00:00
devices = ["bicep" "jwst" "echo"];
2024-01-25 20:39:50 +00:00
};
"/data/books" = {
id = "books";
devices = ["bicep" "jwst" "echo"];
};
"/data/music" = {
id = "music";
devices = ["bicep" "jwst" "echo"];
};
"/var/lib/mpd" = {
id = "mpd state";
2024-02-17 16:47:47 +00:00
devices = ["bicep" "jwst" "echo"];
};
2024-01-23 02:57:50 +00:00
};
2024-01-23 02:17:53 +00:00
};
};
# ------------ Nix ------------
nix.settings = {
experimental-features = ["nix-command" "flakes"];
auto-optimise-store = true;
trusted-users = ["root" "tacocat"];
};
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 1w";
};
nixpkgs.config = {
allowUnfree = true;
};
programs.nix-index.enable = true;
programs.command-not-found.enable = false;
2023-12-21 06:37:09 +00:00
# ------------ Software ------------
environment = {
systemPackages = with pkgs; [
screen
2024-01-22 20:28:29 +00:00
distrobox
udiskie
pyocd
vim
exfat
encfs
ntfs3g
2024-01-11 01:46:31 +00:00
gnutls
2024-03-23 19:54:24 +00:00
inputs.agenix.packages.${system}.default
];
# remove nano
defaultPackages = with pkgs; [
perl
rsync
strace
];
};
programs.sway = {
enable = true;
wrapperFeatures.gtk = true;
extraPackages = with pkgs; [
swaylock
swayidle
brightnessctl
wl-mirror
];
};
programs.waybar.enable = true;
programs.steam.enable = true;
programs.steam.remotePlay.openFirewall = true;
# programs.steam.gamescopeSession = {
2023-12-21 06:37:09 +00:00
# enable = true;
# args = [
# "-f"
# "--expose-wayland"
# ];
# };
programs.gamemode.enable = true;
# programs.gamescope.enable = true;
2024-01-26 21:09:41 +00:00
programs.ssh.startAgent = true;
2024-01-26 22:13:17 +00:00
programs.gnupg.agent = {
enable = true;
2024-01-27 02:16:39 +00:00
# pinentryFlavor = "curses";
# enableSSHSupport = true;
2024-01-26 22:13:17 +00:00
};
2024-01-26 21:09:41 +00:00
xdg.portal = {
enable = true;
wlr.enable = true;
extraPortals = with pkgs; [
xdg-desktop-portal-gtk
];
};
gtk.iconCache.enable = true;
# ------------ Graphics ------------
hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};
}