MODULARIZE

This commit is contained in:
Benson Chu 2023-12-30 10:53:36 -06:00
parent 7703ac4a6f
commit 70c9294388
3 changed files with 23 additions and 29 deletions

View file

@ -66,6 +66,7 @@
]; ];
}; };
services.tailscale.enable = true;
# Allow unfree packages # Allow unfree packages
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;

20
common/laptop-things.nix Normal file
View file

@ -0,0 +1,20 @@
{ config, pkgs, ... }:
{
services.logind = {
extraConfig = "HandlePowerKey=suspend";
lidSwitch = "suspend";
};
hardware.bluetooth.enable = true; # enables support for Bluetooth
# Configure keymap in X11
services.xserver = {
layout = "us,us";
xkbVariant = "dvorak,";
xkbOptions = "grp:win_space_toggle";
};
# Configure console keymap
console.keyMap = "dvorak";
}

View file

@ -8,6 +8,8 @@ in
[ [
# ./home-git-repos.nix # ./home-git-repos.nix
../../common/configuration.nix ../../common/configuration.nix
../../common/laptop-things.nix
../../common/exwm.nix
# Include the results of the hardware scan. # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
@ -21,15 +23,6 @@ in
services.xserver.displayManager.sddm.enable = true; services.xserver.displayManager.sddm.enable = true;
services.xserver.desktopManager.plasma5.enable = true; services.xserver.desktopManager.plasma5.enable = true;
# home-manager.users.benson = {
# services.network-manager-applet.enable = true;
# };
# VNC Server
services.xrdp.enable = true;
services.xrdp.defaultWindowManager = "startplasma-x11";
services.xrdp.openFirewall = true;
services.syncthing = { services.syncthing = {
enable = true; enable = true;
user = "benson"; user = "benson";
@ -37,23 +30,6 @@ in
dataDir = "/home/benson/.config/syncthing/db"; # Folder for Syncthing's database dataDir = "/home/benson/.config/syncthing/db"; # Folder for Syncthing's database
}; };
services.logind = {
extraConfig = "HandlePowerKey=suspend";
lidSwitch = "suspend";
};
hardware.bluetooth.enable = true; # enables support for Bluetooth
# Configure keymap in X11
services.xserver = {
layout = "us,us";
xkbVariant = "dvorak,";
xkbOptions = "grp:win_space_toggle";
};
# Configure console keymap
console.keyMap = "dvorak";
# Define a user account. Don't forget to set a password with passwd. # Define a user account. Don't forget to set a password with passwd.
users.users.benson = { users.users.benson = {
isNormalUser = true; isNormalUser = true;
@ -66,11 +42,8 @@ in
]; ];
}; };
fonts.packages = with pkgs; [ roboto-mono ];
# Enable the OpenSSH daemon. # Enable the OpenSSH daemon.
services.openssh.enable = true; services.openssh.enable = true;
services.tailscale.enable = true;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [