users.users.aidan = { # Here
isNormalUser = true;
description = "aidan"; # Here
extraGroups = [
"networkmanager"
"wheel"
"video"
];
shell = pkgs.zsh;
};
services.borgbackup.jobs.home-aidan =
let
common-excludes = [
# Largest cache dirs
".cache"
".cargo"
"*/cache2" # firefox
"*/Cache"
".config/Code/CachedData"
".container-diff"
".npm/_cacache"
# Work related dirs
"*/node_modules"
"*/bower_components"
"*/_build"
"*/.tox"
"*/venv"
"*/.venv"
];
in
{
paths = "/home/aidan";
exclude = common-excludes;
encryption.mode = "none";
environment.BORG_RSH = "ssh -o 'StrictHostKeyChecking=no' -i /home/aidan/.ssh/id_rsa";
repo = "ssh://[email protected]:22/mnt/external_hard/asus_backup";
compression = "auto,zstd";
startAt = [ ]; # "daily";
};
If you would like to be able to hibernate change this in configuration.nix to a valid partition otherwise remove the following
# Bootloader
boot = {
resumeDevice = "/dev/nvme0n1p7"; # This line
kernelPackages = pkgs.linuxPackages_latest;
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
supportedFilesystems = [ "ntfs" ];
};
Go to home/default.nix and change my name to your name
home.username = "aidan"
home.homeDirectory = "/home/aidan";
Go to home/git/default.nix and change my stuff with your stuff
{ pkgs, ... }:
{
programs.git = {
enable = true;
userName = "AidanV"; # Here
userEmail = "[email protected]"; # Here
extraConfig = {
credential.helper = "${pkgs.git.override { withLibsecret = true; }}/bin/git-credential-libsecret";
};
};
}
Navigate to the repo's root folder and run:
sudo nixos-rebuild switch --flake .#nixos
If you ever want to upgrade your packages you can run:
sudo nix flake update