2021-07-23 18:47:53 +02:00
|
|
|
|
# Edit this configuration file to define what should be installed on
|
|
|
|
|
# your system. Help is available in the configuration.nix(5) man page
|
|
|
|
|
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
|
|
|
|
{
|
2022-04-10 11:54:58 +02:00
|
|
|
|
config,
|
|
|
|
|
lib,
|
|
|
|
|
pkgs,
|
|
|
|
|
...
|
|
|
|
|
}: {
|
|
|
|
|
imports = [
|
|
|
|
|
# Include the results of the hardware scan.
|
|
|
|
|
./hardware-configuration.nix
|
|
|
|
|
./home.nix
|
|
|
|
|
./secrets.nix
|
|
|
|
|
];
|
2021-07-23 18:47:53 +02:00
|
|
|
|
|
2021-12-04 22:20:23 +01:00
|
|
|
|
boot.kernelPackages = pkgs.linuxPackages;
|
2021-07-23 18:47:53 +02:00
|
|
|
|
|
|
|
|
|
# Use the systemd-boot EFI boot loader.
|
|
|
|
|
boot.loader.systemd-boot.enable = true;
|
|
|
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
|
|
|
|
|
2022-05-16 12:24:46 +02:00
|
|
|
|
boot.tmpOnTmpfs = true;
|
|
|
|
|
|
2021-07-23 18:47:53 +02:00
|
|
|
|
services.btrfs = {
|
|
|
|
|
autoScrub = {
|
|
|
|
|
enable = true;
|
2022-04-10 11:54:58 +02:00
|
|
|
|
fileSystems = ["/"];
|
2021-07-23 18:47:53 +02:00
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
networking.hostName = "zephyrus"; # Define your hostname.
|
|
|
|
|
networking.domain = "alarsyo.net";
|
|
|
|
|
|
|
|
|
|
# Set your time zone.
|
|
|
|
|
time.timeZone = "Europe/Paris";
|
|
|
|
|
|
|
|
|
|
# List services that you want to enable:
|
|
|
|
|
my.services = {
|
|
|
|
|
tailscale.enable = true;
|
|
|
|
|
|
|
|
|
|
pipewire.enable = true;
|
2022-01-17 22:00:51 +01:00
|
|
|
|
|
|
|
|
|
restic-backup = {
|
|
|
|
|
enable = true;
|
|
|
|
|
repo = "b2:zephyrus-backup";
|
|
|
|
|
passwordFile = config.age.secrets."restic-backup/zephyrus-password".path;
|
|
|
|
|
environmentFile = config.age.secrets."restic-backup/zephyrus-credentials".path;
|
|
|
|
|
|
2022-01-18 09:05:36 +01:00
|
|
|
|
timerConfig = {
|
|
|
|
|
OnCalendar = "*-*-* 13:00:00"; # laptop only gets used during the day
|
|
|
|
|
};
|
|
|
|
|
|
2022-01-17 22:00:51 +01:00
|
|
|
|
paths = [
|
|
|
|
|
"/home/alarsyo"
|
|
|
|
|
];
|
|
|
|
|
exclude = [
|
|
|
|
|
"/home/alarsyo/Downloads"
|
|
|
|
|
|
|
|
|
|
# Rust builds using half my storage capacity
|
2022-01-17 23:39:45 +01:00
|
|
|
|
"/home/alarsyo/**/target"
|
2022-01-17 22:00:51 +01:00
|
|
|
|
"/home/alarsyo/work/rust/build"
|
|
|
|
|
|
|
|
|
|
# don't backup nixpkgs
|
|
|
|
|
"/home/alarsyo/work/nixpkgs"
|
|
|
|
|
|
2022-11-05 17:04:41 +01:00
|
|
|
|
"/home/alarsyo/go"
|
|
|
|
|
|
2022-01-17 22:00:51 +01:00
|
|
|
|
# C build crap
|
|
|
|
|
"*.a"
|
|
|
|
|
"*.o"
|
|
|
|
|
"*.so"
|
|
|
|
|
|
|
|
|
|
# ignore all dotfiles as .config and .cache can become quite big
|
|
|
|
|
"/home/alarsyo/.*"
|
|
|
|
|
];
|
|
|
|
|
};
|
2021-07-23 18:47:53 +02:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
services = {
|
2021-07-27 00:33:10 +02:00
|
|
|
|
tlp = {
|
|
|
|
|
settings = {
|
|
|
|
|
START_CHARGE_THRESH_BAT0 = 70;
|
|
|
|
|
STOP_CHARGE_THRESH_BAT0 = 80;
|
|
|
|
|
};
|
|
|
|
|
};
|
2021-07-27 22:52:07 +02:00
|
|
|
|
fwupd.enable = true;
|
2022-11-14 23:46:17 +01:00
|
|
|
|
openssh.enable = true;
|
2021-07-23 18:47:53 +02:00
|
|
|
|
};
|
2022-01-07 17:20:57 +01:00
|
|
|
|
my.gui.enable = true;
|
2021-07-23 18:47:53 +02:00
|
|
|
|
|
2022-09-24 00:14:38 +02:00
|
|
|
|
services.udev.packages = [pkgs.chrysalis];
|
2021-09-30 15:43:25 +02:00
|
|
|
|
|
2021-07-23 18:47:53 +02:00
|
|
|
|
hardware.bluetooth = {
|
|
|
|
|
enable = true;
|
|
|
|
|
powerOnBoot = false;
|
2022-09-20 15:20:42 +02:00
|
|
|
|
settings.General.Experimental = true;
|
2021-07-23 18:47:53 +02:00
|
|
|
|
};
|
2021-07-24 01:29:53 +02:00
|
|
|
|
|
|
|
|
|
programs.light.enable = true;
|
2021-07-23 18:47:53 +02:00
|
|
|
|
}
|