modules/security: add hlissner-based security config
This commit is contained in:
parent
58836225d1
commit
182932de5f
2 changed files with 16 additions and 1 deletions
|
@ -45,8 +45,10 @@ in
|
||||||
boot.loader = {
|
boot.loader = {
|
||||||
systemd-boot = {
|
systemd-boot = {
|
||||||
enable = mkDefault true;
|
enable = mkDefault true;
|
||||||
editor = false;
|
|
||||||
consoleMode = "2";
|
consoleMode = "2";
|
||||||
|
|
||||||
|
# See desc in nixpkgs/nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix
|
||||||
|
editor = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
efi.canTouchEfiVariables = true;
|
efi.canTouchEfiVariables = true;
|
||||||
|
|
13
modules/modules/security.nix
Normal file
13
modules/modules/security.nix
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{ config, lib, ... }:
|
||||||
|
with lib;
|
||||||
|
with lib.hlissner;
|
||||||
|
{
|
||||||
|
# Security settings based on https://github.com/hlissner/dotfiles/blob/master/modules/security.nix
|
||||||
|
security.acme.acceptTerms = true;
|
||||||
|
|
||||||
|
boot = {
|
||||||
|
# Make tmp volatile, using tmpfs is speedy on SSD systems
|
||||||
|
tmpOnTmpfs = mkDefault true;
|
||||||
|
cleanTmpDir = mkDefault (!config.boot.tmpOnTmpfs);
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue