|
| 1 | +{ config, pkgs, ... }: |
| 2 | + |
| 3 | +{ |
| 4 | + imports = |
| 5 | + [ # Include the results of the hardware scan. |
| 6 | + ./hardware-configuration.nix |
| 7 | + ]; |
| 8 | + |
| 9 | + nix.settings.experimental-features = [ "nix-command" "flakes" ]; |
| 10 | + |
| 11 | + # Bootloader. |
| 12 | + boot.loader.systemd-boot.enable = true; |
| 13 | + boot.loader.efi.canTouchEfiVariables = true; |
| 14 | + |
| 15 | + networking.hostName = "liskov"; # Define your hostname. |
| 16 | + # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. |
| 17 | + |
| 18 | + # Configure network proxy if necessary |
| 19 | + # networking.proxy.default = "http://user:password@proxy:port/"; |
| 20 | + # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; |
| 21 | + |
| 22 | + # Enable networking |
| 23 | + networking.networkmanager.enable = true; |
| 24 | + |
| 25 | + # Set your time zone. |
| 26 | + time.timeZone = "Europe/Belgrade"; |
| 27 | + |
| 28 | + # Select internationalisation properties. |
| 29 | + i18n.defaultLocale = "en_US.UTF-8"; |
| 30 | + |
| 31 | + i18n.extraLocaleSettings = { |
| 32 | + LC_ADDRESS = "en_GB.UTF-8"; |
| 33 | + LC_IDENTIFICATION = "en_GB.UTF-8"; |
| 34 | + LC_MEASUREMENT = "en_GB.UTF-8"; |
| 35 | + LC_MONETARY = "en_GB.UTF-8"; |
| 36 | + LC_NAME = "en_GB.UTF-8"; |
| 37 | + LC_NUMERIC = "en_GB.UTF-8"; |
| 38 | + LC_PAPER = "en_GB.UTF-8"; |
| 39 | + LC_TELEPHONE = "en_GB.UTF-8"; |
| 40 | + LC_TIME = "en_GB.UTF-8"; |
| 41 | + }; |
| 42 | + |
| 43 | + # NVIDIA GPU drivers |
| 44 | + hardware.graphics.enable = true; |
| 45 | + hardware.nvidia = { |
| 46 | + # Modesetting is required. |
| 47 | + modesetting.enable = true; |
| 48 | + |
| 49 | + # Use proprietary driver |
| 50 | + open = false; |
| 51 | + package = config.boot.kernelPackages.nvidiaPackages.production; |
| 52 | + |
| 53 | + nvidiaSettings = true; |
| 54 | + |
| 55 | + # Setup PRIME |
| 56 | + prime = { |
| 57 | + # Offload mode: discrete GPU used for specific tasks only |
| 58 | + offload = { |
| 59 | + enable = true; |
| 60 | + enableOffloadCmd = true; |
| 61 | + }; |
| 62 | + |
| 63 | + intelBusId = "PCI:0:2:0"; |
| 64 | + nvidiaBusId = "PCI:1:0:0"; |
| 65 | + }; |
| 66 | + }; |
| 67 | + services.xserver.videoDrivers = [ "nvidia" ]; |
| 68 | + |
| 69 | + # SDDM login manager with wayland support |
| 70 | + # services.displayManager.sddm = { |
| 71 | + # enable = true; |
| 72 | + # wayland.enable = true; |
| 73 | + # |
| 74 | + # theme = "catppuccin-frappe"; |
| 75 | + # package = pkgs.kdePackages.sddm; |
| 76 | + # }; |
| 77 | + |
| 78 | + services.greetd = { |
| 79 | + enable = true; |
| 80 | + |
| 81 | + settings = rec { |
| 82 | + initial_session = { |
| 83 | + command = "${pkgs.sway}/bin/sway"; |
| 84 | + user = "buglight"; |
| 85 | + }; |
| 86 | + |
| 87 | + default_session = initial_session; |
| 88 | + }; |
| 89 | + }; |
| 90 | + |
| 91 | + security.polkit.enable = true; |
| 92 | + |
| 93 | + # Enable the gnome-keyring secrets vault. |
| 94 | + # Will be exposed through DBus to programs willing to store secrets. |
| 95 | + services.gnome.gnome-keyring.enable = true; |
| 96 | + |
| 97 | + # Enable CUPS to print documents. |
| 98 | + services.printing.enable = true; |
| 99 | + |
| 100 | + # Enable sound with pipewire. |
| 101 | + hardware.pulseaudio.enable = false; |
| 102 | + security.rtkit.enable = true; |
| 103 | + services.pipewire = { |
| 104 | + enable = true; |
| 105 | + alsa.enable = true; |
| 106 | + alsa.support32Bit = true; |
| 107 | + pulse.enable = true; |
| 108 | + # If you want to use JACK applications, uncomment this |
| 109 | + #jack.enable = true; |
| 110 | + |
| 111 | + # use the example session manager (no others are packaged yet so this is enabled by default, |
| 112 | + # no need to redefine it in your config for now) |
| 113 | + #media-session.enable = true; |
| 114 | + }; |
| 115 | + |
| 116 | + # Enable touchpad support (enabled default in most desktopManager). |
| 117 | + services.libinput.enable = true; |
| 118 | + |
| 119 | + # Define a user account. Don't forget to set a password with ‘passwd’. |
| 120 | + users.users.buglight = { |
| 121 | + isNormalUser = true; |
| 122 | + description = "Dani"; |
| 123 | + extraGroups = [ "networkmanager" "wheel" "video" ]; |
| 124 | + packages = with pkgs; [ |
| 125 | + ]; |
| 126 | + }; |
| 127 | + |
| 128 | + # Install firefox. |
| 129 | + programs.firefox.enable = true; |
| 130 | + |
| 131 | + programs.light.enable = true; |
| 132 | + |
| 133 | + # Allow unfree packages |
| 134 | + nixpkgs.config.allowUnfree = true; |
| 135 | + |
| 136 | + # System packages |
| 137 | + environment.systemPackages = with pkgs; [ |
| 138 | + # basic utilities |
| 139 | + git |
| 140 | + neovim |
| 141 | + |
| 142 | + # media |
| 143 | + pulseaudio |
| 144 | + |
| 145 | + # notification system for sway |
| 146 | + mako |
| 147 | + |
| 148 | + # wl-copy and wl-paste for copy/paste from stdin / stdout |
| 149 | + wl-clipboard |
| 150 | + |
| 151 | + # sddm catpuccin theme |
| 152 | + (catppuccin-sddm.override { |
| 153 | + flavor = "frappe"; |
| 154 | + font = "Noto Sans"; |
| 155 | + fontSize = "16"; |
| 156 | + # background = "${./wallpaper.png}"; |
| 157 | + loginBackground = false; |
| 158 | + }) |
| 159 | + ]; |
| 160 | + |
| 161 | + # Some programs need SUID wrappers, can be configured further or are |
| 162 | + # started in user sessions. |
| 163 | + # programs.mtr.enable = true; |
| 164 | + # programs.gnupg.agent = { |
| 165 | + # enable = true; |
| 166 | + # enableSSHSupport = true; |
| 167 | + # }; |
| 168 | + |
| 169 | + # List services that you want to enable: |
| 170 | + |
| 171 | + # Enable the OpenSSH daemon. |
| 172 | + # services.openssh.enable = true; |
| 173 | + |
| 174 | + # Open ports in the firewall. |
| 175 | + # networking.firewall.allowedTCPPorts = [ ... ]; |
| 176 | + # networking.firewall.allowedUDPPorts = [ ... ]; |
| 177 | + # Or disable the firewall altogether. |
| 178 | + # networking.firewall.enable = false; |
| 179 | + |
| 180 | + # This value determines the NixOS release from which the default |
| 181 | + # settings for stateful data, like file locations and database versions |
| 182 | + # on your system were taken. It‘s perfectly fine and recommended to leave |
| 183 | + # this value at the release version of the first install of this system. |
| 184 | + # Before changing this value read the documentation for this option |
| 185 | + # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). |
| 186 | + system.stateVersion = "24.11"; # Did you read the comment? |
| 187 | + |
| 188 | +} |
0 commit comments