summaryrefslogtreecommitdiff
path: root/hosts
diff options
context:
space:
mode:
Diffstat (limited to 'hosts')
-rw-r--r--hosts/ahmed/configuration.nix9
-rw-r--r--hosts/ahmed/ssh.nix4
-rw-r--r--hosts/common.nix34
-rw-r--r--hosts/muhammed/configuration.nix7
4 files changed, 36 insertions, 18 deletions
diff --git a/hosts/ahmed/configuration.nix b/hosts/ahmed/configuration.nix
index 95561bd..2dbf4e1 100644
--- a/hosts/ahmed/configuration.nix
+++ b/hosts/ahmed/configuration.nix
@@ -15,14 +15,7 @@
isNormalUser = true;
hashedPassword = "$y$j9T$kNJ5L50Si0sAhdrHyO19I1$YcwXZ46dI.ApLMgZSj7qImq9FrSL0CEUeoJUS8P1103";
extraGroups = [ "wheel" ];
- shell = pkgs.zsh;
};
- # Following are recommended when changing the default shell.
- # https://nixos.wiki/wiki/Command_Shell#Changing_default_shelltrue;
- programs.zsh.enable = true;
- environment.shells = [ pkgs.zsh ];
-
- my.use-cases = [ "development" "sysadmin" ];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
@@ -57,8 +50,6 @@
networking.wireless.enable = true;
networking.wireless.networks."Rumpenettet_Guest".psk = "Rumpenerglad"; # NOCOMMIT
- nix.settings.experimental-features = [ "nix-command" ];
-
# Set up Minecraft server.
my.services.on-demand-minecraft = {
enable = true;
diff --git a/hosts/ahmed/ssh.nix b/hosts/ahmed/ssh.nix
index 9e34d99..f737437 100644
--- a/hosts/ahmed/ssh.nix
+++ b/hosts/ahmed/ssh.nix
@@ -1,6 +1,6 @@
# This file configures openSSH on this host.
-{ config, pkgs, lib, misc, ... }:
+{ lib, metadata, ... }:
{
# Who is allowed/expected to connect to this machine?
@@ -13,7 +13,7 @@
users.users = lib.genAttrs ["root" "linus"] (_: {
openssh.authorizedKeys.keys =
[
- misc.metadata.hosts.muhammed.sshPubKey
+ metadata.hosts.muhammed.sshPubKey
];
});
}
diff --git a/hosts/common.nix b/hosts/common.nix
new file mode 100644
index 0000000..87c6b27
--- /dev/null
+++ b/hosts/common.nix
@@ -0,0 +1,34 @@
+# Shared configuraion regardless of hosts.
+
+{ pkgs, ... }:
+
+{
+ # Enable de facto stable features.
+ nix.settings.experimental-features = [ "nix-command" "flakes" ];
+
+ # Set ZSH as the shell.
+ # https://nixos.wiki/wiki/Command_Shell#Changing_default_shelltrue
+ programs.zsh.enable = true;
+ environment.shells = [ pkgs.zsh ];
+ users.users.linus.shell = pkgs.zsh;
+
+ # Very basic system administration tools.
+ environment.systemPackages = with pkgs; [
+ tree
+ jc
+ jq
+ vim
+ comma
+ curl
+ ];
+
+ # Aliases that are burned into my muscle memory.
+ environment.shellAliases = {
+ "mv" = "mv -i";
+ "rm" = "rm -i";
+ "cp" = "cp -i";
+ "ls" = "ls -A --color=auto";
+ "grep" = "grep --color=auto";
+ "file" = "file --no-dereference";
+ };
+}
diff --git a/hosts/muhammed/configuration.nix b/hosts/muhammed/configuration.nix
index 0e41669..c824eb3 100644
--- a/hosts/muhammed/configuration.nix
+++ b/hosts/muhammed/configuration.nix
@@ -13,14 +13,7 @@
users.users.linus = {
description = "Personal user account";
home = "/Users/linus";
- shell = pkgs.zsh;
};
- # Following are recommended when changing the default shell.
- # https://nixos.wiki/wiki/Command_Shell#Changing_default_shelltrue;
- programs.zsh.enable = true; # TODO: move to common module
- environment.shells = [ pkgs.zsh ];
-
- my.use-cases = [ "gui" "development" ];
# Should match containing folder.
networking.hostName = "muhammed";