Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
199 changed files
with
1,869 additions
and
771 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
{ config, lib, pkgs, ... }: | ||
|
||
with lib; | ||
|
||
let | ||
ecfg = config.services.earlyoom; | ||
in | ||
{ | ||
options = { | ||
services.earlyoom = { | ||
|
||
enable = mkOption { | ||
type = types.bool; | ||
default = false; | ||
description = '' | ||
Enable early out of memory killing. | ||
''; | ||
}; | ||
|
||
freeMemThreshold = mkOption { | ||
type = types.int; | ||
default = 10; | ||
description = '' | ||
Minimum of availabe memory (in percent). | ||
If the free memory falls below this threshold and the analog is true for | ||
<option>services.earlyoom.freeSwapThreshold</option> | ||
the killing begins. | ||
''; | ||
}; | ||
|
||
freeSwapThreshold = mkOption { | ||
type = types.int; | ||
default = 10; | ||
description = '' | ||
Minimum of availabe swap space (in percent). | ||
If the available swap space falls below this threshold and the analog | ||
is true for <option>services.earlyoom.freeMemThreshold</option> | ||
the killing begins. | ||
''; | ||
}; | ||
|
||
useKernelOOMKiller= mkOption { | ||
type = types.bool; | ||
default = false; | ||
description = '' | ||
Use kernel OOM killer instead of own user-space implementation. | ||
''; | ||
}; | ||
|
||
ignoreOOMScoreAdjust = mkOption { | ||
type = types.bool; | ||
default = false; | ||
description = '' | ||
Ignore oom_score_adjust values of processes. | ||
User-space implementation only. | ||
''; | ||
}; | ||
|
||
enableDebugInfo = mkOption { | ||
type = types.bool; | ||
default = false; | ||
description = '' | ||
Enable debugging messages. | ||
''; | ||
}; | ||
}; | ||
}; | ||
|
||
config = mkIf ecfg.enable { | ||
assertions = [ | ||
{ assertion = ecfg.freeMemThreshold > 0 && ecfg.freeMemThreshold <= 100; | ||
message = "Needs to be a positive percentage"; } | ||
{ assertion = ecfg.freeSwapThreshold > 0 && ecfg.freeSwapThreshold <= 100; | ||
message = "Needs to be a positive percentage"; } | ||
{ assertion = !ecfg.useKernelOOMKiller || !ecfg.ignoreOOMScoreAdjust; | ||
message = "Both options in conjunction do not make sense"; } | ||
]; | ||
|
||
systemd.services.earlyoom = { | ||
description = "Early OOM Daemon for Linux"; | ||
wantedBy = [ "multi-user.target" ]; | ||
serviceConfig = { | ||
StandardOutput = "null"; | ||
StandardError = "syslog"; | ||
ExecStart = '' | ||
${pkgs.earlyoom}/bin/earlyoom \ | ||
-m ${toString ecfg.freeMemThreshold} \ | ||
-s ${toString ecfg.freeSwapThreshold} \ | ||
${optionalString ecfg.useKernelOOMKiller "-k"} \ | ||
${optionalString ecfg.ignoreOOMScoreAdjust "-i"} \ | ||
${optionalString ecfg.enableDebugInfo "-d"} | ||
''; | ||
}; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ in | |
./dwm.nix | ||
./exwm.nix | ||
./fluxbox.nix | ||
./fvwm.nix | ||
./herbstluftwm.nix | ||
./i3.nix | ||
./jwm.nix | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ config, lib, pkgs, ... }: | ||
|
||
with lib; | ||
|
||
let | ||
cfg = config.services.xserver.windowManager.fvwm; | ||
fvwm = pkgs.fvwm.override { gestures = cfg.gestures; }; | ||
in | ||
|
||
{ | ||
|
||
###### interface | ||
|
||
options = { | ||
services.xserver.windowManager.fvwm = { | ||
enable = mkEnableOption "Fvwm window manager"; | ||
|
||
gestures = mkOption { | ||
default = false; | ||
type = types.bool; | ||
description = "Whether or not to enable libstroke for gesture support"; | ||
}; | ||
}; | ||
}; | ||
|
||
|
||
###### implementation | ||
|
||
config = mkIf cfg.enable { | ||
services.xserver.windowManager.session = singleton | ||
{ name = "fvwm"; | ||
start = | ||
'' | ||
${fvwm}/bin/fvwm & | ||
waitPID=$! | ||
''; | ||
}; | ||
|
||
environment.systemPackages = [ fvwm ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
diff -Naur gammu-1.33.0.orig/contrib/CMakeLists.txt gammu-1.33.0/contrib/CMakeLists.txt | ||
--- gammu-1.33.0.orig/contrib/CMakeLists.txt 2013-12-26 20:56:22.887772110 +0100 | ||
+++ gammu-1.33.0/contrib/CMakeLists.txt 2013-12-26 20:57:04.386276037 +0100 | ||
@@ -85,7 +85,7 @@ | ||
--- a/contrib/CMakeLists.txt | ||
+++ b/contrib/CMakeLists.txt | ||
@@ -85,7 +85,7 @@ endif (INSTALL_PHP_EXAMPLES) | ||
if (INSTALL_BASH_COMPLETION) | ||
macro_optional_find_package (BashCompletion) | ||
if (NOT BASH_COMPLETION_FOUND) | ||
- set (BASH_COMPLETION_COMPLETIONSDIR "/etc/bash_completion.d" CACHE PATH "Location of bash_completion.d") | ||
+ set (BASH_COMPLETION_COMPLETIONSDIR "${CMAKE_INSTALL_PREFIX}/etc/bash_completion.d" CACHE PATH "Location of bash_completion.d") | ||
endif (NOT BASH_COMPLETION_FOUND) | ||
install ( | ||
FILES bash-completion/gammu | ||
- DESTINATION "/etc/bash_completion.d" | ||
+ DESTINATION "${CMAKE_INSTALL_PREFIX}/etc/bash_completion.d" | ||
COMPONENT "bash" | ||
) | ||
endif (INSTALL_BASH_COMPLETION) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
diff --git a/cmake/templates/gammu.spec.in b/cmake/templates/gammu.spec.in | ||
index 8302353..e3ca59a 100644 | ||
--- a/cmake/templates/gammu.spec.in | ||
+++ b/cmake/templates/gammu.spec.in | ||
@@ -387,9 +387,9 @@ fi | ||
%doc %{_mandir}/man7/gammu-smsd-run.7* | ||
%doc %{_mandir}/man7/gammu-smsd-sql.7* | ||
%doc %{_mandir}/man7/gammu-smsd-tables.7* | ||
-%dir %{_libexecdir}/systemd | ||
-%dir %{_libexecdir}/systemd/system | ||
-%{_libexecdir}/systemd/system/gammu-smsd.service | ||
+%dir %{_prefix}/systemd | ||
+%dir %{_prefix}/systemd/system | ||
+%{_prefix}/systemd/system/gammu-smsd.service | ||
|
||
%files -n libGammu%{so_ver} -f libgammu.lang | ||
%defattr(-,root,root,-) | ||
diff --git a/contrib/CMakeLists.txt b/contrib/CMakeLists.txt | ||
index 78cc7fc..d674c36 100644 | ||
--- a/contrib/CMakeLists.txt | ||
+++ b/contrib/CMakeLists.txt | ||
@@ -97,7 +97,7 @@ endif (INSTALL_BASH_COMPLETION) | ||
if (WITH_SYSTEMD) | ||
install ( | ||
FILES init/gammu-smsd.service | ||
- DESTINATION "${SYSTEMD_SERVICES_INSTALL_DIR}" | ||
+ DESTINATION "${CMAKE_INSTALL_PREFIX}/systemd" | ||
COMPONENT "systemd" | ||
) | ||
endif (WITH_SYSTEMD) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.