This repository has been archived on 2023-08-08. You can view files and clone it, but cannot push or open issues or pull requests.
nil/modules/profiles/minimal.nix

76 lines
1.7 KiB
Nix
Raw Normal View History

2021-11-28 01:10:36 +00:00
{ config, pkgs, ... }:
let
publicKey = pkgs.fetchurl {
url = "https://github.com/jamesepatrick.keys";
2022-04-26 22:44:11 +00:00
sha256 = "sha256-alm6KRFca4VjzTyVEg+j1s0uKaSfvV76o3sgYNAisSA=";
2021-11-28 01:10:36 +00:00
};
2021-11-28 22:20:10 +00:00
in {
2021-12-13 06:13:05 +00:00
imports = [ ../. ../system/xdg.nix ];
2021-11-28 01:10:36 +00:00
# Allow Cleanup, nix, & flakes
nix = {
2022-02-08 01:24:05 +00:00
settings = {
2022-03-05 04:43:10 +00:00
auto-optimise-store = true;
allowed-users = [ "@wheel" ];
2022-02-08 01:24:05 +00:00
};
2021-11-28 01:10:36 +00:00
gc = {
automatic = true;
dates = "daily";
};
package = pkgs.nixUnstable;
extraOptions = ''
2021-11-28 22:20:10 +00:00
experimental-features = nix-command flakes
'';
2021-11-28 01:10:36 +00:00
};
nixpkgs.config.allowUnfree = true;
2021-11-28 01:10:36 +00:00
# Locale
time.timeZone = "America/New_York";
i18n.defaultLocale = "en_US.UTF-8";
console = {
font = "Lat2-Terminus16";
keyMap = "us";
};
# Define a user account. Don't forget to set a password with passwd.
2021-11-28 22:20:10 +00:00
users.users = {
2021-11-28 01:10:36 +00:00
root.initialPassword = "nixos";
james = {
description = "James Patrick";
extraGroups = [ "wheel" "systemd-journal" ];
2021-11-28 01:10:36 +00:00
initialPassword = "nixos";
isNormalUser = true;
openssh.authorizedKeys.keyFiles = [ publicKey ];
shell = pkgs.zsh;
};
};
# These are the most basic tools I need.
2021-11-28 22:20:10 +00:00
environment.systemPackages = with pkgs; [ nixfmt git gnumake vim zsh ];
2021-11-28 01:10:36 +00:00
networking = {
firewall = {
enable = true;
allowedTCPPorts = [ 443 80 ];
allowedUDPPorts = [ 443 80 ];
allowPing = false;
};
};
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
programs.mtr.enable = true;
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
# Openssh settings for security
services.openssh = {
enable = true;
permitRootLogin = "no";
passwordAuthentication = false;
};
}