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 | |
Skyler Turner | 7b0051e | 2021-12-29 15:46:56 +0000 | [diff] [blame] | 29 | # Enable emulated systems |
Skyler Turner | 107ae41 | 2021-12-29 18:34:59 +0000 | [diff] [blame] | 30 | boot.binfmt.emulatedSystems = [ "aarch64-linux" "armv6l-linux" ]; |
Skyler Turner | 7b0051e | 2021-12-29 15:46:56 +0000 | [diff] [blame] | 31 | |
Skyler Turner | 205aff1 | 2021-12-20 11:22:57 +0000 | [diff] [blame] | 32 | # Enable apparmor |
| 33 | security.apparmor.enable = true; |
| 34 | security.apparmor.killUnconfinedConfinables = true; |
| 35 | |
Skyler Turner | 36f86f0 | 2022-01-09 14:19:34 +0000 | [diff] [blame^] | 36 | # Change the sudo askpass program |
| 37 | security.sudo.extraConfig = '' |
| 38 | Plugin askpass /nix/store/5x5y8amldf8p1llwsv60jalmfy51aq51-ssh-askpass-fullscreen-1.2/bin/ssh-askpass-fullscreen |
| 39 | '' |
| 40 | |
Skyler Turner | 205aff1 | 2021-12-20 11:22:57 +0000 | [diff] [blame] | 41 | # Set your time zone. |
| 42 | time.timeZone = "Europe/London"; |
| 43 | |
| 44 | # Select internationalisation properties. |
| 45 | i18n.defaultLocale = "en_US.UTF-8"; |
| 46 | console = { |
| 47 | font = "Lat2-Terminus16"; |
| 48 | keyMap = "uk"; |
| 49 | }; |
| 50 | |
| 51 | # Enable the X11 windowing system. |
| 52 | services.xserver = { |
| 53 | enable = true; |
| 54 | desktopManager = { |
| 55 | xterm.enable = false; |
| 56 | # xfce.enable = true; |
| 57 | }; |
Skyler Turner | f0e4f3e | 2022-01-09 13:46:00 +0000 | [diff] [blame] | 58 | # displayManager.startx.enable = true; |
| 59 | displayManager.sddm.enable = true; |
Skyler Turner | 205aff1 | 2021-12-20 11:22:57 +0000 | [diff] [blame] | 60 | }; |
| 61 | |
| 62 | # And wayland |
| 63 | programs.sway = { |
| 64 | enable = true; |
| 65 | wrapperFeatures.gtk = true; # so that gtk works properly |
| 66 | extraPackages = with pkgs; [ |
| 67 | swaylock |
| 68 | swayidle |
| 69 | wl-clipboard |
| 70 | mako # notification daemon |
| 71 | alacritty # Alacritty is the default terminal in the config |
Skyler Turner | 205aff1 | 2021-12-20 11:22:57 +0000 | [diff] [blame] | 72 | ]; |
| 73 | }; |
| 74 | |
| 75 | # Get screensharing to work |
| 76 | xdg = { |
| 77 | portal = { |
| 78 | enable = true; |
| 79 | extraPortals = with pkgs; [ |
| 80 | xdg-desktop-portal-wlr |
| 81 | xdg-desktop-portal-gtk |
| 82 | ]; |
| 83 | gtkUsePortal = true; |
| 84 | }; |
| 85 | }; |
| 86 | |
| 87 | # Configure keymap in X11 |
| 88 | services.xserver.layout = "gb"; |
| 89 | # services.xserver.xkbOptions = "eurosign:e"; |
| 90 | |
| 91 | |
| 92 | # Permit and install steam |
| 93 | nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ |
| 94 | "steam" |
| 95 | "steam-original" |
| 96 | "steam-runtime" |
| 97 | ]; |
| 98 | |
| 99 | programs.steam.enable = true; |
| 100 | |
| 101 | |
| 102 | # Enable CUPS to print documents. |
| 103 | services.printing.enable = true; |
| 104 | |
| 105 | # Enable sound. |
| 106 | sound.enable = true; |
| 107 | hardware.pulseaudio.enable = false; |
| 108 | services.pipewire = { |
| 109 | enable = true; |
| 110 | alsa = { |
| 111 | enable = true; |
| 112 | support32Bit = true; |
| 113 | }; |
| 114 | pulse.enable = true; |
| 115 | }; |
| 116 | |
| 117 | # Enable touchpad support (enabled default in most desktopManager). |
| 118 | services.xserver.libinput.enable = true; |
| 119 | |
| 120 | # Define a user account. Don't forget to set a password with ‘passwd’. |
| 121 | users.users.minion = { |
| 122 | isNormalUser = true; |
| 123 | extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user. |
| 124 | }; |
| 125 | |
| 126 | # List packages installed in system profile. To search, run: |
| 127 | # $ nix search wget |
| 128 | environment.systemPackages = with pkgs; [ |
| 129 | vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. |
| 130 | ((emacsPackagesNgGen emacs).emacsWithPackages (epkgs: [ |
| 131 | epkgs.vterm |
| 132 | epkgs.emacsql-sqlite |
| 133 | ])) # Emacs + vterm-module (needed for vterm) |
| 134 | wget |
| 135 | firefox |
| 136 | chromium # Install chromium if needed |
| 137 | texlive.combined.scheme-full |
| 138 | keybase # Install keybase |
| 139 | keybase-gui |
| 140 | kbfs |
Skyler Turner | 36f86f0 | 2022-01-09 14:19:34 +0000 | [diff] [blame^] | 141 | ssh-askpass-fullscreen |
Skyler Turner | 205aff1 | 2021-12-20 11:22:57 +0000 | [diff] [blame] | 142 | ]; |
| 143 | |
| 144 | # environment.systemPackages = [ |
| 145 | # import /scripts/jetbrains.rider.nix |
| 146 | # ]; |
| 147 | |
| 148 | fonts.fonts = with pkgs; [ |
| 149 | nerdfonts |
| 150 | noto-fonts |
| 151 | noto-fonts-cjk |
| 152 | noto-fonts-emoji |
| 153 | liberation_ttf |
| 154 | fira-code |
| 155 | fira-code-symbols |
| 156 | mplus-outline-fonts |
| 157 | dina-font |
| 158 | proggyfonts |
| 159 | roboto |
| 160 | ]; |
| 161 | |
| 162 | # Some programs need SUID wrappers, can be configured further or are |
| 163 | # started in user sessions. |
| 164 | programs.mtr.enable = true; |
| 165 | programs.gnupg.agent = { |
| 166 | enable = true; |
| 167 | enableSSHSupport = true; |
| 168 | }; |
| 169 | |
| 170 | # List services that you want to enable: |
| 171 | |
| 172 | # Enable the OpenSSH daemon. |
| 173 | services.openssh.enable = true; |
| 174 | services.keybase.enable = true; |
| 175 | services.gnome.gnome-keyring.enable = true; |
| 176 | services.i2p.enable = true; |
Skyler Turner | 32dbfb4 | 2021-12-24 15:50:22 +0000 | [diff] [blame] | 177 | virtualisation.docker.enable = true; |
Skyler Turner | f0e4f3e | 2022-01-09 13:46:00 +0000 | [diff] [blame] | 178 | virtualisation.containerd.enable = true; |
Skyler Turner | 205aff1 | 2021-12-20 11:22:57 +0000 | [diff] [blame] | 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 = "21.11"; # Did you read the comment? |
| 187 | |
| 188 | } |
| 189 | |