-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfiguration.nix
223 lines (185 loc) · 5.19 KB
/
configuration.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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
{ config, pkgs, lib, ... }:
{
imports =
[
./scripts/default.nix
];
# Nix preferences: unstable version
nix = {
settings.auto-optimise-store = true;
#Garbage collection
gc = {
automatic = true;
dates = "daily";
options = "--delete-older-than 30d";
};
extraOptions = ''
experimental-features = nix-command flakes
'';
};
nixpkgs.config.allowUnfree = true;
############## ADD BOOT SETTINGS IN HOST SPECIFIC CONFIG#########################
# Use the GRUB 2 boot loader.
# boot.loader.grub.enable = true;
# boot.loader.grub.version = 2;
# boot.loader.grub.efiSupport = true;
# boot.loader.grub.efiInstallAsRemovable = true;
# boot.loader.efi.efiSysMountPoint = "/boot/efi";
# Define on which hard drive you want to install Grub.
# boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only
#################################################################################
# Set up locales.
time.timeZone = "America/New_York";
i18n.defaultLocale = "en_US.UTF-8";
console = {
keyMap = "us";
};
##################### ADD NETWORK SETTINGS TO HOST SPECIFIC CONGIF ########################
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
# Per-interface useDHCP will be mandatory in the future, so this generated config
# replicates the default behaviour.
# networking.useDHCP = false;
# networking.interfaces.enp0s3.useDHCP = true;
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# for iphone
services.usbmuxd.enable = true;
# Enable the X11 windowing system.
services.xserver = {
enable = true;
# Keyboard US and Polytonic Greek
xkb = {
layout = "us,gr";
variant = ",polytonic";
options = "grp:shifts_toggle, ctrl:nocaps";
};
displayManager = {
lightdm.enable = true;
defaultSession = "none+xmonad";
autoLogin = {
enable = false;
user = "will";
};
};
windowManager.xmonad = {
enable = true;
enableContribAndExtras = true;
config = builtins.readFile ./users/will/programs/xmonad/xmonad.hs;
};
windowManager.awesome = {
enable = true;
};
libinput = {
enable = true;
touchpad.naturalScrolling = false;
};
};
services.emacs = {
enable = false;
install = true;
defaultEditor = true;
package = with pkgs; (emacsWithPackagesFromUsePackage
{
config = ./users/will/programs/emacs/config.el;
package = pkgs.emacs-unstable;
alwaysEnsure = false;
}
);
};
# Enable CUPS to print documents.
# services.printing.enable = true;
# Enable sound.
hardware.pulseaudio.enable = true;
hardware.pulseaudio.support32Bit = true;
services.pipewire.enable = false;
# Define a user account. Don't forget to set a password with ‘passwd’.
users.users.will = {
isNormalUser = true;
home = "/home/will";
extraGroups = [ "wheel" "networkmanager" "audio" ];
shell = pkgs.zsh;
initialPassword = "12";
};
#no sudo passwd
security.sudo = {
enable = true;
wheelNeedsPassword = true;
};
security.wrappers = {
pmount = {
source = "${pkgs.pmount}/bin/pmount";
owner = "root";
group = "root";
setuid = true;
};
pumount = {
source = "${pkgs.pmount}/bin/pumount";
owner = "root";
group = "root";
setuid = true;
};
};
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
home-manager
#Terminal emulator
wget
git
neovim
# xkblayout-state
xkblayout-state
# installed globally for xmonad
dzen2
feh
];
programs.zsh.enable = true;
services.logind = {
extraConfig = "HandlePowerKey=suspend";
lidSwitch = "suspend";
};
programs.slock.enable = true;
programs.xss-lock = {
enable = true;
};
# Install fonts
fonts = {
packages = with pkgs; [
nerd-fonts.ubuntu
nerd-fonts.ubuntu-mono
nerd-fonts.fira-mono
nerd-fonts.fira-code
nerd-fonts.mononoki
font-awesome
material-icons
emacs-all-the-icons-fonts
];
fontDir.enable = true;
};
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
services.syncthing = {
enable = true;
user = "will";
dataDir = "/home/will/Documents";
configDir = "/home/will/.config/syncthing";
openDefaultPorts = true;
};
programs.kdeconnect.enable = true;
programs.localsend.enable = true;
# Enable the OpenSSH daemon.
# services.openssh.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
networking.firewall.enable = false;
# ADD stateVersion TO HOST CONFIG BASED ON THE GENERATER "configuration.nix"
#system.stateVersion = "21.05"; # Did you read the comment?
}