-
Notifications
You must be signed in to change notification settings - Fork 4
/
x230.nix
167 lines (138 loc) · 3.61 KB
/
x230.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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
# 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, lib, pkgs, nixpkgs, nixos-hardware, ... }:
{
imports = [
nixpkgs.nixosModules.notDetected
nixos-hardware.nixosModules.lenovo-thinkpad-x230
./hardware/x230.nix
./modules/buildMachines.nix
./modules/cachix.nix
./modules/nas.nix
./modules/vpn.nix
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking = {
hostName = "x230";
networkmanager.enable = true;
};
# Workaround for " Failed to start Network Manager Wait Online." after `nixos-rebuild switch`
# See https://github.com/NixOS/nixpkgs/issues/180175
systemd.services.NetworkManager-wait-online.enable = lib.mkForce false;
nixpkgs.config.allowUnfree = true;
powerManagement.powertop.enable = true;
# List packages installed in system profile.
environment.systemPackages = with pkgs; [
acpi
bat
curl
#dropbox-cli
fd
file
firefox-wayland
fzf
git
gh
httpie
moreutils
mosh
mpv
ntfs3g
pass
pavucontrol
pmount
ripgrep
tree
unzip
vcsh
wget
wl-clipboard
xdg-utils
zathura
zoom-us
];
fonts.packages = with pkgs; [
noto-fonts
noto-fonts-emoji
];
security.wrappers = {
pmount.source = "${pkgs.pmount}/bin/pmount";
pmount.owner = "root";
pmount.group = "root";
pmount.setuid = true;
pumount.source = "${pkgs.pmount}/bin/pumount";
pumount.owner = "root";
pumount.group = "root";
pumount.setuid = true;
};
programs = {
autojump.enable = true;
gnupg.agent = { enable = true; enableSSHSupport = true; };
sway = {
enable = true;
extraPackages = with pkgs; [ swaylock swayidle swayimg foot sway-contrib.grimshot wmenu ];
};
neovim = {
enable = true;
viAlias = true;
vimAlias = true;
};
zsh = {
enable = true;
ohMyZsh = {
enable = true;
theme = "robbyrussell";
plugins = [ "autojump" "dirhistory" "fzf" "git" "pass" "sudo" ];
};
};
};
xdg.portal.wlr.enable = true;
hardware = {
enableRedistributableFirmware = true;
enableAllFirmware = true;
bluetooth = {
enable = true;
};
trackpoint = {
enable = true;
speed = 200;
sensitivity = 200;
};
};
services = {
avahi = {
enable = true;
nssmdns4 = true;
openFirewall = true;
};
illum.enable = true; # Enable the brightness buttons
openssh.enable = true;
printing.enable = true;
tailscale.useRoutingFeatures = "client";
greetd = {
enable = true;
settings = {
default_session = {
command = "${pkgs.greetd.greetd}/bin/agreety --cmd sway";
};
};
};
};
virtualisation.podman.enable = true;
virtualisation.virtualbox.host.enable = true;
# Define a user account. Don't forget to set a password with ‘passwd’.
users.users.dwagner = {
isNormalUser = true;
shell = pkgs.zsh;
extraGroups = [ "dialout" "networkmanager" "vboxusers" "wheel" ];
};
nix.settings.trusted-users = [ "root" "@wheel" ];
# 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?
}