1
0
Fork 0

Clean up in accordance with unofficial nix-linter.

This commit is contained in:
Kevin Baensch 2019-05-09 18:28:40 +02:00
parent cfa7222f4d
commit 0ddcaf4085
34 changed files with 49 additions and 75 deletions

View File

@ -1,5 +1,3 @@
{ config, lib, pkgs, ... }:
{
imports = [
./etc.nix

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ config, lib, ... }:
with lib;

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ config, pkgs, ... }:
{
i18n = {

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ config, ... }:
let
firewallcfg = config.machine.firewall;

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ lib, ... }:
{
nix = {

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ config, lib, ... }:
with lib;

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ config, lib, ... }:
with lib;

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ config, lib, ... }:
with lib;

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ lib, ... }:
with lib;

View File

@ -2,8 +2,6 @@
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }:
{
imports = [
./hardware-configuration.nix

View File

@ -1,4 +1,4 @@
{ config, lib, ... }:
{ lib, ... }:
with lib;

View File

@ -1,8 +1,6 @@
{ config, lib, pkgs, ... }:
{ pkgs, ... }:
let
cfg = import ./configuration.nix;
in {
{
imports = [
./hardware-configuration.nix
];

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ config, pkgs, ... }:
{
imports = [

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ pkgs, ... }:
{
imports = [

View File

@ -1,7 +1,6 @@
{ config, lib, pkgs, ... }:
{ pkgs, ... }:
let
localpkgs = import <nixpkgs-local> {};
musnix_channel = (fetchTarball "https://github.com/musnix/musnix/archive/master.tar.gz");
# vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
in {
@ -26,7 +25,7 @@ in {
initrd.kernelModules = [ "hid-multitouch" ];
initrd.availableKernelModules = [ "hid-microsoft" "hid-multitouch" "xhci_pci" "nvme" "usb_storage" "sd_mod" ];
kernelModules = [ "kvm-intel" "hid-microsoft" "hid-multitouch" "uinput" ] ++ [ "snd-seq" "snd-rawmidi" ];
kernelModules = [ "kvm-intel" "hid-microsoft" "hid-multitouch" "uinput" ];
kernel.sysctl = { "fs.inotify.max_user_watches" = 524288; };
kernelParams = [ "threadirq" ];
extraModulePackages = [ ];

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ lib, ... }:
with lib;

View File

@ -2,8 +2,6 @@
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }:
{
imports = [
./hardware-configuration.nix

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ pkgs, ... }:
{
imports =

View File

@ -1,4 +1,4 @@
{ config, lib, ... }:
{ lib, ... }:
with lib;

View File

@ -1,4 +1,4 @@
{ config, pkgs, lib, ... }:
{ lib, ... }:
with lib;

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ config, lib, ... }:
{
nixpkgs.config = {

View File

@ -1,14 +1,11 @@
{ stable ? import <nixos-stable>,
unstable ? import <nixos-unstable>,
gitpkgs ? import /nixpkgs/default.nix,
config, lib, pkgs, ... }:
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.machine;
optPkgs = package: pkgstring: optionals (elem pkgstring cfg.pkgs) package;
gitpkgs = import /nixpkgs/default.nix {};
gitpkgs = import /nixpkgs {};
# Programms I'm likely to want on every machine and/or may execute as root
base = with pkgs; [

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ config, lib, ... }:
with lib;
@ -8,8 +8,6 @@ mkIf (elem "containers" config.machine.services) {
hostAddress = "192.168.100.10";
localAddress = "192.168.100.11";
config =
{ config, lib, pkgs, ... }:
{
imports = [
../machines/CDServer/options.nix

View File

@ -1,5 +1,3 @@
{ config, lib, pkgs, ... }:
{
imports = [
./cups.nix

View File

@ -1,8 +0,0 @@
{ config, pkgs, ... }:
{
services.ejabberd = {
enable = true;
imagemagick = true;
};
}

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ config, lib, ... }:
# mostly taken from https://github.com/davidak/nixos-config/blob/master/services/fail2ban.nix
with lib;

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ config, lib, ... }:
with lib;

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ config, lib, ... }:
# hydra user needs to be manually crated
# sudo -u hydra -s
@ -10,7 +10,7 @@
with lib;
mkIf (elem "hydra" config.machine.services) rec {
mkIf (elem "hydra" config.machine.services) {
# also take a look at ../conf/nix.nix
nix.buildMachines = [
{

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ config, lib, ... }:
with lib;

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ config, lib, ... }:
with lib;

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ config, lib, ... }:
# For reference:
# https://infosec.mozilla.org/guidelines/openssh.html

View File

@ -1,5 +1,3 @@
{ config, pkgs, ... }:
{
services.prosody = {
enable = true;

View File

@ -1,34 +1,34 @@
{ config, lib, pkgs, ... }:
{ config, lib, ... }:
with lib;
mkIf (elem "udev" config.machine.services) {
services.udev.extraRules = ''
# Valve USB devices
SUBSYSTEM=="usb", ATTRS{idVendor}=="28de", TAG+="uaccess", TAG+="udev-acl"
# Valve USB devices
SUBSYSTEM=="usb", ATTRS{idVendor}=="28de", TAG+="uaccess", TAG+="udev-acl"
# Steam Controller udev write access
KERNEL=="uinput", SUBSYSTEM=="misc", TAG+="uaccess", TAG+="udev-acl"
# Steam Controller udev write access
KERNEL=="uinput", SUBSYSTEM=="misc", TAG+="uaccess", TAG+="udev-acl"
# Valve HID devices over USB hidraw
KERNEL=="hidraw*", ATTRS{idVendor}=="28de", TAG+="uaccess", TAG+="udev-acl"
# Valve HID devices over USB hidraw
KERNEL=="hidraw*", ATTRS{idVendor}=="28de", TAG+="uaccess", TAG+="udev-acl"
# Valve HID devices over bluetooth hidraw
KERNEL=="hidraw*", KERNELS=="*28DE:*", TAG+="uaccess", TAG+="udev-acl"
# Valve HID devices over bluetooth hidraw
KERNEL=="hidraw*", KERNELS=="*28DE:*", TAG+="uaccess", TAG+="udev-acl"
# DualShock 4 over USB hidraw
KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="05c4", TAG+="uaccess", TAG+="udev-acl"
# DualShock 4 over USB hidraw
KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="05c4", TAG+="uaccess", TAG+="udev-acl"
# DualShock 4 wireless adapter over USB hidraw
KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="0ba0", TAG+="uaccess", TAG+="udev-acl"
# DualShock 4 wireless adapter over USB hidraw
KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="0ba0", TAG+="uaccess", TAG+="udev-acl"
# DualShock 4 Slim over USB hidraw
KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="09cc", TAG+="uaccess", TAG+="udev-acl"
# DualShock 4 Slim over USB hidraw
KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="09cc", TAG+="uaccess", TAG+="udev-acl"
# DualShock 4 over bluetooth hidraw
KERNEL=="hidraw*", KERNELS=="*054C:05C4*", TAG+="uaccess", TAG+="udev-acl"
# DualShock 4 over bluetooth hidraw
KERNEL=="hidraw*", KERNELS=="*054C:05C4*", TAG+="uaccess", TAG+="udev-acl"
# DualShock 4 Slim over bluetooth hidraw
KERNEL=="hidraw*", KERNELS=="*054C:09CC*", TAG+="uaccess", TAG+="udev-acl"
# DualShock 4 Slim over bluetooth hidraw
KERNEL=="hidraw*", KERNELS=="*054C:09CC*", TAG+="uaccess", TAG+="udev-acl"
'';
}