style: reformat with nixfmt-rfc-style
This commit is contained in:
parent
5ad8bc1d56
commit
1c5d83d81e
99 changed files with 2247 additions and 1334 deletions
|
@ -1,7 +1,19 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [ ./zram.nix ./i18n.nix ./nix.nix ./networking.nix ./hardened.nix ];
|
||||
imports = [
|
||||
./zram.nix
|
||||
./i18n.nix
|
||||
./nix.nix
|
||||
./networking.nix
|
||||
./hardened.nix
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [ wget curl openssl rage neovim ];
|
||||
environment.systemPackages = with pkgs; [
|
||||
wget
|
||||
curl
|
||||
openssl
|
||||
rage
|
||||
neovim
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [ ./common.nix ./fonts.nix ./sound.nix ./vpn.nix ./printing ];
|
||||
imports = [
|
||||
./common.nix
|
||||
./fonts.nix
|
||||
./sound.nix
|
||||
./vpn.nix
|
||||
./printing
|
||||
];
|
||||
}
|
||||
|
|
|
@ -10,9 +10,21 @@
|
|||
fira-code
|
||||
];
|
||||
fonts.fontconfig.defaultFonts = {
|
||||
serif = [ "Noto Serif" "emoji" ];
|
||||
sansSerif = [ "Noto Sans" "emoji" ];
|
||||
monospace = [ "Fira Code" "emoji" ];
|
||||
emoji = [ "Noto Color Emoji" "Symbols Nerd Font Mono" ];
|
||||
serif = [
|
||||
"Noto Serif"
|
||||
"emoji"
|
||||
];
|
||||
sansSerif = [
|
||||
"Noto Sans"
|
||||
"emoji"
|
||||
];
|
||||
monospace = [
|
||||
"Fira Code"
|
||||
"emoji"
|
||||
];
|
||||
emoji = [
|
||||
"Noto Color Emoji"
|
||||
"Symbols Nerd Font Mono"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -14,9 +14,8 @@
|
|||
programs.steam.enable = true;
|
||||
programs.steam.package = pkgs.steam.override {
|
||||
# https://github.com/NixOS/nixpkgs/blob/master/pkgs/games/steam/fhsenv.nix
|
||||
extraLibraries = pkgs:
|
||||
with pkgs;
|
||||
[
|
||||
extraLibraries =
|
||||
pkgs: with pkgs; [
|
||||
libxcrypt-legacy # Life Is Strange
|
||||
];
|
||||
};
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
{ config, modulesPath, pkgs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
modulesPath,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [ "${modulesPath}/profiles/hardened.nix" ];
|
||||
|
|
|
@ -13,7 +13,10 @@
|
|||
};
|
||||
supportedLocales = [ "all" ];
|
||||
inputMethod.enabled = "ibus";
|
||||
inputMethod.ibus.engines = with pkgs.ibus-engines; [ uniemoji mozc ];
|
||||
inputMethod.ibus.engines = with pkgs.ibus-engines; [
|
||||
uniemoji
|
||||
mozc
|
||||
];
|
||||
};
|
||||
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
networking.nameservers = [ "127.0.0.1" "::1" ];
|
||||
networking.nameservers = [
|
||||
"127.0.0.1"
|
||||
"::1"
|
||||
];
|
||||
networking.networkmanager.dns = "systemd-resolved";
|
||||
|
||||
services.dnsmasq.enable = false;
|
||||
|
@ -13,6 +16,9 @@
|
|||
|
||||
services.nextdns = {
|
||||
enable = true;
|
||||
arguments = [ "-config" "b8e2f7" ];
|
||||
arguments = [
|
||||
"-config"
|
||||
"b8e2f7"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
let
|
||||
flakes = lib.filterAttrs (name: value: value ? outputs) inputs;
|
||||
inherit (inputs.self.outputs) nixConfig;
|
||||
in {
|
||||
in
|
||||
{
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "04:00";
|
||||
|
@ -21,7 +22,13 @@ in {
|
|||
enable = true;
|
||||
dates = "03:00";
|
||||
flake = "/etc/nixos";
|
||||
flags = with lib;
|
||||
flatten (mapAttrsToList (n: _: [ "--update-input" n ]) flakes);
|
||||
flags =
|
||||
with lib;
|
||||
flatten (
|
||||
mapAttrsToList (n: _: [
|
||||
"--update-input"
|
||||
n
|
||||
]) flakes
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
|
@ -5,13 +5,14 @@
|
|||
|
||||
hardware.printers = {
|
||||
ensureDefaultPrinter = "Brother_HL-L2370DN";
|
||||
ensurePrinters = [{
|
||||
name = "Brother_HL-L2370DN";
|
||||
description = "Brother HL-L2370DN";
|
||||
deviceUri =
|
||||
"dnssd://Brother%20HL-L2370DN%20series._ipp._tcp.local/?uuid=e3248000-80ce-11db-8000-b422007e1490";
|
||||
model = "drv:///brlaser.drv/brl2370d.ppd";
|
||||
# model = "everywhere";
|
||||
}];
|
||||
ensurePrinters = [
|
||||
{
|
||||
name = "Brother_HL-L2370DN";
|
||||
description = "Brother HL-L2370DN";
|
||||
deviceUri = "dnssd://Brother%20HL-L2370DN%20series._ipp._tcp.local/?uuid=e3248000-80ce-11db-8000-b422007e1490";
|
||||
model = "drv:///brlaser.drv/brl2370d.ppd";
|
||||
# model = "everywhere";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [ ./common.nix ./vpn.nix ];
|
||||
imports = [
|
||||
./common.nix
|
||||
./vpn.nix
|
||||
];
|
||||
|
||||
# use xserver without display manager
|
||||
services.xserver.displayManager.startx.enable = true;
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
hardware.pulseaudio.enable = false;
|
||||
|
@ -16,7 +21,12 @@
|
|||
"bluez5.enable-sbc-xq" = true;
|
||||
"bluez5.enable-msbc" = true;
|
||||
"bluez5.enable-hw-volume" = true;
|
||||
"bluez5.roles" = [ "hsp_hs" "hsp_ag" "hfp_hf" "hfp_ag" ];
|
||||
"bluez5.roles" = [
|
||||
"hsp_hs"
|
||||
"hsp_ag"
|
||||
"hfp_hf"
|
||||
"hfp_ag"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,11 +1,17 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.services.tailscale;
|
||||
tailscaleInterface = cfg.interfaceName;
|
||||
inherit (config.networking) hostName;
|
||||
tailnetHost = "${hostName}.tail05275.ts.net";
|
||||
in {
|
||||
in
|
||||
{
|
||||
networking.wireguard.enable = true;
|
||||
networking.firewall.trustedInterfaces = [ tailscaleInterface ];
|
||||
|
||||
|
@ -22,8 +28,7 @@ in {
|
|||
];
|
||||
};
|
||||
|
||||
systemd.services.tailscaled.serviceConfig.Environment =
|
||||
[ "TS_DEBUG_FIREWALL_MODE=auto" ];
|
||||
systemd.services.tailscaled.serviceConfig.Environment = [ "TS_DEBUG_FIREWALL_MODE=auto" ];
|
||||
|
||||
# call taiscale up without --auth-key
|
||||
systemd.services.tailscaled-autoconnect = lib.mkIf (cfg.authKeyFile == null) {
|
||||
|
@ -31,19 +36,21 @@ in {
|
|||
wants = [ "tailscaled.service" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig.Type = "oneshot";
|
||||
script = ''
|
||||
status=$(${config.systemd.package}/bin/systemctl show -P StatusText tailscaled.service)
|
||||
if [[ $status != Connected* ]]; then
|
||||
${cfg.package}/bin/tailscale up
|
||||
fi
|
||||
script =
|
||||
''
|
||||
status=$(${config.systemd.package}/bin/systemctl show -P StatusText tailscaled.service)
|
||||
if [[ $status != Connected* ]]; then
|
||||
${cfg.package}/bin/tailscale up
|
||||
fi
|
||||
|
||||
# some options cannot be set immediately
|
||||
${cfg.package}/bin/tailscale up ${lib.escapeShellArgs cfg.extraUpFlags}
|
||||
# some options cannot be set immediately
|
||||
${cfg.package}/bin/tailscale up ${lib.escapeShellArgs cfg.extraUpFlags}
|
||||
|
||||
${cfg.package}/bin/tailscale cert ${tailnetHost}
|
||||
'' + lib.optionalString config.services.nginx.enable ''
|
||||
chown nginx:nginx /var/lib/tailscale/certs/${tailnetHost}.{key,crt}
|
||||
'';
|
||||
${cfg.package}/bin/tailscale cert ${tailnetHost}
|
||||
''
|
||||
+ lib.optionalString config.services.nginx.enable ''
|
||||
chown nginx:nginx /var/lib/tailscale/certs/${tailnetHost}.{key,crt}
|
||||
'';
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts.${tailnetHost} = {
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib; {
|
||||
with lib;
|
||||
{
|
||||
zramSwap.enable = mkDefault true;
|
||||
zramSwap.memoryPercent = mkDefault 100;
|
||||
zramSwap.memoryMax = mkDefault (16 * 1024 * 1024 * 1024);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue