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";
|
||||
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
|
||||
#killall
|
||||
#diffutils
|
||||
inetutils
|
||||
findutils
|
||||
utillinux
|
||||
|
|
@ -18,12 +30,6 @@
|
|||
hostname
|
||||
man
|
||||
gnugrep
|
||||
#gnupg
|
||||
#gnused
|
||||
#gnutar
|
||||
#bzip2
|
||||
#gzip
|
||||
#xz
|
||||
zip
|
||||
unzip
|
||||
fish
|
||||
|
|
@ -73,23 +79,9 @@
|
|||
];
|
||||
|
||||
# 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
|
||||
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 = ''
|
||||
etc."ssh/sshd_config".text = ''
|
||||
AcceptEnv LANG LC_*
|
||||
KbdInteractiveAuthentication no
|
||||
PasswordAuthentication no
|
||||
|
|
@ -98,7 +90,8 @@
|
|||
PrintMotd no
|
||||
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
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,13 +4,25 @@
|
|||
}:
|
||||
{
|
||||
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
|
||||
#killall
|
||||
#diffutils
|
||||
inetutils
|
||||
findutils
|
||||
utillinux
|
||||
|
|
@ -18,12 +30,6 @@
|
|||
hostname
|
||||
man
|
||||
gnugrep
|
||||
#gnupg
|
||||
#gnused
|
||||
#gnutar
|
||||
#bzip2
|
||||
#gzip
|
||||
#xz
|
||||
zip
|
||||
unzip
|
||||
fish
|
||||
|
|
@ -73,23 +79,9 @@
|
|||
];
|
||||
|
||||
# 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
|
||||
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 = ''
|
||||
etc."ssh/sshd_config".text = ''
|
||||
AcceptEnv LANG LC_*
|
||||
KbdInteractiveAuthentication no
|
||||
PasswordAuthentication no
|
||||
|
|
@ -98,7 +90,8 @@
|
|||
PrintMotd no
|
||||
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
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue