summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorBenjamin Chausse <benjamin@chausse.xyz>2024-11-14 12:05:09 -0500
committerBenjamin Chausse <benjamin@chausse.xyz>2024-11-14 12:05:09 -0500
commit3727e7bd79fe75ff18b1dc6af494dbda940e0971 (patch)
tree8c4fa53308b74063b4262605a02fcda07cd14d21 /common
Batman
Diffstat (limited to 'common')
-rw-r--r--common/dropbox.nix9
-rw-r--r--common/main-user.nix44
-rw-r--r--common/services.nix18
-rw-r--r--common/ssh.nix16
4 files changed, 87 insertions, 0 deletions
diff --git a/common/dropbox.nix b/common/dropbox.nix
new file mode 100644
index 0000000..8076610
--- /dev/null
+++ b/common/dropbox.nix
@@ -0,0 +1,9 @@
+{environment, pkgs, programs, ...}:
+
+{
+ environment.systemPackages = with pkgs; [
+ pass
+ maestral
+ maestral-gui
+ ];
+}
diff --git a/common/main-user.nix b/common/main-user.nix
new file mode 100644
index 0000000..4219b67
--- /dev/null
+++ b/common/main-user.nix
@@ -0,0 +1,44 @@
+{lib, config, pkgs, programs, environment, ...}:
+
+let
+ cfg = config.main-user;
+in
+{
+
+ options.main-user = {
+ enable = lib.mkEnableOption "enable user module";
+ userName = lib.mkOption {
+ default = "master";
+ description = ''
+ username
+ '';
+ };
+ };
+
+ config = lib.mkIf config.main-user.enable {
+
+
+ programs.zsh.enable = true;
+
+ users.groups.plugdev = {};
+ users.users.${config.main-user.userName} = {
+ isNormalUser = true;
+ initialPassword = "password1324";
+ description = "Benjamin Chausse";
+ group = "wheel";
+ extraGroups = ["plugdev" "networkmanager" "docker" "mlocate"];
+ shell = pkgs.zsh;
+ };
+
+ environment.systemPackages = with pkgs; [
+ git
+ yadm
+ neovim
+ zsh
+ zsh-syntax-highlighting
+ ];
+
+ };
+}
+
+
diff --git a/common/services.nix b/common/services.nix
new file mode 100644
index 0000000..7ed9bec
--- /dev/null
+++ b/common/services.nix
@@ -0,0 +1,18 @@
+{virtualisation, environment, pkgs, services, ...}:
+
+{
+ virtualisation.docker = {
+ enable = true;
+ liveRestore = false;
+ };
+ environment.systemPackages = with pkgs; [
+ lazydocker
+ ];
+
+ services.plex = {
+ enable = true;
+ openFirewall = true;
+ user="master";
+ accelerationDevices = ["*"];
+ };
+}
diff --git a/common/ssh.nix b/common/ssh.nix
new file mode 100644
index 0000000..de931f5
--- /dev/null
+++ b/common/ssh.nix
@@ -0,0 +1,16 @@
+{services, networking, ...}:
+
+{
+ services.openssh = {
+ enable = true;
+ ports = [ 22 ];
+ settings = {
+ PasswordAuthentication = true;
+ AllowUsers = null; # Allows all users by default. Can be [ "user1" "user2" ]
+ UseDns = true;
+ X11Forwarding = false;
+ PermitRootLogin = "no"; # "yes", "without-password", "prohibit-password", "forced-commands-only", "no"
+ };
+ };
+ # networking.firewall.allowedTCPPorts = [22];
+}