adds storage box to ssh config
This commit is contained in:
parent
acc751c27a
commit
922a6be0f1
3 changed files with 30 additions and 12 deletions
|
|
@ -3,12 +3,14 @@
|
||||||
outputs,
|
outputs,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
../../modules/ups
|
../../modules/ups
|
||||||
../../modules/openssh
|
../../modules/openssh
|
||||||
|
../../modules/ssh
|
||||||
../../modules/jellyfin
|
../../modules/jellyfin
|
||||||
../../modules/syncthing
|
../../modules/syncthing
|
||||||
];
|
];
|
||||||
|
|
@ -37,11 +39,11 @@
|
||||||
# Launch fish shell
|
# Launch fish shell
|
||||||
programs.bash = {
|
programs.bash = {
|
||||||
interactiveShellInit = ''
|
interactiveShellInit = ''
|
||||||
if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]]
|
if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]]
|
||||||
then
|
then
|
||||||
shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=""
|
shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=""
|
||||||
exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
|
exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -67,7 +69,10 @@
|
||||||
users.users.dennis = {
|
users.users.dennis = {
|
||||||
description = "dennis";
|
description = "dennis";
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = [ "wheel" "networkmanager" ];
|
extraGroups = [
|
||||||
|
"wheel"
|
||||||
|
"networkmanager"
|
||||||
|
];
|
||||||
openssh.authorizedKeys.keys = [
|
openssh.authorizedKeys.keys = [
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILvXWZOPOJJDAoF+Sx/ZLoAVu6G/7/MAWoknBgMAzjul dennis@dnsc-mac"
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILvXWZOPOJJDAoF+Sx/ZLoAVu6G/7/MAWoknBgMAzjul dennis@dnsc-mac"
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKnmuxDkpDIku5t1Tykz21u78xoQ7LJR8JEcfth32LGu dennis@dnsc-work"
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKnmuxDkpDIku5t1Tykz21u78xoQ7LJR8JEcfth32LGu dennis@dnsc-work"
|
||||||
|
|
@ -86,7 +91,10 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
# Enable new Nix CLI and flakes
|
# Enable new Nix CLI and flakes
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
nix.settings.experimental-features = [
|
||||||
|
"nix-command"
|
||||||
|
"flakes"
|
||||||
|
];
|
||||||
|
|
||||||
# Install system wide packages
|
# Install system wide packages
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
|
@ -98,6 +106,7 @@
|
||||||
jellyfin-web
|
jellyfin-web
|
||||||
jellyfin-ffmpeg
|
jellyfin-ffmpeg
|
||||||
usbutils
|
usbutils
|
||||||
|
restic
|
||||||
];
|
];
|
||||||
|
|
||||||
# Programs
|
# Programs
|
||||||
|
|
@ -133,10 +142,10 @@
|
||||||
"share" = {
|
"share" = {
|
||||||
"path" = "/main/share";
|
"path" = "/main/share";
|
||||||
"browseable" = "yes";
|
"browseable" = "yes";
|
||||||
"writeable" = "yes";
|
"writeable" = "yes";
|
||||||
"read only" = "no";
|
"read only" = "no";
|
||||||
"guest ok" = "yes";
|
"guest ok" = "yes";
|
||||||
"force user" = "dennis";
|
"force user" = "dennis";
|
||||||
"force group" = "users";
|
"force group" = "users";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
@ -171,4 +180,3 @@
|
||||||
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
||||||
system.stateVersion = "24.11";
|
system.stateVersion = "24.11";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
3
modules/restic/default.nix
Normal file
3
modules/restic/default.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -21,6 +21,13 @@
|
||||||
identityFile = "/Users/dennis/.ssh/id_ed25519";
|
identityFile = "/Users/dennis/.ssh/id_ed25519";
|
||||||
identitiesOnly = true;
|
identitiesOnly = true;
|
||||||
};
|
};
|
||||||
|
"dnsc-storage" = {
|
||||||
|
hostname = "u295965.your-storagebox.de";
|
||||||
|
user = "u295965";
|
||||||
|
identityFile = "/Users/dennis/.ssh/id_ed25519";
|
||||||
|
identitiesOnly = true;
|
||||||
|
port = 23;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue