nixos-config/common/default.nix

115 lines
2.4 KiB
Nix
Raw Normal View History

2024-04-08 20:32:17 +02:00
{
inputs,
outputs,
lib,
config,
pkgs,
...
}: {
imports = [
2024-04-08 21:28:07 +02:00
./packages/neovim.nix
2024-04-17 22:28:27 +02:00
./packages/zsh.nix
2024-04-08 20:32:17 +02:00
];
nixpkgs = {
# You can add overlays here
overlays = [
# Add overlays your own flake exports (from overlays and pkgs dir):
outputs.overlays.additions
outputs.overlays.modifications
outputs.overlays.unstable-packages
# You can also add overlays exported from other flakes:
# neovim-nightly-overlay.overlays.default
# Or define it inline, for example:
# (final: prev: {
# hi = final.hello.overrideAttrs (oldAttrs: {
# patches = [ ./change-hello-to-hi.patch ];
# });
# })
];
};
# This will add each flake input as a registry
# To make nix3 commands consistent with your flake
nix.registry = (lib.mapAttrs (_: flake: {inherit flake;})) ((lib.filterAttrs (_: lib.isType "flake")) inputs);
# This will additionally add your inputs to the system's legacy channels
# Making legacy nix commands consistent as well, awesome!
nix.nixPath = ["/etc/nix/path"];
environment.etc =
lib.mapAttrs'
(name: value: {
name = "nix/path/${name}";
value.source = value.flake;
})
config.nix.registry;
nix.settings = {
# Enable flakes and new 'nix' command
experimental-features = "nix-command flakes";
# Deduplicate and optimize nix store
auto-optimise-store = true;
};
2024-04-08 21:28:07 +02:00
boot.loader = {
2024-04-17 20:39:12 +02:00
systemd-boot.enable = true;
2024-04-08 21:28:07 +02:00
efi.canTouchEfiVariables = true;
2024-04-08 20:32:17 +02:00
};
# Set your time zone.
time.timeZone = "Europe/Paris";
services.fwupd.enable = true;
2024-04-22 04:21:07 +02:00
services.tailscale.enable = true;
2024-04-08 20:32:17 +02:00
networking = {
networkmanager.enable = true;
2024-04-22 04:21:07 +02:00
firewall = {
enable = true;
trustedInterfaces = ["tailscale0"];
};
2024-04-08 20:32:17 +02:00
};
nix.settings.allowed-users = ["@wheel"];
2024-04-08 21:28:07 +02:00
security.sudo.execWheelOnly = true;
2024-04-08 20:32:17 +02:00
2024-04-11 17:08:50 +02:00
programs.git = {
enable = true;
config = {
user = {
name = "Tasia Iso";
email = "tasiaiso@proton.me";
2024-04-22 04:21:07 +02:00
gpg.format = "ssh";
commit.gpgsign = "true";
# git config --global user.signingkey ~/.ssh/id_ed25519
2024-04-11 17:08:50 +02:00
};
2024-04-22 04:21:07 +02:00
2024-04-11 17:08:50 +02:00
init = {
defaultBranch = "master";
};
};
};
2024-04-08 20:32:17 +02:00
environment.systemPackages = with pkgs; [
wget
dig
nmap
btop
2024-04-17 20:39:12 +02:00
gitFull
2024-04-08 20:32:17 +02:00
smartmontools
lm_sensors
pciutils
gcc
gnumake
sysstat
file
ffmpeg
];
}