Added logging config for new logging VM
This commit is contained in:
parent
ad12dfc2d9
commit
cb918b25fb
25
config/logging.nix
Normal file
25
config/logging.nix
Normal file
@ -0,0 +1,25 @@
|
||||
{ config, pkgs, inputs, ... }: {
|
||||
|
||||
imports = [
|
||||
../hardware/logging.nix
|
||||
./headless.nix
|
||||
];
|
||||
|
||||
users.users.logging = import ./user.nix;
|
||||
networking.hostName = "r330-logging";
|
||||
|
||||
# Conigure a static IP address.
|
||||
networking.defaultGateway = "192.168.8.1";
|
||||
networking.nameservers = [ "192.168.8.1" ];
|
||||
#networking.firewall.allowedTCPPorts = [ ];
|
||||
networking.interfaces.ens18.ipv4.addresses = [
|
||||
{
|
||||
address = "192.168.8.8";
|
||||
prefixLength = 24;
|
||||
}
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
suricata
|
||||
];
|
||||
}
|
57
flake.nix
57
flake.nix
@ -15,6 +15,9 @@
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, nix-darwin, home-manager, ... } @ inputs: {
|
||||
|
||||
# Nixos Configurations
|
||||
|
||||
nixosConfigurations.randomctf = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit inputs; };
|
||||
@ -24,14 +27,6 @@
|
||||
];
|
||||
};
|
||||
|
||||
homeConfigurations.random = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages."x86_64-linux";
|
||||
extraSpecialArgs.user = "random";
|
||||
modules = [
|
||||
./home/headful-nixos.nix
|
||||
];
|
||||
};
|
||||
|
||||
nixosConfigurations."r330-media" = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit inputs; };
|
||||
@ -40,14 +35,6 @@
|
||||
];
|
||||
};
|
||||
|
||||
homeConfigurations.sampledb = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages."x86_64-linux";
|
||||
extraSpecialArgs.user = "sampledb";
|
||||
modules = [
|
||||
./home/headless-nixos.nix
|
||||
];
|
||||
};
|
||||
|
||||
nixosConfigurations."sampledb-dev" = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit inputs; };
|
||||
@ -56,6 +43,25 @@
|
||||
];
|
||||
};
|
||||
|
||||
nixosConfigurations."r330-logging" = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./config/logging.nix
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
# Home-Manager Configurations
|
||||
|
||||
homeConfigurations.random = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages."x86_64-linux";
|
||||
extraSpecialArgs.user = "random";
|
||||
modules = [
|
||||
./home/headful-nixos.nix
|
||||
];
|
||||
};
|
||||
|
||||
homeConfigurations.media = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages."x86_64-linux";
|
||||
extraSpecialArgs.user = "media";
|
||||
@ -64,6 +70,25 @@
|
||||
];
|
||||
};
|
||||
|
||||
homeConfigurations.sampledb = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages."x86_64-linux";
|
||||
extraSpecialArgs.user = "sampledb";
|
||||
modules = [
|
||||
./home/headless-nixos.nix
|
||||
];
|
||||
};
|
||||
|
||||
homeConfigurations.logging = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages."x86_64-linux";
|
||||
extraSpecialArgs.user = "logging";
|
||||
modules = [
|
||||
./home/headless-nixos.nix
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
# Darwin Configuration
|
||||
|
||||
darwinConfigurations."Jadens-MacBook-Air" = nix-darwin.lib.darwinSystem {
|
||||
system = "aarch64-darwin";
|
||||
specialArgs = { inherit inputs; };
|
||||
|
31
hardware/logging.nix
Normal file
31
hardware/logging.nix
Normal file
@ -0,0 +1,31 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/4b91f41b-e619-41e1-a602-c60862cd6fb9";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.ens18.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user