refactor: fix nix formatting

This commit is contained in:
Felix Schröter 2022-01-01 02:13:02 +01:00
parent e02d84533d
commit 4e2f60294a
No known key found for this signature in database
GPG key ID: 910ACB9F6BD26F58
6 changed files with 45 additions and 62 deletions

View file

@ -1,24 +1,24 @@
{ config, lib, pkgs, ... }:
{
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
boot.initrd.availableKernelModules =
[ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/155b5acf-a0f8-4615-ae03-43a5c193f772";
fileSystems."/" = {
device = "/dev/disk/by-uuid/155b5acf-a0f8-4615-ae03-43a5c193f772";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/31C7-CBD1";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/31C7-CBD1";
fsType = "vfat";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/397a1a92-596f-421b-99e1-c9b2cb821309"; }
];
[{ device = "/dev/disk/by-uuid/397a1a92-596f-421b-99e1-c9b2cb821309"; }];
# TODO keep this disabled?
# nix.maxJobs = lib.mkDefault 8;

View file

@ -121,8 +121,8 @@ in {
cp -r ${scriptBin}/bin/${name} $out/bin/${name}
cp -r ${desktopFile}/share/applications $out/share/applications
'';
in (with pkgs;
[ (tor-browser-bundle-bin.override { pulseaudioSupport = true; }) ]) ++ [
in with pkgs; [
(tor-browser-bundle-bin.override { pulseaudioSupport = true; })
(makeFirefoxProfileBin {
profile = "work";
desktopName = "Firefox (Work)";

View file

@ -1,9 +1,5 @@
{ config, pkgs, ... }:
{
imports = [
./gtk.nix
./gnome.nix
./mimeapps.nix
];
imports = [ ./gtk.nix ./gnome.nix ./mimeapps.nix ];
}

View file

@ -1,44 +1,30 @@
{ lib, pkgs, config, ... }:
with lib;
let
cfg = config.programs.git;
in
{
let cfg = config.programs.git;
in {
options.programs.git = {
profiles = mkOption {
type = types.attrsOf (types.submodule ({ name, config, ... }: {
options = {
name = mkOption {
type = types.str;
};
email = mkOption {
type = types.str;
};
signingKey = mkOption {
type = types.str;
};
dirs = mkOption {
type = types.listOf types.str;
};
name = mkOption { type = types.str; };
email = mkOption { type = types.str; };
signingKey = mkOption { type = types.str; };
dirs = mkOption { type = types.listOf types.str; };
};
}));
};
defaultProfile = mkOption {
type = types.str;
};
defaultProfile = mkOption { type = types.str; };
};
config = let
profiles = cfg.profiles;
config = let profiles = cfg.profiles;
in {
programs.git = {
userName = profiles."${cfg.defaultProfile}".name;
userEmail = profiles."${cfg.defaultProfile}".email;
signing = {
key = profiles."${cfg.defaultProfile}".signingKey;
};
includes = flatten (mapAttrsToList (name: profile: map (dir: {
signing = { key = profiles."${cfg.defaultProfile}".signingKey; };
includes = flatten (mapAttrsToList (name: profile:
map (dir: {
condition = "gitdir:${dir}";
contents = {
user = {

View file

@ -6,7 +6,8 @@ mkDerivation rec {
version = "2.09.03";
src = fetchurl {
url = "https://deconz.dresden-elektronik.de/debian/stable/deconz_${version}-debian-stretch-stable_arm64.deb";
url =
"https://deconz.dresden-elektronik.de/debian/stable/deconz_${version}-debian-stretch-stable_arm64.deb";
sha256 = "6EXYoXOg+6dTR9/hRHmNafZuBeNnAAS4z8ia15s1+9U=";
};

View file

@ -20,7 +20,9 @@ in {
};
# easypi/ot-recorder-arm uses different store location
# volumes = [ "/var/lib/owntracks/recorder/store:/store" ];
volumes = [ "/var/lib/owntracks/recorder/store:/var/spool/owntracks/recorder/store" ];
volumes = [
"/var/lib/owntracks/recorder/store:/var/spool/owntracks/recorder/store"
];
extraOptions = [
# TODO systemd doesn't substitute variables because it doesn't run in a shell
# "-e OTR_PASS=\"$(cat /etc/nixos/secrets/mqtt/owntracks-plain)\""
@ -36,9 +38,7 @@ in {
SERVER_PORT = "8083";
LISTEN_PORT = "8085";
};
volumes = [
"${frontend-config}:/usr/share/nginx/html/config/config.js"
];
volumes = [ "${frontend-config}:/usr/share/nginx/html/config/config.js" ];
extraOptions = [ "--network=host" ];
};
};