nixos-config/hosts/zephyrus/default.nix

106 lines
2.6 KiB
Nix
Raw Normal View History

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).
{ 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
];
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;
services.btrfs = {
autoScrub = {
enable = true;
fileSystems = [ "/" ];
};
};
networking.hostName = "zephyrus"; # Define your hostname.
networking.domain = "alarsyo.net";
# Set your time zone.
time.timeZone = "Europe/Paris";
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
# Per-interface useDHCP will be mandatory in the future, so this generated config
# replicates the default behaviour.
networking.interfaces.enp0s31f6.useDHCP = true;
networking.interfaces.wlp0s20f3.useDHCP = true;
# List services that you want to enable:
my.services = {
tailscale.enable = true;
pipewire.enable = true;
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;
timerConfig = {
OnCalendar = "*-*-* 13:00:00"; # laptop only gets used during the day
};
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"
"/home/alarsyo/work/rust/build"
# don't backup nixpkgs
"/home/alarsyo/work/nixpkgs"
# 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 = {
tlp = {
settings = {
START_CHARGE_THRESH_BAT0 = 70;
STOP_CHARGE_THRESH_BAT0 = 80;
};
};
2021-07-27 22:52:07 +02:00
fwupd.enable = true;
2022-01-17 21:56:41 +01:00
openssh = {
enable = true;
permitRootLogin = "no";
passwordAuthentication = false;
};
2021-07-23 18:47:53 +02:00
};
my.gui.enable = true;
2021-07-23 18:47:53 +02:00
2022-03-18 11:21:15 +01:00
environment.systemPackages = [ pkgs.arandr pkgs.chrysalis ];
services.udev.packages = [ pkgs.packages.kaleidoscope-udev-rules ];
2021-09-30 15:43:25 +02:00
2021-07-23 18:47:53 +02:00
hardware.bluetooth = {
enable = true;
powerOnBoot = false;
};
2021-07-24 01:29:53 +02:00
programs.light.enable = true;
2021-07-23 18:47:53 +02:00
}