From fc52d1c5be78e9e6014184ad458c583fe48c7ee9 Mon Sep 17 00:00:00 2001 From: Pim Kunis Date: Wed, 15 Nov 2023 21:25:35 +0100 Subject: [PATCH] use rust-motd for greeting message --- configuration.nix | 16 +++++++++++++++- hardware-configuration.nix | 16 ++-------------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/configuration.nix b/configuration.nix index bb8a309..f9a93d2 100644 --- a/configuration.nix +++ b/configuration.nix @@ -75,9 +75,23 @@ ''; }; + programs.rust-motd = { + enable = true; + settings = { + banner = { + color = "red"; + command = + "${pkgs.nettools}/bin/hostname | ${pkgs.figlet}/bin/figlet -f univers"; + }; + uptime.prefix = "Up"; + filesystems.root = "/"; + memory.swap_pos = "beside"; + }; + }; + nixpkgs.config.allowUnfree = true; - environment.systemPackages = with pkgs; [ vim neofetch cowsay python3 ]; + environment.systemPackages = with pkgs; [ vim neofetch python3 ]; networking.firewall.enable = false; diff --git a/hardware-configuration.nix b/hardware-configuration.nix index 56e0248..0d22d9d 100644 --- a/hardware-configuration.nix +++ b/hardware-configuration.nix @@ -1,4 +1,4 @@ -{ config, lib, modulesPath, ... }: { +{ config, lib, modulesPath, machine, ... }: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; boot.initrd.availableKernelModules = @@ -7,20 +7,8 @@ boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; - # fileSystems."/" = { - # device = "/dev/disk/by-uuid/b78f591c-c9b6-4dae-9837-56716d38990b"; - # fsType = "ext4"; - # }; - - # fileSystems."/boot" = { - # device = "/dev/disk/by-uuid/6936-84C2"; - # fsType = "vfat"; - # }; - - # swapDevices = - # [{ device = "/dev/disk/by-uuid/79fbd322-e58d-4e45-8969-06ef494cefea"; }]; - networking.useDHCP = false; + networking.hostName = machine.name; nixpkgs.hostPlatform = "x86_64-linux"; hardware.cpu.intel.updateMicrocode =