refactor: fix nix formatting
This commit is contained in:
parent
e02d84533d
commit
4e2f60294a
|
@ -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";
|
||||
fsType = "ext4";
|
||||
};
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/155b5acf-a0f8-4615-ae03-43a5c193f772";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/31C7-CBD1";
|
||||
fsType = "vfat";
|
||||
};
|
||||
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;
|
||||
|
|
|
@ -121,12 +121,12 @@ 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; }) ]) ++ [
|
||||
(makeFirefoxProfileBin {
|
||||
profile = "work";
|
||||
desktopName = "Firefox (Work)";
|
||||
icon = "firefox";
|
||||
})
|
||||
];
|
||||
in with pkgs; [
|
||||
(tor-browser-bundle-bin.override { pulseaudioSupport = true; })
|
||||
(makeFirefoxProfileBin {
|
||||
profile = "work";
|
||||
desktopName = "Firefox (Work)";
|
||||
icon = "firefox";
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./gtk.nix
|
||||
./gnome.nix
|
||||
./mimeapps.nix
|
||||
];
|
||||
imports = [ ./gtk.nix ./gnome.nix ./mimeapps.nix ];
|
||||
}
|
||||
|
|
|
@ -1,53 +1,39 @@
|
|||
{ 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: {
|
||||
condition = "gitdir:${dir}";
|
||||
contents = {
|
||||
user = {
|
||||
name = profile.name;
|
||||
email = profile.email;
|
||||
signingKey = profile.signingKey;
|
||||
signing = { key = profiles."${cfg.defaultProfile}".signingKey; };
|
||||
includes = flatten (mapAttrsToList (name: profile:
|
||||
map (dir: {
|
||||
condition = "gitdir:${dir}";
|
||||
contents = {
|
||||
user = {
|
||||
name = profile.name;
|
||||
email = profile.email;
|
||||
signingKey = profile.signingKey;
|
||||
};
|
||||
};
|
||||
};
|
||||
}) profile.dirs) profiles);
|
||||
}) profile.dirs) profiles);
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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=";
|
||||
};
|
||||
|
||||
|
|
|
@ -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" ];
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue