-
Notifications
You must be signed in to change notification settings - Fork 1
/
configuration-template.nix
122 lines (98 loc) · 3.1 KB
/
configuration-template.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running 'nixos-help').
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
# Specify the encrypted disk
boot.initrd.luks.devices.root = {
device = "##device##2";
preLVM = true;
};
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# Networking setup
networking.hostName = "##username##";
# Enable NetworkManager
networking.networkmanager.enable = true;
# Root password
users.users.root.initialHashedPassword = "##rootpasswd##";
# Allow unfree proprietary packages such as spotify or vscode
nixpkgs.config.allowUnfree = true;
# System-wide packages
environment.systemPackages = with pkgs; [
# System utilities
ark
usbutils
unzip
vim
wget
# Desktop utilities
evince
firefox
keepassxc
libreoffice-fresh
phototonic
signal-desktop
thunderbird
vlc
# Gnome specifics and utilities
gnome3.gnome-tweaks
gnomeExtensions.dash-to-panel
];
# Enabling unfree packages, adding unstable channel to be able to install latest packages as user
environment.interactiveShellInit = ''
if [ ! -f ~/.config/nixpkgs/config.nix ]
then
mkdir -p ~/.config/nixpkgs/
echo '{ allowUnfree = true; }' > ~/.config/nixpkgs/config.nix
fi
'';
# List services that you want to enable:
# Limit journal size
services.journald = {
extraConfig = "SystemMaxUse=500M";
};
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable sound.
sound.enable = true;
# Enable BT
hardware.bluetooth.enable = true;
# Enable pulseaudio with BT support
hardware.pulseaudio = {
enable = true;
package = pkgs.pulseaudioFull;
};
# Enable the X11 windowing system.
services.xserver.enable = true;
services.xserver.layout = "us";
services.xserver.xkbOptions = "eurosign:e";
# Enable touchpad support.
# It is needed to explicitly disable libinput if we want to use synaptics
services.xserver.libinput.enable = false;
# Enable Lenovo/IBM touchpad support
services.xserver.synaptics.enable = true;
# Enable for Gnome Desktop Environment
services.xserver.displayManager.gdm.enable = true;
services.xserver.desktopManager.gnome3.enable = true;
# Set your time zone.
time.timeZone = "UTC";
# Define a user account. Don't forget to set a password with ‘passwd’.
users.users.##username## = {
isNormalUser = true;
uid = 1000;
createHome = true;
home = "/home/##username##/";
extraGroups = [ "wheel" "networkmanager" ];
};
# This value determines the NixOS release with which your system is to be
# compatible, in order to avoid breaking some software such as database
# servers. You should change this only after NixOS release notes say you
# should.
system.stateVersion = "22.05"; # Did you read the comment?
}