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 = [
./hardware-configuration.nix
./freecorn.nix
"${homeManager}/nixos"
];
# Bootloader.
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/sda";
boot.loader.grub = {
enable = true;
device = "/dev/sda";
};
# Hostname
networking.hostName = "freecornserver";
@ -37,28 +40,19 @@ in
services.xserver.enable = true;
# Printer Stuff (FUCK HP!)
# services.printing.enable = true;
services.printing.drivers = [ pkgs.hplip ];
hardware.sane.extraBackends = [ pkgs.hplipWithPlugin ];
services.avahi = {
services = {
printing = {
enable = true;
drivers = [ pkgs.hplip ];
webInterface = false;
};
avahi = {
enable = true;
nssmdns4 = true;
openFirewall = true;
publish = {
enable = true;
userServices = true;
};
};
services.printing = {
listenAddresses = [ "*:631" ];
allowFrom = [ "all" ];
browsing = true;
defaultShared = true;
openFirewall = true;
};
# Enable the LXQT Desktop Environment.
services.xserver.displayManager.lightdm.enable = true;
services.xserver.desktopManager.lxqt.enable = true;
@ -69,10 +63,6 @@ in
xkb.variant = "";
};
# Enable CUPS to print documents.
services.printing.enable = true;
hardware.sane.enable = true;
# Enable sound with pipewire.
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
@ -84,11 +74,6 @@ in
};
# 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 = {
extraGroups = [ "nfsShare" ];
isSystemUser = true;
@ -106,33 +91,14 @@ in
boot.kernelParams = [ "modprobe.blacklist=dvb_usb_rtl28xxu" ]; # blacklist dunb driver
# OpenWebRX
# services.openwebrx.enable = true;
# services.openwebrx.enable = true;
# Enable automatic login for the user.
services.displayManager.autoLogin.enable = true;
services.displayManager.autoLogin.user = "freecorn";
services.xserver.videoDrivers = [ "radeon" ];
# 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 = {
services = {
xserver.videoDrivers = [ "radeon" ];
displayManager.autoLogin = {
enable = true;
plugins = with pkgs.obs-studio-plugins; [
advanced-scene-switcher obs-multi-rtmp
];
};
# Don't change this
home.stateVersion = "24.05";
user = "freecorn";
};
};
@ -173,7 +139,7 @@ in
};
# Nextcloud Proxy
"cloud.${cornDomain}" = {
"cloud.${secrets.cornDomain}" = {
enableACME = true;
addSSL = true;
locations."/" = {
@ -234,12 +200,18 @@ in
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# Enable Adguard
# services.adguardhome.enable = true;
# Packages installed in system profile
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!
@ -250,18 +222,17 @@ in
# Enable the OpenSSH daemon.
services.openssh = {
enable = true;
# settings = {
# PermitRootLogin = "no";
# PrintLastLog = "no";
settings = {
PermitRootLogin = "no";
PrintLastLog = "no";
# PasswordAuthentication = false;
# };
};
# ports = [ 69 ];
};
# Open ports in the firewall.
# Adguard ports: 3000 on tcp, 53 on udp
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).
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";
};
};
}