summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorRaghuram Subramani <raghus2247@gmail.com>2024-01-31 22:02:28 +0530
committerRaghuram Subramani <raghus2247@gmail.com>2024-01-31 22:02:28 +0530
commit01bb0877c285383fd2857920048bd2576f4d31e9 (patch)
treeb6f26596f1051baf5b791450d6158a69363f6c76 /modules
parent578dd91bd1af79b256166ecf797344611790e267 (diff)
restructure
Diffstat (limited to 'modules')
-rw-r--r--modules/compromyse.nix10
-rw-r--r--modules/global.nix12
-rw-r--r--modules/nvidia.nix25
-rw-r--r--modules/ssh.nix9
4 files changed, 56 insertions, 0 deletions
diff --git a/modules/compromyse.nix b/modules/compromyse.nix
new file mode 100644
index 0000000..0d204d2
--- /dev/null
+++ b/modules/compromyse.nix
@@ -0,0 +1,10 @@
+{ config, ... }:
+
+{
+ users.users.compromyse = {
+ initialPassword = "changeme";
+ isNormalUser = true;
+ # openssh.authorizedKeys.keys = [];
+ extraGroups = [ "wheel" "storage" "libvirtd" ];
+ };
+}
diff --git a/modules/global.nix b/modules/global.nix
new file mode 100644
index 0000000..61575c1
--- /dev/null
+++ b/modules/global.nix
@@ -0,0 +1,12 @@
+{
+ nix.settings = {
+ experimental-features = [ "nix-command" "flakes" ];
+ auto-optimise-store = true;
+ };
+
+ nixpkgs.config.allowUnfree = true;
+
+ time.timeZone = "Asia/Kolkata";
+
+ system.stateVersion = "23.11";
+}
diff --git a/modules/nvidia.nix b/modules/nvidia.nix
new file mode 100644
index 0000000..a3f6074
--- /dev/null
+++ b/modules/nvidia.nix
@@ -0,0 +1,25 @@
+{ pkgs, config, ... }:
+
+{
+ hardware.opengl = {
+ enable = true;
+ driSupport = true;
+ driSupport32Bit = true;
+ };
+
+ services.xserver.videoDrivers = [ "nvidia" ];
+
+ hardware.nvidia = {
+ modesetting.enable = true;
+ powerManagement.enable = false;
+ powerManagement.finegrained = false;
+ open = false;
+ nvidiaSettings = false;
+ package = config.boot.kernelPackages.nvidiaPackages.production;
+
+ prime = {
+ intelBusId = "PCI:0:2:0";
+ nvidiaBusId = "PCI:1:0:0";
+ };
+ };
+}
diff --git a/modules/ssh.nix b/modules/ssh.nix
new file mode 100644
index 0000000..a389210
--- /dev/null
+++ b/modules/ssh.nix
@@ -0,0 +1,9 @@
+{ pkgs, config, ... }:
+
+{
+ services.openssh = {
+ enable = true;
+ permitRootLogin = "no";
+ passwordAuthentication = false;
+ };
+}