2023-03-31 17:39:02 +03:00
|
|
|
|
{ config, pkgs, ... }:
|
2022-09-25 23:38:57 +03:00
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
imports = [
|
|
|
|
|
# Include the results of the hardware scan.
|
|
|
|
|
./hardware-configuration.nix
|
2023-03-18 16:47:02 +03:00
|
|
|
|
../../shared/common.nix
|
|
|
|
|
../../shared/sound.nix
|
|
|
|
|
../../shared/window-manager.nix
|
|
|
|
|
../../shared/fonts.nix
|
|
|
|
|
../../shared/gnupg.nix
|
|
|
|
|
../../shared/garbage-collector.nix
|
|
|
|
|
../../shared/networking.secret.nix
|
2023-03-31 17:39:02 +03:00
|
|
|
|
../../shared/ipfs.nix
|
2022-09-25 23:38:57 +03:00
|
|
|
|
];
|
|
|
|
|
|
2022-10-08 22:45:35 +03:00
|
|
|
|
# Use latest kernel
|
2022-11-17 23:12:19 +03:00
|
|
|
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
2022-09-25 23:38:57 +03:00
|
|
|
|
|
2022-10-08 22:45:35 +03:00
|
|
|
|
# Use the systemd-boot EFI boot loader.
|
|
|
|
|
boot.loader = {
|
2022-10-13 23:11:12 +03:00
|
|
|
|
systemd-boot = {
|
|
|
|
|
enable = true;
|
|
|
|
|
configurationLimit = 10;
|
|
|
|
|
};
|
|
|
|
|
|
2022-10-08 22:45:35 +03:00
|
|
|
|
efi.canTouchEfiVariables = true;
|
2022-09-25 23:38:57 +03:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
networking = {
|
|
|
|
|
hostName = "laptop"; # Define your hostname.
|
|
|
|
|
|
2022-10-12 02:56:07 +03:00
|
|
|
|
useDHCP = false;
|
2022-09-25 23:38:57 +03:00
|
|
|
|
interfaces = {
|
|
|
|
|
enp3s0.useDHCP = true;
|
|
|
|
|
wlp2s0.useDHCP = true;
|
|
|
|
|
};
|
2022-10-12 02:56:07 +03:00
|
|
|
|
|
|
|
|
|
networkmanager.enable = true;
|
2022-09-25 23:38:57 +03:00
|
|
|
|
};
|
|
|
|
|
|
2022-10-03 13:04:35 +03:00
|
|
|
|
# enable bluetooth
|
|
|
|
|
hardware.bluetooth.enable = true;
|
|
|
|
|
|
2022-10-08 22:45:35 +03:00
|
|
|
|
# configure mouse and touchpad
|
2022-10-03 13:04:35 +03:00
|
|
|
|
services.xserver.libinput = {
|
|
|
|
|
enable = true;
|
|
|
|
|
touchpad = {
|
2022-10-04 14:54:32 +03:00
|
|
|
|
accelSpeed = "0.5";
|
2022-10-03 13:04:35 +03:00
|
|
|
|
disableWhileTyping = true;
|
2022-10-03 12:46:46 +03:00
|
|
|
|
};
|
|
|
|
|
};
|
2022-10-12 02:56:07 +03:00
|
|
|
|
|
2023-02-16 22:53:42 +03:00
|
|
|
|
services.logind.extraConfig = ''
|
|
|
|
|
# don’t shutdown when power button is short-pressed
|
|
|
|
|
HandlePowerKey=ignore
|
|
|
|
|
'';
|
|
|
|
|
|
2022-10-12 02:56:07 +03:00
|
|
|
|
# Enable the Docker
|
|
|
|
|
virtualisation.docker.enable = true;
|
2022-10-13 07:47:31 +03:00
|
|
|
|
|
2023-03-02 16:00:19 +03:00
|
|
|
|
# Additional nix configs
|
2022-10-13 07:47:31 +03:00
|
|
|
|
local.nix.enableMyRegistry = true;
|
2023-03-02 16:00:19 +03:00
|
|
|
|
|
|
|
|
|
# Wireguard client
|
2023-03-02 17:36:29 +03:00
|
|
|
|
age.secrets.wireguard-asus-gl553vd-private = {
|
2023-03-18 23:38:11 +03:00
|
|
|
|
file = ../../../secrets/wireguard-asus-gl553vd-private.age;
|
2023-03-02 17:36:29 +03:00
|
|
|
|
mode = "0400";
|
|
|
|
|
};
|
2023-03-02 16:00:19 +03:00
|
|
|
|
local.wireguard = {
|
2023-03-03 10:27:09 +03:00
|
|
|
|
enable = false;
|
2023-03-02 16:00:19 +03:00
|
|
|
|
ip = "10.100.0.3/24";
|
|
|
|
|
privateKeyFile = config.age.secrets.wireguard-asus-gl553vd-private.path;
|
|
|
|
|
};
|
2022-09-25 23:38:57 +03:00
|
|
|
|
}
|