2021-04-16 21:33:48 +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, ... }:
|
|
|
|
|
let
|
|
|
|
|
secrets = config.my.secrets;
|
|
|
|
|
in
|
|
|
|
|
{
|
|
|
|
|
imports =
|
|
|
|
|
[ # Include the results of the hardware scan.
|
|
|
|
|
./hardware-configuration.nix
|
2021-04-19 14:29:38 +02:00
|
|
|
|
|
|
|
|
|
./home.nix
|
2021-04-16 21:33:48 +02:00
|
|
|
|
];
|
|
|
|
|
|
2021-08-01 13:24:44 +02:00
|
|
|
|
boot.kernelPackages = pkgs.linuxPackages_5_12;
|
2021-06-10 04:40:45 +02:00
|
|
|
|
|
2021-04-16 21:33:48 +02:00
|
|
|
|
# Use the systemd-boot EFI boot loader.
|
|
|
|
|
boot.loader.systemd-boot.enable = true;
|
|
|
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
|
|
|
|
|
2021-04-27 18:17:06 +02:00
|
|
|
|
boot.supportedFilesystems = [
|
|
|
|
|
"btrfs"
|
|
|
|
|
"ntfs"
|
|
|
|
|
];
|
|
|
|
|
|
2021-04-16 21:33:48 +02:00
|
|
|
|
services.btrfs = {
|
|
|
|
|
autoScrub = {
|
|
|
|
|
enable = true;
|
|
|
|
|
fileSystems = [ "/" ];
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
networking.hostName = "boreal"; # 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.
|
2021-07-01 22:19:51 +02:00
|
|
|
|
networking.interfaces.enp8s0.useDHCP = true;
|
|
|
|
|
networking.interfaces.wlp4s0.useDHCP = true;
|
2021-04-16 21:33:48 +02:00
|
|
|
|
|
|
|
|
|
# List services that you want to enable:
|
|
|
|
|
my.services = {
|
2021-04-23 20:38:22 +02:00
|
|
|
|
borg-backup = {
|
|
|
|
|
enable = true;
|
|
|
|
|
repo = secrets.borg-backup.boreal-repo;
|
2021-05-04 01:32:37 +02:00
|
|
|
|
# for a workstation, having backups spanning the last month should be
|
|
|
|
|
# enough
|
|
|
|
|
prune = {
|
|
|
|
|
keep = {
|
|
|
|
|
daily = 7;
|
|
|
|
|
weekly = 4;
|
|
|
|
|
};
|
|
|
|
|
};
|
2021-04-23 20:38:22 +02:00
|
|
|
|
paths = [
|
|
|
|
|
"/home/alarsyo"
|
|
|
|
|
];
|
|
|
|
|
exclude = [
|
|
|
|
|
"/home/alarsyo/Downloads"
|
|
|
|
|
|
|
|
|
|
# Rust builds using half my storage capacity
|
|
|
|
|
"/home/alarsyo/*/target"
|
2021-06-17 02:47:34 +02:00
|
|
|
|
"/home/alarsyo/work/rust/build"
|
2021-04-23 20:38:22 +02:00
|
|
|
|
|
2021-06-17 10:58:24 +02:00
|
|
|
|
# don't backup nixpkgs
|
|
|
|
|
"/home/alarsyo/work/nixpkgs"
|
|
|
|
|
|
2021-04-23 20:38:22 +02:00
|
|
|
|
# C build crap
|
|
|
|
|
"*.a"
|
|
|
|
|
"*.o"
|
|
|
|
|
"*.so"
|
|
|
|
|
|
|
|
|
|
# ignore all dotfiles as .config and .cache can become quite big
|
|
|
|
|
"re:^/home/alarsyo/\\."
|
|
|
|
|
];
|
|
|
|
|
};
|
|
|
|
|
|
2021-05-26 00:33:52 +02:00
|
|
|
|
pipewire.enable = true;
|
|
|
|
|
|
2021-07-13 23:48:41 +02:00
|
|
|
|
tailscale.enable = true;
|
2021-04-16 21:33:48 +02:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
services = {
|
|
|
|
|
openssh = {
|
|
|
|
|
enable = true;
|
|
|
|
|
permitRootLogin = "no";
|
|
|
|
|
passwordAuthentication = false;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
xserver = {
|
|
|
|
|
enable = true;
|
2021-04-17 17:30:56 +02:00
|
|
|
|
videoDrivers = [ "nvidia" ];
|
2021-04-16 21:33:48 +02:00
|
|
|
|
windowManager.i3.enable = true;
|
|
|
|
|
layout = "fr";
|
|
|
|
|
xkbVariant = "us";
|
2021-06-10 04:40:45 +02:00
|
|
|
|
libinput.enable = true;
|
2021-04-16 21:33:48 +02:00
|
|
|
|
};
|
|
|
|
|
};
|
2021-04-22 14:22:55 +02:00
|
|
|
|
my.displayManager.sddm.enable = true;
|
|
|
|
|
|
2021-06-10 03:15:02 +02:00
|
|
|
|
services.udev.packages = with pkgs; [
|
|
|
|
|
packages.kaleidoscope-udev-rules
|
|
|
|
|
];
|
|
|
|
|
|
2021-04-17 03:15:44 +02:00
|
|
|
|
hardware.bluetooth = {
|
|
|
|
|
enable = true;
|
2021-07-05 12:30:19 +02:00
|
|
|
|
powerOnBoot = false;
|
2021-04-17 03:15:44 +02:00
|
|
|
|
};
|
2021-04-16 21:33:48 +02:00
|
|
|
|
}
|