mirror of
https://github.com/nmasur/dotfiles
synced 2025-07-05 12:40:13 +00:00
separate xorg and i3
This commit is contained in:
@ -1,5 +1,12 @@
|
||||
{ pkgs, lib, user, gui, ... }:
|
||||
|
||||
{
|
||||
home-manager.users.${user}.home.packages = [ (lib.mkIf gui pkgs.firefox) ];
|
||||
config = lib.mkIf gui {
|
||||
home-manager.users.${user}.home.packages = [ pkgs.firefox ];
|
||||
|
||||
# Required for setting GTK theme (for preferred-color-scheme in browser)
|
||||
services.dbus.packages = [ pkgs.dconf ];
|
||||
programs.dconf.enable = true;
|
||||
};
|
||||
|
||||
}
|
||||
|
5
modules/desktop/i3.nix
Normal file
5
modules/desktop/i3.nix
Normal file
@ -0,0 +1,5 @@
|
||||
{ ... }: {
|
||||
|
||||
services.xserver.windowManager = { i3 = { enable = true; }; };
|
||||
|
||||
}
|
53
modules/desktop/xorg.nix
Normal file
53
modules/desktop/xorg.nix
Normal file
@ -0,0 +1,53 @@
|
||||
{ pkgs, ... }: {
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
|
||||
# Enable touchpad support
|
||||
libinput.enable = true;
|
||||
|
||||
# Disable mouse acceleration
|
||||
libinput.mouse.accelProfile = "flat";
|
||||
libinput.mouse.accelSpeed = "1.15";
|
||||
|
||||
# Keyboard responsiveness
|
||||
autoRepeatDelay = 250;
|
||||
autoRepeatInterval = 40;
|
||||
|
||||
# Configure keymap in X11
|
||||
layout = "us";
|
||||
xkbOptions = "eurosign:e,caps:swapescape";
|
||||
|
||||
# Login screen
|
||||
displayManager = {
|
||||
lightdm = {
|
||||
enable = true;
|
||||
|
||||
# Make the login screen dark
|
||||
greeters.gtk.theme.name = "Adwaita-dark";
|
||||
|
||||
# Put the login screen on the left monitor
|
||||
greeters.gtk.extraConfig = ''
|
||||
active-monitor=0
|
||||
'';
|
||||
};
|
||||
setupCommands = ''
|
||||
${pkgs.xorg.xrandr}/bin/xrandr --output DisplayPort-0 \
|
||||
--mode 1920x1200 \
|
||||
--pos 1920x0 \
|
||||
--rotate left \
|
||||
--output HDMI-0 \
|
||||
--primary \
|
||||
--mode 1920x1080 \
|
||||
--pos 0x559 \
|
||||
--rotate normal \
|
||||
--output DVI-0 --off \
|
||||
--output DVI-1 --off \
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -16,4 +16,7 @@
|
||||
|
||||
};
|
||||
|
||||
# Used for icons in Vim
|
||||
fonts.fonts = with pkgs; [ nerdfonts ];
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,7 @@
|
||||
{ pkgs, user, ... }: {
|
||||
|
||||
users.users.${user}.shell = pkgs.fish;
|
||||
|
||||
home-manager.users.${user} = {
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
|
20
modules/system/user.nix
Normal file
20
modules/system/user.nix
Normal file
@ -0,0 +1,20 @@
|
||||
{ user, ... }: {
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.${user} = {
|
||||
|
||||
# Create a home directory for human user
|
||||
isNormalUser = true;
|
||||
|
||||
# Automatically create a password to start
|
||||
initialPassword = "changeme";
|
||||
|
||||
# Enable sudo privileges
|
||||
extraGroups = [
|
||||
"wheel" # Sudo privileges
|
||||
"i2c" # Access to external monitors
|
||||
];
|
||||
|
||||
};
|
||||
|
||||
}
|
Reference in New Issue
Block a user