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 {
|
2022-05-03 04:11:02 +00:00
|
|
|
|
|
|
|
|
|
imports = [
|
2022-08-12 00:44:29 +00:00
|
|
|
|
../modules/. # This imports /modules/default.nix
|
|
|
|
|
../modules/system/xdg.nix
|
2022-05-03 04:11:02 +00:00
|
|
|
|
];
|
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
|
|
|
|
};
|
|
|
|
|
|
2021-11-29 03:06:47 +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";
|
2021-12-02 05:10:34 +00:00
|
|
|
|
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;
|
|
|
|
|
};
|
|
|
|
|
}
|