mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-09 23:22:57 +00:00
setup more default.nix
This commit is contained in:
parent
9d7307d16d
commit
0685a90aa3
20
flake.nix
20
flake.nix
@ -41,18 +41,10 @@
|
||||
./nixos/hardware-configuration.nix
|
||||
./nixos/configuration.nix
|
||||
./nixos/home.nix
|
||||
./modules/desktop/xorg.nix
|
||||
./modules/desktop/i3.nix
|
||||
./modules/desktop/fonts.nix
|
||||
./modules/hardware/boot.nix
|
||||
./modules/hardware/mouse.nix
|
||||
./modules/hardware/keyboard.nix
|
||||
./modules/hardware/monitors.nix
|
||||
./modules/hardware/audio.nix
|
||||
./modules/hardware/networking.nix
|
||||
./modules/system/timezone.nix
|
||||
./modules/system/doas.nix
|
||||
./modules/system/user.nix
|
||||
./modules/desktop
|
||||
./modules/hardware
|
||||
./modules/system
|
||||
./modules/shell
|
||||
./modules/gaming
|
||||
./modules/services/keybase.nix
|
||||
./modules/applications/firefox.nix
|
||||
@ -60,10 +52,6 @@
|
||||
./modules/applications/media.nix
|
||||
./modules/applications/1password.nix
|
||||
./modules/applications/discord.nix
|
||||
./modules/shell/fish.nix
|
||||
./modules/shell/utilities.nix
|
||||
./modules/shell/git.nix
|
||||
./modules/shell/github.nix
|
||||
./modules/editor/neovim.nix
|
||||
];
|
||||
};
|
||||
|
5
modules/desktop/default.nix
Normal file
5
modules/desktop/default.nix
Normal file
@ -0,0 +1,5 @@
|
||||
{ ... }: {
|
||||
|
||||
imports = [ ./xorg.nix ./fonts.nix ./i3.nix ];
|
||||
|
||||
}
|
@ -1,10 +1,14 @@
|
||||
{ pkgs, gui, ... }: {
|
||||
{ pkgs, lib, gui, ... }: {
|
||||
|
||||
fonts.fonts = with pkgs;
|
||||
[
|
||||
gui.font.package # Used for Vim and Terminal
|
||||
# siji # More icons for Polybar
|
||||
];
|
||||
fonts.fontconfig.defaultFonts.monospace = [ gui.font.name ];
|
||||
config = lib.mkIf gui.enable {
|
||||
|
||||
fonts.fonts = with pkgs;
|
||||
[
|
||||
gui.font.package # Used for Vim and Terminal
|
||||
# siji # More icons for Polybar
|
||||
];
|
||||
fonts.fontconfig.defaultFonts.monospace = [ gui.font.name ];
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -1,34 +1,37 @@
|
||||
{ config, pkgs, identity, gui, ... }: {
|
||||
{ config, pkgs, lib, identity, gui, ... }: {
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver = {
|
||||
enable = gui.enable;
|
||||
config = lib.mkIf gui.enable {
|
||||
|
||||
# Enable touchpad support
|
||||
libinput.enable = true;
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver = {
|
||||
enable = gui.enable;
|
||||
|
||||
# Login screen
|
||||
displayManager = {
|
||||
lightdm = {
|
||||
enable = config.services.xserver.enable;
|
||||
# Enable touchpad support
|
||||
libinput.enable = true;
|
||||
|
||||
# Make the login screen dark
|
||||
greeters.gtk.theme.name = gui.gtkTheme;
|
||||
# Login screen
|
||||
displayManager = {
|
||||
lightdm = {
|
||||
enable = config.services.xserver.enable;
|
||||
|
||||
# Make the login screen dark
|
||||
greeters.gtk.theme.name = gui.gtkTheme;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs;
|
||||
[
|
||||
xclip # Clipboard
|
||||
];
|
||||
|
||||
home-manager.users.${identity.user}.programs.fish.shellAliases = {
|
||||
pbcopy = "xclip -selection clipboard -in";
|
||||
pbpaste = "xclip -selection clipboard -out";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs;
|
||||
[
|
||||
xclip # Clipboard
|
||||
];
|
||||
|
||||
home-manager.users.${identity.user}.programs.fish.shellAliases = {
|
||||
pbcopy = "xclip -selection clipboard -in";
|
||||
pbpaste = "xclip -selection clipboard -out";
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
@ -1,11 +1,13 @@
|
||||
{ pkgs, ... }: {
|
||||
{ pkgs, lib, gui, ... }: {
|
||||
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = true;
|
||||
config = lib.mkIf gui.enable {
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs;
|
||||
[
|
||||
pamixer # Audio control
|
||||
];
|
||||
environment.systemPackages = with pkgs;
|
||||
[
|
||||
pamixer # Audio control
|
||||
];
|
||||
};
|
||||
|
||||
}
|
||||
|
12
modules/hardware/default.nix
Normal file
12
modules/hardware/default.nix
Normal file
@ -0,0 +1,12 @@
|
||||
{ lib, gui, ... }: {
|
||||
|
||||
imports = [
|
||||
./audio.nix
|
||||
./boot.nix
|
||||
./keyboard.nix
|
||||
./monitors.nix
|
||||
./mouse.nix
|
||||
./networking.nix
|
||||
];
|
||||
|
||||
}
|
@ -1,49 +1,53 @@
|
||||
{ pkgs, identity, ... }: {
|
||||
{ pkgs, lib, gui, identity, ... }: {
|
||||
|
||||
# Timezone required for Redshift schedule
|
||||
imports = [ ../system/timezone.nix ];
|
||||
|
||||
environment.systemPackages = with pkgs;
|
||||
[
|
||||
ddcutil # Monitor brightness control
|
||||
];
|
||||
config = lib.mkIf gui.enable {
|
||||
|
||||
# Reduce blue light at night
|
||||
services.redshift = {
|
||||
enable = true;
|
||||
brightness = {
|
||||
day = "1.0";
|
||||
night = "1.0";
|
||||
environment.systemPackages = with pkgs;
|
||||
[
|
||||
ddcutil # Monitor brightness control
|
||||
];
|
||||
|
||||
# Reduce blue light at night
|
||||
services.redshift = {
|
||||
enable = true;
|
||||
brightness = {
|
||||
day = "1.0";
|
||||
night = "1.0";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Detect monitors (brightness)
|
||||
hardware.i2c.enable = true;
|
||||
# Detect monitors (brightness)
|
||||
hardware.i2c.enable = true;
|
||||
|
||||
# Grant user access to external monitors
|
||||
users.users.${identity.user}.extraGroups = [ "i2c" ];
|
||||
# Grant user access to external monitors
|
||||
users.users.${identity.user}.extraGroups = [ "i2c" ];
|
||||
|
||||
services.xserver.displayManager = {
|
||||
services.xserver.displayManager = {
|
||||
|
||||
# Put the login screen on the left monitor
|
||||
lightdm.greeters.gtk.extraConfig = ''
|
||||
active-monitor=0
|
||||
'';
|
||||
# Put the login screen on the left monitor
|
||||
lightdm.greeters.gtk.extraConfig = ''
|
||||
active-monitor=0
|
||||
'';
|
||||
|
||||
# Set up screen position and rotation
|
||||
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 \
|
||||
'';
|
||||
};
|
||||
|
||||
# Set up screen position and rotation
|
||||
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 \
|
||||
'';
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -1,17 +1,21 @@
|
||||
{ pkgs, ... }: {
|
||||
{ pkgs, lib, gui, ... }: {
|
||||
|
||||
# Mouse config
|
||||
services.ratbagd.enable = true;
|
||||
config = lib.mkIf gui.enable {
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
libratbag # Mouse adjustments
|
||||
piper # Mouse adjustments GUI
|
||||
];
|
||||
# Mouse config
|
||||
services.ratbagd.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
libratbag # Mouse adjustments
|
||||
piper # Mouse adjustments GUI
|
||||
];
|
||||
|
||||
services.xserver.libinput.mouse = {
|
||||
# Disable mouse acceleration
|
||||
accelProfile = "flat";
|
||||
accelSpeed = "1.15";
|
||||
};
|
||||
|
||||
services.xserver.libinput.mouse = {
|
||||
# Disable mouse acceleration
|
||||
accelProfile = "flat";
|
||||
accelSpeed = "1.15";
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
{ ... }: { imports = [ ./fish.nix ]; }
|
||||
{ ... }: { imports = [ ./fish.nix ./git.nix ./github.nix ./utilities.nix ]; }
|
||||
|
5
modules/system/default.nix
Normal file
5
modules/system/default.nix
Normal file
@ -0,0 +1,5 @@
|
||||
{ ... }: {
|
||||
|
||||
imports = [ ./user.nix ./timezone.nix ./doas.nix ];
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user