2023-11-23 01:21:58 -08:00
|
|
|
|
{ config, pkgs, user, lib, ... }:
|
2023-07-10 17:52:34 -07:00
|
|
|
|
{
|
2023-10-07 09:33:26 -07:00
|
|
|
|
imports = [
|
2023-10-13 21:01:14 -07:00
|
|
|
|
./syncthing.nix
|
2023-10-07 09:33:26 -07:00
|
|
|
|
];
|
|
|
|
|
|
2023-07-10 17:52:34 -07:00
|
|
|
|
nix = {
|
|
|
|
|
package = pkgs.nixFlakes;
|
|
|
|
|
extraOptions = "experimental-features = nix-command flakes";
|
|
|
|
|
|
|
|
|
|
settings.auto-optimise-store = true;
|
|
|
|
|
gc = {
|
|
|
|
|
automatic = true;
|
|
|
|
|
dates = "weekly";
|
|
|
|
|
options = "--delete-older-than 7d";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# Add non-free packages
|
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
2023-12-31 17:23:47 -08:00
|
|
|
|
nixpkgs.config.permittedInsecurePackages = [ "electron-25.9.0" "openssl-1.1.1w" ];
|
2023-07-10 17:52:34 -07:00
|
|
|
|
nixpkgs.overlays = import ../../lib/overlays.nix;
|
|
|
|
|
|
|
|
|
|
# Use zen kernel
|
|
|
|
|
boot.kernelPackages = pkgs.linuxPackages_zen;
|
|
|
|
|
|
|
|
|
|
# Hardware options
|
|
|
|
|
hardware.bluetooth.enable = true;
|
2024-01-20 16:10:20 -08:00
|
|
|
|
hardware.bluetooth.package = pkgs.bluez;
|
2023-07-10 17:52:34 -07:00
|
|
|
|
hardware.sensor.iio.enable = true;
|
2024-07-06 10:14:18 -07:00
|
|
|
|
hardware.graphics.enable = true;
|
2023-07-10 17:52:34 -07:00
|
|
|
|
|
|
|
|
|
# Use the systemd-boot EFI boot loader.
|
|
|
|
|
boot.loader.systemd-boot.enable = true;
|
|
|
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
|
|
|
|
|
|
|
|
|
# Set networking options
|
|
|
|
|
networking.hostName = "kestrel";
|
2023-07-23 14:34:39 -07:00
|
|
|
|
networking.firewall.checkReversePath = "loose";
|
2023-08-21 21:05:02 -07:00
|
|
|
|
networking.firewall.enable = false;
|
2023-07-10 17:52:34 -07:00
|
|
|
|
|
|
|
|
|
# Set your time zone.
|
|
|
|
|
time.timeZone = "America/Los_Angeles";
|
|
|
|
|
i18n.defaultLocale = "en_US.UTF-8";
|
|
|
|
|
|
|
|
|
|
# Add fonts
|
2023-11-23 01:21:58 -08:00
|
|
|
|
fonts.packages = with pkgs; [
|
2023-07-10 17:52:34 -07:00
|
|
|
|
nerdfonts
|
|
|
|
|
];
|
|
|
|
|
|
2023-10-09 19:52:55 -07:00
|
|
|
|
# Enable docker
|
2023-10-09 21:23:12 -07:00
|
|
|
|
virtualisation.docker.enable = true;
|
|
|
|
|
virtualisation.docker.storageDriver = "btrfs";
|
2023-07-11 21:17:48 -07:00
|
|
|
|
|
|
|
|
|
# Define user account.
|
2023-07-10 17:52:34 -07:00
|
|
|
|
users.users.${user} = {
|
|
|
|
|
isNormalUser = true;
|
2023-10-07 02:16:26 -07:00
|
|
|
|
extraGroups = [ "dialout" "wheel" "docker" "libvirtd" ]; # Enable ‘sudo’ for the user.
|
2023-07-10 17:52:34 -07:00
|
|
|
|
};
|
|
|
|
|
|
2023-10-08 20:43:23 -07:00
|
|
|
|
# Password-less root
|
|
|
|
|
security.sudo.extraRules = [{
|
|
|
|
|
users = [ "${user}" ];
|
|
|
|
|
commands = [{
|
|
|
|
|
command = "ALL" ;
|
2023-10-08 21:13:29 -07:00
|
|
|
|
options= [ "NOPASSWD" ];
|
2023-10-08 20:43:23 -07:00
|
|
|
|
}];
|
|
|
|
|
}];
|
|
|
|
|
|
2023-09-19 17:53:01 -07:00
|
|
|
|
environment.systemPackages = with pkgs; [
|
2024-04-21 10:37:47 -07:00
|
|
|
|
distrobox # Platform for creating and managing Linux distribution images.
|
2023-09-19 17:53:01 -07:00
|
|
|
|
];
|
|
|
|
|
|
2023-07-10 17:52:34 -07:00
|
|
|
|
# Enable modules
|
|
|
|
|
modules = {
|
2023-09-12 21:34:40 -07:00
|
|
|
|
desktop = {
|
2024-04-06 12:44:23 -07:00
|
|
|
|
sway.enable = false;
|
2024-04-08 21:51:30 -07:00
|
|
|
|
gnome = {
|
|
|
|
|
enable = true;
|
|
|
|
|
wallpaper = "file://${../../../resources/img/wallpapers/gruvbox/kestrel.png}";
|
|
|
|
|
};
|
2023-11-19 11:29:30 -08:00
|
|
|
|
browser.enable = true;
|
2023-07-10 17:52:34 -07:00
|
|
|
|
};
|
|
|
|
|
devel = {
|
|
|
|
|
engineering.enable = true;
|
2023-09-17 17:04:49 -07:00
|
|
|
|
notes.enable = true;
|
2023-10-09 21:34:11 -07:00
|
|
|
|
python.enable = true;
|
2023-09-17 21:41:32 -07:00
|
|
|
|
tooling.enable = true;
|
2023-07-10 17:52:34 -07:00
|
|
|
|
};
|
|
|
|
|
gaming = {
|
|
|
|
|
steam.enable = true;
|
2024-03-10 10:50:58 -07:00
|
|
|
|
emulation.enable = true;
|
|
|
|
|
misc.enable = true;
|
2023-07-10 17:52:34 -07:00
|
|
|
|
};
|
2023-09-12 21:34:40 -07:00
|
|
|
|
services = {
|
2023-10-08 00:01:40 -07:00
|
|
|
|
jellyfin.enable = false;
|
2023-09-17 21:41:32 -07:00
|
|
|
|
peripherals.enable = true;
|
2023-09-12 21:34:40 -07:00
|
|
|
|
samba-client.enable = true;
|
2023-09-17 21:41:32 -07:00
|
|
|
|
virt-manager.enable = true;
|
2023-09-12 21:34:40 -07:00
|
|
|
|
};
|
|
|
|
|
system = {
|
2024-05-04 17:50:03 -07:00
|
|
|
|
nipr.enable = true;
|
2023-11-19 22:55:56 -08:00
|
|
|
|
secrets.enable = true;
|
2023-09-12 21:34:40 -07:00
|
|
|
|
ssh.enable = true;
|
2023-09-17 21:41:32 -07:00
|
|
|
|
terminal.enable = true;
|
2023-10-08 00:01:40 -07:00
|
|
|
|
wireguard-client = {
|
|
|
|
|
enable = true;
|
2023-11-19 23:25:08 -08:00
|
|
|
|
privateKeyFile = "/run/secrets/wireguard/kestrel";
|
2023-10-08 20:59:04 -07:00
|
|
|
|
address = [ "192.168.3.3/24" ];
|
2023-10-08 00:01:40 -07:00
|
|
|
|
publicKey = "bd7bbZOngl/FTdBlnbIhgCLNf6yx5X8WjiRB7E1NEQQ=";
|
|
|
|
|
endpoint = "66.218.43.87";
|
|
|
|
|
};
|
2023-07-10 17:52:34 -07:00
|
|
|
|
};
|
|
|
|
|
};
|
2023-11-18 17:19:21 -08:00
|
|
|
|
|
2023-09-12 21:34:40 -07:00
|
|
|
|
# Did you read the comment?
|
2023-11-23 01:21:58 -08:00
|
|
|
|
system.stateVersion = "23.11";
|
2023-07-10 17:52:34 -07:00
|
|
|
|
}
|