2021-05-11 20:40:37 +02:00
|
|
|
|
{ self, config, lib, pkgs, ... }:
|
2020-01-04 06:06:31 +01:00
|
|
|
|
let inherit (lib) fileContents;
|
2020-07-31 06:17:28 +02:00
|
|
|
|
in
|
|
|
|
|
{
|
2022-07-31 21:44:02 +02:00
|
|
|
|
# Cachix
|
|
|
|
|
nix = {
|
2022-10-20 18:26:28 +02:00
|
|
|
|
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
|
|
|
|
|
'';
|
2022-07-31 21:44:02 +02:00
|
|
|
|
};
|
|
|
|
|
|
2021-12-29 23:42:51 +01:00
|
|
|
|
# For rage encryption, all hosts need a ssh key pair
|
|
|
|
|
services.openssh = {
|
|
|
|
|
enable = true;
|
|
|
|
|
openFirewall = lib.mkDefault false;
|
|
|
|
|
};
|
2019-12-05 06:36:36 +01:00
|
|
|
|
|
|
|
|
|
|
2021-07-27 11:50:57 +02:00
|
|
|
|
# Fix zsh autocompletion with home-manager
|
|
|
|
|
environment.pathsToLink = [ "/share/zsh" ];
|
|
|
|
|
|
2022-02-26 14:03:39 +01:00
|
|
|
|
# We set this via home-manager
|
|
|
|
|
environment.variables.EDITOR = "$EDITOR";
|
|
|
|
|
|
2021-12-27 22:57:16 +01:00
|
|
|
|
services.logind.lidSwitch = "ignore";
|
2022-07-03 01:06:34 +02:00
|
|
|
|
services.logind.extraConfig = ''
|
2022-02-22 01:03:10 +01:00
|
|
|
|
# don’t shutdown when power button is short-pressed
|
|
|
|
|
HandlePowerKey=ignore
|
|
|
|
|
'';
|
2021-07-27 11:50:57 +02:00
|
|
|
|
|
2019-12-05 06:36:36 +01:00
|
|
|
|
environment = {
|
|
|
|
|
systemPackages = with pkgs; [
|
2022-02-20 18:19:05 +01:00
|
|
|
|
agenix
|
2019-12-05 06:36:36 +01:00
|
|
|
|
binutils
|
|
|
|
|
coreutils
|
2021-08-05 14:12:48 +02:00
|
|
|
|
psmisc
|
2021-12-27 22:57:16 +01:00
|
|
|
|
asciinema
|
2019-12-05 06:36:36 +01:00
|
|
|
|
curl
|
2020-08-02 21:28:41 +02:00
|
|
|
|
direnv
|
2022-01-02 23:51:30 +01:00
|
|
|
|
exa
|
2019-12-05 06:36:36 +01:00
|
|
|
|
dnsutils
|
2020-07-07 02:25:32 +02:00
|
|
|
|
dosfstools
|
2019-12-05 06:36:36 +01:00
|
|
|
|
fd
|
2021-04-06 13:37:40 +02:00
|
|
|
|
fzf
|
2019-12-05 06:36:36 +01:00
|
|
|
|
git
|
2021-04-06 13:37:40 +02:00
|
|
|
|
bat
|
|
|
|
|
neovim
|
2021-06-30 16:50:07 +02:00
|
|
|
|
bottom
|
2019-12-17 05:13:33 +01:00
|
|
|
|
gptfdisk
|
2021-05-08 11:49:42 +02:00
|
|
|
|
file
|
2019-12-05 06:36:36 +01:00
|
|
|
|
iputils
|
2020-07-21 02:04:37 +02:00
|
|
|
|
jq
|
2020-12-16 22:48:40 +01:00
|
|
|
|
manix
|
2019-12-05 06:36:36 +01:00
|
|
|
|
moreutils
|
2022-01-02 23:51:30 +01:00
|
|
|
|
yt-dlp
|
2021-02-15 06:17:24 +01:00
|
|
|
|
nix-index
|
2021-04-06 20:59:09 +02:00
|
|
|
|
tmux
|
2020-07-07 02:25:32 +02:00
|
|
|
|
nmap
|
2019-12-05 06:36:36 +01:00
|
|
|
|
ripgrep
|
2021-03-15 04:49:35 +01:00
|
|
|
|
skim
|
2021-02-03 06:46:12 +01:00
|
|
|
|
tealdeer
|
2020-07-07 02:25:32 +02:00
|
|
|
|
whois
|
2021-11-11 11:07:43 +01:00
|
|
|
|
p7zip
|
|
|
|
|
wget
|
|
|
|
|
xxd
|
|
|
|
|
imagemagick
|
2021-11-21 18:11:11 +01:00
|
|
|
|
nushell
|
2022-07-25 18:20:35 +02:00
|
|
|
|
mosh
|
2021-04-13 09:02:39 +02:00
|
|
|
|
|
2021-07-27 11:50:57 +02:00
|
|
|
|
nixpkgs-fmt
|
2021-08-27 14:43:53 +02:00
|
|
|
|
nvfetcher
|
2021-04-13 09:02:39 +02:00
|
|
|
|
libqalculate
|
2019-12-05 06:36:36 +01:00
|
|
|
|
];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
fonts = {
|
2021-06-03 11:57:39 +02:00
|
|
|
|
fonts = with pkgs; [ powerline-fonts dejavu_fonts twitter-color-emoji ];
|
2019-12-05 06:36:36 +01:00
|
|
|
|
fontconfig.defaultFonts = {
|
|
|
|
|
monospace = [ "DejaVu Sans Mono for Powerline" ];
|
|
|
|
|
sansSerif = [ "DejaVu Sans" ];
|
2021-06-03 11:57:39 +02:00
|
|
|
|
emoji = [ "Twitter Color Emoji" ];
|
2019-12-05 06:36:36 +01:00
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
2021-04-06 13:37:40 +02:00
|
|
|
|
time.timeZone = "Europe/Warsaw";
|
|
|
|
|
i18n.defaultLocale = "en_US.UTF-8";
|
2020-07-27 06:24:28 +02:00
|
|
|
|
|
2021-12-29 23:42:51 +01:00
|
|
|
|
# Service that makes Out of Memory Killer more effective
|
2019-12-05 06:36:36 +01:00
|
|
|
|
services.earlyoom.enable = true;
|
2020-01-06 08:38:12 +01:00
|
|
|
|
users.mutableUsers = false;
|
2021-05-30 19:49:22 +02:00
|
|
|
|
console.keyMap = "pl";
|
2019-12-05 06:36:36 +01:00
|
|
|
|
}
|