devos/profiles/core/default.nix
2022-10-20 18:26:28 +02:00

125 lines
2.5 KiB
Nix
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{ self, config, lib, pkgs, ... }:
let inherit (lib) fileContents;
in
{
# Cachix
nix = {
settings = {
substituters = [
"https://cache.nixos.org/"
"https://nix-community.cachix.org"
];
trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
trusted-users = [ "root" "@wheel" ];
system-features = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
sandbox = true;
auto-optimise-store = true;
};
registry = {
nixpkgs.flake = self.inputs.nixos;
latest.flake = self.inputs.latest;
stable.flake = self.inputs.stable;
pwnix.flake = self.inputs.pwnix;
};
# Improve nix store disk usage
gc.automatic = true;
optimise.automatic = true;
# Generally useful nix option defaults
extraOptions = ''
keep-outputs = true
keep-derivations = true
fallback = true
'';
};
# For rage encryption, all hosts need a ssh key pair
services.openssh = {
enable = true;
openFirewall = lib.mkDefault false;
};
# Fix zsh autocompletion with home-manager
environment.pathsToLink = [ "/share/zsh" ];
# We set this via home-manager
environment.variables.EDITOR = "$EDITOR";
services.logind.lidSwitch = "ignore";
services.logind.extraConfig = ''
# dont shutdown when power button is short-pressed
HandlePowerKey=ignore
'';
environment = {
systemPackages = with pkgs; [
agenix
binutils
coreutils
psmisc
asciinema
curl
direnv
exa
dnsutils
dosfstools
fd
fzf
git
bat
neovim
bottom
gptfdisk
file
iputils
jq
manix
moreutils
yt-dlp
nix-index
tmux
nmap
ripgrep
skim
tealdeer
whois
p7zip
wget
xxd
imagemagick
nushell
mosh
nixpkgs-fmt
nvfetcher
libqalculate
];
};
fonts = {
fonts = with pkgs; [ powerline-fonts dejavu_fonts twitter-color-emoji ];
fontconfig.defaultFonts = {
monospace = [ "DejaVu Sans Mono for Powerline" ];
sansSerif = [ "DejaVu Sans" ];
emoji = [ "Twitter Color Emoji" ];
};
};
time.timeZone = "Europe/Warsaw";
i18n.defaultLocale = "en_US.UTF-8";
# Service that makes Out of Memory Killer more effective
services.earlyoom.enable = true;
users.mutableUsers = false;
console.keyMap = "pl";
}