feat!: change machine hostnames

Instead of merely naming my systems "laptop", "desktop", etc. (boring),
I now have them named after Aristotelian elements (cool).

This also gives me an excuse to refactor my flake file.
This commit is contained in:
Kiana Sheibani 2024-10-15 03:25:56 -04:00
parent e4ec3df115
commit fb7b45f98d
Signed by: toki
GPG key ID: 6CB106C25E86A9F7
13 changed files with 81 additions and 83 deletions

View file

@ -1,5 +1,5 @@
{ config, lib, ... }:
lib.mkIf (config.platform == "laptop") {
lib.mkIf (config.machine == "fire") {
services.upower = {
enable = true;

View file

@ -1,15 +1,15 @@
{ config, pkgs, lib, username, fullname, ... }:
let
inherit (config) platform;
isMobile = platform == "mobile";
inherit (config) machine;
isMobile = machine == "air";
hashedPassword =
if platform == "desktop" then
"$6$HYibiGhDN.JgLtw6$cecU7NjfumTUJSkFNFQG4uVgdd3tTPLGxK0zHAwYn3un/V43IUlyVBNKoRMLCQk65RckbD/.AjsLFVFKUUHVA/"
else if platform == "laptop" then
"$6$y3eb1phxFWnParRT$w1LNfxJ2ByHoiBa5ywh4STGuIK/r4Tnyxx2Xe/nlovrE6LuuLAVdKRFAroUTtUI/d2BNGI9ErjZ2z2Dl7w/t00"
else # if platform == "mobile"
"$6$vmmMT7pEY1W0Bj9R$Kb6nuwdg/KzCrGcUPkEo2jJ6a2NJRikiOeN8/I8ObU1K6rVYvgYqPVgPg9NkLaUScdh1PWcabuvaHCFLMw14A0";
if machine == "earth" then
"$y$j9T$rpQs/Fnsxh4DNw4qDSvTu.$nzA1EskOnWrYM.Iba7q73O.QPEn3DFWrX2.KY8mKza."
else if machine == "fire" then
"$y$j9T$EXc0TFu9LQhQ9YGrOkb7u0$LpwNG0XpUIVSltLqUw7CAOLSsI2rZr1RTBnJai5dkM7"
else # if machine == "air"
"$y$j9T$zF34p.W/HFKrWde5Rb1nq/$1Q5IN9IT.IQ6SLg8InUZM5L27.jQV.cRtNENnUPp0ZC";
in
{
nix.package = pkgs.nixFlakes;
@ -24,7 +24,7 @@ in
boot.loader.systemd-boot.enable = !isMobile;
boot.loader.efi.canTouchEfiVariables = !isMobile;
networking.hostName = "kiana-${platform}";
networking.hostName = "toki-${machine}";
networking.wireless.enable = false;
networking.networkmanager.enable = true;

View file

@ -10,7 +10,7 @@ let
mv * $out/share/sddm/themes/tokyo-night-sddm
'';
};
in lib.mkIf (config.platform != "mobile") {
in lib.mkIf (config.machine != "air") {
environment.systemPackages = with pkgs.libsForQt5; [
tokyo-night-sddm # Theme
qtbase