From 395fe1d235ece3490c3fa21defdbe698000b5eaf Mon Sep 17 00:00:00 2001 From: Menno van Leeuwen Date: Sat, 2 Nov 2024 01:44:24 +0100 Subject: [PATCH] chore: set hostname by var, remove trash, add missing ssh files --- .gitignore | 1 - config/config.yaml | 84 +--------------------- config/nixos/configuration.nix | 3 + config/nixos/flake.nix | 2 - config/ssh/authorized_keys/homeserver-pc | 2 + config/ssh/authorized_keys/mennos-gamingpc | 2 + config/ssh/id_ed25519 | 1 - config/ssh/id_ed25519.pub | 1 - 8 files changed, 8 insertions(+), 88 deletions(-) create mode 100644 config/ssh/authorized_keys/homeserver-pc create mode 100644 config/ssh/authorized_keys/mennos-gamingpc delete mode 120000 config/ssh/id_ed25519 delete mode 120000 config/ssh/id_ed25519.pub diff --git a/.gitignore b/.gitignore index 8a08bd0..7617572 100644 --- a/.gitignore +++ b/.gitignore @@ -9,7 +9,6 @@ secrets/ssh_config/*.* !secrets/ssh_config/*.gpg secrets/*.* !secrets/*.gpg -secrets/id_ed25519 # SHA256 hashes of the encrypted secrets *.sha256 \ No newline at end of file diff --git a/config/config.yaml b/config/config.yaml index 89dc196..f0efd30 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -36,6 +36,7 @@ config: sources: mennos-laptop: ~/dotfiles/config/ssh/authorized_keys/mennos-laptop mennos-desktop: ~/dotfiles/config/ssh/authorized_keys/mennos-desktop + mennos-gamingpc: ~/dotfiles/config/ssh/authorized_keys/mennos-gamingpc homeserver-pc: ~/dotfiles/config/ssh/authorized_keys/homeserver-pc target: ~/.ssh/authorized_keys chmod: 600 @@ -77,7 +78,6 @@ config: url: git@github.com:tradaware/infra.git branch: main target: ~/Projects/Work - # Packages to install # Note: Uninstalling packages is not supported, if you remove a package from this list it will not be removed from the system! @@ -92,85 +92,3 @@ config: - gnome-extensions-cli - bauh - shyaml - -# No longer supported: - # apt: - # repos: - # apps: - # - bash - # - bash-completion - # - solaar - # - git - # - curl - # - wget - # - gpg - # - nala - # - ca-certificates - # - gnupg-agent - # - software-properties-common - # - apt-transport-https - # - vim - # - sl - # - jq - # - gh - # - libglvnd-dev - # - libwayland-dev - # - libseat-dev - # - libxkbcommon-dev - # - libinput-dev - # - udev - # - dbus - # - liblzma-dev - # - libreadline-dev - # - libdbus-1-dev - # - libsystemd-dev - # - libpixman-1-dev - # - libssl-dev - # - libflatpak-dev - # - libpulse-dev - # - libexpat1-dev - # - libfontconfig-dev - # - libfreetype-dev - # - mold - # - clang - # - libgtk-3-dev - # - gcc - # - gcc-mingw-w64 - # - btop - # - htop - # - libgbm-dev - # - libclang-dev - # - libsecret-1-dev - # - libpipewire-0.3-dev - # - libpam0g-dev - # - openssh-server - # - build-essential - # - flatpak - # - meson - # - pipx - # - python3-nautilus - # - gettext - # - fzf - # - fastfetch - # - screenfetch - # - screen - # - code - # - 1password - # - 1password-cli - # - flameshot - # - cmake - # - libsqlite3-dev - # - libudev-dev - # - libncursesw5-dev - # - libgdbm-dev - # - libc6-dev - # - libbz2-dev - # - libffi-dev - # - tk-dev - # - cmatrix - # - toilet - # - oneko - # - libaa-bin - # - libcurses-perl - # - xdotool - # - xclip diff --git a/config/nixos/configuration.nix b/config/nixos/configuration.nix index 092f3c3..469b60a 100644 --- a/config/nixos/configuration.nix +++ b/config/nixos/configuration.nix @@ -106,6 +106,9 @@ allowedUDPPorts = [ ]; }; + # Set hostname to DOTF_HOSTNAME if defined, otherwise use the hostname of the system. + networking.hostName = builtins.getEnv "DOTF_HOSTNAME"; + # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions # on your system were taken. It‘s perfectly fine and recommended to leave diff --git a/config/nixos/flake.nix b/config/nixos/flake.nix index b41986b..66ca2bb 100644 --- a/config/nixos/flake.nix +++ b/config/nixos/flake.nix @@ -14,7 +14,6 @@ modules = [ ./hardware/mennos-laptop.nix ./configuration.nix - { networking.hostName = "mennos-laptop"; } ]; }; "mennos-gamingpc" = nixpkgs.lib.nixosSystem { @@ -22,7 +21,6 @@ modules = [ ./hardware/mennos-gamingpc.nix ./configuration.nix - { networking.hostName = "mennos-desktop"; } ]; }; }; diff --git a/config/ssh/authorized_keys/homeserver-pc b/config/ssh/authorized_keys/homeserver-pc new file mode 100644 index 0000000..26b28a2 --- /dev/null +++ b/config/ssh/authorized_keys/homeserver-pc @@ -0,0 +1,2 @@ +# This is the authrorized_keys file for the user mennos-laptop +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM+sKpcREOUjwMMSzEWAso6830wbOi8kUxqpuXWw5gHr \ No newline at end of file diff --git a/config/ssh/authorized_keys/mennos-gamingpc b/config/ssh/authorized_keys/mennos-gamingpc new file mode 100644 index 0000000..a7083d7 --- /dev/null +++ b/config/ssh/authorized_keys/mennos-gamingpc @@ -0,0 +1,2 @@ +# This is the authrorized_keys file for the user mennos-desktop +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM+sKpcREOUjwMMSzEWAso6830wbOi8kUxqpuXWw5gHr \ No newline at end of file diff --git a/config/ssh/id_ed25519 b/config/ssh/id_ed25519 deleted file mode 120000 index fceb5b5..0000000 --- a/config/ssh/id_ed25519 +++ /dev/null @@ -1 +0,0 @@ -../../secrets/id_ed25519 \ No newline at end of file diff --git a/config/ssh/id_ed25519.pub b/config/ssh/id_ed25519.pub deleted file mode 120000 index 0e0e5e1..0000000 --- a/config/ssh/id_ed25519.pub +++ /dev/null @@ -1 +0,0 @@ -../../secrets/id_ed25519.pub \ No newline at end of file