# sudo nix-channel --add https://github.com/NixOS/nixos-hardware/archive/master.tar.gz nixos-hardware # sudo nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager let systemInformation = import ./system/system-information.nix; in { config, pkgs, lib, ... }: { networking.hostName = systemInformation.hostname; imports = [ ./configs/filesystems.nix ./system/hardware-requirements.nix ]; # Bootloader boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.efiSysMountPoint = "/boot/efi"; boot.kernelParams = [ # Power efficiency # https://wiki.archlinux.org/title/Power_management#Kernel_parameters "nmi_watchdog=0" ]; boot.kernel.sysctl = { # Set IO batching to 2 minutes for power reasons "vm.dirty_writeback_centisecs" = 12000; }; # Setup keyfile boot.initrd.secrets = { "/crypto_keyfile.bin" = null; }; # Enable networking networking.networkmanager.enable = true; powerManagement.cpuFreqGovernor = "powersave"; # 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; services.logind.lidSwitch = "ignore"; # Enable the GNOME Desktop Environment. services.xserver.displayManager.gdm.enable = true; services.xserver.desktopManager.gnome.enable = true; # Configure keymap in X11 services.xserver = { layout = "us"; xkbVariant = "3l"; }; # Enable CUPS to print documents. services.printing.enable = true; # Enable sound with pipewire. sound.enable = true; hardware.pulseaudio.enable = false; security.rtkit.enable = true; services.pipewire = { enable = true; alsa.enable = true; alsa.support32Bit = true; pulse.enable = true; # If you want to use JACK applications, uncomment this #jack.enable = true; # use the example session manager (no others are packaged yet so this is enabled by default, # no need to redefine it in your config for now) #media-session.enable = true; }; # Define a user account. Don't forget to set a password with ‘passwd’. users.users.ember = { uid = 1312; isNormalUser = true; description = "Ember"; extraGroups = [ "networkmanager" "wheel" ]; shell = pkgs.fish; }; home-manager.users.ember = import ./configs/home.full.nix; # Allow unfree packages nixpkgs.config.allowUnfree = true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; # List packages installed in system profile. To search, run: environment.systemPackages = with pkgs; [ wget gnumake htop wl-clipboard unzip vlc file pavucontrol gst_all_1.gstreamer gst_all_1.gst-plugins-base gst_all_1.gst-libav gst_all_1.gst-vaapi gst_all_1.gst-plugins-bad gst_all_1.gst-plugins-good gst_all_1.gst-plugins-ugly ]; environment.gnome.excludePackages = with pkgs.gnome; [ gnome-terminal gnome-music gedit geary totem ]; # List services that you want to enable: services = { flatpak = { enable = true; }; fwupd.enable = true; syncthing = { enable = true; dataDir = "/home/ember"; configDir = "/home/ember/.config/syncthing"; user = "ember"; devices = { oak.name = "🌳 Oak"; oak.id = "MQBRJVF-GDHYWZ3-LIDUX2H-3Z2AQ2G-QPTQWHN-YUJ454D-CWT4HHU-GGPPTAW"; mugwort.name = "🌿 Mugwort"; mugwort.id = "GVJZF4E-5BYFG7U-P6KZPLL-CSM3O3H-JOJUZIX-YGZ3QXM-CHWTA4J-AG6KFQK"; kudzu.name = "🥦 Kudzu"; kudzu.id = "RQUVE3L-D345NMM-4KUE7D6-PCJ3HIO-VFZNYJ6-BNF2YH3-6UBCXF7-NS5YKQR"; }; folders."~/Sync/" = { devices = ["oak" "kudzu" "mugwort"]; id = "xuwnn-mknwe"; label = "Sync"; }; overrideDevices = true; #overrideFolders = true; }; }; # Enable the OpenSSH daemon. # services.openssh.enable = true; # Open ports in the firewall. # networking.firewall.allowedTCPPorts = [ ... ]; # networking.firewall.allowedUDPPorts = [ ... ]; # Or disable the firewall altogether. networking.firewall.enable = false; networking.hosts = { "162.255.119.254" = ["www.librepunk.club"]; "129.21.49.69" = ["www.librepunk.club"]; }; # 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? # Set up hardware acceleration # https://nixos.wiki/wiki/Accelerated_Video_Playback hardware.opengl = { enable = true; extraPackages = with pkgs; [ intel-compute-runtime intel-media-driver # LIBVA_DRIVER_NAME=iHD vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium) vaapiVdpau libvdpau-va-gl ]; }; hardware.enableAllFirmware = true; hardware.cpu.intel.updateMicrocode = systemInformation.isIntel; # high-resolution display hardware.video.hidpi.enable = systemInformation.isHiDPI; }