Squashed commit of the following: commitdb95d142d4
Author: coolneng <akasroua@gmail.com> Date: Thu Jan 30 13:23:23 2020 +0100 Update Syncthing IDs and add roamer to Wireguard commit6a2346d4a1
Author: coolneng <akasroua@gmail.com> Date: Wed Jan 29 14:30:31 2020 +0100 Add wireguard server configuration commit09c5755ec8
Author: coolneng <akasroua@gmail.com> Date: Wed Jan 29 00:20:52 2020 +0100 Add wireguard packages commitc542b06c9d
Author: coolneng <akasroua@gmail.com> Date: Tue Jan 28 21:57:53 2020 +0100 Move zeroconf section to networking commit1af6e07072
Author: coolneng <akasroua@gmail.com> Date: Tue Jan 28 21:54:39 2020 +0100 Revert "Clean up packages and refactor nginx config" This reverts commit375758a958
. commit5eb5e446ad
Author: coolneng <akasroua@gmail.com> Date: Sun Jan 26 19:39:28 2020 +0100 Add wallabag docker container commit375758a958
Author: coolneng <akasroua@gmail.com> Date: Sun Jan 26 08:45:56 2020 +0100 Clean up packages and refactor nginx config commitf210353ce5
Author: coolneng <akasroua@gmail.com> Date: Tue Dec 31 18:41:34 2019 +0100 Delete Security folder from Syncthing commit65afa32e57
Author: coolneng <akasroua@gmail.com> Date: Thu Dec 26 04:19:38 2019 +0100 Use 'after' instead of 'wantedBy' commit8cc829e063
Author: coolneng <akasroua@gmail.com> Date: Thu Dec 26 04:16:21 2019 +0100 Use wantedBy instead of partOf commite490102d74
Merge:91d4b24
51ed142
Author: coolneng <akasroua@gmail.com> Date: Wed Dec 25 17:47:14 2019 +0100 Merge branch 'test' of gitea into test commit51ed142c5f
Author: coolneng <akasroua@gmail.com> Date: Wed Dec 25 17:15:42 2019 +0100 Use mkforce for 'partOf' option commitcaf4a49ec2
Author: coolneng <akasroua@gmail.com> Date: Wed Dec 25 16:37:11 2019 +0100 Configure nginx service as dependent on gitea commite8850eff51
Author: coolneng <akasroua@gmail.com> Date: Wed Dec 25 16:24:10 2019 +0100 Restart nginx after Gitea commit91d4b240d7
Author: coolneng <akasroua@gmail.com> Date: Sun Dec 15 22:54:00 2019 +0100 # This is a combination of 2 commits. # This is the 1st commit message: Revert "Disable wizard on Gitea" This reverts commitd8b415ee16
. # This is the commit message #2: Remove Gitea socket connection to the DB
96 lines
2.9 KiB
Nix
96 lines
2.9 KiB
Nix
{ config, pkgs, lib, ... }:
|
|
{
|
|
# NixOS wants to enable GRUB by default
|
|
boot.loader.grub.enable = false;
|
|
# Enables the generation of /boot/extlinux/extlinux.conf
|
|
boot.loader.generic-extlinux-compatible.enable = true;
|
|
|
|
# A bunch of boot parameters needed for optimal runtime on RPi 3B
|
|
boot.kernelParams = ["cma=32M"];
|
|
boot.loader.raspberryPi = {
|
|
enable = true;
|
|
version = 3;
|
|
uboot.enable = true;
|
|
firmwareConfig = ''
|
|
hdmi_force_hotplug=1
|
|
'';
|
|
};
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
raspberrypi-tools
|
|
git
|
|
htop
|
|
vim
|
|
];
|
|
|
|
# !!! Adding a swap file is optional, but strongly recommended!
|
|
swapDevices = [ { device = "/swapfile"; size = 1024; } ];
|
|
|
|
# Configure basic SSH access
|
|
services.openssh = {
|
|
enable = true;
|
|
permitRootLogin = "yes";
|
|
};
|
|
|
|
# Cleanup tmp on startup
|
|
boot.cleanTmpDir = true;
|
|
|
|
# Set hostname
|
|
networking.hostName = "zion";
|
|
|
|
# Create coolneng user
|
|
users.users.coolneng = {
|
|
isNormalUser = true;
|
|
home = "/home/coolneng";
|
|
extraGroups = [ "wheel" "lp" "scanner" ];
|
|
openssh.authorizedKeys.keys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDG7JtfAqcbZV28wkNTfSWSqTOo5buH+dyT0w6SlTqq+KFh5DxREB0yGuM1UfjLpyLQ0XI7UbhCwNG28Li4yv/hwPGq63TF1kl+w4sjQKFn4bOUv1NvsfSN3oTamjfYoVsrapCiXqOvZkzEKMF47MSwOfPkqZ6ihU5V3INA0IZbl1Ri+r9MsIzvY76ZHBiF6rVqQJjdXVDbcLMViOrM56FpyK+ICo+uTkErsEbYFwevVTv9memOh778RRPesBobpZjggWOI4HXXxqk35myInYjHve9K4ox6YZMjwnwnEftONr2HyoBBcBNT+wWd1jtYxCoCWQ3vVkn4LGBDOQ3+HKb4rT3JxI66VfFyQWGJPdgJL5/ZNRlBqA7CpAtE7JaR6l7d3mCCoGW2B0atWiEXecwb8dz4CzzYm1r9Wz27L74OtPzUqcV7mQjCVDcnRsY/MtfhzyWzhB3tujVqnRtF3VrFSrm0YXS1ZWG4dltX1cfgud8s8XwwBKcFw5NdCrVxq3nRMNlGcSqbXC+RnrkK/i6ciAriZdXgFrmnBl+6qEmqIO15u2IPvDhnQs18DzRkHnPQegphhHhHix5aaqNbLfSRZNCTQaqE774X+0kuU/RWylI4muIyf4k9x+et4txeU2OC6l0W0LMpbsELzXIRr/ZBFrGHbE7/KLi8HNiAJ0KmAQ== coolneng@monolith" ];
|
|
shell = "/run/current-system/sw/bin/fish";
|
|
};
|
|
|
|
# Set vim as default editor
|
|
programs.vim.defaultEditor = true;
|
|
|
|
# Set timezone and synchronize NTP
|
|
time.timeZone = "Europe/Brussels";
|
|
services.timesyncd.enable = true;
|
|
|
|
# Enable zfs support
|
|
networking.hostId = "bb26c304";
|
|
boot.supportedFilesystems = [ "zfs" ];
|
|
boot.zfs.extraPools = [ "vault" ];
|
|
|
|
# Scrub zpool monthly
|
|
services.zfs.autoScrub = {
|
|
enable = true;
|
|
interval = "monthly";
|
|
};
|
|
|
|
# Auto-upgrade the system and reboot if needed
|
|
system.autoUpgrade = {
|
|
enable = true;
|
|
allowReboot = true;
|
|
};
|
|
|
|
# Run Nix garbage collector daily
|
|
nix.gc = {
|
|
automatic = true;
|
|
dates = "03:15";
|
|
options = "--delete-older-than 14d";
|
|
};
|
|
|
|
# Configure fish shell
|
|
programs.fish.enable = true;
|
|
users.users.root.shell = "/run/current-system/sw/bin/fish";
|
|
|
|
# Import other configuration modules
|
|
imports = [
|
|
./modules/printing.nix
|
|
./modules/networking.nix
|
|
./modules/datasync.nix
|
|
./modules/hardware-configuration.nix
|
|
./modules/webstack.nix
|
|
./modules/devops.nix
|
|
];
|
|
|
|
}
|