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