mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-11-14 12:23:58 +01:00
nix: Continue modularization
This commit is contained in:
parent
9c64fffdc8
commit
4a7b603536
@ -12,44 +12,20 @@
|
||||
./modules/tlp.nix
|
||||
./modules/osu
|
||||
./modules/srb2
|
||||
./modules/mullvad
|
||||
./modules/pipewire
|
||||
./modules/networking
|
||||
./modules/virtualization
|
||||
./modules/xserver
|
||||
];
|
||||
|
||||
boot.loader.systemd-boot.enable = 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 = ''
|
||||
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 = {
|
||||
EDITOR = "nvim";
|
||||
VISUAL = "nvim";
|
||||
@ -58,12 +34,7 @@
|
||||
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";
|
||||
|
||||
@ -71,7 +42,6 @@
|
||||
i18n.supportedLocales =
|
||||
[ "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;
|
||||
nix.package = pkgs.nixFlakes;
|
||||
@ -81,7 +51,6 @@
|
||||
wget
|
||||
grim
|
||||
slurp
|
||||
mullvad-vpn
|
||||
mullvad-browser
|
||||
papirus-icon-theme
|
||||
mediainfo
|
||||
@ -110,7 +79,6 @@
|
||||
rsync
|
||||
jq
|
||||
keepassxc
|
||||
stow
|
||||
exa
|
||||
fd
|
||||
fzf
|
||||
@ -120,16 +88,13 @@
|
||||
typespeed
|
||||
slade
|
||||
gdu
|
||||
ranger
|
||||
nixfmt
|
||||
whois
|
||||
lnch
|
||||
libnotify
|
||||
dwt1-shell-color-scripts
|
||||
dig
|
||||
trashy
|
||||
swaybg
|
||||
udiskie
|
||||
brightnessctl
|
||||
killall
|
||||
nodejs
|
||||
@ -141,22 +106,13 @@
|
||||
rustfmt
|
||||
cargo
|
||||
genact
|
||||
(pkgs.callPackage ./pkgs/srb2.nix {})
|
||||
];
|
||||
|
||||
services.mullvad-vpn.enable = true;
|
||||
services.mullvad-vpn.enableExcludeWrapper = false;
|
||||
networking.networkmanager.wifi.macAddress = "random";
|
||||
networking.networkmanager.ethernet.macAddress = "random";
|
||||
services.resolved.llmnr = "false";
|
||||
|
||||
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";
|
||||
}
|
||||
|
@ -30,7 +30,6 @@
|
||||
./home.nix
|
||||
./home-manager
|
||||
hyprland.nixosModules.default
|
||||
{ programs.hyprland.enable = true; }
|
||||
stylix.nixosModules.stylix
|
||||
home-manager.nixosModules.home-manager
|
||||
];
|
||||
|
@ -1,4 +1,8 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = [ pkgs.libnotify ];
|
||||
|
||||
home-manager.sharedModules = [{
|
||||
services.dunst = {
|
||||
enable = true;
|
||||
|
@ -1,4 +1,6 @@
|
||||
{
|
||||
programs.hyprland.enable = true;
|
||||
|
||||
home-manager.sharedModules = [{
|
||||
xdg.configFile."hypr/hyprland.conf".text = ''
|
||||
env=XCURSOR_SIZE,24
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
{
|
||||
programs.thunar.enable = true;
|
||||
services.tumbler.enable = true;
|
||||
environment.systemPackages = [ pkgs.xfce.exo ];
|
||||
|
||||
home-manager.sharedModules = [{
|
||||
|
@ -1,6 +1,12 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
users.defaultUserShell = pkgs.fish;
|
||||
environment.shells = [ pkgs.fish ];
|
||||
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
|
||||
shellAliases = {
|
||||
ls = "exa --group-directories-first -I 'lost+found'";
|
||||
tree =
|
||||
@ -8,6 +14,7 @@
|
||||
mv = "mv -i";
|
||||
rg = "rg --max-columns=2000";
|
||||
};
|
||||
|
||||
shellAbbrs = {
|
||||
g = "git";
|
||||
ga = "git add";
|
||||
|
18
modules/mullvad/default.nix
Normal file
18
modules/mullvad/default.nix
Normal 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-*" ];
|
||||
};
|
||||
};
|
||||
}
|
12
modules/networking/default.nix
Normal file
12
modules/networking/default.nix
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
networking = {
|
||||
hostName = "nixos";
|
||||
|
||||
networkmanager = {
|
||||
enable = true;
|
||||
dns = "none";
|
||||
};
|
||||
|
||||
useHostResolvConf = true;
|
||||
};
|
||||
}
|
15
modules/pipewire/default.nix
Normal file
15
modules/pipewire/default.nix
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
|
||||
alsa = {
|
||||
enable = true;
|
||||
support32Bit = true;
|
||||
};
|
||||
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
|
||||
security.rtkit.enable = true;
|
||||
}
|
25
modules/virtualization/default.nix
Normal file
25
modules/virtualization/default.nix
Normal 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;
|
||||
};
|
||||
}
|
9
modules/xserver/default.nix
Normal file
9
modules/xserver/default.nix
Normal file
@ -0,0 +1,9 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
displayManager.lightdm.enable = false;
|
||||
excludePackages = [ pkgs.xterm ];
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user