blob: ee4a170a1b6ac31a564658d4aad6336b5dcf03cc [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 Turneree73be42022-01-10 11:02:46 +000024 # Overlay the overlays
25 nixpkgs.overlays = [
26 (self: super: {
27 # Fix polkit
28 polkit = super.polkit.overrideAttrs (oldAttrs: {
29 patches = oldAttrs.patches ++ [
30 (super.fetchpatch {
31 url = "https://gitlab.freedesktop.org/polkit/polkit/-/commit/716a273ce0af467968057f3e107156182bd290b0.patch";
32 sha256 = "sha256-hOJJhUmxXm87W1ZU9Y1NJ8GCyKvPjbIVtCHlhRGlN8k=";
33 })
34 ];
35 });
36 })
37 ];
38
Skyler Turner205aff12021-12-20 11:22:57 +000039 # Use the systemd-boot EFI boot loader.
40 boot.loader.systemd-boot.enable = true;
41 boot.loader.efi.canTouchEfiVariables = true;
42 boot.loader.grub.useOSProber = true;
43
Skyler Turner7b0051e2021-12-29 15:46:56 +000044 # Enable emulated systems
Skyler Turner107ae412021-12-29 18:34:59 +000045 boot.binfmt.emulatedSystems = [ "aarch64-linux" "armv6l-linux" ];
Skyler Turner7b0051e2021-12-29 15:46:56 +000046
Skyler Turner205aff12021-12-20 11:22:57 +000047 # Enable apparmor
48 security.apparmor.enable = true;
49 security.apparmor.killUnconfinedConfinables = true;
50
51 # Set your time zone.
52 time.timeZone = "Europe/London";
53
54 # Select internationalisation properties.
55 i18n.defaultLocale = "en_US.UTF-8";
56 console = {
57 font = "Lat2-Terminus16";
58 keyMap = "uk";
59 };
60
61 # Enable the X11 windowing system.
62 services.xserver = {
63 enable = true;
64 desktopManager = {
65 xterm.enable = false;
66 # xfce.enable = true;
67 };
Skyler Turnerf0e4f3e2022-01-09 13:46:00 +000068 # displayManager.startx.enable = true;
69 displayManager.sddm.enable = true;
Skyler Turner205aff12021-12-20 11:22:57 +000070 };
71
72 # And wayland
73 programs.sway = {
74 enable = true;
75 wrapperFeatures.gtk = true; # so that gtk works properly
76 extraPackages = with pkgs; [
77 swaylock
78 swayidle
79 wl-clipboard
80 mako # notification daemon
81 alacritty # Alacritty is the default terminal in the config
Skyler Turner205aff12021-12-20 11:22:57 +000082 ];
83 };
84
85 # Get screensharing to work
86 xdg = {
87 portal = {
88 enable = true;
89 extraPortals = with pkgs; [
90 xdg-desktop-portal-wlr
91 xdg-desktop-portal-gtk
92 ];
93 gtkUsePortal = true;
94 };
95 };
96
97 # Configure keymap in X11
98 services.xserver.layout = "gb";
99 # services.xserver.xkbOptions = "eurosign:e";
100
101
102 # Permit and install steam
103 nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
104 "steam"
105 "steam-original"
106 "steam-runtime"
107 ];
108
109 programs.steam.enable = true;
110
111
112 # Enable CUPS to print documents.
113 services.printing.enable = true;
114
115 # Enable sound.
116 sound.enable = true;
117 hardware.pulseaudio.enable = false;
118 services.pipewire = {
119 enable = true;
120 alsa = {
121 enable = true;
122 support32Bit = true;
123 };
124 pulse.enable = true;
125 };
126
127 # Enable touchpad support (enabled default in most desktopManager).
128 services.xserver.libinput.enable = true;
129
130 # Define a user account. Don't forget to set a password with ‘passwd’.
131 users.users.minion = {
132 isNormalUser = true;
133 extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
134 };
135
136 # List packages installed in system profile. To search, run:
137 # $ nix search wget
138 environment.systemPackages = with pkgs; [
139 vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
140 ((emacsPackagesNgGen emacs).emacsWithPackages (epkgs: [
141 epkgs.vterm
142 epkgs.emacsql-sqlite
143 ])) # Emacs + vterm-module (needed for vterm)
144 wget
145 firefox
146 chromium # Install chromium if needed
147 texlive.combined.scheme-full
148 keybase # Install keybase
149 keybase-gui
150 kbfs
Skyler Turneree73be42022-01-10 11:02:46 +0000151 bluez
Skyler Turner205aff12021-12-20 11:22:57 +0000152 ];
153
154# environment.systemPackages = [
155# import /scripts/jetbrains.rider.nix
156# ];
157
158 fonts.fonts = with pkgs; [
159 nerdfonts
160 noto-fonts
161 noto-fonts-cjk
162 noto-fonts-emoji
163 liberation_ttf
164 fira-code
165 fira-code-symbols
166 mplus-outline-fonts
167 dina-font
168 proggyfonts
169 roboto
170 ];
171
172 # Some programs need SUID wrappers, can be configured further or are
173 # started in user sessions.
174 programs.mtr.enable = true;
175 programs.gnupg.agent = {
176 enable = true;
177 enableSSHSupport = true;
178 };
179
180 # List services that you want to enable:
181
182 # Enable the OpenSSH daemon.
183 services.openssh.enable = true;
184 services.keybase.enable = true;
185 services.gnome.gnome-keyring.enable = true;
186 services.i2p.enable = true;
Skyler Turner32dbfb42021-12-24 15:50:22 +0000187 virtualisation.docker.enable = true;
Skyler Turnerf0e4f3e2022-01-09 13:46:00 +0000188 virtualisation.containerd.enable = true;
Skyler Turner205aff12021-12-20 11:22:57 +0000189
190 # This value determines the NixOS release from which the default
191 # settings for stateful data, like file locations and database versions
192 # on your system were taken. It‘s perfectly fine and recommended to leave
193 # this value at the release version of the first install of this system.
194 # Before changing this value read the documentation for this option
195 # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
196 system.stateVersion = "21.11"; # Did you read the comment?
197
198}
199