Skyler Turner | 205aff1 | 2021-12-20 11:22:57 +0000 | [diff] [blame] | 1 | # Edit this configuration file to define what should be installed on |
| 2 | # your system. Help is available in the configuration.nix(5) man page |
| 3 | # and in the NixOS manual (accessible by running ‘nixos-help’). |
| 4 | |
| 5 | { config, pkgs, lib, ... }: |
| 6 | |
| 7 | { |
| 8 | imports = |
| 9 | [ # Include the results of the hardware scan. |
| 10 | ./hardware-configuration.nix |
Skyler Turner | 444ffc2 | 2021-12-20 11:28:06 +0000 | [diff] [blame] | 11 | ../secrets/networking-configuration.nix |
Skyler Turner | 205aff1 | 2021-12-20 11:22:57 +0000 | [diff] [blame] | 12 | ./packaging-configuration.nix |
| 13 | # ./eduroam.nix |
| 14 | ]; |
| 15 | |
Skyler Turner | 32dbfb4 | 2021-12-24 15:50:22 +0000 | [diff] [blame^] | 16 | # Prepare nix flakes |
| 17 | nix = { |
| 18 | package = pkgs.nixFlakes; |
| 19 | extraOptions = '' |
| 20 | experimental-features = nix-command flakes |
| 21 | ''; |
| 22 | }; |
| 23 | |
Skyler Turner | 205aff1 | 2021-12-20 11:22:57 +0000 | [diff] [blame] | 24 | # Use the systemd-boot EFI boot loader. |
| 25 | boot.loader.systemd-boot.enable = true; |
| 26 | boot.loader.efi.canTouchEfiVariables = true; |
| 27 | boot.loader.grub.useOSProber = true; |
| 28 | |
| 29 | # Enable apparmor |
| 30 | security.apparmor.enable = true; |
| 31 | security.apparmor.killUnconfinedConfinables = true; |
| 32 | |
| 33 | # Set your time zone. |
| 34 | time.timeZone = "Europe/London"; |
| 35 | |
| 36 | # Select internationalisation properties. |
| 37 | i18n.defaultLocale = "en_US.UTF-8"; |
| 38 | console = { |
| 39 | font = "Lat2-Terminus16"; |
| 40 | keyMap = "uk"; |
| 41 | }; |
| 42 | |
| 43 | # Enable the X11 windowing system. |
| 44 | services.xserver = { |
| 45 | enable = true; |
| 46 | desktopManager = { |
| 47 | xterm.enable = false; |
| 48 | # xfce.enable = true; |
| 49 | }; |
| 50 | displayManager.sddm.enable = true; |
| 51 | }; |
| 52 | |
| 53 | # And wayland |
| 54 | programs.sway = { |
| 55 | enable = true; |
| 56 | wrapperFeatures.gtk = true; # so that gtk works properly |
| 57 | extraPackages = with pkgs; [ |
| 58 | swaylock |
| 59 | swayidle |
| 60 | wl-clipboard |
| 61 | mako # notification daemon |
| 62 | alacritty # Alacritty is the default terminal in the config |
| 63 | dmenu # Dmenu is the default in the config but i recommend wofi since its wayland native |
| 64 | ]; |
| 65 | }; |
| 66 | |
| 67 | # Get screensharing to work |
| 68 | xdg = { |
| 69 | portal = { |
| 70 | enable = true; |
| 71 | extraPortals = with pkgs; [ |
| 72 | xdg-desktop-portal-wlr |
| 73 | xdg-desktop-portal-gtk |
| 74 | ]; |
| 75 | gtkUsePortal = true; |
| 76 | }; |
| 77 | }; |
| 78 | |
| 79 | # Configure keymap in X11 |
| 80 | services.xserver.layout = "gb"; |
| 81 | # services.xserver.xkbOptions = "eurosign:e"; |
| 82 | |
| 83 | |
| 84 | # Permit and install steam |
| 85 | nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ |
| 86 | "steam" |
| 87 | "steam-original" |
| 88 | "steam-runtime" |
| 89 | ]; |
| 90 | |
| 91 | programs.steam.enable = true; |
| 92 | |
| 93 | |
| 94 | # Enable CUPS to print documents. |
| 95 | services.printing.enable = true; |
| 96 | |
| 97 | # Enable sound. |
| 98 | sound.enable = true; |
| 99 | hardware.pulseaudio.enable = false; |
| 100 | services.pipewire = { |
| 101 | enable = true; |
| 102 | alsa = { |
| 103 | enable = true; |
| 104 | support32Bit = true; |
| 105 | }; |
| 106 | pulse.enable = true; |
| 107 | }; |
| 108 | |
| 109 | # Enable touchpad support (enabled default in most desktopManager). |
| 110 | services.xserver.libinput.enable = true; |
| 111 | |
| 112 | # Define a user account. Don't forget to set a password with ‘passwd’. |
| 113 | users.users.minion = { |
| 114 | isNormalUser = true; |
| 115 | extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user. |
| 116 | }; |
| 117 | |
| 118 | # List packages installed in system profile. To search, run: |
| 119 | # $ nix search wget |
| 120 | environment.systemPackages = with pkgs; [ |
| 121 | vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. |
| 122 | ((emacsPackagesNgGen emacs).emacsWithPackages (epkgs: [ |
| 123 | epkgs.vterm |
| 124 | epkgs.emacsql-sqlite |
| 125 | ])) # Emacs + vterm-module (needed for vterm) |
| 126 | wget |
| 127 | firefox |
| 128 | chromium # Install chromium if needed |
| 129 | texlive.combined.scheme-full |
| 130 | keybase # Install keybase |
| 131 | keybase-gui |
| 132 | kbfs |
| 133 | ]; |
| 134 | |
| 135 | # environment.systemPackages = [ |
| 136 | # import /scripts/jetbrains.rider.nix |
| 137 | # ]; |
| 138 | |
| 139 | fonts.fonts = with pkgs; [ |
| 140 | nerdfonts |
| 141 | noto-fonts |
| 142 | noto-fonts-cjk |
| 143 | noto-fonts-emoji |
| 144 | liberation_ttf |
| 145 | fira-code |
| 146 | fira-code-symbols |
| 147 | mplus-outline-fonts |
| 148 | dina-font |
| 149 | proggyfonts |
| 150 | roboto |
| 151 | ]; |
| 152 | |
| 153 | # Some programs need SUID wrappers, can be configured further or are |
| 154 | # started in user sessions. |
| 155 | programs.mtr.enable = true; |
| 156 | programs.gnupg.agent = { |
| 157 | enable = true; |
| 158 | enableSSHSupport = true; |
| 159 | }; |
| 160 | |
| 161 | # List services that you want to enable: |
| 162 | |
| 163 | # Enable the OpenSSH daemon. |
| 164 | services.openssh.enable = true; |
| 165 | services.keybase.enable = true; |
| 166 | services.gnome.gnome-keyring.enable = true; |
| 167 | services.i2p.enable = true; |
Skyler Turner | 32dbfb4 | 2021-12-24 15:50:22 +0000 | [diff] [blame^] | 168 | virtualisation.docker.enable = true; |
Skyler Turner | 205aff1 | 2021-12-20 11:22:57 +0000 | [diff] [blame] | 169 | |
| 170 | # This value determines the NixOS release from which the default |
| 171 | # settings for stateful data, like file locations and database versions |
| 172 | # on your system were taken. It‘s perfectly fine and recommended to leave |
| 173 | # this value at the release version of the first install of this system. |
| 174 | # Before changing this value read the documentation for this option |
| 175 | # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). |
| 176 | system.stateVersion = "21.11"; # Did you read the comment? |
| 177 | |
| 178 | } |
| 179 | |