nixpkgs/pkgs/os-specific/linux
Austin Seipp 172dc1336f nixos: add grsecurity module (#1875)
This module implements a significant refactoring in grsecurity
configuration for NixOS, making it far more usable by default and much
easier to configure.

 - New security.grsecurity NixOS attributes.
   - All grsec kernels supported
   - Allows default 'auto' grsec configuration, or custom config
   - Supports custom kernel options through kernelExtraConfig
   - Defaults to high-security - user must choose kernel, server/desktop
     mode, and any virtualisation software. That's all.
   - kptr_restrict is fixed under grsecurity (it's unwriteable)
 - grsecurity patch creation is now significantly abstracted
   - only need revision, version, and SHA1
   - kernel version requirements are asserted for sanity
   - built kernels can have the uname specify the exact grsec version
     for development or bug reports. Off by default (requires
     `security.grsecurity.config.verboseVersion = true;`)
 - grsecurity sysctl support
   - By default, disabled.
   - For people who enable it, NixOS deploys a 'grsec-lock' systemd
     service which runs at startup. You are expected to configure sysctl
     through NixOS like you regularly would, which will occur before the
     service is started. As a result, changing sysctl settings requires
     a reboot.
 - New default group: 'grsecurity'
   - Root is a member by default
   - GRKERNSEC_PROC_GID is implicitly set to the 'grsecurity' GID,
     making it possible to easily add users to this group for /proc
     access
 - AppArmor is now automatically enabled where it wasn't before, despite
   implying features.apparmor = true

The most trivial example of enabling grsecurity in your kernel is by
specifying:

    security.grsecurity.enable          = true;
    security.grsecurity.testing         = true;      # testing 3.13 kernel
    security.grsecurity.config.system   = "desktop"; # or "server"

This specifies absolutely no virtualisation support. In general, you
probably at least want KVM host support, which is a little more work.
So:

    security.grsecurity.enable = true;
    security.grsecurity.stable = true; # enable stable 3.2 kernel
    security.grsecurity.config = {
      system   = "server";
      priority = "security";
      virtualisationConfig   = "host";
      virtualisationSoftware = "kvm";
      hardwareVirtualisation = true;
    }

This module has primarily been tested on Hetzner EX40 & VQ7 servers
using NixOps.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2014-04-11 22:43:51 -05:00
..
915resolution
acpi Adopt more packages. 2014-01-28 18:11:00 +01:00
acpi-call Update and fix kernel packages to new kernel build 2014-01-04 21:17:04 -05:00
acpid acpid: update from 2.0.21 to 2.0.22 2014-03-19 21:56:48 +01:00
acpitool
afuse
alienfx Add #include <unisted.h> for sleep and usleep 2014-01-25 13:46:48 -05:00
alsa-lib
alsa-oss
alsa-plugins
alsa-utils Fix alsa-utils 2014-03-14 09:08:04 -04:00
apparmor
ati-drivers ATI-driver: the hash has changed, reported by: @ikervagyok 2014-02-10 16:42:02 +01:00
atop
audit
autofs
batman-adv Update and fix kernel packages to new kernel build 2014-01-04 21:17:04 -05:00
bbswitch upgrade bbswitch to 0.8 2014-03-04 01:05:12 +01:00
blcr Update and fix kernel packages to new kernel build 2014-01-04 21:17:04 -05:00
bluez bluez5: update from 5.12 to 5.16 2014-03-21 16:04:15 +02:00
bridge-utils
broadcom-sta Update and fix kernel packages to new kernel build 2014-01-04 21:17:04 -05:00
busybox busybox: update from 1.21.1 to 1.22.1 2014-04-09 12:41:10 +02:00
can-utils can-utils: new package 2014-03-09 14:19:39 +01:00
checkpolicy
checksec Make my packages slightly more consistent. 2014-03-07 20:27:02 -06:00
cifs-utils
conky conky: add config options 2014-03-16 12:30:15 +01:00
consoletools
conspy
cpufrequtils Make cpufrequtils compilation pure. 2014-04-05 09:08:05 +02:00
cramfsswap
criu criu: attempt to fix doc building on Hydra 2014-03-20 14:01:57 -05:00
cryopid
cryptodev Update and fix kernel packages to new kernel build 2014-01-04 21:17:04 -05:00
cryptsetup cryptsetup: update from 1.6.2 to 1.6.3 2014-01-08 18:49:49 +01:00
dietlibc
directvnc
dmidecode
dmraid
dmtcp
drbd
dstat
e3cfsprogs
e1000e Update and fix kernel packages to new kernel build 2014-01-04 21:17:04 -05:00
ebtables
fbterm
ffado nixpkgs-lint: add the platforms meta attr for most of my packages 2014-03-16 12:08:26 +01:00
firmware Unmaintain a bunch of packages 2014-01-21 22:34:41 -05:00
forktty
frandom Update and fix kernel packages to new kernel build 2014-01-04 21:17:04 -05:00
fuse Adopt more packages. 2014-01-28 18:11:00 +01:00
fxload
gfxtablet
gogoclient
google-authenticator Add support for printing qr code for google-authenticator. 2014-02-20 12:30:49 +01:00
gradm gradm: learn of all accesses for /nix/store 2014-04-06 21:51:35 +02:00
guvcview add guvcview package 2014-02-07 00:01:40 +00:00
hdparm
hibernate
hostapd hostapd: update from 2.0 to 2.1 2014-04-03 07:05:07 +03:00
htop
hwdata
i7z
i810switch
ifenslave ifenslave: Add new package 2013-12-31 09:28:52 -06:00
ifplugd
iotop buildPythonPackage: fix more borken packages 2014-02-21 18:29:57 +01:00
iproute Move all db4 packages to the default db5 2014-02-15 12:03:02 +01:00
ipsec-tools ipsecTools: update from 0.8.1 to 0.8.2 2014-03-03 11:10:24 +01:00
iptables
iputils
iw iw: update from 3.11 to 3.14 2014-02-24 22:04:40 +01:00
jujuutils
kbd
kernel nixos: add grsecurity module (#1875) 2014-04-11 22:43:51 -05:00
kernel-headers linuxHeaders: add meta, incl. platforms = linux; 2014-01-25 15:35:52 +01:00
kernel-headers-cross
kexectools
keyutils
klibc Update and fix kernel packages to new kernel build 2014-01-04 21:17:04 -05:00
kmod kmod: bump 2014-02-03 18:42:04 -05:00
kmod-blacklist-ubuntu kmod-blacklist-ubuntu: fix references to binaries 2014-02-02 09:45:59 +01:00
kmscon Add platforms for kmscon 2014-01-15 08:17:19 -05:00
ktap Make my packages slightly more consistent. 2014-03-07 20:27:02 -06:00
latencytop
ldm ldm: Use meta.repositories.git. 2014-03-04 12:44:15 +01:00
libaio libaio: Fix download URL 2014-01-18 15:24:42 +00:00
libatasmart
libcap
libcap-ng
libcgroup
libnl
libnscd
libselinux libselinux: update from 2.2.1 to 2.2.2 2014-02-24 22:04:40 +01:00
libsemanage
libsepol remove pointless passthru meta 2014-01-10 01:45:35 +01:00
libsmbios
libvolume_id
lm-sensors lm_sensors: update from 3.3.4 to 3.3.5 2014-02-04 21:58:25 +02:00
lockdep lockdep: refactor into non-kernel package 2014-04-08 19:21:55 -05:00
lsiutil
lsscsi
lttng-modules set all licenses to be attributes (and wait for Nix 1.7) 2014-03-12 21:20:43 +01:00
lvm2
lxc lxc: set rootfs path somewhere outside /nix/store 2014-04-10 11:46:06 +02:00
mcelog
mdadm
microcode intel-microcode: upgrade to 20140122 2014-04-10 11:57:20 +02:00
mingetty
module-init-tools
multipath-tools
musl musl: version 1.0.0 2014-04-07 10:31:31 -05:00
ndiswrapper Update and fix kernel packages to new kernel build 2014-01-04 21:17:04 -05:00
net-tools
netatop Update and fix kernel packages to new kernel build 2014-01-04 21:17:04 -05:00
nfs-utils
nss_ldap
numactl
nvidia-x11 nvidia-x11: patch for kernel 3.14 support 2014-04-11 23:40:16 +02:00
nvidiabl Now properly add nvidiabl. 2014-03-07 16:08:38 +01:00
open-iscsi Update and fix kernel packages to new kernel build 2014-01-04 21:17:04 -05:00
opengl/xorg-sys
otpw
pam
pam_ccreds
pam_console
pam_devperm
pam_krb5 Adopt packages. 2014-01-28 17:31:17 +01:00
pam_ldap
pam_login
pam_ssh_agent_auth
pam_usb
pax-utils pax-utils: Update from 0.7 -> 0.8.1 2014-03-21 16:14:17 +01:00
paxctl paxctl: Use http instead of https 2014-02-28 00:15:55 +01:00
pcmciautils
plymouth nixpkgs-lint: add the platforms meta attr for most of my packages 2014-03-16 12:08:26 +01:00
pm-utils
pmount
pmtools
policycoreutils
pommed Unmaintain a bunch of packages 2014-01-21 22:34:41 -05:00
powertop
procps
procps-ng procps-ng: make it the default procps (name and attr) 2014-03-16 19:07:38 +01:00
psmisc psmisc: the tarball got updated upstream 2014-03-24 10:35:52 +01:00
psmouse-alps Update and fix kernel packages to new kernel build 2014-01-04 21:17:04 -05:00
radeontools
regionset
reptyr reptyr: version 0.5 2014-02-19 15:05:36 -06:00
rfkill rfkill: Update to 0.5 2014-01-27 17:58:25 +01:00
rtkit
sdparm
sepolgen
setools
shadow su: Make the su package a provider of only the su binary 2014-04-05 16:01:52 -05:00
spl spl, zfs: Add myself as a maintainer 2014-03-15 02:01:57 +01:00
statifier
sysfsutils
sysklogd
syslinux syslinux: update from 4.06 to 4.07 2013-12-31 05:44:11 +02:00
sysstat
systemd nixos: fix linux containers (systemd-nspawn, lxc, lxc-libvirt) 2014-03-24 23:59:50 +01:00
sysvinit
tcp-wrappers
tp_smapi Update and fix kernel packages to new kernel build 2014-01-04 21:17:04 -05:00
ttysnoop
tunctl
uclibc
udev
udisks Revert "Fix services.udisks.enable." 2014-04-08 13:28:24 +02:00
udisks-glue
untie
upower upower: add gobject introspection 2014-01-26 00:15:05 +01:00
upstart
usbutils
util-linux su: Make the su package a provider of only the su binary 2014-04-05 16:01:52 -05:00
v4l-utils
v4l2loopback typo 2014-04-02 12:40:59 +02:00
v86d Update and fix kernel packages to new kernel build 2014-01-04 21:17:04 -05:00
wireless-tools
wis-go7007 Update and fix kernel packages to new kernel build 2014-01-04 21:17:04 -05:00
wpa_supplicant wpa_supplicant: cosmetic to un-break syntax highlighting 2014-03-11 12:34:48 +01:00
wvdial Fix wvdial build by inserting missing unistd.h includes 2014-02-02 19:21:08 +04:00
x86info
xf86-input-mtrack Unmaintain a bunch of packages 2014-01-21 22:34:41 -05:00
xf86-input-multitouch Unmaintain a bunch of packages 2014-01-21 22:34:41 -05:00
xf86-input-wacom xf86_input_wacom: update from 0.20.0 to 0.23.0 2014-02-15 20:45:10 +01:00
xf86-video-nested
zfs spl, zfs: Add myself as a maintainer 2014-03-15 02:01:57 +01:00