system: cleanup main file

This commit is contained in:
Dmitriy Pleshevskiy 2022-08-29 00:18:24 +03:00
parent 0dd0d7dc5e
commit ebec7174a4
Signed by: pleshevskiy
GPG key ID: 1B59187B161C0215
3 changed files with 53 additions and 41 deletions

View file

@ -8,40 +8,15 @@ let
secrets = import ../secrets.nix;
in
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
boot = {
# Use the GRUB 2 boot loader.
loader.grub = {
enable = true;
version = 2;
device = "/dev/sda";
};
kernelPackages = pkgs.linuxPackages_latest;
extraModulePackages = with config.boot.kernelPackages; [
rtl88x2bu
];
};
imports = [ ./machine/home ];
networking = {
hostName = "home"; # Define your hostname.
inherit (secrets.networking) extraHosts;
networkmanager.enable = true;
# 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.
useDHCP = false;
interfaces = {
enp3s0.useDHCP = true;
wlp11s0f3u2.useDHCP = true;
};
};
# Select internationalisation properties.
@ -66,7 +41,6 @@ in
openssh.enable = true;
# Xmonad
dbus = {
enable = true;
packages = [ pkgs.dconf ];
@ -80,20 +54,6 @@ in
xkbVariant = "dvorak,";
xkbOptions = "grp:win_space_toggle";
xrandrHeads = [
{
output = "DisplayPort-1";
primary = true;
}
{
output = "HDMI-A-0";
monitorConfig = ''
Option "Rotate" "right"
Option "LeftOf" "DisplayPort-1"
'';
}
];
displayManager = {
defaultSession = "none+xmonad";
};
@ -107,6 +67,7 @@ in
enable = true;
mediaKeys.enable = true;
};
hardware.pulseaudio = {
enable = true;
package = pkgs.pulseaudioFull;

View file

@ -0,0 +1,51 @@
{ config, pkgs, ... }:
let
secrets = import ../../../secrets.nix;
in
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
boot = {
# Use the GRUB 2 boot loader.
loader.grub = {
enable = true;
version = 2;
device = "/dev/sda";
};
kernelPackages = pkgs.linuxPackages_latest;
extraModulePackages = with config.boot.kernelPackages; [
rtl88x2bu
];
};
networking = {
hostName = "home"; # Define your hostname.
inherit (secrets.networking) extraHosts;
interfaces = {
enp3s0.useDHCP = true;
wlp11s0f3u2.useDHCP = true;
};
};
services.xserver = {
xrandrHeads = [
{
output = "DisplayPort-1";
primary = true;
}
{
output = "HDMI-A-0";
monitorConfig = ''
Option "Rotate" "right"
Option "LeftOf" "DisplayPort-1"
'';
}
];
};
}