# Edit this configuration file to define what should be installed on # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). { inputs, config, pkgs, lib, ... }: let nvidia-offload = pkgs.writeShellScriptBin "nvidia-offload" '' export __NV_PRIME_RENDER_OFFLOAD=1 export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0 export __GLX_VENDOR_LIBRARY_NAME=nvidia export __VK_LAYER_NV_optimus=NVIDIA_only exec "$@" ''; in { imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix # ../../modules/appimage.nix ../../modules/sudo.nix ../../modules/wm/x.nix ../../modules/wm/xmonad/default.nix ]; # Use the systemd-boot EFI boot loader. boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; boot.loader.timeout = 5; # do not protect the kernel image to allow hibernation security.protectKernelImage = lib.mkForce false; networking.hostName = "dregil"; # Define your hostname. # Pick only one of the below networking options. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. networking.extraHosts = '' 127.0.0.1 localhost dregil.localdomain dregil ''; i18n = { extraLocaleSettings = { LC_TIME = "sv_SE.UTF-8"; # iso foramt }; extraLocales = "all"; defaultLocale = "en_US.UTF-8"; }; console = { font = "Lat2-Terminus16"; keyMap = "dvorak"; }; fonts = { enableDefaultPackages = true; packages = with pkgs; [ corefonts noto-fonts noto-fonts-color-emoji fira-code fira-code-symbols ] ++ builtins.filter lib.attrsets.isDerivation (builtins.attrValues pkgs.nerd-fonts); }; # Enable CUPS to print documents. # services.printing.enable = true; # rtkit is optional but recommended 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; }; # List packages installed in system profile. To search, run: # $ nix search wget environment.systemPackages = with pkgs; [ wget ripgrep git nvidia-offload pinentry-qt ]; # adjust channels to nixpkgs used on this system via this flake environment.etc."nix/inputs/nixpkgs".source = inputs.nixpkgs.outPath; nix.nixPath = [ "nixpkgs=${inputs.nixpkgs}" ]; nix.settings.max-jobs = 3; nix.settings.cores = 4; programs.neovim = { enable = true; }; programs.steam = { enable = true; }; programs.zsh = { enable = true; }; # List services that you want to enable: # Enable the OpenSSH daemon. services.openssh.enable = true; services.blueman.enable = true; # Open ports in the firewall # 22000, 21027 syncthing discovery and connectivity networking.firewall.allowedTCPPorts = [ 5223 22000 ]; networking.firewall.allowedUDPPorts = [ 21027 22000 ]; # Or disable the firewall altogether. # networking.firewall.enable = false; # 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? }