Skip to content

Commit

Permalink
base: blacklist modules
Browse files Browse the repository at this point in the history
  • Loading branch information
mkg20001 committed Mar 24, 2024
1 parent 4e8bb1f commit c9e50aa
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/defaults/base/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# This is seperate so we have 1:1 what we have in ansible in here
# This is seperate so we have 1:1 what we have in ansible base role in here

{
imports = [
./modules.nix
./screen.nix
./sshd.nix
./sysctl.nix
Expand Down
34 changes: 34 additions & 0 deletions modules/defaults/base/modules.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{ config, pkgs, lib, ... }:

with lib;

let
net = [
"dccp"
"sctp"
"rds"
"tipc"
];
fs = [
"cramfs"
"freevxfs"
"hfs"
"hfsplus"
"jffs2"
];
misc = [
"bluetooth"
"firewire-core"
"n_hdlc"
"net-pf-31"
"soundcore"
"thunderbolt"
"usb-midi"
];
in
{
environment.etc."modprobe.d/disablemod.conf".text = concatStringsSep "\n"
(map (module: "install ${module} ${pkgs.coreutils}/bin/true")
(net ++ fs ++ misc)
);
}

0 comments on commit c9e50aa

Please sign in to comment.