2023-11-14 18:29:14 +01:00
|
|
|
|
{
|
2023-11-15 01:00:35 +01:00
|
|
|
|
lib,
|
2023-11-14 18:29:14 +01:00
|
|
|
|
pkgs,
|
2024-01-10 17:48:50 +01:00
|
|
|
|
config,
|
2023-11-14 18:29:14 +01:00
|
|
|
|
nixpkgs,
|
2024-01-10 18:07:31 +01:00
|
|
|
|
ragenix,
|
2023-11-14 18:29:14 +01:00
|
|
|
|
...
|
|
|
|
|
}: {
|
2024-01-18 15:36:37 +01:00
|
|
|
|
boot = {
|
|
|
|
|
kernelPackages = pkgs.linuxPackages_latest;
|
|
|
|
|
kernelParams = ["quiet" "loglevel=3"];
|
|
|
|
|
};
|
|
|
|
|
|
2023-11-25 16:28:23 +01:00
|
|
|
|
environment = {
|
2024-01-10 18:07:31 +01:00
|
|
|
|
systemPackages = with pkgs; let
|
|
|
|
|
inherit (pkgs.stdenv.hostPlatform) system;
|
|
|
|
|
in [
|
|
|
|
|
ragenix.packages.${system}.default
|
2023-11-25 16:28:23 +01:00
|
|
|
|
neovim
|
|
|
|
|
git
|
|
|
|
|
curl
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
variables = {
|
|
|
|
|
EDITOR = lib.getExe pkgs.neovim;
|
|
|
|
|
};
|
|
|
|
|
};
|
2023-11-14 18:29:14 +01:00
|
|
|
|
|
2024-01-18 15:36:37 +01:00
|
|
|
|
networking.networkmanager.enable = true;
|
|
|
|
|
|
|
|
|
|
time.timeZone = "Europe/Paris";
|
|
|
|
|
|
|
|
|
|
i18n.defaultLocale = "en_US.UTF-8";
|
|
|
|
|
|
|
|
|
|
console.keyMap = "fr";
|
|
|
|
|
|
|
|
|
|
age = {
|
|
|
|
|
identityPaths = ["/etc/ssh/ssh_host_ed25519_key"];
|
|
|
|
|
|
|
|
|
|
secrets = {
|
|
|
|
|
tailscaleKey.file = ../secrets/tailscaleKey.age;
|
|
|
|
|
};
|
2024-01-10 17:48:50 +01:00
|
|
|
|
};
|
|
|
|
|
|
2023-11-14 18:29:14 +01:00
|
|
|
|
programs = {
|
2023-11-17 15:18:56 +01:00
|
|
|
|
ssh.startAgent = true;
|
|
|
|
|
|
2023-11-14 18:29:14 +01:00
|
|
|
|
direnv.enable = true;
|
|
|
|
|
|
|
|
|
|
command-not-found.enable = false;
|
|
|
|
|
nix-index = {
|
|
|
|
|
enable = true;
|
|
|
|
|
enableFishIntegration = true;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
2024-01-18 15:36:37 +01:00
|
|
|
|
home-manager = {
|
|
|
|
|
useGlobalPkgs = true;
|
|
|
|
|
useUserPackages = true;
|
|
|
|
|
};
|
|
|
|
|
|
2023-11-22 14:31:25 +01:00
|
|
|
|
services = {
|
|
|
|
|
openssh = {
|
|
|
|
|
enable = true;
|
|
|
|
|
openFirewall = lib.mkDefault false;
|
|
|
|
|
};
|
2024-01-10 17:48:50 +01:00
|
|
|
|
|
|
|
|
|
tailscale = {
|
|
|
|
|
enable = true;
|
|
|
|
|
useRoutingFeatures = "both";
|
|
|
|
|
extraUpFlags = ["--ssh"];
|
|
|
|
|
authKeyFile = config.age.secrets.tailscaleKey.path;
|
|
|
|
|
};
|
2023-11-22 14:31:25 +01:00
|
|
|
|
};
|
|
|
|
|
|
2024-01-18 15:36:37 +01:00
|
|
|
|
security = {
|
|
|
|
|
rtkit.enable = true;
|
|
|
|
|
polkit.enable = true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
nixpkgs = {
|
|
|
|
|
config.allowUnfree = true;
|
|
|
|
|
overlays = [(import ../exprs/overlay.nix)];
|
|
|
|
|
};
|
2023-11-14 18:29:14 +01:00
|
|
|
|
|
|
|
|
|
nix = {
|
|
|
|
|
gc = {
|
|
|
|
|
automatic = true;
|
2024-01-02 17:24:42 +01:00
|
|
|
|
dates = "weekly";
|
2023-11-14 18:29:14 +01:00
|
|
|
|
options = "-d";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
settings = {
|
|
|
|
|
auto-optimise-store = true;
|
|
|
|
|
experimental-features = ["nix-command" "flakes"];
|
2023-11-16 17:41:34 +01:00
|
|
|
|
trusted-users = ["root" "@wheel"];
|
2023-11-14 18:29:14 +01:00
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
nix.registry = let
|
|
|
|
|
nixpkgsRegistry.flake = nixpkgs;
|
|
|
|
|
in {
|
|
|
|
|
nixpkgs = nixpkgsRegistry;
|
|
|
|
|
n = nixpkgsRegistry;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# This value determines the NixOS release from which the default
|
|
|
|
|
# settings for stateful data, like file locations and database versions
|
|
|
|
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
|
|
|
|
# this value at the release version of the first install of this system.
|
|
|
|
|
# Before changing this value read the documentation for this option
|
|
|
|
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
2023-11-15 01:00:35 +01:00
|
|
|
|
system.stateVersion = lib.mkDefault "23.11"; # Did you read the comment?
|
2023-11-14 18:29:14 +01:00
|
|
|
|
}
|