mirror of
https://github.com/donovanglover/nix-config.git
synced 2025-04-16 15:28:18 +02:00
nix: Continue modularization
This commit is contained in:
parent
72bd18dcfc
commit
83b6ce6e2d
@ -8,15 +8,21 @@
|
|||||||
./greetd.nix
|
./greetd.nix
|
||||||
./home-manager.nix
|
./home-manager.nix
|
||||||
./hyprland.nix
|
./hyprland.nix
|
||||||
|
./logind.nix
|
||||||
|
./mullvad.nix
|
||||||
|
./neovim.nix
|
||||||
./networking.nix
|
./networking.nix
|
||||||
./nix.nix
|
./nix.nix
|
||||||
./piper.nix
|
./piper.nix
|
||||||
./pipewire.nix
|
./pipewire.nix
|
||||||
|
./resolved.nix
|
||||||
./starship.nix
|
./starship.nix
|
||||||
./stylix.nix
|
./stylix.nix
|
||||||
|
./systemd.nix
|
||||||
./thunar.nix
|
./thunar.nix
|
||||||
./user.nix
|
./user.nix
|
||||||
./virtualization.nix
|
./virtualization.nix
|
||||||
./vmware.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;
|
hardware.opengl.driSupport32Bit = true;
|
||||||
|
|
||||||
programs.neovim.enable = true;
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
hypr-contrib.packages."${VARIABLES.system}".grimblast
|
hypr-contrib.packages."${VARIABLES.system}".grimblast
|
||||||
nix-gaming.packages."${VARIABLES.system}".osu-stable
|
nix-gaming.packages."${VARIABLES.system}".osu-stable
|
||||||
@ -40,7 +39,6 @@ let VARIABLES = import ./variables.nix; in {
|
|||||||
slade
|
slade
|
||||||
typespeed
|
typespeed
|
||||||
osu-lazer-bin
|
osu-lazer-bin
|
||||||
mullvad-vpn
|
|
||||||
pass
|
pass
|
||||||
treefmt
|
treefmt
|
||||||
jamesdsp
|
jamesdsp
|
||||||
@ -127,8 +125,6 @@ let VARIABLES = import ./variables.nix; in {
|
|||||||
];
|
];
|
||||||
|
|
||||||
environment.sessionVariables = {
|
environment.sessionVariables = {
|
||||||
EDITOR = "nvim";
|
|
||||||
VISUAL = "nvim";
|
|
||||||
GIT_DISCOVERY_ACROSS_FILESYSTEM = "1";
|
GIT_DISCOVERY_ACROSS_FILESYSTEM = "1";
|
||||||
FZF_DEFAULT_OPTS = "--height 40% --reverse --border --color=16";
|
FZF_DEFAULT_OPTS = "--height 40% --reverse --border --color=16";
|
||||||
NODE_OPTIONS = "--max_old_space_size=16384";
|
NODE_OPTIONS = "--max_old_space_size=16384";
|
||||||
@ -137,25 +133,7 @@ let VARIABLES = import ./variables.nix; in {
|
|||||||
environment.defaultPackages = [ ];
|
environment.defaultPackages = [ ];
|
||||||
system.stateVersion = VARIABLES.stateVersion;
|
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
|
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 ];
|
networking.firewall.allowedTCPPorts = [ 11918 ];
|
||||||
|
|
||||||
zramSwap.enable = true; # Swap
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user