From 572a4967045ec7b05dc21621d73fe5742e63bb27 Mon Sep 17 00:00:00 2001 From: Filippo Berto Date: Sun, 8 Aug 2021 03:48:52 +0200 Subject: [PATCH] Defcon configuration --- custom/cocktail-bar-cli/default.nix | 9 +++++++++ custom/default.nix | 1 + home.nix | 20 ++++++++++++-------- modules/fonts.nix | 12 ++++++++++++ modules/kitty.nix | 10 ++++++---- modules/polybar.nix | 7 ++++++- modules/security.nix | 9 +++++++-- nixos/base.nix | 11 +++++++++-- nixos/defcon.nix | 13 +++++++++++++ 9 files changed, 75 insertions(+), 17 deletions(-) create mode 100644 custom/cocktail-bar-cli/default.nix create mode 100644 modules/fonts.nix create mode 100644 nixos/defcon.nix diff --git a/custom/cocktail-bar-cli/default.nix b/custom/cocktail-bar-cli/default.nix new file mode 100644 index 0000000..7c57bdb --- /dev/null +++ b/custom/cocktail-bar-cli/default.nix @@ -0,0 +1,9 @@ +{ pkgs, stdenv, autoPatchelfHook, ... }: +stdenv.mkDerivation rec { + name = "cocktail-bar-cli"; + version = "1.0"; + src = /home/bertof/defcon/cli/cocktail-bar-cli; + dontUnpack = true; + nativeBuildInputs = [ autoPatchelfHook ]; + installPhase = "install -m755 -D ${src} $out/bin/cocktail-bar-cli"; +} diff --git a/custom/default.nix b/custom/default.nix index bb72678..927b8e7 100644 --- a/custom/default.nix +++ b/custom/default.nix @@ -7,6 +7,7 @@ let self = { lockscreen = callPackage ./lockscreen {}; update-background = callPackage ./update-background {}; + cocktail-bar-cli = callPackage ./cocktail-bar-cli {}; # joystickwake = callPackage ./joystickwake {}; }; in diff --git a/home.nix b/home.nix index 3c08d5c..bbe4983 100644 --- a/home.nix +++ b/home.nix @@ -10,10 +10,6 @@ let onedark = import ./themes/onedark.nix; in { - fonts.fontconfig = { - enable = true; - }; - nixpkgs.overlays = [ (final: prev: { rice = (prev.lib.callPackageWith prev) nix-rice {}; }) # Custom library (final: prev: (prev.lib.callPackageWith prev) ./custom/default.nix {}) # Custom packges @@ -38,7 +34,14 @@ in }; font = { normal = { package = pkgs.cantarell-fonts; name = "Cantarell"; }; - monospace = { package = pkgs.nerdfonts; name = "FuraCode Nerd Font Mono"; }; + monospace = { + package = ( + pkgs.nerdfonts.override { + fonts = [ "FiraCode" ]; + } + ); + name = "FuraCode Nerd Font Mono"; + }; }; opacity = 0.9; }; @@ -101,7 +104,6 @@ in megacmd mpv neofetch - nerdfonts nix-prefetch-git obsidian openvpn @@ -152,6 +154,7 @@ in imports = [ ./modules/configurations.nix + ./modules/fonts.nix ./modules/alacritty.nix ./modules/bash.nix @@ -178,7 +181,7 @@ in ./modules/libinput-gestures.nix ./modules/lorri.nix ./modules/man.nix - ./modules/mangohud.nix + # ./modules/mangohud.nix # ./modules/nix-index.nix ./modules/noti.nix ./modules/obs-studio.nix @@ -195,7 +198,7 @@ in ./modules/terminator.nix ./modules/tmux.nix ./modules/update_background.nix - ./modules/xidlehook.nix + # ./modules/xidlehook.nix # ./modules/zathura.nix ./modules/zoxide.nix ./modules/zsh.nix @@ -204,6 +207,7 @@ in ./modules/security.nix ./modules/shell_aliases.nix + ./modules/security.nix ]; programs.home-manager.enable = true; diff --git a/modules/fonts.nix b/modules/fonts.nix new file mode 100644 index 0000000..3c1b45b --- /dev/null +++ b/modules/fonts.nix @@ -0,0 +1,12 @@ +{ pkgs, ... }: +{ + fonts.fontconfig = { + enable = true; + }; + home.packages = with pkgs; [ + dejavu_fonts + noto-fonts + noto-fonts-extra + noto-fonts-cjk + ]; +} diff --git a/modules/kitty.nix b/modules/kitty.nix index 76b4085..7bfc20b 100644 --- a/modules/kitty.nix +++ b/modules/kitty.nix @@ -1,20 +1,22 @@ { pkgs, ... }: let nord = import ../configs/themes/nord.nix; -in { - home.packages = [ pkgs.nerdfonts ]; +in +{ + home.packages = [ pkgs.rice.font.monospace.package ]; programs.kitty = { enable = true; settings = { + # font = pkgs.rice.font.monospace; # font = { # package = pkgs.nerdfonts; # name = "Fira Code Retina Nerd Font Complete"; # size = 9; # }; - font = "FuraCode Nerd Font Mono 10"; + font = "${pkgs.rice.font.monospace.name} 10"; }; extraConfig = '' -backround_opacity = 0.95; + backround_opacity = 0.95; ''; }; } diff --git a/modules/polybar.nix b/modules/polybar.nix index 449d401..6c5f6ac 100644 --- a/modules/polybar.nix +++ b/modules/polybar.nix @@ -71,7 +71,12 @@ let ramp = [ "▂" "▃" "▄" "▅" "▆" "▇" ]; in { - home.packages = with pkgs; [ nerdfonts emojione noto-fonts-emoji material-design-icons ]; + home.packages = with pkgs; [ + pkgs.rice.font.monospace.package + emojione + noto-fonts-emoji + material-design-icons + ]; services.polybar = { enable = true; package = pkgs.polybarFull; diff --git a/modules/security.nix b/modules/security.nix index 200911b..f6a0094 100644 --- a/modules/security.nix +++ b/modules/security.nix @@ -2,11 +2,16 @@ { home.packages = with pkgs; [ # WEB - postman - # burpsuite + altair + burpsuite httpie # REVERSING ghidra-bin + radare2 + cutter + + # INFRASTRUCTURE + cocktail-bar-cli ]; } diff --git a/nixos/base.nix b/nixos/base.nix index 2d6498b..4b3a641 100644 --- a/nixos/base.nix +++ b/nixos/base.nix @@ -7,6 +7,7 @@ ./laptop.nix ./pentablet.nix ./pro_audio.nix + ./defcon.nix ]; # Use the systemd-boot EFI boot loader. @@ -115,6 +116,7 @@ extraGroups = [ "audio" "input" + "docker" "libvirtd" "network" "usb" @@ -223,7 +225,13 @@ services.clamav = { daemon.enable = true; updater.enable = true; }; # Virtualisation - virtualisation = { kvmgt.enable = true; libvirtd.enable = true; podman.enable = true; }; + virtualisation = { + kvmgt.enable = true; + libvirtd.enable = true; + podman.enable = true; + virtualbox.host.enable = true; + docker.enable = true; + }; # Allow completion for system packages environment.pathsToLink = [ "/share/zsh" ]; @@ -243,5 +251,4 @@ # Before changing this value read the documentation for this option # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). system.stateVersion = "21.05"; # Did you read the comment? - } diff --git a/nixos/defcon.nix b/nixos/defcon.nix new file mode 100644 index 0000000..6377eff --- /dev/null +++ b/nixos/defcon.nix @@ -0,0 +1,13 @@ +{ ... }: +{ + + networking.hosts = { + "54.176.11.243" = [ "vpn.mhackeroni.it" ]; + "10.100.0.50" = [ "master.cb.cloud.mhackeroni.it" "bartender.cb.cloud.mhackeroni.it" "grafana.cb.cloud.mhackeroni.it" "menu.cb.cloud.mhackeroni.it" "maitre.cb.cloud.mhackeroni.it" "accountant.cb.cloud.mhackeroni.it" ]; + "10.100.0.150" = [ "flowgui.cloud.mhackeroni.it" "smb.cloud.mhackeroni.it" ]; + "10.100.0.200" = [ "tunniceddu.cloud.mhackeroni.it" ]; + "10.100.0.250" = [ "rev.cloud.mhackeroni.it" ]; + "10.100.0.66" = [ "attackerbackup.cloud.mhackeroni.it" ]; + "192.168.128.1" = [ "smb.hotel.mhackeroni.it" "rev.hotel.mhackeroni.it" ]; + }; +}