refactor: dedup several modules by breaking them out into feature modules
This commit is contained in:
+12
-126
@@ -1,25 +1,20 @@
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
boot.loader = {
|
||||
systemd-boot.enable = true;
|
||||
systemd-boot.configurationLimit = 10;
|
||||
efi.canTouchEfiVariables = true;
|
||||
timeout = 0;
|
||||
};
|
||||
imports = [
|
||||
../../features/bash.nix
|
||||
../../features/vim.nix
|
||||
../../features/docker.nix
|
||||
../../features/libvirt.nix
|
||||
../../features/avahi.nix
|
||||
../../features/systemd-boot.nix
|
||||
../../features/i18n.nix
|
||||
./nix-package-manager.nix
|
||||
];
|
||||
|
||||
services = {
|
||||
avahi = {
|
||||
enable = true;
|
||||
nssmdns4 = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
openssh.enable = true;
|
||||
};
|
||||
services.openssh.enable = true;
|
||||
|
||||
networking = {
|
||||
useNetworkd = true;
|
||||
@@ -68,91 +63,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
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";
|
||||
};
|
||||
};
|
||||
|
||||
programs = {
|
||||
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)";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
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 = [ ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
ssh.startAgent = true;
|
||||
};
|
||||
|
||||
virtualisation = {
|
||||
docker.enable = true;
|
||||
spiceUSBRedirection.enable = true;
|
||||
|
||||
libvirtd = {
|
||||
enable = true;
|
||||
|
||||
qemu = {
|
||||
package = pkgs.qemu_kvm;
|
||||
runAsRoot = true;
|
||||
swtpm.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
programs.ssh.startAgent = true;
|
||||
|
||||
users.users.frank = {
|
||||
isNormalUser = true;
|
||||
@@ -174,14 +85,12 @@
|
||||
nil
|
||||
bash-language-server
|
||||
devenv
|
||||
jump
|
||||
weather
|
||||
borgbackup
|
||||
openjdk
|
||||
openjdk17
|
||||
openjdk25
|
||||
tmux
|
||||
fastfetch
|
||||
ripgrep
|
||||
|
||||
(python3.withPackages (
|
||||
@@ -196,28 +105,5 @@
|
||||
sessionVariables = import ../../features/xdg.nix { inherit pkgs; };
|
||||
};
|
||||
|
||||
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;
|
||||
};
|
||||
};
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
system.stateVersion = "26.05";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user