mirror of
https://github.com/davegallant/nix-config
synced 2025-08-07 21:32:27 +00:00
Move modules into modules/
This commit is contained in:
3
modules/common/darwin.nix
Normal file
3
modules/common/darwin.nix
Normal file
@@ -0,0 +1,3 @@
|
||||
{pkgs, ...}: {
|
||||
nix.extraOptions = "experimental-features = nix-command flakes";
|
||||
}
|
24
modules/common/fonts.nix
Normal file
24
modules/common/fonts.nix
Normal 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"];
|
||||
};
|
||||
}
|
31
modules/common/linux-desktop.nix
Normal file
31
modules/common/linux-desktop.nix
Normal 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
63
modules/common/linux.nix
Normal 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;
|
||||
}
|
12
modules/common/networking.nix
Normal file
12
modules/common/networking.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
{pkgs, ...}: {
|
||||
services.tailscale.enable = true;
|
||||
|
||||
networking = {
|
||||
firewall = {
|
||||
allowPing = false;
|
||||
enable = true;
|
||||
checkReversePath = "loose";
|
||||
trustedInterfaces = ["tailscale0"];
|
||||
};
|
||||
};
|
||||
}
|
3
modules/common/printing.nix
Normal file
3
modules/common/printing.nix
Normal file
@@ -0,0 +1,3 @@
|
||||
{pkgs, ...}: {
|
||||
services.printing.enable = true;
|
||||
}
|
Reference in New Issue
Block a user