static ip

This commit is contained in:
Snorre Ettrup Altschul 2025-03-03 21:58:20 +01:00
parent 77654b1188
commit 2a930a6c9d
4 changed files with 33 additions and 25 deletions

View file

@ -1,4 +1,4 @@
{username ? throw "no username provided"}: {...}: { {username ? throw "no username provided"}: {pkgs,...}: {
imports = []; imports = [];
home.username = username; home.username = username;
@ -6,6 +6,10 @@
programs.home-manager.enable = true; programs.home-manager.enable = true;
home.packages = with pkgs; [
dig
];
home.sessionVariables = { home.sessionVariables = {
EDITOR = "vim"; EDITOR = "vim";
}; };

View file

@ -2,25 +2,33 @@
networking.hostName = hostname; networking.hostName = hostname;
networking.hostId = "2ead098f"; networking.hostId = "2ead098f";
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
networking.useDHCP = false;
# networking.resolvconf.dnsExtensionMechanism = false;
networking.firewall = { networking.firewall = {
enable = true; enable = true;
allowedTCPPorts = []; allowedTCPPorts = [];
allowedUDPPorts = []; allowedUDPPorts = [];
}; };
# Static ip networking.interfaces.enp2s0 = {
# networking.interfaces.enp2s0 = { ipv4.addresses = [
# ipv4.addresses = [ {
# { address = "10.0.101.10";
# address = "10.0.201.23"; prefixLength = 24;
# prefixLength = 24; }
# } ];
# ]; };
# };
# networking.defaultGateway = { networking.defaultGateway = {
# address = "10.0.201.1"; address = "10.0.101.1";
# interface = "enp2s0"; interface = "enp2s0";
# }; };
networking.nameservers = [
"10.0.101.1"
"8.8.8.8"
"8.8.4.4"
];
# Uncomment when domain is set up # Uncomment when domain is set up
# security.acme = { # security.acme = {

View file

@ -1,12 +1,10 @@
{ pkgs, ... }: {pkgs, ...}: let
let
host = "127.0.0.1"; host = "127.0.0.1";
port = 8096; port = 8096;
in in {
{
# Enable VAAPI # Enable VAAPI
nixpkgs.config.packageOverrides = pkgs: { nixpkgs.config.packageOverrides = pkgs: {
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; }; vaapiIntel = pkgs.vaapiIntel.override {enableHybridCodec = true;};
}; };
hardware.graphics = { hardware.graphics = {
enable = true; enable = true;
@ -48,5 +46,4 @@ in
}; };
}; };
}; };
} }

View file

@ -1,5 +1,4 @@
{fetchFromGitLab, ...}: {fetchFromGitLab, ...}: {
{
imports = [ imports = [
(fetchFromGitLab { (fetchFromGitLab {
owner = "simple-nixos-webserver"; owner = "simple-nixos-webserver";
@ -9,10 +8,10 @@
}) })
]; ];
mailserver = { mailserver = {
enable = true; enable = true;
fqdn = "mail.spoodythe.one"; fqdn = "mail.spoodythe.one";
domains = [ "spoodythe.one" ]; domains = ["spoodythe.one"];
# A list of all login accounts. To create the password hashes, use # A list of all login accounts. To create the password hashes, use
# nix-shell -p mkpasswd --run 'mkpasswd -sm bcrypt' # nix-shell -p mkpasswd --run 'mkpasswd -sm bcrypt'
@ -26,6 +25,6 @@
# Use Let's Encrypt certificates. Note that this needs to set up a stripped # Use Let's Encrypt certificates. Note that this needs to set up a stripped
# down nginx and opens port 80. # down nginx and opens port 80.
certificateScheme = "acme-nginx"; certificateScheme = "acme-nginx";
certificateDomains = [ "mail.spoodythe.one" ]; certificateDomains = ["mail.spoodythe.one"];
}; };
} }