Add serial commands, app image support, home-manager cli, and network manager profile configuration example.

This commit is contained in:
GRMrGecko 2024-05-22 23:57:13 -05:00
parent 023dc8a6d5
commit 103a17e6ff
8 changed files with 145 additions and 1 deletions

View File

@ -237,6 +237,7 @@ rec {
name = "${gitName}";
email = "${gitEmail}";
};
networkmanager.profiles = {};
}
EOF

View File

@ -48,6 +48,7 @@
else
inputs.home-manager-unstable
);
# Setup an overlay for unstable packages to include on stable environments.
overlay-unstable = final: prev: {
unstable = import inputs.nixpkgs-unstable {

View File

@ -71,6 +71,8 @@
cron
mlocate
tmux
screen
picocom
killall
pciutils

View File

@ -69,6 +69,7 @@
# Desktop
polybar
appimage-run
# Software defined radio
gqrx

View File

@ -11,6 +11,7 @@
# Or disable the firewall altogether.
networking.firewall.enable = false;
networking.networkmanager.enable = true;
networking.networkmanager.ensureProfiles.profiles = settings.networkmanager.profiles;
environment.systemPackages = with pkgs; [
dnsutils

View File

@ -36,6 +36,7 @@
unstable.nodejs_22
pure-prompt
fastfetch
home-manager
];
home-manager = {

View File

@ -2,7 +2,7 @@ rec {
system = "x86_64-linux";
timezone = "America/Chicago";
locale = "en_US.UTF-8";
packages = "stable";
packages = "unstable";
profile = "desktop";
hostId = (builtins.substring 0 8 (builtins.readFile "/etc/machine-id"));
hostName = "nixos";
@ -27,4 +27,5 @@ rec {
name = "GRMrGecko";
email = "grmrgecko@gmail.com";
};
networkmanager.profiles = {};
}

136
settings-server-example.nix Normal file
View File

@ -0,0 +1,136 @@
rec {
system = "x86_64-linux";
timezone = "America/Chicago";
locale = "en_US.UTF-8";
packages = "stable";
profile = "virtual-machine-host";
hostId = (builtins.substring 0 8 (builtins.readFile "/etc/machine-id"));
hostName = "nixos";
videoDrivers = "unknown";
disk = {
device = "/dev/sda";
swapSize = "8G";
luks = false;
};
user = {
name = "grmrgecko";
description = "James Coleman";
hashedPassword = "";
openssh.authorizedKeys.keys = [];
autoLogin = false;
};
root = {
hashedPassword = user.hashedPassword;
openssh.authorizedKeys.keys = user.openssh.authorizedKeys.keys;
};
git = {
name = "GRMrGecko";
email = "grmrgecko@gmail.com";
};
network.interface = "enp1s0";
network.suffix = "2";
networkmanager.profiles = {
${network.interface} = {
connection = {
id = network.interface;
type = "ethernet";
interface-name = network.interface;
};
ethernet = {
mtu = 9000;
};
ipv4 = {
method = "disabled";
};
ipv6 = {
method = "disabled";
};
};
"vlan-${network.interface}.1" = {
connection = {
id = "vlan-${network.interface}.1";
type = "vlan";
interface-name = "${network.interface}.1";
master = "br0";
slave-type = "bridge";
};
ethernet = {
mtu = 1500;
};
vlan = {
flags = 1;
id = 1;
parent = network.interface;
};
};
"vlan-${network.interface}.10" = {
connection = {
id = "vlan-${network.interface}.10";
type = "vlan";
interface-name = "${network.interface}.10";
master = "br1";
slave-type = "bridge";
};
ethernet = {
mtu = 1500;
};
vlan = {
flags = 1;
id = 10;
parent = network.interface;
};
};
"vlan-${network.interface}.100" = {
connection = {
id = "vlan-${network.interface}.100";
type = "vlan";
interface-name = "${network.interface}.100";
};
ethernet = {
mtu = 9000;
};
vlan = {
flags = 1;
id = 100;
parent = network.interface;
};
ipv4 = {
address1 = "10.0.100.${network.suffix}/24";
method = "manual";
};
ipv6 = {
method = "disabled";
};
};
"bridge-br0" = {
connection = {
id = "bridge-br0";
type = "bridge";
interface-name = "br0";
};
ipv4 = {
address1 = "10.0.0.${network.suffix}/24,10.0.0.1";
dns = "10.0.0.33;10.0.0.1;";
method = "manual";
};
ipv6 = {
addr-gen-mode = "stable-privacy";
method = "auto";
};
};
"bridge-br1" = {
connection = {
id = "bridge-br1";
type = "bridge";
interface-name = "br1";
};
ipv4 = {
address1 = "10.0.10.${network.suffix}/24";
method = "manual";
};
ipv6 = {
method = "disabled";
};
};
};
}