refactor: dedup several modules by breaking them out into feature modules
This commit is contained in:
+15
-154
@@ -5,14 +5,18 @@
|
||||
...
|
||||
}:
|
||||
{
|
||||
boot = {
|
||||
loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
systemd-boot.configurationLimit = 10;
|
||||
timeout = 0;
|
||||
};
|
||||
imports = [
|
||||
../../features/bash.nix
|
||||
../../features/nix-ld.nix
|
||||
../../features/docker.nix
|
||||
../../features/vim.nix
|
||||
../../features/avahi.nix
|
||||
../../features/systemd-boot.nix
|
||||
../../features/i18n.nix
|
||||
./nix-package-manager.nix
|
||||
];
|
||||
|
||||
boot = {
|
||||
consoleLogLevel = 3;
|
||||
|
||||
kernelParams = [
|
||||
@@ -116,13 +120,6 @@
|
||||
|
||||
openssh.enable = true;
|
||||
affinity-thumbnailer.enable = true;
|
||||
|
||||
# Enables m(ulticast)DNS (a.k.a. Bonjour) support.
|
||||
avahi = {
|
||||
enable = true;
|
||||
nssmdns4 = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
};
|
||||
|
||||
networking = {
|
||||
@@ -131,10 +128,7 @@
|
||||
networkmanager.plugins = with pkgs; [ networkmanager-openvpn ];
|
||||
|
||||
firewall = {
|
||||
trustedInterfaces = [
|
||||
"virbr0"
|
||||
"br0"
|
||||
];
|
||||
allowedTCPPorts = [ 22 ];
|
||||
|
||||
allowedTCPPortRanges = [
|
||||
{
|
||||
@@ -149,132 +143,24 @@
|
||||
to = 1764;
|
||||
} # KDE Connect
|
||||
];
|
||||
|
||||
allowedTCPPorts = [ 22 ];
|
||||
};
|
||||
};
|
||||
|
||||
time.timeZone = "America/New_York";
|
||||
|
||||
i18n = {
|
||||
defaultLocale = "en_US.UTF-8";
|
||||
|
||||
extraLocales = [
|
||||
"ja_JP.UTF-8/UTF-8"
|
||||
];
|
||||
|
||||
extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_US.UTF-8";
|
||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||
LC_MEASUREMENT = "en_US.UTF-8";
|
||||
LC_MONETARY = "en_US.UTF-8";
|
||||
LC_NAME = "en_US.UTF-8";
|
||||
LC_NUMERIC = "en_US.UTF-8";
|
||||
LC_PAPER = "en_US.UTF-8";
|
||||
LC_TELEPHONE = "en_US.UTF-8";
|
||||
LC_TIME = "en_US.UTF-8";
|
||||
};
|
||||
};
|
||||
|
||||
security.rtkit.enable = true;
|
||||
|
||||
programs = {
|
||||
ssh.startAgent = true;
|
||||
firefox.enable = true;
|
||||
|
||||
gnupg.agent = {
|
||||
enable = true;
|
||||
pinentryPackage = pkgs.pinentry-qt;
|
||||
};
|
||||
|
||||
nix-ld = {
|
||||
enable = true;
|
||||
libraries = with pkgs; [
|
||||
stdenv.cc.cc.lib
|
||||
openssl
|
||||
zlib
|
||||
icu
|
||||
curl
|
||||
libxcrypt-legacy
|
||||
gcc
|
||||
pkg-config
|
||||
busybox
|
||||
libdrm
|
||||
mesa
|
||||
libxkbcommon
|
||||
fontconfig
|
||||
libglvnd
|
||||
freetype
|
||||
libxcb
|
||||
libx11
|
||||
libice
|
||||
libsm
|
||||
libxcursor
|
||||
libxrandr
|
||||
libxft
|
||||
skia
|
||||
dotnet-sdk
|
||||
dotnet-runtime
|
||||
dotnet-runtime_8
|
||||
dotnet-runtime_10
|
||||
];
|
||||
};
|
||||
|
||||
bash = {
|
||||
enable = true;
|
||||
|
||||
interactiveShellInit = ''
|
||||
eval "$(jump shell)"
|
||||
bind -x '"\eOQ": clear;fastfetch'
|
||||
'';
|
||||
};
|
||||
|
||||
starship = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
character = {
|
||||
success_symbol = "[λ](bold green)";
|
||||
error_symbol = "[λ](bold red)";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
ssh.startAgent = true;
|
||||
|
||||
firefox.enable = true;
|
||||
thunderbird.enable = true;
|
||||
|
||||
appimage = {
|
||||
enable = true;
|
||||
binfmt = true;
|
||||
};
|
||||
|
||||
neovim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
vimAlias = true;
|
||||
|
||||
configure = {
|
||||
customRC = ''
|
||||
set nocompatible
|
||||
set backspace=indent,eol,start
|
||||
set tabstop=2
|
||||
set shiftwidth=2
|
||||
set expandtab
|
||||
'';
|
||||
|
||||
packages.myPlugins = with pkgs.vimPlugins; {
|
||||
start = [
|
||||
vim-lastplace
|
||||
vim-nix
|
||||
];
|
||||
|
||||
opt = [ ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
virtualisation = {
|
||||
docker.enable = true;
|
||||
};
|
||||
|
||||
users.users.frank = {
|
||||
@@ -293,8 +179,6 @@
|
||||
};
|
||||
|
||||
nixpkgs = {
|
||||
config.allowUnfree = true;
|
||||
|
||||
# Fix msitools compiling and failing it's test-suite.
|
||||
overlays = [
|
||||
(final: prev: {
|
||||
@@ -307,28 +191,6 @@
|
||||
];
|
||||
};
|
||||
|
||||
nix = {
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 30d";
|
||||
};
|
||||
|
||||
optimise = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
};
|
||||
|
||||
settings = {
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
|
||||
use-xdg-base-directories = true;
|
||||
};
|
||||
};
|
||||
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
wget
|
||||
@@ -355,7 +217,6 @@
|
||||
affinity-v3
|
||||
libreoffice-qt
|
||||
qimgv
|
||||
fastfetch
|
||||
vorta
|
||||
distrobox
|
||||
devenv
|
||||
|
||||
Reference in New Issue
Block a user