nix: Continue modularization

This commit is contained in:
Donovan Glover 2023-05-17 09:23:38 -04:00
parent 9c64fffdc8
commit 4a7b603536
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65
11 changed files with 98 additions and 50 deletions

View File

@ -12,44 +12,20 @@
./modules/tlp.nix ./modules/tlp.nix
./modules/osu ./modules/osu
./modules/srb2 ./modules/srb2
./modules/mullvad
./modules/pipewire
./modules/networking
./modules/virtualization
./modules/xserver
]; ];
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
services.xserver.displayManager.lightdm.enable = false;
networking.hostName = "nixos";
networking.networkmanager.enable = true;
networking.networkmanager.unmanaged = [ "interface-name:ve-*" ];
networking.networkmanager.dns = "none";
networking.useHostResolvConf = true;
systemd.extraConfig = '' systemd.extraConfig = ''
DefaultTimeoutStopSec=10s DefaultTimeoutStopSec=10s
''; '';
virtualisation.vmVariant = {
virtualisation = {
memorySize = 8192;
cores = 4;
};
virtualisation.qemu.options =
[ "-device virtio-vga-gl" "-display sdl,gl=on" ];
services.xserver.desktopManager.gnome.enable = true;
services.xserver.displayManager.gdm.enable = true;
i18n.inputMethod = lib.mkDefault {
enabled = "ibus";
ibus.engines = with pkgs.ibus-engines; [ mozc ];
};
services.gnome.core-utilities.enable = false;
environment.gnome.excludePackages = [ pkgs.gnome-tour ];
hardware.pulseaudio.enable = false;
};
environment.sessionVariables = { environment.sessionVariables = {
EDITOR = "nvim"; EDITOR = "nvim";
VISUAL = "nvim"; VISUAL = "nvim";
@ -58,12 +34,7 @@
NODE_OPTIONS = "--max_old_space_size=16384"; NODE_OPTIONS = "--max_old_space_size=16384";
}; };
services.vnstat.enable = true;
services.tumbler.enable = true;
security.rtkit.enable = true;
users.defaultUserShell = pkgs.fish;
environment.shells = with pkgs; [ fish ];
time.timeZone = "America/New_York"; time.timeZone = "America/New_York";
@ -71,7 +42,6 @@
i18n.supportedLocales = i18n.supportedLocales =
[ "en_US.UTF-8/UTF-8" "ja_JP.UTF-8/UTF-8" "fr_FR.UTF-8/UTF-8" ]; [ "en_US.UTF-8/UTF-8" "ja_JP.UTF-8/UTF-8" "fr_FR.UTF-8/UTF-8" ];
services.xserver.enable = true;
programs.firejail.enable = true; programs.firejail.enable = true;
nix.package = pkgs.nixFlakes; nix.package = pkgs.nixFlakes;
@ -81,7 +51,6 @@
wget wget
grim grim
slurp slurp
mullvad-vpn
mullvad-browser mullvad-browser
papirus-icon-theme papirus-icon-theme
mediainfo mediainfo
@ -110,7 +79,6 @@
rsync rsync
jq jq
keepassxc keepassxc
stow
exa exa
fd fd
fzf fzf
@ -120,16 +88,13 @@
typespeed typespeed
slade slade
gdu gdu
ranger
nixfmt nixfmt
whois whois
lnch lnch
libnotify
dwt1-shell-color-scripts dwt1-shell-color-scripts
dig dig
trashy trashy
swaybg swaybg
udiskie
brightnessctl brightnessctl
killall killall
nodejs nodejs
@ -141,22 +106,13 @@
rustfmt rustfmt
cargo cargo
genact genact
(pkgs.callPackage ./pkgs/srb2.nix {})
]; ];
services.mullvad-vpn.enable = true;
services.mullvad-vpn.enableExcludeWrapper = false;
networking.networkmanager.wifi.macAddress = "random"; networking.networkmanager.wifi.macAddress = "random";
networking.networkmanager.ethernet.macAddress = "random"; networking.networkmanager.ethernet.macAddress = "random";
services.resolved.llmnr = "false"; services.resolved.llmnr = "false";
environment.defaultPackages = [ ]; environment.defaultPackages = [ ];
services.xserver.excludePackages = [ pkgs.xterm ];
# Force containers to use mullvad
networking.nat.enable = true;
networking.nat.internalInterfaces = [ "ve-+" ];
networking.nat.externalInterface = "wg-mullvad";
system.stateVersion = "22.11"; system.stateVersion = "22.11";
} }

