summaryrefslogtreecommitdiff
path: root/modules/common
diff options
context:
space:
mode:
authorm4siri <git@m4siri.com>2025-11-23 10:36:43 +0545
committerm4siri <git@m4siri.com>2025-11-23 10:36:56 +0545
commit3424cfd40c046c038df0335212e8000ebd473602 (patch)
treefc800399450284e77be346311952968591a5534e /modules/common
repo init
Diffstat (limited to 'modules/common')
-rw-r--r--modules/common/agenix.nix21
-rw-r--r--modules/common/nix.nix5
-rw-r--r--modules/common/packages.nix15
-rw-r--r--modules/common/qemu.nix6
-rw-r--r--modules/common/ssh/default.nix9
-rw-r--r--modules/common/users.nix20
6 files changed, 76 insertions, 0 deletions
diff --git a/modules/common/agenix.nix b/modules/common/agenix.nix
new file mode 100644
index 0000000..189f80e
--- /dev/null
+++ b/modules/common/agenix.nix
@@ -0,0 +1,21 @@
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}: let
+ inherit (lib) mkAliasOptionModule mkIf;
+in {
+ imports = [(mkAliasOptionModule ["secrets"] ["age" "secrets"])];
+
+ age.identityPaths = [
+ "/root/.ssh/id"
+ ];
+
+ environment = {
+ shellAliases.ragenix = "ragenix --identity ~/.ssh/id";
+ systemPackages = [
+ pkgs.ragenix
+ ];
+ };
+}
diff --git a/modules/common/nix.nix b/modules/common/nix.nix
new file mode 100644
index 0000000..fbcbbfd
--- /dev/null
+++ b/modules/common/nix.nix
@@ -0,0 +1,5 @@
+{
+ nix.settings = {
+ experimental-features = ["nix-command" "flakes" "pipe-operators"];
+ };
+}
diff --git a/modules/common/packages.nix b/modules/common/packages.nix
new file mode 100644
index 0000000..3e5b043
--- /dev/null
+++ b/modules/common/packages.nix
@@ -0,0 +1,15 @@
+{
+ pkgs,
+ unstable,
+ ...
+}: {
+ environment.systemPackages = with pkgs;
+ [
+ curl
+ gitMinimal
+ helix
+ jujutsu
+ nushell
+ ]
+ ++ [pkgs.stalwart-mail];
+}
diff --git a/modules/common/qemu.nix b/modules/common/qemu.nix
new file mode 100644
index 0000000..231d13a
--- /dev/null
+++ b/modules/common/qemu.nix
@@ -0,0 +1,6 @@
+{modulesPath, ...}: {
+ imports = [
+ (modulesPath + "/installer/scan/not-detected.nix")
+ (modulesPath + "/profiles/qemu-guest.nix")
+ ];
+}
diff --git a/modules/common/ssh/default.nix b/modules/common/ssh/default.nix
new file mode 100644
index 0000000..a4c5891
--- /dev/null
+++ b/modules/common/ssh/default.nix
@@ -0,0 +1,9 @@
+{
+ services.openssh = {
+ enable = true;
+ settings = {
+ PermitRootLogin = "yes";
+ PasswordAuthentication = true;
+ };
+ };
+}
diff --git a/modules/common/users.nix b/modules/common/users.nix
new file mode 100644
index 0000000..bb41b02
--- /dev/null
+++ b/modules/common/users.nix
@@ -0,0 +1,20 @@
+{
+ users.groups.siri = {};
+
+ users.users.root = {
+ hashedPassword = "$6$WHOn5nIFRZ/fhc6u$1rMRPwW3anEfWcf.Wd0IxfUoV.ouo5Vm0NxOSyUwtkTP8OKnFfdLL0.OCzS5Dnlp8rIpZNWlUImkqBq7fTZ7i/";
+ openssh.authorizedKeys.keys = [
+ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMrczZPQlkb9TwtLa5YKs6Npu2vXtG4yJa0AWmwOLtfF siri@m4siri"
+ ];
+ };
+
+ users.users.siri = {
+ group = "siri";
+ isNormalUser = true;
+ extraGroups = [ "wheel" ];
+ hashedPassword = "$6$WHOn5nIFRZ/fhc6u$1rMRPwW3anEfWcf.Wd0IxfUoV.ouo5Vm0NxOSyUwtkTP8OKnFfdLL0.OCzS5Dnlp8rIpZNWlUImkqBq7fTZ7i/";
+ openssh.authorizedKeys.keys = [
+ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMrczZPQlkb9TwtLa5YKs6Npu2vXtG4yJa0AWmwOLtfF siri@m4siri"
+ ];
+ };
+}