blob: 28c001ccf3811256db1821ebff0e4262f032d6b2 [file] [log] [blame]
Skyler Turner205aff12021-12-20 11:22:57 +00001# 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 Turner444ffc22021-12-20 11:28:06 +000011 ../secrets/networking-configuration.nix
Skyler Turner205aff12021-12-20 11:22:57 +000012 ./packaging-configuration.nix
13# ./eduroam.nix
14 ];
15
Skyler Turner32dbfb42021-12-24 15:50:22 +000016 # Prepare nix flakes
17 nix = {
18 package = pkgs.nixFlakes;
19 extraOptions = ''
20 experimental-features = nix-command flakes
21 '';
22 };
23
Skyler Turner205aff12021-12-20 11:22:57 +000024 # 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 Turner7b0051e2021-12-29 15:46:56 +000029 # Enable emulated systems
Skyler Turner107ae412021-12-29 18:34:59 +000030 boot.binfmt.emulatedSystems = [ "aarch64-linux" "armv6l-linux" ];
Skyler Turner7b0051e2021-12-29 15:46:56 +000031
Skyler Turner205aff12021-12-20 11:22:57 +000032 # Enable apparmor
33 security.apparmor.enable = true;
34 security.apparmor.killUnconfinedConfinables = true;
35
Skyler Turner36f86f02022-01-09 14:19:34 +000036 # Change the sudo askpass program
Skyler Turner65174422022-01-09 14:28:27 +000037 security.sudo.extraConfig = "Path askpass /nix/store/5x5y8amldf8p1llwsv60jalmfy51aq51-ssh-askpass-fullscreen-1.2/bin/ssh-askpass-fullscreen";
Skyler Turner36f86f02022-01-09 14:19:34 +000038
Skyler Turner205aff12021-12-20 11:22:57 +000039 # Set your time zone.
40 time.timeZone = "Europe/London";
41
42 # Select internationalisation properties.
43 i18n.defaultLocale = "en_US.UTF-8";
44 console = {
45 font = "Lat2-Terminus16";
46 keyMap = "uk";
47 };
48
49 # Enable the X11 windowing system.
50 services.xserver = {
51 enable = true;
52 desktopManager = {
53 xterm.enable = false;
54 # xfce.enable = true;
55 };
Skyler Turnerf0e4f3e2022-01-09 13:46:00 +000056 # displayManager.startx.enable = true;
57 displayManager.sddm.enable = true;
Skyler Turner205aff12021-12-20 11:22:57 +000058 };
59
60 # And wayland
61 programs.sway = {
62 enable = true;
63 wrapperFeatures.gtk = true; # so that gtk works properly
64 extraPackages = with pkgs; [
65 swaylock
66 swayidle
67 wl-clipboard
68 mako # notification daemon
69 alacritty # Alacritty is the default terminal in the config
Skyler Turner205aff12021-12-20 11:22:57 +000070 ];
71 };
72
73 # Get screensharing to work
74 xdg = {
75 portal = {
76 enable = true;
77 extraPortals = with pkgs; [
78 xdg-desktop-portal-wlr
79 xdg-desktop-portal-gtk
80 ];
81 gtkUsePortal = true;
82 };
83 };
84
85 # Configure keymap in X11
86 services.xserver.layout = "gb";
87 # services.xserver.xkbOptions = "eurosign:e";
88
89
90 # Permit and install steam
91 nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
92 "steam"
93 "steam-original"
94 "steam-runtime"
95 ];
96
97 programs.steam.enable = true;
98
99
100 # Enable CUPS to print documents.
101 services.printing.enable = true;
102
103 # Enable sound.
104 sound.enable = true;
105 hardware.pulseaudio.enable = false;
106 services.pipewire = {
107 enable = true;
108 alsa = {
109 enable = true;
110 support32Bit = true;
111 };
112 pulse.enable = true;
113 };
114
115 # Enable touchpad support (enabled default in most desktopManager).
116 services.xserver.libinput.enable = true;
117
118 # Define a user account. Don't forget to set a password with ‘passwd’.
119 users.users.minion = {
120 isNormalUser = true;
121 extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
122 };
123
124 # List packages installed in system profile. To search, run:
125 # $ nix search wget
126 environment.systemPackages = with pkgs; [
127 vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
128 ((emacsPackagesNgGen emacs).emacsWithPackages (epkgs: [
129 epkgs.vterm
130 epkgs.emacsql-sqlite
131 ])) # Emacs + vterm-module (needed for vterm)
132 wget
133 firefox
134 chromium # Install chromium if needed
135 texlive.combined.scheme-full
136 keybase # Install keybase
137 keybase-gui
138 kbfs
Skyler Turner36f86f02022-01-09 14:19:34 +0000139 ssh-askpass-fullscreen
Skyler Turner205aff12021-12-20 11:22:57 +0000140 ];
141
142# environment.systemPackages = [
143# import /scripts/jetbrains.rider.nix
144# ];
145
146 fonts.fonts = with pkgs; [
147 nerdfonts
148 noto-fonts
149 noto-fonts-cjk
150 noto-fonts-emoji
151 liberation_ttf
152 fira-code
153 fira-code-symbols
154 mplus-outline-fonts
155 dina-font
156 proggyfonts
157 roboto
158 ];
159
160 # Some programs need SUID wrappers, can be configured further or are
161 # started in user sessions.
162 programs.mtr.enable = true;
163 programs.gnupg.agent = {
164 enable = true;
165 enableSSHSupport = true;
166 };
167
168 # List services that you want to enable:
169
170 # Enable the OpenSSH daemon.
171 services.openssh.enable = true;
172 services.keybase.enable = true;
173 services.gnome.gnome-keyring.enable = true;
174 services.i2p.enable = true;
Skyler Turner32dbfb42021-12-24 15:50:22 +0000175 virtualisation.docker.enable = true;
Skyler Turnerf0e4f3e2022-01-09 13:46:00 +0000176 virtualisation.containerd.enable = true;
Skyler Turner205aff12021-12-20 11:22:57 +0000177
178 # This value determines the NixOS release from which the default
179 # settings for stateful data, like file locations and database versions
180 # on your system were taken. It‘s perfectly fine and recommended to leave
181 # this value at the release version of the first install of this system.
182 # Before changing this value read the documentation for this option
183 # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
184 system.stateVersion = "21.11"; # Did you read the comment?
185
186}
187