Add restic backups for nix plus some hardware settings

This commit is contained in:
Cyryl Płotnicki 2019-04-03 11:38:01 +01:00
parent e946ee7fa3
commit 417bdd9563

View file

@ -33,16 +33,16 @@ in
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
wget myVim git zsh gnupg curl tmux microcodeIntel wget myVim git zsh gnupg curl tmux
]; ];
networking.hostName = "skinnyv"; networking.hostName = "skinnyv";
users.users.cyryl = { users.users.cyryl = {
isNormalUser = true; isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" ]; extraGroups = [ "wheel" "networkmanager" "video" "scanner" "lp" ];
packages = with pkgs; [ packages = with pkgs; [
firefox chromium terminator zsh keepass fontconfig go nodejs unstable.rustup gcc gdb binutils xclip pkgconfig veracrypt gitAndTools.diff-so-fancy gnome3.gnome-shell-extensions chrome-gnome-shell gnomeExtensions.clipboard-indicator gnomeExtensions.caffeine gnomeExtensions.no-title-bar unstable.gnomeExtensions.gsconnect unstable.appimage-run openjdk10 pdftk pdfshuffler gimp firefox chromium terminator zsh keepass fontconfig go nodejs unstable.rustup gcc gdb binutils xclip pkgconfig veracrypt gitAndTools.diff-so-fancy gnome3.gnome-shell-extensions chrome-gnome-shell gnomeExtensions.clipboard-indicator gnomeExtensions.caffeine gnomeExtensions.no-title-bar unstable.gnomeExtensions.gsconnect unstable.appimage-run openjdk10 pdftk pdfshuffler gimp restic
]; ];
uid = 1000; uid = 1000;
shell = pkgs.zsh; shell = pkgs.zsh;
@ -60,6 +60,13 @@ in
openDefaultPorts = true; openDefaultPorts = true;
}; };
restic.backups.home = {
passwordFile = "/etc/nixos/secrets/restic-password";
paths = [ "/home" ];
repository = "sftp:fetcher@brix:/mnt/data/backup-targets";
timerConfig = { OnCalendar = "hourly"; };
};
xserver = { xserver = {
enable = true; enable = true;
layout = "pl"; layout = "pl";
@ -77,6 +84,11 @@ in
sound.enable = true; sound.enable = true;
hardware.pulseaudio.enable = true; hardware.pulseaudio.enable = true;
hardware.u2f.enable = true;
hardware.brightnessctl.enable = true;
hardware.cpu.intel.updateMicrocode = true;
hardware.opengl.enable = true;
hardware.sane.enable = true;
fileSystems."/".options = [ "noatime" "nodiratime" "discard" ]; fileSystems."/".options = [ "noatime" "nodiratime" "discard" ];