2022-09-11 19:14:43 +03:00
|
|
|
{ config, pkgs, lib, ... }:
|
2022-08-29 00:18:24 +03:00
|
|
|
|
|
|
|
{
|
2022-08-30 04:32:05 +03:00
|
|
|
imports = [
|
|
|
|
# Include the results of the hardware scan.
|
|
|
|
./hardware-configuration.nix
|
2022-10-12 02:56:07 +03:00
|
|
|
../modules/common.nix
|
|
|
|
../modules/sound.nix
|
|
|
|
../modules/window_manager.nix
|
|
|
|
../modules/fonts.nix
|
|
|
|
../modules/gnupg.nix
|
|
|
|
../modules/nix.nix
|
|
|
|
../modules/garbage-collector.nix
|
2022-10-19 19:17:37 +03:00
|
|
|
../modules/networking.secret.nix
|
2022-08-30 04:32:05 +03:00
|
|
|
];
|
2022-08-29 00:18:24 +03:00
|
|
|
|
2022-10-12 02:56:07 +03:00
|
|
|
# Configure kernel
|
2022-08-29 00:18:24 +03:00
|
|
|
boot = {
|
2022-10-21 02:45:10 +03:00
|
|
|
kernelPackages = pkgs.linuxPackages_5_19;
|
2022-08-29 00:18:24 +03:00
|
|
|
extraModulePackages = with config.boot.kernelPackages; [
|
|
|
|
rtl88x2bu
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2022-10-12 02:56:07 +03:00
|
|
|
# Use the GRUB 2 boot loader.
|
|
|
|
boot.loader.grub = {
|
|
|
|
enable = true;
|
|
|
|
version = 2;
|
|
|
|
device = "/dev/sdb";
|
|
|
|
};
|
|
|
|
|
2022-08-29 00:18:24 +03:00
|
|
|
networking = {
|
|
|
|
hostName = "home"; # Define your hostname.
|
|
|
|
|
2022-10-12 02:56:07 +03:00
|
|
|
useDHCP = false;
|
2022-08-29 00:18:24 +03:00
|
|
|
interfaces = {
|
|
|
|
enp3s0.useDHCP = true;
|
|
|
|
wlp11s0f3u2.useDHCP = true;
|
|
|
|
};
|
2022-10-12 02:56:07 +03:00
|
|
|
|
|
|
|
networkmanager.enable = true;
|
2022-08-29 00:18:24 +03:00
|
|
|
};
|
|
|
|
|
2022-11-13 23:14:04 +03:00
|
|
|
local.nix.allowUnfreePackages = [ "cnijfilter2" ];
|
|
|
|
|
2022-09-11 19:14:43 +03:00
|
|
|
services = {
|
|
|
|
avahi = {
|
|
|
|
enable = true;
|
|
|
|
nssmdns = true;
|
|
|
|
};
|
|
|
|
printing = {
|
|
|
|
enable = true;
|
|
|
|
drivers = with pkgs; [ gutenprint cnijfilter2 ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-08-29 00:18:24 +03:00
|
|
|
services.xserver = {
|
2022-08-29 16:09:59 +03:00
|
|
|
# All monitors in the right order
|
2022-08-31 13:23:54 +03:00
|
|
|
# Source: https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/x11/xserver.nix#L83
|
2022-08-29 00:18:24 +03:00
|
|
|
xrandrHeads = [
|
|
|
|
{
|
|
|
|
output = "HDMI-A-0";
|
|
|
|
monitorConfig = ''
|
2022-08-29 16:09:59 +03:00
|
|
|
Option "PreferredMode" "1920x1080"
|
2022-08-29 00:18:24 +03:00
|
|
|
Option "Rotate" "right"
|
2022-08-29 16:09:59 +03:00
|
|
|
'';
|
|
|
|
}
|
|
|
|
{
|
|
|
|
output = "DisplayPort-1";
|
|
|
|
primary = true;
|
|
|
|
monitorConfig = ''
|
|
|
|
Option "PreferredMode" "2560x1440"
|
2022-08-29 00:18:24 +03:00
|
|
|
'';
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
2022-10-12 02:56:07 +03:00
|
|
|
|
|
|
|
# Enable the Docker
|
|
|
|
virtualisation.docker.enable = true;
|
2022-10-13 07:47:31 +03:00
|
|
|
|
|
|
|
local.nix.enableMyRegistry = true;
|
2022-08-29 00:18:24 +03:00
|
|
|
}
|