-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathconfiguration.nix
73 lines (64 loc) · 2.13 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
{ config, pkgs, lib, ... }:
{
imports = [
<nixpkgs/nixos/modules/virtualisation/docker-image.nix>
./hardware-configuration.nix
];
documentation.doc.enable = false;
environment.noXlibs = lib.mkForce false;
networking.firewall.enable = false;
networking.hostName = lib.mkForce "";
networking.interfaces.eth0.useDHCP = false;
networking.nameservers = [ "1.1.1.1" "8.8.8.8" ];
networking.networkmanager.enable = lib.mkForce false;
networking.resolvconf.dnsExtensionMechanism = false;
networking.useDHCP = false;
networking.wireless.enable = false;
nix.distributedBuilds = true;
security.audit.enable = false;
security.sudo.enable = true;
systemd.enableEmergencyMode = false;
systemd.services.console-getty.enable = lib.mkForce false;
systemd.services.rescue.enable = false;
systemd.services.systemd-firstboot.enable = lib.mkForce false;
systemd.services.systemd-hostnamed.enable = lib.mkForce false;
boot.isContainer = true;
boot.loader = {
systemd-boot.enable = false;
efi.canTouchEfiVariables = false;
};
# List packages installed in system profile. To search by name, run:
# $ nix-env -qaP | grep wget
environment.systemPackages = with pkgs; [
bashInteractive
cacert
curl
git
gnumake
gnupg
htop
nix
tmux
tree
unzip
vim
wget
];
nixpkgs.config = {
allowUnfree = true; # Allow "unfree" packages.
# firefox.enableAdobeFlash = true;
# chromium.enablePepperFlash = true;
};
environment.variables = { GOROOT = [ "${pkgs.go.out}/share/go" ]; };
# don't set sycstl values in a container
systemd.services.systemd-sysctl.restartTriggers = lib.mkForce [ ];
environment.etc."sysctl.d/60-nixos.conf" = lib.mkForce { text = "# disabled\n"; };
environment.etc."sysctl.d/50-default.conf" = lib.mkForce { text = "# diasbled\n"; };
environment.etc."sysctl.d/50-coredump.conf" = lib.mkForce { text = "# disabled\n"; };
boot.kernel.sysctl = lib.mkForce { };
# add sudo group
users.groups.sudo = {};
security.sudo.extraRules = [
{ groups = [ "sudo" ]; commands = [ { command = "ALL"; options = [ "NOPASSWD" ]; } ]; }
];
}