nixos-config/hosts/generic.nix

78 lines
1.6 KiB
Nix
Raw Normal View History

2021-07-29 20:21:51 +00:00
{ config, lib, pkgs, python3Packages, ... }:
let
home-manager = builtins.fetchGit {
url = "https://github.com/nix-community/home-manager.git";
rev = "35a24648d155843a4d162de98c17b1afd5db51e4";
ref = "release-21.05";
};
in
{
# Install home-manager
imports = [
"${home-manager}/nixos"
../modules/users # For system.singleUser
2021-07-29 20:21:51 +00:00
];
home-manager.useGlobalPkgs = true;
time.timeZone = "Europe/Berlin";
networking = {
useDHCP = false; # Done by the network manager
networkmanager.enable = false;
};
i18n.defaultLocale = "en_GB.UTF-8";
console = {
font = "Lat2-Terminus16";
keyMap = "de";
};
users = {
mutableUsers = false;
extraUsers = {
root = {
# Disable root login
hashedPassword = "*";
};
# Users configured in vm.nix, nishimiya.nix or miku.nix
};
};
environment = {
systemPackages = with pkgs; [
htop
firejail
vim
git # Otherwise we cannot install home-manager
git-crypt
gnupg
python3
];
};
# We don't tolerate non-free software, except for Steam and Linux firmware
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "firmwareLinuxNonfree" ];
services = {
connman = {
enable = true;
extraFlags = [ "--nodnsproxy" ];
};
# TODO: Is this correct? Maybe run once
timesyncd.enable = false;
printing.enable = lib.mkDefault false;
avahi.enable = false;
};
2021-08-02 19:52:42 +00:00
2021-07-29 20:21:51 +00:00
security.sudo.extraConfig = ''
Defaults env_keep += "NIXOS_CONFIG"
'';
system.stateVersion = "21.05";
}