Compare commits

..

6 Commits

Author SHA1 Message Date
Noah Masur
595a02383e use multiple env variables to force git https 2023-02-25 11:45:40 -05:00
Noah Masur
3689f8ef52 try to force https in single command 2023-02-25 11:40:24 -05:00
Noah Masur
ab6a339c34 try to force https for dotfiles clone
git seems to fail with ssh, at least to github
2023-02-25 11:30:41 -05:00
Noah Masur
e6456d7f02 ssh settings for sshd 2023-02-25 11:25:20 -05:00
Noah Masur
fb74122458 fix hardware-configuration for swan 2023-02-25 11:23:26 -05:00
Noah Masur
d56a48cf65 add zfs module with options 2023-02-25 11:22:31 -05:00
6 changed files with 42 additions and 8 deletions

View File

@ -19,6 +19,7 @@ nixpkgs.lib.nixosSystem {
disko.nixosModules.disko
{
server = true;
zfs.enable = true;
gui.enable = false;
theme = { colors = (import ../../colorscheme/gruvbox).dark; };
nixpkgs.overlays = overlays;
@ -36,9 +37,9 @@ nixpkgs.lib.nixosSystem {
neovim.enable = true;
boot.zfs.enabled = true;
boot.kernelPackages =
config.boot.zfs.package.latestCompatibleLinuxPackages;
# boot.zfs.enabled = true;
# boot.kernelPackages =
# config.boot.zfs.package.latestCompatibleLinuxPackages;
# boot.zfs.extraPools = [ "mypool" ];
# services.zfs.autoScrub.enable = true;
# services.zfs.autoScrub.interval = "daily";

View File

@ -12,6 +12,16 @@
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-label/boot";
fsType = "vfat";
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking

View File

@ -14,7 +14,13 @@
[ "writeBoundary" ] ''
if [ ! -d "${config.dotfilesPath}" ]; then
$DRY_RUN_CMD mkdir --parents $VERBOSE_ARG $(dirname "${config.dotfilesPath}")
$DRY_RUN_CMD ${pkgs.git}/bin/git clone ${config.dotfilesRepo} "${config.dotfilesPath}"
# Force HTTPS because anonymous SSH doesn't work
GIT_CONFIG_COUNT=1 \
GIT_CONFIG_KEY_0="url.https://github.com/.insteadOf" \
GIT_CONFIG_VALUE_0="git@github.com:" \
$DRY_RUN_CMD \
${pkgs.git}/bin/git clone ${config.dotfilesRepo} "${config.dotfilesPath}"
fi
'';

View File

@ -10,6 +10,7 @@
./server.nix
./sleep.nix
./wifi.nix
./zfs.nix
];
options = {

View File

@ -0,0 +1,14 @@
{ config, pkgs, lib, ... }: {
options = { zfs.enable = lib.mkEnableOption "ZFS file system."; };
config =
lib.mkIf (pkgs.stdenv.isLinux && config.server && config.zfs.enable) {
# Only use compatible Linux kernel, since ZFS can be behind
boot.kernelPackages =
config.boot.zfs.package.latestCompatibleLinuxPackages;
};
}

View File

@ -17,11 +17,13 @@
services.openssh = {
enable = true;
ports = [ 22 ];
passwordAuthentication = false;
gatewayPorts = "no";
forwardX11 = false;
allowSFTP = true;
permitRootLogin = config.permitRootLogin;
settings = {
GatewayPorts = "no";
X11Forwarding = false;
PasswordAuthentication = false;
PermitRootLogin = config.permitRootLogin;
};
};
users.users.${config.user}.openssh.authorizedKeys.keys =