Skip to content

Instantly share code, notes, and snippets.

@xeji
Created March 27, 2018 07:08
Show Gist options
  • Save xeji/78d4abbb493fc5a5b6f069b41ebdafbe to your computer and use it in GitHub Desktop.
Save xeji/78d4abbb493fc5a5b6f069b41ebdafbe to your computer and use it in GitHub Desktop.
nixos config to test selinux
{
setest = { pkgs, config, ...}: {
boot.kernelParams = [ "security=selinux" "selinux=1" ];
systemd.package = pkgs.systemd.override { withSelinux = true; };
environment.systemPackages = with pkgs; [ vim
libselinux libsepol libsemanage policycoreutils setools checkpolicy selinux-python
];
environment.etc."selinux/config".text = ''
SELINUX=permissive
SELINUXTYPE=refpolicy
'';
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment