nix: Modularize

This commit is contained in:
Donovan Glover 2023-05-17 10:17:42 -04:00
parent 4a7b603536
commit 4012f0a381
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65
9 changed files with 43 additions and 20 deletions

View File

@ -17,15 +17,18 @@
./modules/networking
./modules/virtualization
./modules/xserver
./modules/systemd
./modules/vnstat
./modules/locale
./modules/firejail
./modules/timezone
./modules/nix
./modules/npm
];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
systemd.extraConfig = ''
DefaultTimeoutStopSec=10s
'';
environment.sessionVariables = {
EDITOR = "nvim";
VISUAL = "nvim";
@ -35,17 +38,6 @@
};
time.timeZone = "America/New_York";
i18n.defaultLocale = "en_US.UTF-8";
i18n.supportedLocales =
[ "en_US.UTF-8/UTF-8" "ja_JP.UTF-8/UTF-8" "fr_FR.UTF-8/UTF-8" ];
programs.firejail.enable = true;
nix.package = pkgs.nixFlakes;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
environment.systemPackages = with pkgs; [
pinentry-curses
wget
@ -69,7 +61,6 @@
ponysay
lolcat
figlet
calcurse
httpie
cmatrix
sox
@ -108,10 +99,6 @@
genact
];
networking.networkmanager.wifi.macAddress = "random";
networking.networkmanager.ethernet.macAddress = "random";
services.resolved.llmnr = "false";
environment.defaultPackages = [ ];
system.stateVersion = "22.11";

View File

@ -0,0 +1,3 @@
{
programs.firejail.enable = true;
}

View File

@ -0,0 +1,5 @@
{
i18n.defaultLocale = "en_US.UTF-8";
i18n.supportedLocales =
[ "en_US.UTF-8/UTF-8" "ja_JP.UTF-8/UTF-8" "fr_FR.UTF-8/UTF-8" ];
}

View File

@ -5,8 +5,12 @@
networkmanager = {
enable = true;
dns = "none";
wifi.macAddress = "random";
ethernet.macAddress = "random";
};
useHostResolvConf = true;
};
services.resolved.llmnr = "false";
}

10
modules/nix/default.nix Normal file
View File

@ -0,0 +1,10 @@
{ pkgs, ... }:
{
nix = {
package = pkgs.nixFlakes;
settings = {
experimental-features = [ "nix-command" "flakes" ];
};
};
}

3
modules/npm/default.nix Normal file
View File

@ -0,0 +1,3 @@
{
programs.npm.enable = true;
}

View File

@ -0,0 +1,5 @@
{
systemd.extraConfig = ''
DefaultTimeoutStopSec=10s
'';
}

View File

@ -0,0 +1,3 @@
{
time.timeZone = "America/New_York";
}

View File

@ -0,0 +1,3 @@
{
services.vnstat.enable = true;
}