add ssh for server, add vscodium for pc, refactor hostnames
This commit is contained in:
parent
b06525436b
commit
f174b610d8
7 changed files with 55 additions and 8 deletions
18
modules/desktop/editors/vscodium.nix
Normal file
18
modules/desktop/editors/vscodium.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ config, options, lib, pkgs, ... }:
|
||||
let
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.modules) mkIf;
|
||||
|
||||
cfg = config.modules.desktop.editors.vscodium;
|
||||
in
|
||||
{
|
||||
options.modules.desktop.editors.vscodium = let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
in { enable = mkEnableOption "vscodium"; };
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
user.packages = attrValues {
|
||||
inherit (pkgs) vscodium;
|
||||
};
|
||||
};
|
||||
}
|
27
modules/networking/ssh.nix
Normal file
27
modules/networking/ssh.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
{ config, options, lib, pkgs, ... }:
|
||||
let
|
||||
inherit (lib.modules) mkIf;
|
||||
in
|
||||
{
|
||||
options.modules.networking.ssh = let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
in {
|
||||
enable = mkEnableOption "enable ssh";
|
||||
};
|
||||
|
||||
config = mkIf config.modules.networking.ssh.enable {
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
ports = [ 22 ];
|
||||
settings = {
|
||||
PassswordAuthentication = true;
|
||||
AllowUsers = [ "chris", "root" ];
|
||||
UseDns = true;
|
||||
UsePAM = true;
|
||||
PermitRootLogin = "prohibit-password";
|
||||
PermitEmptyPasswords = "no";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,7 +1,3 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
networking = {
|
||||
hostName = "chris-pc";
|
||||
networkmanager.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue