Merge branch 'Changes_20.03'
This commit is contained in:
commit
ea8739bc21
6 changed files with 24 additions and 3 deletions
|
@ -1,8 +1,8 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
console.keyMap = "de";
|
||||||
i18n = {
|
i18n = {
|
||||||
consoleKeyMap = "de";
|
|
||||||
defaultLocale = "en_US.UTF-8";
|
defaultLocale = "en_US.UTF-8";
|
||||||
|
|
||||||
inputMethod = {
|
inputMethod = {
|
||||||
|
|
3
fn.nix
3
fn.nix
|
@ -5,6 +5,9 @@ with lib;
|
||||||
|
|
||||||
rec {
|
rec {
|
||||||
ifelse = a: b: c: if a then b else c;
|
ifelse = a: b: c: if a then b else c;
|
||||||
|
fileContentsOr = a: b: (ifelse
|
||||||
|
(pathIsRegularFile a)
|
||||||
|
a b);
|
||||||
cwd = toString ./.;
|
cwd = toString ./.;
|
||||||
lst = { p ? cwd, t ? "regular", b ? false }: (lists.forEach
|
lst = { p ? cwd, t ? "regular", b ? false }: (lists.forEach
|
||||||
(attrNames
|
(attrNames
|
||||||
|
|
|
@ -60,7 +60,7 @@ with lib;
|
||||||
allowedUDPPortRanges = [ { from = 1714; to = 1764; } ];
|
allowedUDPPortRanges = [ { from = 1714; to = 1764; } ];
|
||||||
allowedTCPPortRanges = [ { from = 1714; to = 1764; } ];
|
allowedTCPPortRanges = [ { from = 1714; to = 1764; } ];
|
||||||
};
|
};
|
||||||
desktop.wms = [ "i3" ];
|
desktop.wms = [ "none+i3" "i3" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
config.system.copySysConf = {
|
config.system.copySysConf = {
|
||||||
|
|
17
services/acme.nix
Normal file
17
services/acme.nix
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
{ options, config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with builtins;
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
fn = import (../. + (toPath "/fn.nix")) { inherit lib; };
|
||||||
|
cfg = config.machine;
|
||||||
|
in mkIf (elem "acme" cfg.services) {
|
||||||
|
security.acme = {
|
||||||
|
# see https://letsencrypt.org/repository/
|
||||||
|
acceptTerms = true;
|
||||||
|
email = fn.fileContentsOr
|
||||||
|
(toPath "${cfg.secretPath}/acme.mailAddr")
|
||||||
|
"${(elemAt cfg.mailAccounts 0).name}@${cfg.domain}";
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
./acme.nix
|
||||||
./cups.nix
|
./cups.nix
|
||||||
./docker.nix
|
./docker.nix
|
||||||
./fail2ban.nix
|
./fail2ban.nix
|
||||||
|
|
|
@ -40,9 +40,9 @@ in mkIf (elem "desktop" cfg.services) {
|
||||||
enable = !(elem "sway" cfg.desktop.wms);
|
enable = !(elem "sway" cfg.desktop.wms);
|
||||||
layout = "de";
|
layout = "de";
|
||||||
videoDrivers = [ "intel" ];
|
videoDrivers = [ "intel" ];
|
||||||
|
displayManager.defaultSession = ifelse (cfg.desktop.wms != []) (elemAt cfg.desktop.wms 0) null;
|
||||||
windowManager = mkIf (cfg.desktop.wms != []) {
|
windowManager = mkIf (cfg.desktop.wms != []) {
|
||||||
i3 = mkIf (elem "i3" cfg.desktop.wms) (import ./desktop/i3.nix { inherit pkgs; });
|
i3 = mkIf (elem "i3" cfg.desktop.wms) (import ./desktop/i3.nix { inherit pkgs; });
|
||||||
default = elemAt cfg.desktop.wms 0;
|
|
||||||
};
|
};
|
||||||
libinput = {
|
libinput = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
Loading…
Reference in a new issue