mirror of
https://codeberg.org/privacy1st/nix-git
synced 2024-11-21 22:03:19 +01:00
refactor and add yodaNas [WIP]
This commit is contained in:
parent
90489233da
commit
f51628de34
69
hosts/yodaNas/configuration.nix
Normal file
69
hosts/yodaNas/configuration.nix
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
# Edit this configuration file to define what should be installed on
|
||||||
|
# your system. Help is available in the configuration.nix(5) man page
|
||||||
|
# and in the NixOS manual (accessible by running `nixos-help`).
|
||||||
|
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
let
|
||||||
|
# Import Home Manager with niv.
|
||||||
|
home-manager = (import ../../nix/sources.nix).home-manager;
|
||||||
|
#home-manager-source = import (import ../../nix/sources.nix).home-manager {};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
# Paths to other modules.
|
||||||
|
# Compose this module out of smaller ones.
|
||||||
|
# https://nixos.wiki/wiki/NixOS_modules
|
||||||
|
imports =
|
||||||
|
[
|
||||||
|
# Include the results of the hardware scan.
|
||||||
|
./hardware-configuration.nix
|
||||||
|
# Home Manager.
|
||||||
|
(import "${home-manager}/nixos")
|
||||||
|
#home-manager-source.nixos
|
||||||
|
../../modules/home-manager.nix
|
||||||
|
# NUR.
|
||||||
|
../../modules/nur.nix
|
||||||
|
# Device specific.
|
||||||
|
../../modules/yodaNas.nix
|
||||||
|
|
||||||
|
../../modules/base.nix
|
||||||
|
#../../modules/base-gnome.nix
|
||||||
|
#../../modules/programs.nix
|
||||||
|
#../../modules/autostart.nix
|
||||||
|
#../../modules/wallpaper.nix
|
||||||
|
#../../modules/fwupd-gnome.nix
|
||||||
|
#../../modules/print-and-scan.nix
|
||||||
|
../../modules/fde-ssh-unlock.nix
|
||||||
|
#../../modules/nextcloud-integration.nix
|
||||||
|
|
||||||
|
#../../modules/gnome-config.nix
|
||||||
|
#../../modules/gnome-extensions.nix
|
||||||
|
#../../modules/gnome-fractional-scaling.nix
|
||||||
|
#../../modules/git.nix
|
||||||
|
../../modules/zsh.nix
|
||||||
|
#../../modules/nitrokey-gpg-smartcard.nix
|
||||||
|
#../../modules/ssh-client.nix
|
||||||
|
../../modules/ssh-server.nix
|
||||||
|
#../../modules/firefox.nix
|
||||||
|
#../../modules/thunderbird.nix
|
||||||
|
#../../modules/digikam-rawtherapee.nix
|
||||||
|
#../../modules/android.nix
|
||||||
|
#../../modules/podman.nix
|
||||||
|
../../modules/docker.nix
|
||||||
|
#../../modules/docker-pushrm.nix
|
||||||
|
#../../modules/lid-switch-handling.nix
|
||||||
|
../../modules/sendmail-mta.nix
|
||||||
|
../../modules/journalwatch.nix
|
||||||
|
#../../modules/waydroid.nix
|
||||||
|
#../../modules/ntfs.nix
|
||||||
|
#../../modules/veracrypt.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
networking.hostName = "yodaNas";
|
||||||
|
|
||||||
|
boot.kernelParams = [];
|
||||||
|
|
||||||
|
# Allow unfree packages.
|
||||||
|
nixpkgs.config.allowUnfree = false;
|
||||||
|
|
||||||
|
boot.kernelPackages = pkgs.linuxPackages;
|
||||||
|
}
|
@ -57,8 +57,6 @@ in
|
|||||||
];
|
];
|
||||||
|
|
||||||
networking.hostName = "yodaTab";
|
networking.hostName = "yodaTab";
|
||||||
services.openssh.ports = [ 22 ];
|
|
||||||
boot.initrd.network.ssh.port = 22;
|
|
||||||
|
|
||||||
boot.kernelParams = [];
|
boot.kernelParams = [];
|
||||||
|
|
||||||
|
@ -57,8 +57,6 @@ in
|
|||||||
];
|
];
|
||||||
|
|
||||||
networking.hostName = "yodaTux";
|
networking.hostName = "yodaTux";
|
||||||
services.openssh.ports = [ 22 ];
|
|
||||||
boot.initrd.network.ssh.port = 22;
|
|
||||||
|
|
||||||
# Systemd Journal entry:
|
# Systemd Journal entry:
|
||||||
# S Sat Sep 23 16:11:52 2023 p4 kernel: TSC found unstable after boot, most likely due to broken BIOS. Use 'tsc=unstable'.
|
# S Sat Sep 23 16:11:52 2023 p4 kernel: TSC found unstable after boot, most likely due to broken BIOS. Use 'tsc=unstable'.
|
||||||
|
@ -59,8 +59,6 @@ in
|
|||||||
];
|
];
|
||||||
|
|
||||||
networking.hostName = "yodaYoga";
|
networking.hostName = "yodaYoga";
|
||||||
services.openssh.ports = [ 2224 ];
|
|
||||||
boot.initrd.network.ssh.port = 2225;
|
|
||||||
|
|
||||||
boot.kernelParams = [];
|
boot.kernelParams = [];
|
||||||
|
|
||||||
|
@ -11,7 +11,15 @@
|
|||||||
boot.initrd.network.enable = true;
|
boot.initrd.network.enable = true;
|
||||||
boot.initrd.network.ssh = {
|
boot.initrd.network.ssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
#port = 22;
|
port = (
|
||||||
|
if (config.networking.hostname == "yodaTux") || (config.networking.hostname == "yodaTab")
|
||||||
|
then 22
|
||||||
|
else if (config.networking.hostname == "yodaYoga")
|
||||||
|
then 2225
|
||||||
|
else if (config.networking.hostname == "yodaNas")
|
||||||
|
then 2223
|
||||||
|
else throw "Please add initrd ssh port here"
|
||||||
|
);
|
||||||
shell = "/bin/cryptsetup-askpass";
|
shell = "/bin/cryptsetup-askpass";
|
||||||
authorizedKeys = [
|
authorizedKeys = [
|
||||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCpgihAg8Qzu5q+AGXHLR7p+rrS1yB0KlZb/Y/EwZT15EhEtsUMqBMRiY0TdjKQU0broyygZnymccLmCXvihEgk3zk/hP8VEDmN5wmE2tRBPR4lSjo8E1R8N79G+gaFkwi93QYh57MsGfa9k4tvGrJy0yaD7GrPqtQf+IIuvV14WJQAqnikTdbFqRjk5JGearYLU7jSKa+9NmR7JQ9NExoyIPgmQ/pd0Xc2qt8k5UGfz3HM9MAmIVQ30whK6m1iYZ8nxEidHrfreQx8NOa7ujo4zQnV1NYvRUjObr/qyIhPU6DYLT2mVRNupQFKx6LI38O4U13heugUFqJ3zvog3aDsriFiv8jzJAJvWXx7Q3TqKhqiG9VTkwBw1NDbCAOXKiEdMfiCYbdCfpNgdepU75bMloJcSQQVUqoH2tQhS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
|
# Or check the "Network" part of:
|
||||||
# inxi -F
|
# inxi -F
|
||||||
#
|
#
|
||||||
#boot.initrd.availableKernelModules = [ "r8169" ]; # TODO: This value is valid for yodaTux only
|
boot.initrd.availableKernelModules = (
|
||||||
boot.initrd.availableKernelModules = [ "e1000e" ]; # TODO: This value is valid for yodaYoga only
|
if (config.networking.hostname == "yodaTux")
|
||||||
|
then [ "r8169" ]
|
||||||
|
else if (config.networking.hostname == "yodaYoga")
|
||||||
|
then [ "e1000e" ]
|
||||||
|
else throw "Please add kernel module of networ card here"
|
||||||
|
);
|
||||||
#
|
#
|
||||||
# dmesg -> enp0s20f0u1u2: renamed from eth0 (yodaTux)
|
# dmesg -> enp0s20f0u1u2: renamed from eth0 (yodaTux)
|
||||||
# dmesg -> enp0s31f6: renamed from eth0 (yodaYoga)
|
# dmesg -> enp0s31f6: renamed from eth0 (yodaYoga)
|
||||||
|
@ -4,7 +4,15 @@
|
|||||||
# Enable SSH server.
|
# Enable SSH server.
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
#ports = [ 22 ];
|
ports = (
|
||||||
|
if (config.networking.hostname == "yodaTux") || (config.networking.hostname == "yodaTab")
|
||||||
|
then [22]
|
||||||
|
else if (config.networking.hostname == "yodaYoga")
|
||||||
|
then [2224]
|
||||||
|
else if (config.networking.hostname == "yodaNas")
|
||||||
|
then [2222]
|
||||||
|
else throw "Please add ssh port here"
|
||||||
|
);
|
||||||
# Use authorized keys only.
|
# Use authorized keys only.
|
||||||
settings.PasswordAuthentication = false;
|
settings.PasswordAuthentication = false;
|
||||||
settings.PermitRootLogin = "prohibit-password";
|
settings.PermitRootLogin = "prohibit-password";
|
||||||
|
Loading…
Reference in New Issue
Block a user