Last active
July 14, 2018 16:45
-
-
Save tenten8401/0f71414909c45004b146215b47e3ce64 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################ | |
# MISC. SECTION # | |
################################ | |
{ config, pkgs, ... }: | |
let | |
greeting = pkgs.writeScript "getty-greeting" '' | |
#!${pkgs.bash}/bin/bash | |
${pkgs.utillinux}/sbin/agetty agetty --login-program ${pkgs.shadow}/bin/login ${if (config.services.mingetty.autologinUser != null) then "--autologin ${config.services.mingetty.autologinUser}" else ""} --noclear --issue-file <(${pkgs.fortune}/bin/fortune) --keep-baud %I 115200,38400,9600 $TERM | |
''; | |
in | |
{ | |
# Allow automatic updating & garbage collection. | |
system.autoUpgrade.enable = true; | |
nix.gc = { | |
automatic = true; | |
options = "--delete-older-than 30d"; | |
}; | |
# Enable Redshift. | |
services.redshift = { | |
enable = true; | |
latitude = "35.43"; | |
longitude = "-83.34"; | |
}; | |
# Enable ZSH and setup themes. | |
programs.zsh = { | |
enable = true; | |
syntaxHighlighting.enable = true; | |
autosuggestions.enable = true; | |
ohMyZsh.enable = true; | |
ohMyZsh.theme = "agnoster"; | |
}; | |
# Allow non-free software. | |
nixpkgs.config = { | |
allowUnfree = true; | |
}; | |
# Enable plymouth. | |
boot.plymouth.enable = true; | |
# Custom tty greeting. | |
environment.systemPackages = with pkgs; [ | |
fortune lolcat figlet | |
]; | |
systemd.services."getty@" = { | |
serviceConfig.ExecStart = [ | |
"" | |
greeting | |
]; | |
}; | |
# Enable boot-up numlock. | |
services.xserver.displayManager.sddm.autoNumlock = true; | |
# Enable the OpenSSH daemon. | |
services.openssh.enable = true; | |
# Enable CUPS to print documents. | |
services.printing = { | |
enable = true; | |
drivers = [ pkgs.epson-escpr ]; | |
}; | |
# Open ports in the firewall. | |
# networking.firewall.allowedTCPPorts = [ ... ]; | |
# networking.firewall.allowedUDPPorts = [ ... ]; | |
# Or disable the firewall altogether. | |
networking.firewall.enable = false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment