summaryrefslogtreecommitdiff
path: root/hosts/oixos/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/oixos/default.nix')
-rw-r--r--hosts/oixos/default.nix79
1 files changed, 64 insertions, 15 deletions
diff --git a/hosts/oixos/default.nix b/hosts/oixos/default.nix
index 416e2f2..ba853e2 100644
--- a/hosts/oixos/default.nix
+++ b/hosts/oixos/default.nix
@@ -15,32 +15,61 @@
inputs.disko.nixosModules.disko
./disko.nix
./hardware-configuration.nix
+ ./cgit.nix
];
- boot.loader.grub = {
- efiSupport = true;
- efiInstallAsRemovable = true;
+ nix.settings = {
+ trusted-users = [ "@wheel" ];
+ experimental-features = [
+ "nix-command"
+ "flakes"
+ ];
+ auto-optimise-store = true;
};
+ services.chrony.enable = true;
+
+ time.timeZone = "UTC";
+ i18n.defaultLocale = "en_US.UTF-8";
+
+ boot.loader.systemd-boot = {
+ enable = true;
+ editor = false;
+ };
+ boot.loader.timeout = 0;
+ boot.loader.efi.canTouchEfiVariables = false;
+
+ # boot.loader.grub = {
+ # efiSupport = true;
+ # efiInstallAsRemovable = true;
+ # };
+
networking.hostName = hostname;
+ networking.firewall.enable = true;
+ networking.firewall.allowedTCPPorts = [
+ 80
+ 443
+ ];
+ networking.firewall.allowedUDPPorts = [ ];
+
networking.useDHCP = true;
services.openssh = {
enable = true;
- # settings = {
- # PermitRootLogin = "prohibit-password";
- # PasswordAuthentication = false;
- # };
+ settings = {
+ PermitRootLogin = "prohibit-password";
+ PasswordAuthentication = false;
+ };
};
- # users.users.beeb5k = {
- # isNormalUser = true;
- # extraGroups = [ "wheel" ];
- #
- # openssh.authorizedKeys.keys = [
- # "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGTMc0gNGM6vI8s9CrW+fYlW4ppRTKRCELOve3Izj1VD beeb5k"
- # ];
- # };
+ users.users.beeb5k = {
+ isNormalUser = true;
+ extraGroups = [ "wheel" ];
+
+ openssh.authorizedKeys.keys = [
+ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGTMc0gNGM6vI8s9CrW+fYlW4ppRTKRCELOve3Izj1VD beeb5k"
+ ];
+ };
services.cloud-init.enable = true;
@@ -50,11 +79,31 @@
environment.systemPackages = with pkgs; [
git
+ fastfetch
];
# security.sudo.wheelNeedsPassword = false;
+ programs.bash.promptInit = ''
+ if [ "$TERM" != "dumb" ] || [ -n "$INSIDE_EMACS" ]; then
+ # Removed the '1;' prefix to disable bold
+ PROMPT_COLOR="31m"
+ ((UID)) && PROMPT_COLOR="32m"
+
+ if [ -n "$INSIDE_EMACS" ]; then
+ PS1="\[\033[$PROMPT_COLOR\]\u@\h:\w\\$\[\033[0m\] "
+ else
+ PS1="\[\e[94m\]\u@\h \[\e[32m\]\w \[\e[39m\]\$ \[\e[0m\]"
+ fi
+
+ if test "$TERM" = "xterm"; then
+ PS1="\[\033]2;\h:\u:\w\007\]$PS1"
+ fi
+ fi
+ '';
+
nixpkgs.hostPlatform = "aarch64-linux";
system.stateVersion = systemState;
+
}