nixos-config/hosts/worf/configuration.nix

149 lines
3.2 KiB
Nix
Raw Normal View History

2023-07-26 09:06:51 +02:00
{ pkgs, ... }:
{
2023-07-26 10:48:52 +02:00
# Many settings should be handled by home manager. System-wide settings are however managed here.
imports = [
./yabai.nix
];
2023-07-26 10:48:52 +02:00
2023-07-26 15:22:24 +02:00
nixpkgs.config.allowUnfree = true;
nix = {
2023-08-21 23:54:18 +02:00
# gc = {
# automatic = true;
# options = "--delete-older-than 2d";
# };
2023-07-26 15:22:24 +02:00
2023-09-13 23:20:31 +02:00
settings = {
allow-dirty = true;
experimental-features = [ "nix-command" "flakes" "repl-flake" ];
builders-use-substitutes = true;
2024-05-30 10:39:02 +02:00
extra-platforms = [ "x86_64-darwin" "aarch64-darwin" ];
2023-09-13 23:20:31 +02:00
log-lines = 50;
# https://github.com/NixOS/nix/issues/7273
# auto-optimise-store = true;
2023-09-13 23:20:31 +02:00
};
buildMachines = [
{
hostName = "defiant.home.feal.no";
system = "x86_64-linux";
maxJobs = 6;
supportedFeatures = [ "kvm" "big-parallel" "benchmark" "nixos-test" ];
mandatoryFeatures = [ ];
2024-09-22 10:23:55 +02:00
sshUser = "felixalb";
sshKey = "/var/root/.ssh/nix-builder";
}
{
hostName = "challenger.home.feal.no";
system = "x86_64-linux";
maxJobs = 6;
supportedFeatures = [ "kvm" "big-parallel" "benchmark" "nixos-test" ];
mandatoryFeatures = [ ];
sshUser = "felixalb";
sshKey = "/var/root/.ssh/nix-builder";
2023-09-13 23:20:31 +02:00
}
];
distributedBuilds = true;
extraOptions = "builders-use-substitutes = true";
2023-07-26 15:22:24 +02:00
};
2023-07-26 10:48:52 +02:00
# System packages for all users
2023-07-27 11:33:44 +02:00
environment = {
systemPackages = with pkgs; [
eza
2023-07-27 13:13:03 +02:00
findutils
gnugrep
jq
2024-05-30 10:39:02 +02:00
nix-output-monitor
2024-10-05 00:52:57 +02:00
nixpkgs-review
2023-07-27 11:33:44 +02:00
ripgrep
2024-05-30 10:39:02 +02:00
skhd
2023-08-08 08:51:20 +02:00
sshfs
wget
2023-07-27 11:33:44 +02:00
];
variables = {
EDITOR = "nvim";
VISUAL = "nvim";
};
};
2023-07-26 09:06:51 +02:00
2023-07-26 10:48:52 +02:00
users.users.felixalb = {
home = "/Users/felixalb";
shell = pkgs.zsh;
};
programs.zsh.enable = true;
system.activationScripts.postActivation.text = ''sudo chsh -s ${pkgs.zsh}/bin/zsh''; # Since it's not possible to declare default shell, run this command after build
2023-07-27 11:33:44 +02:00
2024-07-30 19:07:24 +02:00
fonts.packages = with pkgs; [
noto-fonts
font-awesome
fira-code
hack-font
(nerdfonts.override {
fonts = [
"Hack"
];
})
];
2023-07-27 11:33:44 +02:00
2023-07-26 15:22:24 +02:00
system.defaults = {
# login window settings
loginwindow = {
# disable guest account
GuestEnabled = false;
# show name instead of username
SHOWFULLNAME = false;
};
finder = {
AppleShowAllExtensions = true;
FXEnableExtensionChangeWarning = true;
_FXShowPosixPathInTitle = true;
};
# firewall settings
alf = {
# 0 = disabled 1 = enabled 2 = blocks all connections except for essential services
globalstate = 1;
loggingenabled = 0;
stealthenabled = 1;
};
# dock settings
dock = {
autohide = true;
autohide-delay = 0.0;
autohide-time-modifier = 1.0;
2023-08-08 08:51:20 +02:00
tilesize = 45;
2023-07-26 15:22:24 +02:00
static-only = false;
showhidden = false;
show-recents = false;
show-process-indicators = true;
orientation = "bottom";
mru-spaces = false;
};
};
system.keyboard = {
enableKeyMapping = true;
remapCapsLockToControl = true;
};
2023-07-26 09:06:51 +02:00
# Auto upgrade nix package and the daemon service.
services.nix-daemon.enable = true;
nix.package = pkgs.nix;
2024-10-05 00:52:57 +02:00
system.stateVersion = 5;
2023-07-26 09:06:51 +02:00
}