2024-09-21 01:38:01 +08:00
|
|
|
{ inputs, pkgs, ... }:
|
2024-08-25 23:02:35 +08:00
|
|
|
{
|
2024-05-24 00:15:10 +08:00
|
|
|
imports =
|
|
|
|
[
|
2024-07-10 07:12:02 +08:00
|
|
|
./hardening.nix
|
|
|
|
./networking.nix
|
2024-07-10 07:18:57 +08:00
|
|
|
./nix.nix
|
2024-08-02 06:17:30 +08:00
|
|
|
./zram.nix
|
2024-05-24 00:15:10 +08:00
|
|
|
]
|
|
|
|
++ (with inputs; [
|
|
|
|
self.nixosModules.default
|
|
|
|
sops-nix.nixosModules.sops
|
|
|
|
]);
|
2023-12-10 23:56:40 +08:00
|
|
|
|
2024-09-21 01:38:01 +08:00
|
|
|
nixpkgs.overlays = [ inputs.self.overlays.default ];
|
2024-02-06 18:05:14 +08:00
|
|
|
|
2024-08-31 04:14:38 +08:00
|
|
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
2023-11-20 20:21:34 +08:00
|
|
|
|
2023-12-25 22:27:42 +08:00
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
unzip
|
|
|
|
tree
|
|
|
|
file
|
|
|
|
htop
|
|
|
|
|
|
|
|
lsof
|
|
|
|
ltrace
|
2024-03-06 06:02:22 +08:00
|
|
|
strace
|
2023-12-25 22:27:42 +08:00
|
|
|
|
|
|
|
dnsutils
|
|
|
|
pciutils
|
|
|
|
usbutils
|
|
|
|
];
|
2024-03-06 06:02:22 +08:00
|
|
|
|
2024-08-02 06:17:30 +08:00
|
|
|
users.mutableUsers = false;
|
|
|
|
boot.initrd.systemd.enable = true;
|
|
|
|
environment.stub-ld.enable = false;
|
|
|
|
|
|
|
|
programs.command-not-found.enable = false;
|
|
|
|
programs.nano.enable = false;
|
|
|
|
programs.vim = {
|
|
|
|
enable = true;
|
|
|
|
defaultEditor = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
# https://archlinux.org/news/making-dbus-broker-our-default-d-bus-daemon/
|
2024-08-31 04:14:38 +08:00
|
|
|
services.dbus.implementation = "broker";
|
2024-08-02 06:17:30 +08:00
|
|
|
|
|
|
|
security.sudo.execWheelOnly = true;
|
|
|
|
security.sudo.extraConfig = ''
|
|
|
|
Defaults lecture = never
|
|
|
|
'';
|
2024-07-10 07:18:57 +08:00
|
|
|
|
|
|
|
documentation = {
|
|
|
|
doc.enable = false;
|
|
|
|
info.enable = false;
|
|
|
|
nixos.enable = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
# https://github.com/NixOS/nixpkgs/pull/308801
|
|
|
|
# nixos/switch-to-configuration: add new implementation
|
|
|
|
system.switch = {
|
|
|
|
enable = false;
|
|
|
|
enableNg = true;
|
|
|
|
};
|
2024-01-17 12:47:27 +08:00
|
|
|
|
2024-12-20 15:52:54 +08:00
|
|
|
# See `nixos-version(8)`
|
|
|
|
system.configurationRevision = inputs.self.rev or "dirty";
|
|
|
|
|
2024-01-17 12:47:27 +08:00
|
|
|
### sops-nix
|
|
|
|
sops = {
|
2024-08-25 23:02:35 +08:00
|
|
|
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
|
|
|
gnupg.sshKeyPaths = [ ];
|
2024-01-17 12:47:27 +08:00
|
|
|
};
|
2023-09-19 08:17:43 +08:00
|
|
|
}
|