From 72d4cf648d760280b5a05be6f8586329a44a3f25 Mon Sep 17 00:00:00 2001 From: iFargle Date: Thu, 5 Oct 2023 12:26:26 +0900 Subject: [PATCH] Make the image smaller --- nixos/hosts/osaka-vultr-01/default.nix | 2 +- nixos/small.nix | 11 ++--------- nixos/users/albert/small.nix | 11 +++++++++++ 3 files changed, 14 insertions(+), 10 deletions(-) create mode 100644 nixos/users/albert/small.nix diff --git a/nixos/hosts/osaka-vultr-01/default.nix b/nixos/hosts/osaka-vultr-01/default.nix index ea29cd5b..8d0e60b7 100644 --- a/nixos/hosts/osaka-vultr-01/default.nix +++ b/nixos/hosts/osaka-vultr-01/default.nix @@ -1,7 +1,7 @@ { config, lib, pkgs, modulesPath, desktop, username, ... }: { imports = [ # This machine won't be using secureboot - ../../common/modules/boot.nix + ../../common/modules/boot.nixz ./disks.nix ]; nixpkgs.config.allowUnfree = false; diff --git a/nixos/small.nix b/nixos/small.nix index e99fb941..4501c9d0 100644 --- a/nixos/small.nix +++ b/nixos/small.nix @@ -9,21 +9,14 @@ # NixOS Modules ./common/modules/networking.nix # Initial Networking configs - ./common/modules/nixos.nix # NixOS related items - ./users/${username} + ./users/${username}/small.nix ./hosts/${hostname} ]; # List packages installed in system profile environment.systemPackages = with pkgs; [ - curl - rsync git - duf - ncdu - du-dust - sops gnupg ]; @@ -42,4 +35,4 @@ }; system.stateVersion = stateVersion; -} +} \ No newline at end of file diff --git a/nixos/users/albert/small.nix b/nixos/users/albert/small.nix new file mode 100644 index 00000000..b1792049 --- /dev/null +++ b/nixos/users/albert/small.nix @@ -0,0 +1,11 @@ +{ config, desktop, lib, pkgs, ... }: { + users.mutableUsers = false; + users.users.albert = { + isNormalUser = true; + description = "Albert J. Copeland"; + extraGroups = [ "networkmanager" "wheel" ]; + # mkpasswd -m sha-512 + hashedPassword = "$y$j9T$wKLsIWaA4Gf63RvjedwLJ0$EHKL6BBJV0CAxEKcHHjaBqW085KJ/MGvmbyWzmcWOy6"; + openssh.authorizedKeys.keyFiles = [ ../../../keys/ssh/keys.txt ]; + }; +} \ No newline at end of file