fixing sshd and suspend problems
This commit is contained in:
parent
22dbeab3f8
commit
a94e8afe34
4 changed files with 40 additions and 27 deletions
|
@ -29,6 +29,8 @@
|
|||
programs.custom.steam.enable = false;
|
||||
programs.custom.video.enable = true;
|
||||
|
||||
system.custom.suspend.enable = false;
|
||||
|
||||
services.printing.enable = true;
|
||||
|
||||
# fonts
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
./wtf.nix
|
||||
];
|
||||
|
||||
system.custom.suspend.enable = lib.mkDefault true;
|
||||
|
||||
backup.dirs =
|
||||
[ "/home/palo/.password-store" "/home/palo/.task" "/home/palo/.vit" ];
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
{ config, ... }: {
|
||||
# make sure ssh is only available trough the tinc
|
||||
#networking.firewall.extraCommands = ''
|
||||
# iptables -t nat -A PREROUTING ! -i tinc.private -p tcp -m tcp --dport 22 -j REDIRECT --to-ports 0
|
||||
#'';
|
||||
networking.firewall.extraCommands = ''
|
||||
iptables --table nat --append PREROUTING ! --in-interface tinc.+ --protocol tcp --match tcp --dport 22 --jump REDIRECT --to-ports 0
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -1,6 +1,15 @@
|
|||
{ pkgs, config, lib, ... }:
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = config.system.custom.suspend;
|
||||
in {
|
||||
|
||||
options.system.custom.suspend.enable = mkEnableOption "use xlock in suspend";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
{
|
||||
systemd.services.screenlock = {
|
||||
before = [ "sleep.target" ];
|
||||
requiredBy = [ "sleep.target" ];
|
||||
|
@ -24,4 +33,5 @@
|
|||
|
||||
services.logind.lidSwitch = "suspend";
|
||||
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue