134 lines
3.0 KiB
Nix
134 lines
3.0 KiB
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
{
|
|
imports =
|
|
[
|
|
./hardware-configuration.nix
|
|
];
|
|
|
|
# Use the systemd-boot EFI boot loader.
|
|
boot.loader.systemd-boot.enable = true;
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
|
|
|
networking.hostName = "syedm";
|
|
|
|
nix.settings.experimental-features = [
|
|
"nix-command"
|
|
"flakes"
|
|
];
|
|
|
|
# Configure network connections interactively with nmcli or nmtui.
|
|
networking.networkmanager.enable = true;
|
|
|
|
programs.fish.enable = true;
|
|
programs.tmux.enable = true;
|
|
programs.neovim = {
|
|
enable = true;
|
|
defaultEditor = true;
|
|
};
|
|
|
|
# Set your time zone.
|
|
time.timeZone = "Europe/London";
|
|
|
|
# Select internationalisation properties.
|
|
i18n.defaultLocale = "en_US.UTF-8";
|
|
console = {
|
|
font = "Lat2-Terminus16";
|
|
useXkbConfig = true;
|
|
};
|
|
|
|
# Define a user account. Don't forget to set a password with 'passwd'.
|
|
users.users.me = {
|
|
isNormalUser = true;
|
|
shell = pkgs.fish;
|
|
extraGroups = [ "wheel" ];
|
|
openssh.authorizedKeys.keys = [
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJFUwk54CNtSLUyXSTLsIs5KXgEsjOgE4HGlA4FacKjV syed@tardis # msi laptop"
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILMeU7L0yQ4+O1GME4D4UM4f6nqua+pWt/zdsMvyHV94 u0_a309@localhost # mobile"
|
|
];
|
|
packages = with pkgs; [];
|
|
};
|
|
|
|
# List packages installed in system profile.
|
|
# You can use https://search.nixos.org/ to find more packages (and options).
|
|
environment.systemPackages = with pkgs; [
|
|
nodejs
|
|
age
|
|
eza
|
|
yazi
|
|
gitui
|
|
bind
|
|
wget
|
|
curl
|
|
stow
|
|
unzip
|
|
git
|
|
];
|
|
|
|
# Enable the OpenSSH daemon.
|
|
services.openssh.enable = true;
|
|
|
|
services.caddy = {
|
|
enable = true;
|
|
virtualHosts."syedm.dev".extraConfig = ''
|
|
respond "Hello, world!"
|
|
'';
|
|
virtualHosts."git.syedm.dev".extraConfig = ''
|
|
reverse_proxy localhost:3000
|
|
'';
|
|
virtualHosts."acs.syedm.dev".extraConfig = ''
|
|
reverse_proxy localhost:3709
|
|
'';
|
|
};
|
|
|
|
services.gitea = {
|
|
enable = true;
|
|
appName = "My personal projects.";
|
|
database.type = "sqlite3";
|
|
settings = {
|
|
server = {
|
|
DOMAIN = "git.syedm.dev";
|
|
ROOT_URL = "https://git.syedm.dev/";
|
|
HTTP_ADDR = "0.0.0.0";
|
|
HTTP_PORT = 3000;
|
|
SSH_DOMAIN = "git.syedm.dev";
|
|
SSH_PORT = 22;
|
|
};
|
|
service = {
|
|
DISABLE_REGISTRATION = true;
|
|
REQUIRE_SIGNIN_VIEW = false;
|
|
};
|
|
session.COOKIE_SECURE = true;
|
|
log.LEVEL = "Info";
|
|
};
|
|
};
|
|
|
|
systemd.services.msjd = {
|
|
description = "Msjd";
|
|
after = [ "network.target" ];
|
|
wantedBy = [ "multi-user.target" ];
|
|
|
|
serviceConfig = {
|
|
WorkingDirectory = "/home/me/main/msjd";
|
|
ExecStart = "${pkgs.nodejs}/bin/node index.mjs";
|
|
|
|
User = "me";
|
|
Restart = "always";
|
|
RestartSec = 3;
|
|
|
|
Environment = [
|
|
"NODE_ENV=production"
|
|
"PORT=3709"
|
|
];
|
|
};
|
|
};
|
|
|
|
# Open ports in the firewall.
|
|
networking.firewall.allowedTCPPorts = [ 22 80 443 ];
|
|
networking.firewall.allowedUDPPorts = [];
|
|
|
|
# DO NOT CHNAGE, EVER!
|
|
system.stateVersion = "26.05";
|
|
}
|
|
|