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 = [];
home.username = username;
@ -6,6 +6,10 @@
programs.home-manager.enable = true;
home.packages = with pkgs; [
dig
];
home.sessionVariables = {
EDITOR = "vim";
};

View file

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

View file

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

View file

@ -1,5 +1,4 @@
{fetchFromGitLab, ...}:
{
{fetchFromGitLab, ...}: {
imports = [
(fetchFromGitLab {
owner = "simple-nixos-webserver";
@ -9,10 +8,10 @@
})
];
mailserver = {
mailserver = {
enable = true;
fqdn = "mail.spoodythe.one";
domains = [ "spoodythe.one" ];
domains = ["spoodythe.one"];
# A list of all login accounts. To create the password hashes, use
# 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
# down nginx and opens port 80.
certificateScheme = "acme-nginx";
certificateDomains = [ "mail.spoodythe.one" ];
certificateDomains = ["mail.spoodythe.one"];
};
}