Enable ssh

This commit is contained in:
Johannes Jöns 2023-02-24 12:35:58 +01:00
parent 4de8009349
commit 614e4d66ca
7 changed files with 33 additions and 4 deletions

View file

@ -86,6 +86,12 @@
inputs.flake-utils.follows = "flake-utils";
};
agenix = {
url = github:ryantm/agenix;
inputs.nixpkgs.follows = "nixpkgs";
inputs.darwin.follows = "nix-darwin";
};
# Dependcies
flake-compat = {
url = github:edolstra/flake-compat;
@ -123,6 +129,7 @@
home-manager.nixosModules.home-manager
nur.nixosModules.nur
peerix.nixosModules.peerix
agenix.nixosModules.default
{
home-manager = {
useGlobalPkgs = true;
@ -130,10 +137,10 @@
};
system.stateVersion = "23.05";
services.peerix = {
enable = true;
#enable = true;
package = peerix.packages.x86_64-linux.peerix;
openFirewall = true;
privateKeyFile = ./peerix-private;
#privateKeyFile = ./peerix-private;
#publicKeyFile = ./peerix-public;
publicKey = "peerix-kami:4DwMEXpwqOWq+fj8gF435FbYGzMkKoMQAUk/0OX0Y0g=";
};

View file

@ -14,7 +14,7 @@ in
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.efi.efiSysMountPoint = "/boot/efi";
boot.loader.systemd-boot.configurationLimit = 10;
#boot.loader.systemd-boot.configurationLimit = 10;
# https://github.com/NixOS/nixpkgs/blob/c32c39d6f3b1fe6514598fa40ad2cf9ce22c3fb7/nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix#L66
boot.loader.systemd-boot.editor = false;

View file

@ -0,0 +1,18 @@
{ options, config, pkgs, lib, ... }:
with lib;
#with lib.internal;
let cfg = config.custom.system.ssh;
in
{
options.custom.system.ssh = with types; {
enable = mkBoolOpt false "Whether or not to enable ssh.";
};
config = mkIf cfg.enable {
services.openssh.enable = true;
services.openssh.settings.X11forwarding = true;
services.openssh.settings.PermitRootLogin = "yes";
};
}

View file

@ -14,6 +14,7 @@ in
isNormalUser = true;
description = "jopejoe1 🚫";
initialPassword = "password";
openssh.authorizedKeys.keys = [];
extraGroups = [ "wheel"]
++ lib.optionals config.custom.hardware.printing.enable [ "scanner" "lp"]
++ lib.optional config.networking.networkmanager.enable "networkmanger";

View file

@ -12,6 +12,7 @@ with lib;
custom.system.fonts.enable = true;
custom.system.locale.enable = true;
custom.system.locale.layout = "us";
custom.system.ssh.enable = true;
custom.nix.enable = true;
custom.hardware.audio.enable = true;
custom.hardware.printing.enable = true;

View file

@ -12,6 +12,7 @@ with lib;
custom.system.fonts.enable = true;
custom.system.locale.enable = true;
custom.system.locale.layout = "de";
custom.system.ssh.enable = true;
custom.nix.enable = true;
custom.hardware.audio.enable = true;
custom.hardware.printing.enable = true;
@ -26,7 +27,7 @@ with lib;
hardware.opengl.enable = true;
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.beta;
boot.kernelParams = [ "module_blacklist=i915" ];
#boot.kernelParams = [ "module_blacklist=i915" ];
programs = {
dconf.enable = true;

View file

@ -12,6 +12,7 @@ with lib;
custom.system.fonts.enable = true;
custom.system.locale.enable = true;
custom.system.locale.layout = "de";
custom.system.ssh.enable = true;
custom.nix.enable = true;
custom.hardware.audio.enable = true;
custom.hardware.printing.enable = true;