2023-08-02 10:06:47 -04:00
|
|
|
|
{ config, pkgs, nixpkgs, ... }:
|
2023-07-25 13:25:23 -04:00
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
imports =
|
|
|
|
|
[
|
|
|
|
|
./hardware-configuration.nix
|
2023-08-01 12:48:49 -04:00
|
|
|
|
# Enable Nvidia driver and CUDA
|
|
|
|
|
./nvidia.nix
|
2023-07-27 14:53:50 -04:00
|
|
|
|
# Set of Modules Defining System Configuration
|
|
|
|
|
./modules.nix
|
2023-07-28 10:56:58 -04:00
|
|
|
|
# Set of system services, like ssh, and RDP/VNC
|
|
|
|
|
./services.nix
|
2023-08-31 10:28:14 -04:00
|
|
|
|
# Public facing/outward facing servers (XPRA, Git(lab|ea))
|
|
|
|
|
./servers.nix
|
2023-07-27 13:14:02 -04:00
|
|
|
|
# Set of System Wide Available Packages
|
|
|
|
|
./packages.nix
|
2023-07-27 14:53:50 -04:00
|
|
|
|
# Set of Users on This System
|
|
|
|
|
./users.nix
|
2023-10-19 10:05:26 -04:00
|
|
|
|
# Disable sleep (so SSH remains accessible)
|
|
|
|
|
./nosleep.nix
|
2023-07-25 13:25:23 -04:00
|
|
|
|
];
|
|
|
|
|
|
2024-02-06 11:01:16 -05:00
|
|
|
|
sops.age.keyFile = "/root/.config/sops/age/keys.txt";
|
2023-10-31 11:22:35 -04:00
|
|
|
|
sops.defaultSopsFile = ./secrets/system.yaml;
|
|
|
|
|
|
2023-09-14 12:34:17 -04:00
|
|
|
|
# Support NTFS(3g)
|
|
|
|
|
boot.supportedFilesystems = ["ntfs"];
|
|
|
|
|
|
2023-08-17 09:34:01 -04:00
|
|
|
|
networking.firewall.enable = true;
|
2023-07-28 12:23:02 -04:00
|
|
|
|
|
2023-07-25 13:25:23 -04:00
|
|
|
|
# Use the systemd-boot EFI boot loader.
|
|
|
|
|
boot.loader.systemd-boot.enable = true;
|
|
|
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
|
|
|
|
|
|
|
|
|
networking.hostName = "kcnhub";
|
|
|
|
|
|
|
|
|
|
time.timeZone = "America/Toronto";
|
|
|
|
|
|
|
|
|
|
# Enable the X11 windowing system.
|
|
|
|
|
services.xserver.enable = true;
|
|
|
|
|
|
2023-07-28 12:23:02 -04:00
|
|
|
|
# Enable KDE Plasma
|
|
|
|
|
services.xserver.displayManager.sddm.enable = true;
|
|
|
|
|
services.xserver.desktopManager.plasma5.enable = true;
|
2023-07-25 13:25:23 -04:00
|
|
|
|
|
|
|
|
|
# Enable CUPS to print documents.
|
|
|
|
|
services.printing.enable = true;
|
|
|
|
|
|
|
|
|
|
# Enable sound.
|
|
|
|
|
security.rtkit.enable = true;
|
|
|
|
|
services.pipewire = {
|
|
|
|
|
enable = true;
|
|
|
|
|
alsa.enable = true;
|
|
|
|
|
alsa.support32Bit = true;
|
|
|
|
|
pulse.enable = true;
|
|
|
|
|
jack.enable = true;
|
|
|
|
|
};
|
|
|
|
|
# Disable Pulseaudio -- we get its features through pipewire
|
|
|
|
|
hardware.pulseaudio.enable = false;
|
|
|
|
|
|
|
|
|
|
# TODO: Define module for adding users & their ssh keys & what projects they have in their home folder
|
|
|
|
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
|
|
|
|
# users.users.alice = {
|
|
|
|
|
# isNormalUser = true;
|
|
|
|
|
# extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
|
|
|
|
# packages = with pkgs; [
|
|
|
|
|
# firefox
|
|
|
|
|
# thunderbird
|
|
|
|
|
# ];
|
|
|
|
|
# };
|
|
|
|
|
|
|
|
|
|
# TODO: Make set of themed packages for packages that are available, e.g. Python packages, Matlab, Octave, etc.
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
2023-07-27 16:15:53 -04:00
|
|
|
|
# Needed to manage Flake
|
2023-07-25 13:25:23 -04:00
|
|
|
|
git
|
2023-07-27 16:15:53 -04:00
|
|
|
|
# Needed to use secrets
|
|
|
|
|
sops
|
|
|
|
|
# Used for Key Generation
|
|
|
|
|
age
|
2023-07-25 13:25:23 -04:00
|
|
|
|
];
|
|
|
|
|
|
2023-08-02 10:06:47 -04:00
|
|
|
|
nix.registry.nixpkgs.flake = nixpkgs;
|
|
|
|
|
|
2023-07-25 13:25:23 -04:00
|
|
|
|
# Open ports in the firewall.
|
|
|
|
|
# networking.firewall.allowedTCPPorts = [ ... ];
|
|
|
|
|
# networking.firewall.allowedUDPPorts = [ ... ];
|
|
|
|
|
# Or disable the firewall altogether.
|
|
|
|
|
# networking.firewall.enable = false;
|
|
|
|
|
|
|
|
|
|
# Copy the NixOS configuration file and link it from the resulting system
|
|
|
|
|
# (/run/current-system/configuration.nix). This is useful in case you
|
|
|
|
|
# accidentally delete configuration.nix.
|
|
|
|
|
# system.copySystemConfiguration = true;
|
|
|
|
|
|
|
|
|
|
# This value determines the NixOS release from which the default
|
|
|
|
|
# settings for stateful data, like file locations and database versions
|
|
|
|
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
|
|
|
|
# this value at the release version of the first install of this system.
|
|
|
|
|
# Before changing this value read the documentation for this option
|
|
|
|
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
|
|
|
|
system.stateVersion = "22.11"; # Did you read the comment?
|
|
|
|
|
}
|
|
|
|
|
|