This commit is contained in:
Jimbo 2024-08-27 14:23:50 -04:00
parent 60405a8504
commit 1c5651bb83
2 changed files with 74 additions and 65 deletions

View file

@ -11,12 +11,15 @@ in
{ {
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
./freecorn.nix
"${homeManager}/nixos" "${homeManager}/nixos"
]; ];
# Bootloader. # Bootloader.
boot.loader.grub.enable = true; boot.loader.grub = {
boot.loader.grub.device = "/dev/sda"; enable = true;
device = "/dev/sda";
};
# Hostname # Hostname
networking.hostName = "freecornserver"; networking.hostName = "freecornserver";
@ -37,26 +40,17 @@ in
services.xserver.enable = true; services.xserver.enable = true;
# Printer Stuff (FUCK HP!) # Printer Stuff (FUCK HP!)
# services.printing.enable = true; services = {
services.printing.drivers = [ pkgs.hplip ]; printing = {
hardware.sane.extraBackends = [ pkgs.hplipWithPlugin ];
services.avahi = {
enable = true;
nssmdns4 = true;
openFirewall = true;
publish = {
enable = true; enable = true;
userServices = true; drivers = [ pkgs.hplip ];
webInterface = false;
};
avahi = {
enable = true;
nssmdns4 = true;
openFirewall = true;
}; };
};
services.printing = {
listenAddresses = [ "*:631" ];
allowFrom = [ "all" ];
browsing = true;
defaultShared = true;
openFirewall = true;
}; };
# Enable the LXQT Desktop Environment. # Enable the LXQT Desktop Environment.
@ -69,10 +63,6 @@ in
xkb.variant = ""; xkb.variant = "";
}; };
# Enable CUPS to print documents.
services.printing.enable = true;
hardware.sane.enable = true;
# Enable sound with pipewire. # Enable sound with pipewire.
hardware.pulseaudio.enable = false; hardware.pulseaudio.enable = false;
security.rtkit.enable = true; security.rtkit.enable = true;
@ -84,11 +74,6 @@ in
}; };
# Define a user account. Don't forget to set a password with passwd. # Define a user account. Don't forget to set a password with passwd.
users.users.freecorn = {
description = "FreeCorn";
isNormalUser = true;
extraGroups = [ "networkmanager" "wheel" "video" "scanner" "lp" "plugdev" ];
};
users.users.nextcloud = { users.users.nextcloud = {
extraGroups = [ "nfsShare" ]; extraGroups = [ "nfsShare" ];
isSystemUser = true; isSystemUser = true;
@ -106,33 +91,14 @@ in
boot.kernelParams = [ "modprobe.blacklist=dvb_usb_rtl28xxu" ]; # blacklist dunb driver boot.kernelParams = [ "modprobe.blacklist=dvb_usb_rtl28xxu" ]; # blacklist dunb driver
# OpenWebRX # OpenWebRX
# services.openwebrx.enable = true; # services.openwebrx.enable = true;
# Enable automatic login for the user. # Enable automatic login for the user.
services.displayManager.autoLogin.enable = true; services = {
services.displayManager.autoLogin.user = "freecorn"; xserver.videoDrivers = [ "radeon" ];
services.xserver.videoDrivers = [ "radeon" ]; displayManager.autoLogin = {
enable = true;
# Define home manager programs and configs user = "freecorn";
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.freecorn = { config, pkgs, ... }: {
# Install user programs
home.packages = (with pkgs; [
rustdesk-flutter anydesk vlc
]);
# OBS with plugins
programs.obs-studio = {
enable = true;
plugins = with pkgs.obs-studio-plugins; [
advanced-scene-switcher obs-multi-rtmp
];
};
# Don't change this
home.stateVersion = "24.05";
}; };
}; };
@ -173,7 +139,7 @@ in
}; };
# Nextcloud Proxy # Nextcloud Proxy
"cloud.${cornDomain}" = { "cloud.${secrets.cornDomain}" = {
enableACME = true; enableACME = true;
addSSL = true; addSSL = true;
locations."/" = { locations."/" = {
@ -234,12 +200,18 @@ in
# Allow unfree packages # Allow unfree packages
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
# Enable Adguard
# services.adguardhome.enable = true;
# Packages installed in system profile # Packages installed in system profile
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
wget x11vnc fastfetch ffmpeg system-config-printer libcaption git rtl-sdr steam-run openwebrx wget
x11vnc
fastfetch
ffmpeg
system-config-printer
libcaption
git
rtl-sdr
steam-run
openwebrx
]; ];
# Install fonts, need this for orbitron! # Install fonts, need this for orbitron!
@ -250,18 +222,17 @@ in
# Enable the OpenSSH daemon. # Enable the OpenSSH daemon.
services.openssh = { services.openssh = {
enable = true; enable = true;
# settings = { settings = {
# PermitRootLogin = "no"; PermitRootLogin = "no";
# PrintLastLog = "no"; PrintLastLog = "no";
# PasswordAuthentication = false; # PasswordAuthentication = false;
# }; };
# ports = [ 69 ]; # ports = [ 69 ];
}; };
# Open ports in the firewall. # Open ports in the firewall.
# Adguard ports: 3000 on tcp, 53 on udp
networking.firewall.allowedTCPPorts = [ 1935 4455 80 443 1234 ]; networking.firewall.allowedTCPPorts = [ 1935 4455 80 443 1234 ];
networking.firewall.allowedUDPPorts = [ 1935 4455 80 443 ]; networking.firewall.allowedUDPPorts = [ 4455 ];
# Copy and link the NixOS configuration file to (/run/current-system/configuration.nix). # Copy and link the NixOS configuration file to (/run/current-system/configuration.nix).
system.copySystemConfiguration = true; system.copySystemConfiguration = true;

38
freecorn.nix Normal file
View file

@ -0,0 +1,38 @@
{
# Define a user account. Don't forget to set a password with passwd.
users.users.freecorn = {
description = "FreeCorn";
isNormalUser = true;
extraGroups = [
"networkmanager"
"wheel"
"video"
"scanner"
"lp"
"plugdev"
];
};
# Define home manager programs and configs
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.freecorn = { config, pkgs, ... }: {
# Install user programs
home.packages = (with pkgs; [
rustdesk-flutter anydesk vlc
]);
# OBS with plugins
programs.obs-studio = {
enable = true;
plugins = with pkgs.obs-studio-plugins; [
advanced-scene-switcher obs-multi-rtmp
];
};
# Don't change this
home.stateVersion = "24.05";
};
};
}