View File

@ -30,7 +30,6 @@
./home.nix ./home.nix
./home-manager ./home-manager
hyprland.nixosModules.default hyprland.nixosModules.default
{ programs.hyprland.enable = true; }
stylix.nixosModules.stylix stylix.nixosModules.stylix
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
]; ];

View File

@ -1,4 +1,8 @@
{ pkgs, ... }:
{ {
environment.systemPackages = [ pkgs.libnotify ];
home-manager.sharedModules = [{ home-manager.sharedModules = [{
services.dunst = { services.dunst = {
enable = true; enable = true;

View File

@ -1,4 +1,6 @@
{ {
programs.hyprland.enable = true;
home-manager.sharedModules = [{ home-manager.sharedModules = [{
xdg.configFile."hypr/hyprland.conf".text = '' xdg.configFile."hypr/hyprland.conf".text = ''
env=XCURSOR_SIZE,24 env=XCURSOR_SIZE,24

View File

@ -2,6 +2,7 @@
{ {
programs.thunar.enable = true; programs.thunar.enable = true;
services.tumbler.enable = true;
environment.systemPackages = [ pkgs.xfce.exo ]; environment.systemPackages = [ pkgs.xfce.exo ];
home-manager.sharedModules = [{ home-manager.sharedModules = [{

View File

@ -1,6 +1,12 @@
{ pkgs, ... }:
{ {
users.defaultUserShell = pkgs.fish;
environment.shells = [ pkgs.fish ];
programs.fish = { programs.fish = {
enable = true; enable = true;
shellAliases = { shellAliases = {
ls = "exa --group-directories-first -I 'lost+found'"; ls = "exa --group-directories-first -I 'lost+found'";
tree = tree =
@ -8,6 +14,7 @@
mv = "mv -i"; mv = "mv -i";
rg = "rg --max-columns=2000"; rg = "rg --max-columns=2000";
}; };
shellAbbrs = { shellAbbrs = {
g = "git"; g = "git";
ga = "git add"; ga = "git add";

View File

@ -0,0 +1,18 @@
{
services.mullvad-vpn = {
enable = true;
enableExcludeWrapper = false;
};
networking = {
nat = {
enable = true;
internalInterfaces = [ "ve-+" ];
externalInterface = "wg-mullvad";
};
networkmanager = {
unmanaged = [ "interface-name:ve-*" ];
};
};
}

View File

@ -0,0 +1,12 @@
{
networking = {
hostName = "nixos";
networkmanager = {
enable = true;
dns = "none";
};
useHostResolvConf = true;
};
}

View File

@ -0,0 +1,15 @@
{
services.pipewire = {
enable = true;
alsa = {
enable = true;
support32Bit = true;
};
pulse.enable = true;
jack.enable = true;
};
security.rtkit.enable = true;
}

View File

@ -0,0 +1,25 @@
{ pkgs, lib, ... }:
{
virtualisation.vmVariant = {
virtualisation = {
memorySize = 8192;
cores = 4;
};
virtualisation.qemu.options =
[ "-device virtio-vga-gl" "-display sdl,gl=on" ];
services.xserver.desktopManager.gnome.enable = true;
services.xserver.displayManager.gdm.enable = true;
i18n.inputMethod = lib.mkDefault {
enabled = "ibus";
ibus.engines = with pkgs.ibus-engines; [ mozc ];
};
services.gnome.core-utilities.enable = false;
environment.gnome.excludePackages = [ pkgs.gnome-tour ];
hardware.pulseaudio.enable = false;
};
}

View File

@ -0,0 +1,9 @@
{ pkgs, ... }:
{
services.xserver = {
enable = true;
displayManager.lightdm.enable = false;
excludePackages = [ pkgs.xterm ];
};
}