diff options
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/compromyse.nix | 10 | ||||
| -rw-r--r-- | modules/global.nix | 12 | ||||
| -rw-r--r-- | modules/nvidia.nix | 25 | ||||
| -rw-r--r-- | modules/ssh.nix | 9 |
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; + }; +} |
