diff --git a/hosts/dnsc-server/default.nix b/hosts/dnsc-server/default.nix index 5194cfc..33a0dcb 100644 --- a/hosts/dnsc-server/default.nix +++ b/hosts/dnsc-server/default.nix @@ -3,12 +3,14 @@ outputs, pkgs, ... -}: { +}: +{ imports = [ ./hardware-configuration.nix inputs.home-manager.nixosModules.home-manager ../../modules/ups ../../modules/openssh + ../../modules/ssh ../../modules/jellyfin ../../modules/syncthing ]; @@ -37,11 +39,11 @@ # Launch fish shell programs.bash = { interactiveShellInit = '' - if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]] - then - shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION="" - exec ${pkgs.fish}/bin/fish $LOGIN_OPTION - fi + if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]] + then + shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION="" + exec ${pkgs.fish}/bin/fish $LOGIN_OPTION + fi ''; }; @@ -67,7 +69,10 @@ users.users.dennis = { description = "dennis"; isNormalUser = true; - extraGroups = [ "wheel" "networkmanager" ]; + extraGroups = [ + "wheel" + "networkmanager" + ]; openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILvXWZOPOJJDAoF+Sx/ZLoAVu6G/7/MAWoknBgMAzjul dennis@dnsc-mac" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKnmuxDkpDIku5t1Tykz21u78xoQ7LJR8JEcfth32LGu dennis@dnsc-work" @@ -86,7 +91,10 @@ }; # Enable new Nix CLI and flakes - nix.settings.experimental-features = [ "nix-command" "flakes" ]; + nix.settings.experimental-features = [ + "nix-command" + "flakes" + ]; # Install system wide packages environment.systemPackages = with pkgs; [ @@ -98,6 +106,7 @@ jellyfin-web jellyfin-ffmpeg usbutils + restic ]; # Programs @@ -133,10 +142,10 @@ "share" = { "path" = "/main/share"; "browseable" = "yes"; - "writeable" = "yes"; + "writeable" = "yes"; "read only" = "no"; "guest ok" = "yes"; - "force user" = "dennis"; + "force user" = "dennis"; "force group" = "users"; }; }; @@ -146,7 +155,7 @@ enable = true; openFirewall = true; }; - + services.avahi = { publish.enable = true; publish.userServices = true; @@ -171,4 +180,3 @@ # For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion . system.stateVersion = "24.11"; } - diff --git a/modules/restic/default.nix b/modules/restic/default.nix new file mode 100644 index 0000000..0db3279 --- /dev/null +++ b/modules/restic/default.nix @@ -0,0 +1,3 @@ +{ + +} diff --git a/modules/ssh/default.nix b/modules/ssh/default.nix index e6a0bf2..5be1c71 100644 --- a/modules/ssh/default.nix +++ b/modules/ssh/default.nix @@ -21,6 +21,13 @@ identityFile = "/Users/dennis/.ssh/id_ed25519"; identitiesOnly = true; }; + "dnsc-storage" = { + hostname = "u295965.your-storagebox.de"; + user = "u295965"; + identityFile = "/Users/dennis/.ssh/id_ed25519"; + identitiesOnly = true; + port = 23; + }; }; }; }