mirror of
https://github.com/nmasur/dotfiles
synced 2024-10-18 19:39:03 +00:00
Compare commits
6 Commits
30fe7c2d18
...
595a02383e
Author | SHA1 | Date | |
---|---|---|---|
|
595a02383e | ||
|
3689f8ef52 | ||
|
ab6a339c34 | ||
|
e6456d7f02 | ||
|
fb74122458 | ||
|
d56a48cf65 |
@ -19,6 +19,7 @@ nixpkgs.lib.nixosSystem {
|
|||||||
disko.nixosModules.disko
|
disko.nixosModules.disko
|
||||||
{
|
{
|
||||||
server = true;
|
server = true;
|
||||||
|
zfs.enable = true;
|
||||||
gui.enable = false;
|
gui.enable = false;
|
||||||
theme = { colors = (import ../../colorscheme/gruvbox).dark; };
|
theme = { colors = (import ../../colorscheme/gruvbox).dark; };
|
||||||
nixpkgs.overlays = overlays;
|
nixpkgs.overlays = overlays;
|
||||||
@ -36,9 +37,9 @@ nixpkgs.lib.nixosSystem {
|
|||||||
|
|
||||||
neovim.enable = true;
|
neovim.enable = true;
|
||||||
|
|
||||||
boot.zfs.enabled = true;
|
# boot.zfs.enabled = true;
|
||||||
boot.kernelPackages =
|
# boot.kernelPackages =
|
||||||
config.boot.zfs.package.latestCompatibleLinuxPackages;
|
# config.boot.zfs.package.latestCompatibleLinuxPackages;
|
||||||
# boot.zfs.extraPools = [ "mypool" ];
|
# boot.zfs.extraPools = [ "mypool" ];
|
||||||
# services.zfs.autoScrub.enable = true;
|
# services.zfs.autoScrub.enable = true;
|
||||||
# services.zfs.autoScrub.interval = "daily";
|
# services.zfs.autoScrub.interval = "daily";
|
||||||
|
@ -12,6 +12,16 @@
|
|||||||
boot.kernelModules = [ "kvm-intel" ];
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" = {
|
||||||
|
device = "/dev/disk/by-label/nixos";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" = {
|
||||||
|
device = "/dev/disk/by-label/boot";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
|
||||||
swapDevices = [ ];
|
swapDevices = [ ];
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
|
@ -14,7 +14,13 @@
|
|||||||
[ "writeBoundary" ] ''
|
[ "writeBoundary" ] ''
|
||||||
if [ ! -d "${config.dotfilesPath}" ]; then
|
if [ ! -d "${config.dotfilesPath}" ]; then
|
||||||
$DRY_RUN_CMD mkdir --parents $VERBOSE_ARG $(dirname "${config.dotfilesPath}")
|
$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
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
./server.nix
|
./server.nix
|
||||||
./sleep.nix
|
./sleep.nix
|
||||||
./wifi.nix
|
./wifi.nix
|
||||||
|
./zfs.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
|
14
modules/nixos/hardware/zfs.nix
Normal file
14
modules/nixos/hardware/zfs.nix
Normal 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;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
@ -17,11 +17,13 @@
|
|||||||
services.openssh = {
|
services.openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
ports = [ 22 ];
|
ports = [ 22 ];
|
||||||
passwordAuthentication = false;
|
|
||||||
gatewayPorts = "no";
|
|
||||||
forwardX11 = false;
|
|
||||||
allowSFTP = true;
|
allowSFTP = true;
|
||||||
permitRootLogin = config.permitRootLogin;
|
settings = {
|
||||||
|
GatewayPorts = "no";
|
||||||
|
X11Forwarding = false;
|
||||||
|
PasswordAuthentication = false;
|
||||||
|
PermitRootLogin = config.permitRootLogin;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.${config.user}.openssh.authorizedKeys.keys =
|
users.users.${config.user}.openssh.authorizedKeys.keys =
|
||||||
|
Loading…
Reference in New Issue
Block a user