# 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’). { lib, config, pkgs, ... }: let flake-compat = builtins.fetchTarball "https://github.com/edolstra/flake-compat/archive/master.tar.gz"; hyprland = (import flake-compat { src = builtins.fetchTarball "https://github.com/hyprwm/Hyprland/archive/master.tar.gz"; }).defaultNix; in { imports = [ ./hardware-configuration.nix hyprland.nixosModules.default ]; nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "broadcom-sta" ]; nix.settings = { experimental-features = [ "nix-command" ]; substituters = ["https://hyprland.cachix.org"]; trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="]; }; # Use the systemd-boot EFI boot loader. boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; networking.hostName = "nixbookpro"; # 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. # Set your time zone. time.timeZone = "Europe/London"; # Configure network proxy if necessary # networking.proxy.default = "http://user:password@proxy:port/"; # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; # Select internationalisation properties. i18n.defaultLocale = "en_GB.UTF-8"; console = { font = "Lat2-Terminus16"; }; # use pipewire hardware.pulseaudio.enable = false; security.rtkit.enable = true; services.pipewire = { enable = true; alsa.enable = true; alsa.support32Bit = true; pulse.enable = true; jack.enable = true; }; security.pam.services.swaylock = {}; # Configure graphical stuff services.xserver = { enable = true; layout = "gb"; xkbVariant = "dvorak"; libinput.enable = true; displayManager.lightdm.enable = true; }; qt5.enable = true; qt5.platformTheme = "gtk2"; qt5.style = "gtk2"; # Enable CUPS to print documents. services.printing.enable = true; # enable flatpaks services.flatpak.enable = true; xdg.portal.enable = true; # Define a user account. Don't forget to set a password with ‘passwd’. users.users.tristan = { isNormalUser = true; extraGroups = [ "wheel" "video" ]; initialPassword = "pass"; shell = pkgs.zsh; }; users.users.guest = { isNormalUser = true; extraGroups = [ ]; initialPassword = "pass"; }; # List packages installed in system profile. To search, run: # $ nix search wget environment.systemPackages = with pkgs; [ gnome.gnome-software # discover tealdeer alsa-utils ]; services.dbus.enable = true; programs.light.enable = true; programs.zsh.enable = true; programs.dconf.enable = true; programs.hyprland = { enable = true; xwayland.enable = true; }; # Some programs need SUID wrappers, can be configured further or are # started in user sessions. # programs.mtr.enable = true; programs.gnupg.agent = { enable = true; enableSSHSupport = true; }; # List services that you want to enable: # Enable the OpenSSH daemon. services.openssh.enable = true; services.tailscale.enable = true; # Open ports in the firewall. networking.firewall.allowedTCPPorts = [ 8080 8081 ]; # 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.05"; # Did you read the comment? }