This commit is contained in:
Dmitriy Kholkin 2022-02-11 21:09:58 +03:00
parent 4e4588a743
commit 5a3a8fd6a2
4 changed files with 17 additions and 5 deletions

View File

@ -120,11 +120,11 @@
specialArgs = { inherit inputs; }; specialArgs = { inherit inputs; };
}; };
in (genAttrs hosts mkHost) // { in (genAttrs hosts mkHost) // {
NixOS-CT = nixpkgs-stable.lib.nixosSystem { NixOS-CT = (name: nixpkgs-stable.lib.nixosSystem {
system = builtins.readFile (./machines + "/${name}/system"); system = builtins.readFile (./machines + "/${name}/system");
modules = [ (import (./machines + "/${name}")) { device = name; } ]; modules = [ (import (./machines + "/${name}")) { device = name; } ];
specialArgs = { inherit inputs; }; specialArgs = { inherit inputs; };
}; } NixOS-CT);
}; };
legacyPackages.x86_64-linux = legacyPackages.x86_64-linux =

View File

@ -28,4 +28,16 @@
systemd.suppressedSystemUnits = [ systemd.suppressedSystemUnits = [
"sys-kernel-debug.mount" "sys-kernel-debug.mount"
]; ];
environment.noXlibs = lib.mkForce false;
networking = {
enableIPv6 = false;
defaultGateway = "192.168.0.1";
nameservers = [ "192.168.0.1" ];
interfaces.eth0.ipv4.addresses = [{
address = "192.168.0.12";
prefixLength = 24;
}];
};
} }

View File

@ -34,7 +34,7 @@ with config.deviceSpecific;
firewall = { firewall = {
enable = true; enable = true;
allowPing = true; allowPing = true;
allowedTCPPorts = lib.mkIf isServer [ 22 80 443 8448 ]; allowedTCPPorts = lib.mkIf isServer [ 22 ];
}; };
usePredictableInterfaceNames = true; usePredictableInterfaceNames = true;

View File

@ -1,6 +1,6 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
with config.deviceSpecific; { with config.deviceSpecific; {
security.apparmor.enable = true; security.apparmor.enable = !isContainer;
programs.firejail.enable = true; programs.firejail.enable = true;
users.mutableUsers = false; users.mutableUsers = false;
users.users.alukard = { users.users.alukard = {
@ -28,7 +28,7 @@ with config.deviceSpecific; {
"corectrl" "corectrl"
"video" "video"
]; ];
description = "Дмитрий Холкин"; description = "Dmitriy Kholkin";
uid = 1000; uid = 1000;
hashedPassword = "$6$kDBGyd99tto$9LjQwixa7NYB9Kaey002MD94zHob1MmNbVz9kx3yX6Q4AmVgsFMGUyNuHozXprxyuXHIbOlTcf8nd4rK8MWfI/"; hashedPassword = "$6$kDBGyd99tto$9LjQwixa7NYB9Kaey002MD94zHob1MmNbVz9kx3yX6Q4AmVgsFMGUyNuHozXprxyuXHIbOlTcf8nd4rK8MWfI/";
shell = pkgs.zsh; shell = pkgs.zsh;