2023-06-14 17:28:00 +02:00
|
|
|
|
{ config, pkgs, nixpkgs, bscpkgs, agenix, theFlake, ... }:
|
2023-04-18 18:27:08 +02:00
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
imports = [
|
2023-09-04 22:09:40 +02:00
|
|
|
|
./agenix.nix
|
2023-04-18 18:30:02 +02:00
|
|
|
|
./boot.nix
|
2023-04-18 18:31:35 +02:00
|
|
|
|
./fs.nix
|
2023-04-18 18:38:08 +02:00
|
|
|
|
./hw.nix
|
2023-04-18 18:50:44 +02:00
|
|
|
|
./net.nix
|
2023-06-30 14:02:15 +02:00
|
|
|
|
./ntp.nix
|
2023-04-27 16:27:04 +02:00
|
|
|
|
./slurm.nix
|
2023-04-18 18:46:53 +02:00
|
|
|
|
./ssh.nix
|
2023-04-18 18:45:10 +02:00
|
|
|
|
./users.nix
|
2023-08-29 22:26:12 +02:00
|
|
|
|
./watchdog.nix
|
2023-09-02 23:49:41 +02:00
|
|
|
|
./rev.nix
|
2023-09-03 11:51:53 +02:00
|
|
|
|
./zsh.nix
|
2023-04-18 18:27:08 +02:00
|
|
|
|
];
|
2023-04-18 18:43:23 +02:00
|
|
|
|
|
2023-06-16 16:02:25 +02:00
|
|
|
|
nixpkgs.overlays = [
|
|
|
|
|
bscpkgs.bscOverlay
|
2023-08-25 18:12:00 +02:00
|
|
|
|
(import ../../pkgs/overlay.nix)
|
2023-06-16 16:02:25 +02:00
|
|
|
|
];
|
2023-06-14 17:28:00 +02:00
|
|
|
|
|
2023-09-02 23:49:41 +02:00
|
|
|
|
system.configurationRevision =
|
|
|
|
|
if theFlake ? rev
|
|
|
|
|
then theFlake.rev
|
|
|
|
|
else throw ("Refusing to build from a dirty Git tree!");
|
|
|
|
|
|
2023-06-14 17:28:00 +02:00
|
|
|
|
nix.nixPath = [
|
|
|
|
|
"nixpkgs=${nixpkgs}"
|
|
|
|
|
"jungle=${theFlake.outPath}"
|
|
|
|
|
];
|
|
|
|
|
|
2023-09-15 09:13:24 +02:00
|
|
|
|
nix.settings.flake-registry =
|
|
|
|
|
pkgs.writeText "global-registry.json" ''{"flakes":[],"version":2}'';
|
|
|
|
|
|
2023-06-14 17:28:00 +02:00
|
|
|
|
nix.registry.nixpkgs.flake = nixpkgs;
|
|
|
|
|
nix.registry.jungle.flake = theFlake;
|
|
|
|
|
|
2023-04-18 18:43:23 +02:00
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
|
vim wget git htop tmux pciutils tcpdump ripgrep nix-index nixos-option
|
2023-05-31 17:06:09 +02:00
|
|
|
|
nix-diff ipmitool freeipmi ethtool lm_sensors ix cmake gnumake file tree
|
2023-06-23 16:12:25 +02:00
|
|
|
|
ncdu config.boot.kernelPackages.perf ldns
|
2023-06-16 19:22:41 +02:00
|
|
|
|
# From bsckgs overlay
|
|
|
|
|
bsc.osumb
|
2023-04-18 18:43:23 +02:00
|
|
|
|
];
|
|
|
|
|
|
2023-09-17 22:27:51 +02:00
|
|
|
|
programs.direnv.enable = true;
|
|
|
|
|
|
2023-04-18 18:43:23 +02:00
|
|
|
|
systemd.services."serial-getty@ttyS0" = {
|
|
|
|
|
enable = true;
|
|
|
|
|
wantedBy = [ "getty.target" ];
|
|
|
|
|
serviceConfig.Restart = "always";
|
|
|
|
|
};
|
|
|
|
|
|
2023-04-28 12:34:51 +02:00
|
|
|
|
# Increase limits
|
|
|
|
|
security.pam.loginLimits = [
|
|
|
|
|
{
|
|
|
|
|
domain = "*";
|
|
|
|
|
type = "-";
|
|
|
|
|
item = "memlock";
|
|
|
|
|
value = "1048576"; # 1 GiB of mem locked
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
|
2023-04-18 18:43:23 +02:00
|
|
|
|
time.timeZone = "Europe/Madrid";
|
|
|
|
|
i18n.defaultLocale = "en_DK.UTF-8";
|
|
|
|
|
|
|
|
|
|
environment.variables = {
|
|
|
|
|
EDITOR = "vim";
|
|
|
|
|
VISUAL = "vim";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
|
|
|
|
nix.settings.sandbox = "relaxed";
|
|
|
|
|
nix.settings.trusted-users = [ "@wheel" ];
|
|
|
|
|
nix.gc.automatic = true;
|
|
|
|
|
nix.gc.dates = "weekly";
|
2023-06-14 13:55:19 +02:00
|
|
|
|
nix.gc.options = "--delete-older-than 30d";
|
2023-04-18 18:43:23 +02:00
|
|
|
|
|
2023-04-28 18:12:10 +02:00
|
|
|
|
programs.bash.promptInit = ''
|
|
|
|
|
PS1="\h\\$ "
|
|
|
|
|
'';
|
|
|
|
|
|
2023-04-18 18:43:23 +02:00
|
|
|
|
# Copy the NixOS configuration file and link it from the resulting system
|
|
|
|
|
# (/run/current-system/configuration.nix). This is useful in case you
|
|
|
|
|
# accidentally delete configuration.nix.
|
2023-04-26 17:36:36 +02:00
|
|
|
|
#system.copySystemConfiguration = true;
|
2023-04-18 18:43:23 +02:00
|
|
|
|
|
|
|
|
|
# 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).
|
|
|
|
|
system.stateVersion = "22.11"; # Did you read the comment?
|
2023-04-18 18:27:08 +02:00
|
|
|
|
}
|