Compare commits

...

2 Commits

Author SHA1 Message Date
Emmet
316588308d Add packages to work computer 2025-09-20 17:14:21 -05:00
Emmet
147aec1692 Create allowedHosts to let specific hosts through blocklist 2025-09-20 17:13:53 -05:00
2 changed files with 9 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ config, lib, pkgs, pkgs-stable, ... }:
{
config = {
@@ -42,7 +42,7 @@
};
home.packages = with pkgs; [
openldap ldapvi rclone teams-for-linux rpi-imager freerdp tigervnc unixtools.xxd
openldap ldapvi rclone teams-for-linux rpi-imager freerdp pkgs-stable.tigervnc unixtools.xxd
];
home.sessionVariables = lib.mkIf config.userSettings.hyprland.enable {

View File

@@ -1,12 +1,18 @@
{ config, lib, inputs, ... }:
let
blocklist = builtins.readFile "${inputs.blocklist-hosts}/alternates/gambling-porn/hosts";
allowedHosts = config.systemSettings.security.blocklist.allowedHosts;
hostsFileDeletions = builtins.genList (x: "0.0.0.0 " + (builtins.elemAt allowedHosts x)) (builtins.length allowedHosts);
blocklist = builtins.replaceStrings hostsFileDeletions (builtins.genList (x: "") (builtins.length hostsFileDeletions)) (builtins.readFile "${inputs.blocklist-hosts}/alternates/gambling-porn/hosts");
cfg = config.systemSettings.security.blocklist;
in {
options = {
systemSettings.security.blocklist = {
enable = lib.mkEnableOption "Enable basic host blocking for bad websites";
allowedHosts = lib.mkOption {
description = "List of hosts to allow (remove from blocklist)";
type = lib.types.listOf lib.types.str;
};
};
};