mirror of
https://codeberg.org/jopejoe1/nix-conf.git
synced 2025-01-04 09:56:34 +01:00
Enable ssh
This commit is contained in:
parent
4de8009349
commit
614e4d66ca
7 changed files with 33 additions and 4 deletions
11
flake.nix
11
flake.nix
|
@ -86,6 +86,12 @@
|
||||||
inputs.flake-utils.follows = "flake-utils";
|
inputs.flake-utils.follows = "flake-utils";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
agenix = {
|
||||||
|
url = github:ryantm/agenix;
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
inputs.darwin.follows = "nix-darwin";
|
||||||
|
};
|
||||||
|
|
||||||
# Dependcies
|
# Dependcies
|
||||||
flake-compat = {
|
flake-compat = {
|
||||||
url = github:edolstra/flake-compat;
|
url = github:edolstra/flake-compat;
|
||||||
|
@ -123,6 +129,7 @@
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
nur.nixosModules.nur
|
nur.nixosModules.nur
|
||||||
peerix.nixosModules.peerix
|
peerix.nixosModules.peerix
|
||||||
|
agenix.nixosModules.default
|
||||||
{
|
{
|
||||||
home-manager = {
|
home-manager = {
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
|
@ -130,10 +137,10 @@
|
||||||
};
|
};
|
||||||
system.stateVersion = "23.05";
|
system.stateVersion = "23.05";
|
||||||
services.peerix = {
|
services.peerix = {
|
||||||
enable = true;
|
#enable = true;
|
||||||
package = peerix.packages.x86_64-linux.peerix;
|
package = peerix.packages.x86_64-linux.peerix;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
privateKeyFile = ./peerix-private;
|
#privateKeyFile = ./peerix-private;
|
||||||
#publicKeyFile = ./peerix-public;
|
#publicKeyFile = ./peerix-public;
|
||||||
publicKey = "peerix-kami:4DwMEXpwqOWq+fj8gF435FbYGzMkKoMQAUk/0OX0Y0g=";
|
publicKey = "peerix-kami:4DwMEXpwqOWq+fj8gF435FbYGzMkKoMQAUk/0OX0Y0g=";
|
||||||
};
|
};
|
||||||
|
|
|
@ -14,7 +14,7 @@ in
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
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
|
# https://github.com/NixOS/nixpkgs/blob/c32c39d6f3b1fe6514598fa40ad2cf9ce22c3fb7/nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix#L66
|
||||||
boot.loader.systemd-boot.editor = false;
|
boot.loader.systemd-boot.editor = false;
|
||||||
|
|
18
modules/system/ssh/default.nix
Normal file
18
modules/system/ssh/default.nix
Normal 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";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
|
@ -14,6 +14,7 @@ in
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "jopejoe1 🚫";
|
description = "jopejoe1 🚫";
|
||||||
initialPassword = "password";
|
initialPassword = "password";
|
||||||
|
openssh.authorizedKeys.keys = [];
|
||||||
extraGroups = [ "wheel"]
|
extraGroups = [ "wheel"]
|
||||||
++ lib.optionals config.custom.hardware.printing.enable [ "scanner" "lp"]
|
++ lib.optionals config.custom.hardware.printing.enable [ "scanner" "lp"]
|
||||||
++ lib.optional config.networking.networkmanager.enable "networkmanger";
|
++ lib.optional config.networking.networkmanager.enable "networkmanger";
|
||||||
|
|
|
@ -12,6 +12,7 @@ with lib;
|
||||||
custom.system.fonts.enable = true;
|
custom.system.fonts.enable = true;
|
||||||
custom.system.locale.enable = true;
|
custom.system.locale.enable = true;
|
||||||
custom.system.locale.layout = "us";
|
custom.system.locale.layout = "us";
|
||||||
|
custom.system.ssh.enable = true;
|
||||||
custom.nix.enable = true;
|
custom.nix.enable = true;
|
||||||
custom.hardware.audio.enable = true;
|
custom.hardware.audio.enable = true;
|
||||||
custom.hardware.printing.enable = true;
|
custom.hardware.printing.enable = true;
|
||||||
|
|
|
@ -12,6 +12,7 @@ with lib;
|
||||||
custom.system.fonts.enable = true;
|
custom.system.fonts.enable = true;
|
||||||
custom.system.locale.enable = true;
|
custom.system.locale.enable = true;
|
||||||
custom.system.locale.layout = "de";
|
custom.system.locale.layout = "de";
|
||||||
|
custom.system.ssh.enable = true;
|
||||||
custom.nix.enable = true;
|
custom.nix.enable = true;
|
||||||
custom.hardware.audio.enable = true;
|
custom.hardware.audio.enable = true;
|
||||||
custom.hardware.printing.enable = true;
|
custom.hardware.printing.enable = true;
|
||||||
|
@ -26,7 +27,7 @@ with lib;
|
||||||
|
|
||||||
hardware.opengl.enable = true;
|
hardware.opengl.enable = true;
|
||||||
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.beta;
|
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||||
boot.kernelParams = [ "module_blacklist=i915" ];
|
#boot.kernelParams = [ "module_blacklist=i915" ];
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
dconf.enable = true;
|
dconf.enable = true;
|
||||||
|
|
|
@ -12,6 +12,7 @@ with lib;
|
||||||
custom.system.fonts.enable = true;
|
custom.system.fonts.enable = true;
|
||||||
custom.system.locale.enable = true;
|
custom.system.locale.enable = true;
|
||||||
custom.system.locale.layout = "de";
|
custom.system.locale.layout = "de";
|
||||||
|
custom.system.ssh.enable = true;
|
||||||
custom.nix.enable = true;
|
custom.nix.enable = true;
|
||||||
custom.hardware.audio.enable = true;
|
custom.hardware.audio.enable = true;
|
||||||
custom.hardware.printing.enable = true;
|
custom.hardware.printing.enable = true;
|
||||||
|
|
Loading…
Reference in a new issue