refactor: config/hosts => hosts
This commit is contained in:
14
hosts/imxyy-nix-wsl/home.nix
Normal file
14
hosts/imxyy-nix-wsl/home.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{ lib, username, ... }:
|
||||
{
|
||||
my.hm.programs.zsh.shellAliases = {
|
||||
localproxy_on = "export http_proxy=http://192.168.128.1:7890 https_proxy=http://192.168.128.1:7890 all_proxy=socks://192.168.128.1:7890";
|
||||
};
|
||||
my = {
|
||||
sops.sshKeyFile = "/home/${username}/.ssh/id_ed25519";
|
||||
coding.all.enable = true;
|
||||
coding.editor.vscode.enable = lib.mkForce false;
|
||||
cli.misc.enable = true;
|
||||
xdg.enable = true;
|
||||
cli.media.all.enable = true;
|
||||
};
|
||||
}
|
||||
27
hosts/imxyy-nix-wsl/nixos.nix
Normal file
27
hosts/imxyy-nix-wsl/nixos.nix
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
lib,
|
||||
username,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
inputs.nixos-wsl.nixosModules.wsl
|
||||
];
|
||||
wsl.enable = true;
|
||||
wsl.defaultUser = username;
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
# Forbid root login through SSH.
|
||||
PermitRootLogin = "no";
|
||||
PasswordAuthentication = true;
|
||||
};
|
||||
};
|
||||
|
||||
# fix vscode remote
|
||||
programs.nix-ld.enable = true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkForce "x86_64-linux";
|
||||
}
|
||||
Reference in New Issue
Block a user