formatting
This commit is contained in:
parent
d43a4d0461
commit
4d1c3b848d
2 changed files with 151 additions and 165 deletions
|
|
@ -4,13 +4,25 @@
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
user.userName = "osbm";
|
user.userName = "osbm";
|
||||||
environment.packages = with pkgs; [
|
|
||||||
vim # or some other editor, e.g. nano or neovim
|
|
||||||
|
|
||||||
# Some common stuff that people expect to have
|
# Read the changelog before changing this value
|
||||||
|
system.stateVersion = "24.05";
|
||||||
|
# Set up nix for flakes
|
||||||
|
nix.extraOptions = ''
|
||||||
|
experimental-features = nix-command flakes
|
||||||
|
'';
|
||||||
|
|
||||||
|
build.activation.sshd = ''
|
||||||
|
if [ ! -e /etc/ssh/ssh_host_ed25519_key ]; then
|
||||||
|
$VERBOSE_ECHO "Generating host keys..."
|
||||||
|
$DRY_RUN_CMD ${pkgs.openssh}/bin/ssh-keygen -t ed25519 -a 32 -f "/etc/ssh/ssh_host_ed25519_key" -N ""
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
|
||||||
|
environment = {
|
||||||
|
packages = with pkgs; [
|
||||||
|
vim # or some other editor, e.g. nano or neovim
|
||||||
procps
|
procps
|
||||||
#killall
|
|
||||||
#diffutils
|
|
||||||
inetutils
|
inetutils
|
||||||
findutils
|
findutils
|
||||||
utillinux
|
utillinux
|
||||||
|
|
@ -18,12 +30,6 @@
|
||||||
hostname
|
hostname
|
||||||
man
|
man
|
||||||
gnugrep
|
gnugrep
|
||||||
#gnupg
|
|
||||||
#gnused
|
|
||||||
#gnutar
|
|
||||||
#bzip2
|
|
||||||
#gzip
|
|
||||||
#xz
|
|
||||||
zip
|
zip
|
||||||
unzip
|
unzip
|
||||||
fish
|
fish
|
||||||
|
|
@ -73,23 +79,9 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
# Backup etc files instead of failing to activate generation if a file already exists in /etc
|
# Backup etc files instead of failing to activate generation if a file already exists in /etc
|
||||||
environment.etcBackupExtension = ".bak";
|
etcBackupExtension = ".bak";
|
||||||
|
|
||||||
# Read the changelog before changing this value
|
etc."ssh/sshd_config".text = ''
|
||||||
system.stateVersion = "24.05";
|
|
||||||
# Set up nix for flakes
|
|
||||||
nix.extraOptions = ''
|
|
||||||
experimental-features = nix-command flakes
|
|
||||||
'';
|
|
||||||
|
|
||||||
build.activation.sshd = ''
|
|
||||||
if [ ! -e /etc/ssh/ssh_host_ed25519_key ]; then
|
|
||||||
$VERBOSE_ECHO "Generating host keys..."
|
|
||||||
$DRY_RUN_CMD ${pkgs.openssh}/bin/ssh-keygen -t ed25519 -a 32 -f "/etc/ssh/ssh_host_ed25519_key" -N ""
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
|
|
||||||
environment.etc."ssh/sshd_config".text = ''
|
|
||||||
AcceptEnv LANG LC_*
|
AcceptEnv LANG LC_*
|
||||||
KbdInteractiveAuthentication no
|
KbdInteractiveAuthentication no
|
||||||
PasswordAuthentication no
|
PasswordAuthentication no
|
||||||
|
|
@ -98,7 +90,8 @@
|
||||||
PrintMotd no
|
PrintMotd no
|
||||||
AuthorizedKeysFile /etc/ssh/authorized_keys.d/%u
|
AuthorizedKeysFile /etc/ssh/authorized_keys.d/%u
|
||||||
'';
|
'';
|
||||||
environment.etc."ssh/authorized_keys.d/osbm".text = ''
|
etc."ssh/authorized_keys.d/osbm".text = ''
|
||||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPfnV+qqUCJf92npNW4Jy0hIiepCJFBDJHXBHnUlNX0k
|
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPfnV+qqUCJf92npNW4Jy0hIiepCJFBDJHXBHnUlNX0k
|
||||||
'';
|
'';
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,13 +4,25 @@
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
user.userName = "osbm";
|
user.userName = "osbm";
|
||||||
environment.packages = with pkgs; [
|
|
||||||
vim # or some other editor, e.g. nano or neovim
|
|
||||||
|
|
||||||
# Some common stuff that people expect to have
|
# Read the changelog before changing this value
|
||||||
|
system.stateVersion = "25.11";
|
||||||
|
# Set up nix for flakes
|
||||||
|
nix.extraOptions = ''
|
||||||
|
experimental-features = nix-command flakes
|
||||||
|
'';
|
||||||
|
|
||||||
|
build.activation.sshd = ''
|
||||||
|
if [ ! -e /etc/ssh/ssh_host_ed25519_key ]; then
|
||||||
|
$VERBOSE_ECHO "Generating host keys..."
|
||||||
|
$DRY_RUN_CMD ${pkgs.openssh}/bin/ssh-keygen -t ed25519 -a 32 -f "/etc/ssh/ssh_host_ed25519_key" -N ""
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
|
||||||
|
environment = {
|
||||||
|
packages = with pkgs; [
|
||||||
|
vim # or some other editor, e.g. nano or neovim
|
||||||
procps
|
procps
|
||||||
#killall
|
|
||||||
#diffutils
|
|
||||||
inetutils
|
inetutils
|
||||||
findutils
|
findutils
|
||||||
utillinux
|
utillinux
|
||||||
|
|
@ -18,12 +30,6 @@
|
||||||
hostname
|
hostname
|
||||||
man
|
man
|
||||||
gnugrep
|
gnugrep
|
||||||
#gnupg
|
|
||||||
#gnused
|
|
||||||
#gnutar
|
|
||||||
#bzip2
|
|
||||||
#gzip
|
|
||||||
#xz
|
|
||||||
zip
|
zip
|
||||||
unzip
|
unzip
|
||||||
fish
|
fish
|
||||||
|
|
@ -73,23 +79,9 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
# Backup etc files instead of failing to activate generation if a file already exists in /etc
|
# Backup etc files instead of failing to activate generation if a file already exists in /etc
|
||||||
environment.etcBackupExtension = ".bak";
|
etcBackupExtension = ".bak";
|
||||||
|
|
||||||
# Read the changelog before changing this value
|
etc."ssh/sshd_config".text = ''
|
||||||
system.stateVersion = "24.05";
|
|
||||||
# Set up nix for flakes
|
|
||||||
nix.extraOptions = ''
|
|
||||||
experimental-features = nix-command flakes
|
|
||||||
'';
|
|
||||||
|
|
||||||
build.activation.sshd = ''
|
|
||||||
if [ ! -e /etc/ssh/ssh_host_ed25519_key ]; then
|
|
||||||
$VERBOSE_ECHO "Generating host keys..."
|
|
||||||
$DRY_RUN_CMD ${pkgs.openssh}/bin/ssh-keygen -t ed25519 -a 32 -f "/etc/ssh/ssh_host_ed25519_key" -N ""
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
|
|
||||||
environment.etc."ssh/sshd_config".text = ''
|
|
||||||
AcceptEnv LANG LC_*
|
AcceptEnv LANG LC_*
|
||||||
KbdInteractiveAuthentication no
|
KbdInteractiveAuthentication no
|
||||||
PasswordAuthentication no
|
PasswordAuthentication no
|
||||||
|
|
@ -98,7 +90,8 @@
|
||||||
PrintMotd no
|
PrintMotd no
|
||||||
AuthorizedKeysFile /etc/ssh/authorized_keys.d/%u
|
AuthorizedKeysFile /etc/ssh/authorized_keys.d/%u
|
||||||
'';
|
'';
|
||||||
environment.etc."ssh/authorized_keys.d/osbm".text = ''
|
etc."ssh/authorized_keys.d/osbm".text = ''
|
||||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPfnV+qqUCJf92npNW4Jy0hIiepCJFBDJHXBHnUlNX0k
|
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPfnV+qqUCJf92npNW4Jy0hIiepCJFBDJHXBHnUlNX0k
|
||||||
'';
|
'';
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue