forked from aylac.top/nixcfg
this repo has no description

skibid

aylac.top fed1412a fd833706

verified
Changed files
+152 -10
modules
+5 -3
modules/home/programs/git/default.nix
···
config = lib.mkIf config.myHome.programs.git.enable {
programs.git = {
enable = true;
-
userName = "ayla";
-
userEmail = "ayla-git.barcode041@silomails.com";
signing = {
format = "ssh";
key = "~/.ssh/id_ed25519";
signByDefault = true;
};
-
extraConfig = {
+
settings = {
+
user = {
+
name = "ayla";
+
email = "ayla-git.barcode041@silomails.com";
+
};
color.ui = true;
github.user = "ayla6";
init = {
+1
modules/nixos/default.nix
···
./desktop
./profiles
./programs
+
./security
./services
];
}
-6
modules/nixos/profiles/base/default.nix
···
networking.networkmanager.enable = true;
security = {
-
polkit.enable = true;
rtkit.enable = true;
-
-
sudo-rs = {
-
enable = true;
-
wheelNeedsPassword = false;
-
};
};
services = {
+1 -1
modules/nixos/profiles/default.nix
···
{...}: {
imports = [
./arr
+
./backups
./base
./btrfs
-
./backups
./workstation
./server
./autoUpgrade
+55
modules/nixos/security/apparmor.nix
···
+
# https://github.com/isabelroses/dotfiles/blob/14a191bd583b34e242ad13a0164a3c32c506c655/modules/nixos/security/apparmor.nix
+
{
+
lib,
+
pkgs,
+
config,
+
...
+
}: let
+
inherit (lib) getExe;
+
in {
+
services.dbus.apparmor = "disabled";
+
+
# apparmor configuration
+
security.apparmor = {
+
enable = true;
+
+
# whether to enable the AppArmor cache
+
# in /var/cache/apparmore
+
enableCache = true;
+
+
# whether to kill processes which have an AppArmor profile enabled
+
# but are not confined
+
killUnconfinedConfinables = true;
+
+
# packages to be added to AppArmor’s include path
+
packages = [pkgs.apparmor-profiles];
+
+
# apparmor policies
+
policies = {
+
"default_deny" = {
+
state = "disable";
+
profile = ''
+
profile default_deny /** { }
+
'';
+
};
+
+
"sudo" = {
+
state = "disable";
+
profile = ''
+
${getExe pkgs.sudo} {
+
file /** rwlkUx,
+
}
+
'';
+
};
+
+
"nix" = {
+
state = "disable";
+
profile = ''
+
${getExe config.nix.package} {
+
unconfined,
+
}
+
'';
+
};
+
};
+
};
+
}
+67
modules/nixos/security/default.nix
···
+
{...}: {
+
imports = [
+
./apparmor.nix
+
./pam.nix
+
./polkit.nix
+
./sudo.nix
+
];
+
+
boot.blacklistedKernelModules = [
+
# Obscure network protocols
+
"ax25"
+
"netrom"
+
"rose"
+
"dccp"
+
"sctp"
+
"rds"
+
"tipc"
+
"n-hdlc"
+
"x25"
+
"decnet"
+
"econet"
+
"af_802154"
+
"ipx"
+
"appletalk"
+
"psnap"
+
"p8023"
+
"p8022"
+
"can"
+
"atm"
+
+
# Old or rare or insufficiently audited filesystems
+
"adfs"
+
"affs"
+
"bfs"
+
"befs"
+
"cramfs"
+
"efs"
+
"erofs"
+
"exofs"
+
"freevxfs"
+
"f2fs"
+
"hfs"
+
"hpfs"
+
"jfs"
+
"minix"
+
"nilfs2"
+
#"ntfs"
+
"omfs"
+
"qnx4"
+
"qnx6"
+
"sysv"
+
"ufs"
+
# Various rare filesystems
+
"jffs2"
+
"hfsplus"
+
#"squashfs"
+
"udf"
+
"cifs"
+
"nfs"
+
"nfsv3"
+
"nfsv4"
+
"gfs2"
+
# vivid driver is only useful for testing purposes and has been the cause
+
# of privilege escalation vulnerabilities
+
"vivid"
+
];
+
}
+7
modules/nixos/security/pam.nix
···
+
{
+
security.pam = {
+
services.login = {
+
failDelay.enable = true;
+
};
+
};
+
}
+3
modules/nixos/security/polkit.nix
···
+
{
+
security.polkit.enable = true;
+
}
+13
modules/nixos/security/sudo.nix
···
+
{
+
security.sudo-rs = {
+
enable = true;
+
wheelNeedsPassword = false;
+
execWheelOnly = true;
+
+
extraConfig = ''
+
Defaults !lecture
+
Defaults env_keep += "EDITOR PATH DISPLAY"
+
Defaults timestamp_timeout = 30
+
'';
+
};
+
}