1
1
mirror of https://github.com/divnix/digga.git synced 2024-11-24 05:05:26 +03:00
digga/profiles/core.nix

136 lines
2.3 KiB
Nix
Raw Normal View History

{ config, lib, pkgs, ... }:
2020-01-04 08:06:31 +03:00
let inherit (lib) fileContents;
2019-12-15 07:37:46 +03:00
2020-01-04 08:06:31 +03:00
in {
nix.package = pkgs.nixFlakes;
2020-01-04 08:06:31 +03:00
nix.systemFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
2020-01-04 08:06:31 +03:00
imports = [ ../local/locale.nix ];
boot = {
kernelPackages = pkgs.linuxPackages_latest;
tmpOnTmpfs = true;
kernel.sysctl."kernel.sysrq" = 1;
};
environment = {
systemPackages = with pkgs; [
binutils
coreutils
curl
2019-12-17 07:13:33 +03:00
dosfstools
dnsutils
2020-06-26 06:56:15 +03:00
whois
fd
git
2019-12-26 10:17:44 +03:00
gotop
2019-12-17 07:13:33 +03:00
gptfdisk
iputils
manpages
moreutils
ripgrep
stdmanpages
utillinux
];
2020-01-04 08:06:31 +03:00
shellAliases =
let ifSudo = string: lib.mkIf config.security.sudo.enable string;
in {
# quick cd
".." = "cd ..";
"..." = "cd ../..";
"...." = "cd ../../..";
"....." = "cd ../../../..";
2019-12-15 11:17:42 +03:00
# git
g = "git";
2019-12-15 07:37:46 +03:00
# grep
grep = "rg";
gi = "grep -i";
# internet ip
myip = "dig +short myip.opendns.com @208.67.222.222 2>&1";
2019-12-16 07:29:54 +03:00
# nix
2019-12-16 08:33:52 +03:00
n = "nix";
2019-12-17 01:37:31 +03:00
np = "n profile";
ni = "np install";
nr = "np remove";
ns = "n search";
2019-12-16 07:29:54 +03:00
nrb = ifSudo "sudo nixos-rebuild";
# sudo
2019-12-19 21:57:49 +03:00
s = ifSudo "sudo -E ";
si = ifSudo "sudo -i";
se = ifSudo "sudoedit";
2019-12-26 10:17:44 +03:00
# top
top = "gotop";
# systemd
ctl = "systemctl";
2019-12-19 21:57:49 +03:00
stl = ifSudo "s systemctl";
utl = "systemctl --user";
ut = "systemctl --user start";
un = "systemctl --user stop";
2019-12-19 21:57:49 +03:00
up = ifSudo "s systemctl start";
dn = ifSudo "s systemctl stop";
jtl = "journalctl";
};
};
fonts = {
2020-01-04 08:06:31 +03:00
fonts = with pkgs; [ powerline-fonts dejavu_fonts ];
fontconfig.defaultFonts = {
monospace = [ "DejaVu Sans Mono for Powerline" ];
sansSerif = [ "DejaVu Sans" ];
};
};
nix = {
autoOptimiseStore = true;
gc.automatic = true;
optimise.automatic = true;
useSandbox = true;
allowedUsers = [ "@wheel" ];
trustedUsers = [ "root" "@wheel" ];
extraOptions = ''
experimental-features = nix-command flakes ca-references
'';
};
security = {
hideProcessInformation = true;
protectKernelImage = true;
};
services.earlyoom.enable = true;
2020-01-06 10:38:12 +03:00
users.mutableUsers = false;
}