mirror of
https://github.com/oqyude/nixos.git
synced 2026-06-15 22:41:52 +03:00
123
This commit is contained in:
+23
-15
@@ -8,22 +8,31 @@ let
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
device.type = "server";
|
xlib.device = {
|
||||||
|
type = "server";
|
||||||
|
hostname = "sapphira";
|
||||||
|
};
|
||||||
|
|
||||||
imports = with inputs; [
|
imports = with inputs; [
|
||||||
sops-nix.nixosModules.sops
|
sops-nix.nixosModules.sops
|
||||||
./hardware/server.nix
|
./hardware/server.nix
|
||||||
self.nixosModules.default
|
self.nixosModules.default
|
||||||
|
self.homeConfigurations.default.nixosModule
|
||||||
|
|
||||||
self.nixosModules.server.immich
|
self.nixosModules.server.immich
|
||||||
self.nixosModules.server.nextcloud
|
self.nixosModules.server.nextcloud
|
||||||
self.nixosModules.server.nginx
|
self.nixosModules.server.nginx
|
||||||
self.nixosModules.software.beets
|
self.nixosModules.software.beets
|
||||||
#self.nixosModules.server.zerotier
|
#self.nixosModules.server.zerotier
|
||||||
|
|
||||||
self.homeConfigurations.server.nixosModule # home-manager configuration module
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
home-manager = {
|
||||||
|
extraSpecialArgs = {
|
||||||
|
#inherit inputs;
|
||||||
|
xlib = config.xlib;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
kernelPackages = pkgs.linuxPackages_xanmod_stable;
|
kernelPackages = pkgs.linuxPackages_xanmod_stable;
|
||||||
hardwareScan = true;
|
hardwareScan = true;
|
||||||
@@ -43,7 +52,7 @@ let
|
|||||||
|
|
||||||
users = {
|
users = {
|
||||||
users = {
|
users = {
|
||||||
"${config.xlib.devices.admin}" = {
|
"${config.xlib.device.username}" = {
|
||||||
openssh.authorizedKeys.keys = [
|
openssh.authorizedKeys.keys = [
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKduJia+unaQQdN6X5syaHvnpIutO+yZwvfiCP4qKQ/P root@sapphira"
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKduJia+unaQQdN6X5syaHvnpIutO+yZwvfiCP4qKQ/P root@sapphira"
|
||||||
];
|
];
|
||||||
@@ -110,19 +119,19 @@ let
|
|||||||
"path" = "/etc/nixos";
|
"path" = "/etc/nixos";
|
||||||
"browseable" = "yes";
|
"browseable" = "yes";
|
||||||
"read only" = "no";
|
"read only" = "no";
|
||||||
"valid users" = "${config.xlib.devices.admin}";
|
"valid users" = "${config.xlib.device.username}";
|
||||||
"guest ok" = "no";
|
"guest ok" = "no";
|
||||||
"writable" = "yes";
|
"writable" = "yes";
|
||||||
"create mask" = 755;
|
"create mask" = 755;
|
||||||
"directory mask" = 755;
|
"directory mask" = 755;
|
||||||
"force user" = "${config.xlib.devices.admin}";
|
"force user" = "${config.xlib.device.username}";
|
||||||
"force group" = "users";
|
"force group" = "users";
|
||||||
};
|
};
|
||||||
root = {
|
root = {
|
||||||
"path" = "/";
|
"path" = "/";
|
||||||
"browseable" = "yes";
|
"browseable" = "yes";
|
||||||
"read only" = "no";
|
"read only" = "no";
|
||||||
"valid users" = "${config.xlib.devices.admin}";
|
"valid users" = "${config.xlib.device.username}";
|
||||||
"guest ok" = "no";
|
"guest ok" = "no";
|
||||||
"writable" = "yes";
|
"writable" = "yes";
|
||||||
#"create mask" = 0644;
|
#"create mask" = 0644;
|
||||||
@@ -130,16 +139,16 @@ let
|
|||||||
"force user" = "root";
|
"force user" = "root";
|
||||||
"force group" = "root";
|
"force group" = "root";
|
||||||
};
|
};
|
||||||
"${config.xlib.devices.admin}" = {
|
"${config.xlib.device.username}" = {
|
||||||
"path" = "${config.xlib.dirs.server-home}";
|
"path" = "${config.xlib.dirs.server-home}";
|
||||||
"browseable" = "yes";
|
"browseable" = "yes";
|
||||||
"read only" = "no";
|
"read only" = "no";
|
||||||
"valid users" = "${config.xlib.devices.admin}";
|
"valid users" = "${config.xlib.device.username}";
|
||||||
"guest ok" = "no";
|
"guest ok" = "no";
|
||||||
"writable" = "yes";
|
"writable" = "yes";
|
||||||
"create mask" = 700;
|
"create mask" = 700;
|
||||||
"directory mask" = 700;
|
"directory mask" = 700;
|
||||||
"force user" = "${config.xlib.devices.admin}";
|
"force user" = "${config.xlib.device.username}";
|
||||||
"force group" = "users";
|
"force group" = "users";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -147,7 +156,7 @@ let
|
|||||||
calibre-web = {
|
calibre-web = {
|
||||||
enable = true;
|
enable = true;
|
||||||
group = "users";
|
group = "users";
|
||||||
user = "${config.xlib.devices.admin}";
|
user = "${config.xlib.device.username}";
|
||||||
options = {
|
options = {
|
||||||
calibreLibrary = "${config.xlib.dirs.calibre-library}";
|
calibreLibrary = "${config.xlib.dirs.calibre-library}";
|
||||||
enableBookUploading = true;
|
enableBookUploading = true;
|
||||||
@@ -177,7 +186,7 @@ let
|
|||||||
credentialsFile = "${config.xlib.dirs.server-home}/server/transmission/settings.json";
|
credentialsFile = "${config.xlib.dirs.server-home}/server/transmission/settings.json";
|
||||||
openRPCPort = true;
|
openRPCPort = true;
|
||||||
package = pkgs.transmission_4;
|
package = pkgs.transmission_4;
|
||||||
user = "${config.xlib.devices.admin}";
|
user = "${config.xlib.device.username}";
|
||||||
group = "users";
|
group = "users";
|
||||||
settings = {
|
settings = {
|
||||||
download-dir = "${config.xlib.dirs.server-home}/Downloads";
|
download-dir = "${config.xlib.dirs.server-home}/Downloads";
|
||||||
@@ -196,13 +205,12 @@ let
|
|||||||
configDir = "${config.xlib.dirs.storage}/Syncthing/${config.xlib.devices.server.hostname}";
|
configDir = "${config.xlib.dirs.storage}/Syncthing/${config.xlib.devices.server.hostname}";
|
||||||
dataDir = "${config.xlib.dirs.server-home}";
|
dataDir = "${config.xlib.dirs.server-home}";
|
||||||
group = "users";
|
group = "users";
|
||||||
user = "${config.xlib.devices.admin}";
|
user = "${config.xlib.device.username}";
|
||||||
};
|
};
|
||||||
tailscale.enable = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "${config.xlib.devices.server.hostname}";
|
hostName = "${config.xlib.device.hostname}";
|
||||||
networkmanager.enable = true;
|
networkmanager.enable = true;
|
||||||
firewall.enable = false;
|
firewall.enable = false;
|
||||||
};
|
};
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
let
|
let
|
||||||
# Paths
|
# Paths
|
||||||
beetsPath = "${xlib.dirs.storage}/beets/linux";
|
beetsPath = "${xlib.dirs.storage}/beets/linux";
|
||||||
sshPath = "${xlib.dirs.storage}/ssh/${xlib.devices.server.hostname}";
|
sshPath = "${xlib.dirs.storage}/ssh/${xlib.device.hostname}";
|
||||||
musicPath = "${config.home.homeDirectory}/External/Music";
|
musicPath = "${config.home.homeDirectory}/External/Music";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user