summaryrefslogtreecommitdiff
path: root/os/common/modules
diff options
context:
space:
mode:
authorsinanmohd <sinan@sinanmohd.com>2024-06-04 21:11:53 +0530
committersinanmohd <sinan@sinanmohd.com>2024-06-05 00:44:35 +0530
commit65f71da77061339b4ed9b33508e95049a4e77cb4 (patch)
treec60f86331aefd71c2a0960d3e161ed8814adc805 /os/common/modules
parent654fa9e430be421df30ee79e7ea5f4e40b39dddc (diff)
os/common/{environment,user}: init
Diffstat (limited to 'os/common/modules')
-rw-r--r--os/common/modules/environment.nix19
-rw-r--r--os/common/modules/user.nix16
2 files changed, 35 insertions, 0 deletions
diff --git a/os/common/modules/environment.nix b/os/common/modules/environment.nix
new file mode 100644
index 0000000..38446f2
--- /dev/null
+++ b/os/common/modules/environment.nix
@@ -0,0 +1,19 @@
+{ pkgs, lib, ... }: {
+ environment = {
+ binsh = lib.getExe pkgs.dash;
+ systemPackages = with pkgs; [
+ dash
+ neovim
+ ];
+
+ variables = {
+ EDITOR = "nvim";
+ VISUAL = "nvim";
+ };
+
+ shellAliases = {
+ grep = "grep --color=auto";
+ ls = "ls --color=auto --group-directories-first";
+ };
+ };
+}
diff --git a/os/common/modules/user.nix b/os/common/modules/user.nix
new file mode 100644
index 0000000..d6c341b
--- /dev/null
+++ b/os/common/modules/user.nix
@@ -0,0 +1,16 @@
+{ config, ... }: let
+ user = config.global.userdata.name;
+ email = config.global.userdata.email;
+in {
+ users.users.${user} = {
+ uid = 1000;
+ isNormalUser = true;
+ description = email;
+ extraGroups = [ "wheel" ];
+
+ openssh.authorizedKeys.keys = [
+ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAcCendbKbeoc7hYEEcBt9wwtSXrJUgJ2SuYARO0zPAX sinan@veu"
+ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL8LnyOuPmtKRqAZeHueNN4kfYvpRQVwCivSTq+SZvDU sinan@cez"
+ ];
+ };
+}