Move modules into modules/

This commit is contained in:
Dave Gallant
2023-07-09 12:28:15 -04:00
parent d2c0d94580
commit 6e19c4512d
10 changed files with 10 additions and 10 deletions

View File

@@ -0,0 +1,3 @@
{pkgs, ...}: {
nix.extraOptions = "experimental-features = nix-command flakes";
}

24
modules/common/fonts.nix Normal file
View File

@@ -0,0 +1,24 @@
{pkgs, ...}: {
# Set system-wide fonts.
fonts.fonts = with pkgs; [
dejavu_fonts
fira-code
fira-code-symbols
fira-mono
font-awesome
google-fonts
liberation_ttf
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
noto-fonts-extra
];
# Set default fonts.
fonts.fontconfig.defaultFonts = {
sansSerif = ["Noto Sans"];
serif = ["Noto Serif"];
monospace = ["Noto Sans Mono"];
emoji = ["Noto Color Emoji"];
};
}

View File

@@ -0,0 +1,31 @@
{...}: {
services.xserver = {
enable = true;
displayManager = {
gdm = {
enable = true;
wayland = false;
};
};
desktopManager = {
gnome = {
enable = true;
};
};
};
services.gnome.gnome-keyring.enable = true;
services.avahi = {
enable = true;
nssmdns = true;
publish = {
enable = true;
addresses = true;
domain = true;
hinfo = true;
userServices = true;
workstation = true;
};
};
}

63
modules/common/linux.nix Normal file
View File

@@ -0,0 +1,63 @@
{pkgs, ...}: {
boot.kernelPackages = pkgs.linuxPackages;
boot.supportedFilesystems = ["ntfs"];
system.stateVersion = "23.05";
system.autoUpgrade.enable = true;
# See: https://github.com/NixOS/nixpkgs/issues/180175
systemd.services.NetworkManager-wait-online.enable = false;
nix.extraOptions = "experimental-features = nix-command flakes";
nix.package = pkgs.nixUnstable;
nixpkgs.config = {
allowUnfree = true;
permittedInsecurePackages = [];
};
users.users.dave = {
isNormalUser = true;
extraGroups = ["docker" "wheel" "libvirtd" "corectrl"];
shell = pkgs.zsh;
};
i18n.defaultLocale = "en_US.UTF-8";
console = {
font = "Lat2-Terminus16";
keyMap = "us";
};
time.timeZone = "America/Toronto";
sound.enable = true;
hardware.pulseaudio.enable = true;
# Enable Vulkan
hardware.opengl.driSupport = true;
hardware.opengl.driSupport32Bit = true;
# Enable Steam
hardware.opengl.extraPackages32 = with pkgs.pkgsi686Linux; [libva];
hardware.pulseaudio.support32Bit = true;
programs.steam = {
enable = true;
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
};
virtualisation.docker.enable = true;
virtualisation.libvirtd.enable = true;
virtualisation.podman.enable = true;
programs.zsh.enable = true;
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
programs.corectrl.enable = true;
}

View File

@@ -0,0 +1,12 @@
{pkgs, ...}: {
services.tailscale.enable = true;
networking = {
firewall = {
allowPing = false;
enable = true;
checkReversePath = "loose";
trustedInterfaces = ["tailscale0"];
};
};
}

View File

@@ -0,0 +1,3 @@
{pkgs, ...}: {
services.printing.enable = true;
}