mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-11-22 00:03:55 +01:00
nix: Continue modularization
This commit is contained in:
parent
72bd18dcfc
commit
83b6ce6e2d
@ -8,15 +8,21 @@
|
||||
./greetd.nix
|
||||
./home-manager.nix
|
||||
./hyprland.nix
|
||||
./logind.nix
|
||||
./mullvad.nix
|
||||
./neovim.nix
|
||||
./networking.nix
|
||||
./nix.nix
|
||||
./piper.nix
|
||||
./pipewire.nix
|
||||
./resolved.nix
|
||||
./starship.nix
|
||||
./stylix.nix
|
||||
./systemd.nix
|
||||
./thunar.nix
|
||||
./user.nix
|
||||
./virtualization.nix
|
||||
./vmware.nix
|
||||
./zram.nix
|
||||
];
|
||||
}
|
||||
|
9
modules/logind.nix
Normal file
9
modules/logind.nix
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
services.logind = {
|
||||
# Don't suspend on lid close
|
||||
lidSwitch = "ignore";
|
||||
|
||||
# Don't shutdown when power button is short-pressed
|
||||
extraConfig = "HandlePowerKey=ignore";
|
||||
};
|
||||
}
|
12
modules/mullvad.nix
Normal file
12
modules/mullvad.nix
Normal file
@ -0,0 +1,12 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
services.mullvad-vpn = {
|
||||
enable = true;
|
||||
enableExcludeWrapper = false;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
mullvad-vpn
|
||||
];
|
||||
}
|
8
modules/neovim.nix
Normal file
8
modules/neovim.nix
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
programs.neovim.enable = true;
|
||||
|
||||
environment.sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
VISUAL = "nvim";
|
||||
};
|
||||
}
|
4
modules/resolved.nix
Normal file
4
modules/resolved.nix
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
# Don't use link-local multicast name resolution
|
||||
services.resolved.llmnr = "false";
|
||||
}
|
9
modules/systemd.nix
Normal file
9
modules/systemd.nix
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
systemd = {
|
||||
# Limit shutdown wait time to 10 seconds
|
||||
extraConfig = "DefaultTimeoutStopSec=10s";
|
||||
|
||||
# Don't wait for an internet connection before obtaining a graphical interface
|
||||
services.NetworkManager-wait-online.enable = false;
|
||||
};
|
||||
}
|
4
modules/zram.nix
Normal file
4
modules/zram.nix
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
# Use zram for swap
|
||||
zramSwap.enable = true; # Swap
|
||||
}
|
22
src/main.nix
22
src/main.nix
@ -28,7 +28,6 @@ let VARIABLES = import ./variables.nix; in {
|
||||
|
||||
hardware.opengl.driSupport32Bit = true;
|
||||
|
||||
programs.neovim.enable = true;
|
||||
environment.systemPackages = with pkgs; [
|
||||
hypr-contrib.packages."${VARIABLES.system}".grimblast
|
||||
nix-gaming.packages."${VARIABLES.system}".osu-stable
|
||||
@ -40,7 +39,6 @@ let VARIABLES = import ./variables.nix; in {
|
||||
slade
|
||||
typespeed
|
||||
osu-lazer-bin
|
||||
mullvad-vpn
|
||||
pass
|
||||
treefmt
|
||||
jamesdsp
|
||||
@ -127,8 +125,6 @@ let VARIABLES = import ./variables.nix; in {
|
||||
];
|
||||
|
||||
environment.sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
VISUAL = "nvim";
|
||||
GIT_DISCOVERY_ACROSS_FILESYSTEM = "1";
|
||||
FZF_DEFAULT_OPTS = "--height 40% --reverse --border --color=16";
|
||||
NODE_OPTIONS = "--max_old_space_size=16384";
|
||||
@ -137,25 +133,7 @@ let VARIABLES = import ./variables.nix; in {
|
||||
environment.defaultPackages = [ ];
|
||||
system.stateVersion = VARIABLES.stateVersion;
|
||||
|
||||
systemd.extraConfig = "DefaultTimeoutStopSec=10s"; # Prevent hanging on shutdown
|
||||
services.logind.lidSwitch = "ignore"; # Don't suspend on lid close
|
||||
|
||||
# Don't shutdown when power button is short-pressed
|
||||
services.logind.extraConfig = "HandlePowerKey=ignore";
|
||||
|
||||
time.timeZone = "${VARIABLES.timezone}"; # Timezone
|
||||
|
||||
services.resolved.llmnr = "false";
|
||||
|
||||
systemd.services.NetworkManager-wait-online.enable = false;
|
||||
|
||||
# mullvad-vpn
|
||||
services.mullvad-vpn = {
|
||||
enable = true;
|
||||
enableExcludeWrapper = false;
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 11918 ];
|
||||
|
||||
zramSwap.enable = true; # Swap
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user