nixos-config/defaults.nix

195 lines
3.5 KiB
Nix
Raw Normal View History

2019-12-25 15:20:36 -08:00
# Ref: https://learnxinyminutes.com/docs/nix/
{ config, pkgs, ... }:
{
imports = [
./hardware-configuration.nix
2020-01-15 09:24:11 -08:00
./packages/local.nix
./config/local.nix
2019-12-25 15:20:36 -08:00
];
nixpkgs.config.allowUnfree = true;
2020-06-06 18:58:13 -07:00
security.acme.acceptTerms = true;
2019-12-25 15:20:36 -08:00
environment.systemPackages = with pkgs; [
asdf
atop
autoconf
automake
bash
2020-06-06 19:24:59 -07:00
boot
2019-12-25 15:20:36 -08:00
bind
binutils
btrfs-progs
bundix
byobu
cdrtools
cargo
certbot
clang
curl
2020-06-06 19:24:59 -07:00
dpkg
2019-12-25 15:20:36 -08:00
emacs
fail2ban
2020-06-25 20:46:18 -07:00
file
2019-12-25 15:20:36 -08:00
fortune
gcc
git
gnumake
gnupg
google-cloud-sdk
guile
heimdalFull
imagemagick
ipfs
iptables
jdk
kerberos
libisofs
2020-06-06 19:24:59 -07:00
libstdcxxHook
2019-12-25 15:20:36 -08:00
lispPackages.alexandria
lispPackages.cl-ppcre
lispPackages.clx
lispPackages.quicklisp
lshw
mkpasswd
ncurses5
2020-06-25 20:46:18 -07:00
nix-index
2019-12-25 15:20:36 -08:00
nmap
oidentd
openldap
openssh
openssl_1_1
openssh_gssapi
pciutils
2020-06-27 16:45:28 -07:00
pinentry.curses
2019-12-25 15:20:36 -08:00
pv
pwgen
racket
ruby
rustc
sbcl
screen
service-wrapper
stdenv
telnet
texlive.combined.scheme-basic
tmux
unzip
vim
wget
2020-06-06 19:24:59 -07:00
yubikey-manager
2019-12-25 15:20:36 -08:00
];
system.stateVersion = "19.09";
system.autoUpgrade.enable = true;
environment.etc.current-nixos-config.source = ./.;
krb5.enable = true;
krb5.libdefaults.default_realm = "FUDO.ORG";
krb5.kerberos = pkgs.heimdalFull;
2020-06-06 18:58:13 -07:00
console.keyMap = "dvp";
2019-12-25 15:20:36 -08:00
i18n = {
defaultLocale = "en_US.UTF-8";
};
programs = {
mosh.enable = true;
ssh = {
extraConfig = ''
GSSAPIAuthentication yes
GSSAPIDelegateCredentials yes
'';
};
bash.enableCompletion = true;
mtr.enable = true;
gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
};
services = {
emacs = {
defaultEditor = true;
enable = true;
};
cron = {
enable = true;
};
openssh = {
enable = true;
startWhenNeeded = true;
extraConfig = ''
GSSAPIAuthentication yes
GSSAPICleanupCredentials yes
'';
};
};
security.pam = {
enableSSHAgentAuth = true;
# TODO: add yubico?
services.sshd = {
# This should only ask for a code if ~/.google_authenticator exists, but it asks anyway.
# googleAuthenticator.enable = true;
makeHomeDir = true;
# Fails!
# requireWheel = true;
};
};
2020-01-15 09:24:11 -08:00
users.extraUsers = {
node = {
isSystemUser = true;
group = "nogroup";
2019-12-25 15:20:36 -08:00
};
};
2020-01-15 09:24:11 -08:00
users.groups = {
fudosys = {
gid = 888;
2019-12-25 15:20:36 -08:00
};
};
users.extraUsers = {
niten = {
isNormalUser = true;
uid = 10000;
createHome = true;
description = "Niten";
extraGroups = ["wheel" "audio" "video" "disk" "floppy" "lp" "cdrom" "tape" "dialout" "adm" "input" "systemd-journal" "fudosys" "libvirtd"];
group = "users";
home = "/home/niten";
hashedPassword = "$6$a1q2Duoe35hd5$IaZGXPfqyGv9uq5DQm7DZq0vIHsUs39sLktBiBBqMiwl/f/Z4jSvNZLJp9DZJYe5u2qGBYh1ca.jsXvQA8FPZ/";
};
reaper = {
isNormalUser = true;
uid = 10049;
createHome = true;
description = "Reaper";
extraGroups = ["wheel" "audio" "video" "disk" "floppy" "lp" "cdrom" "tape" "dialout" "adm" "input" "systemd-journal" "fudosys" "libvirtd"];
group = "users";
home = "/home/reaper";
hashedPassword = "$6$YVCI6kiGcG5EVMT$t9lYEXjAhbnh7YkvJJPAbrzL8XE/AASsKFlWWeS.fDjBi/8S7zwXTHF0j41nDUfC//3viysn0tIOQKyZTHhzG.";
};
fudo = {
isSystemUser = true;
uid = 888;
description = "Fudo System User";
group = "fudosys";
};
};
}