nixpkgs-format all files

dev-docs
Moritz Böhme 2021-11-11 18:34:54 +01:00
parent 342b29f73c
commit 6f64608b0b
15 changed files with 50 additions and 38 deletions

View File

@ -14,7 +14,8 @@
emacs-overlay.url = "github:nix-community/emacs-overlay"; emacs-overlay.url = "github:nix-community/emacs-overlay";
home-manager = { url = "github:nix-community/home-manager"; }; home-manager.url = "github:nix-community/home-manager";
picom = { picom = {
url = "github:jonaburg/picom"; url = "github:jonaburg/picom";
flake = false; flake = false;

View File

@ -1,7 +1,7 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
let {
base = { home-manager.users.moritz = {
programs.kitty = { programs.kitty = {
enable = true; enable = true;
settings = { settings = {
@ -67,4 +67,4 @@ let
}; };
}; };
}; };
in { home-manager.users.moritz = { ... }: (base); } }

View File

@ -1,7 +1,8 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
let {
base = (home: { home-manager.users.moritz = {
programs.rofi = { programs.rofi = {
enable = true; enable = true;
package = pkgs.rofi.override { plugins = with pkgs; [ rofi-calc ]; }; package = pkgs.rofi.override { plugins = with pkgs; [ rofi-calc ]; };
@ -15,5 +16,5 @@ let
dmenu_command = rofi dmenu_command = rofi
''; '';
}; };
}); };
in { home-manager.users.moritz = { ... }: (base "/home/moritz/"); } }

View File

@ -1,7 +1,8 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
let {
base = { home-manager.users.moritz = {
programs.zathura = { programs.zathura = {
enable = true; enable = true;
options = { options = {
@ -51,4 +52,4 @@ let
}; };
}; };
}; };
in { home-manager.users.moritz = { ... }: (base); } }

View File

@ -1,4 +1,3 @@
# WARN: this file will get overwritten by $ cachix use <name> # WARN: this file will get overwritten by $ cachix use <name>
{ pkgs, lib, ... }: { pkgs, lib, ... }:
@ -7,7 +6,8 @@ let
toImport = name: value: folder + ("/" + name); toImport = name: value: folder + ("/" + name);
filterCaches = key: value: value == "regular" && lib.hasSuffix ".nix" key; filterCaches = key: value: value == "regular" && lib.hasSuffix ".nix" key;
imports = lib.mapAttrsToList toImport (lib.filterAttrs filterCaches (builtins.readDir folder)); imports = lib.mapAttrsToList toImport (lib.filterAttrs filterCaches (builtins.readDir folder));
in { in
{
inherit imports; inherit imports;
nix.binaryCaches = [ "https://cache.nixos.org/" ]; nix.binaryCaches = [ "https://cache.nixos.org/" ];
} }

View File

@ -1,4 +1,3 @@
{ {
nix = { nix = {
binaryCaches = [ binaryCaches = [

View File

@ -1,7 +1,8 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
let {
base = (home: { home-manager.users.moritz = {
programs.git = { programs.git = {
enable = true; enable = true;
userName = "MoritzBoehme"; userName = "MoritzBoehme";
@ -9,5 +10,5 @@ let
extraConfig = { init.defaultBranch = "main"; }; extraConfig = { init.defaultBranch = "main"; };
delta.enable = true; delta.enable = true;
}; };
}); };
in { home-manager.users.moritz = { ... }: (base "/home/moritz"); } }

View File

@ -36,7 +36,8 @@ let
}; };
}; };
}); });
in { in
{
environment.pathsToLink = [ "/share/zsh" ]; environment.pathsToLink = [ "/share/zsh" ];
home-manager.users.moritz = { ... }: (base "/home/moritz"); home-manager.users.moritz = { ... }: (base "/home/moritz");
} }

View File

@ -5,7 +5,8 @@ let
puid = "1000"; puid = "1000";
pgid = "100"; pgid = "100";
timeZone = "Europe/Berlin"; timeZone = "Europe/Berlin";
in { in
{
home-manager.users.moritz = { home-manager.users.moritz = {
home.packages = with pkgs; [ docker-compose ]; home.packages = with pkgs; [ docker-compose ];
home.file = { home.file = {

View File

@ -1,7 +1,8 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
let {
base = { home-manager.users.moritz = {
services.polybar = { services.polybar = {
enable = true; enable = true;
package = pkgs.polybar.override { pulseSupport = true; }; package = pkgs.polybar.override { pulseSupport = true; };
@ -15,4 +16,4 @@ let
+ builtins.readFile ./colors.ini; + builtins.readFile ./colors.ini;
}; };
}; };
in { home-manager.users.moritz = { ... }: (base); } }

View File

@ -3,7 +3,8 @@
let let
emacs = with pkgs; emacs = with pkgs;
((emacsPackagesNgGen emacsGcc).emacsWithPackages (epkgs: [ epkgs.vterm ])); ((emacsPackagesNgGen emacsGcc).emacsWithPackages (epkgs: [ epkgs.vterm ]));
in { in
{
fonts.fonts = [ pkgs.emacs-all-the-icons-fonts ]; fonts.fonts = [ pkgs.emacs-all-the-icons-fonts ];
home-manager.users.moritz = { home-manager.users.moritz = {

View File

@ -25,12 +25,14 @@
fileSystems."/media/media" = { fileSystems."/media/media" = {
device = "//192.168.0.2/media"; device = "//192.168.0.2/media";
fsType = "cifs"; fsType = "cifs";
options = let options =
let
# this line prevents hanging on network split # this line prevents hanging on network split
automount_opts = automount_opts =
"x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s"; "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s";
in [ in
[
"${automount_opts},credentials=/run/secrets/smbMedia,uid=1000,gid=100" "${automount_opts},credentials=/run/secrets/smbMedia,uid=1000,gid=100"
]; ];
}; };

View File

@ -4,7 +4,8 @@ let
from = 1714; from = 1714;
to = 1764; to = 1764;
}; };
in { in
{
home-manager.users.moritz.services = { kdeconnect.enable = true; }; home-manager.users.moritz.services = { kdeconnect.enable = true; };
networking.firewall = { networking.firewall = {
allowedTCPPortRanges = [ ports ]; allowedTCPPortRanges = [ ports ];

View File

@ -1,7 +1,8 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
let {
base = { home-manager.users.moritz = {
services.picom = { services.picom = {
enable = true; enable = true;
inactiveOpacity = "0.90"; inactiveOpacity = "0.90";
@ -48,4 +49,4 @@ let
''; '';
}; };
}; };
in { home-manager.users.moritz = { ... }: (base); } }

View File

@ -8,7 +8,8 @@ let
nixos-desktop = nixos-desktop =
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKl8gMhwSf1NsP5gp14xbbyjqQLZzcHLb/XKRMoHdXgI"; "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKl8gMhwSf1NsP5gp14xbbyjqQLZzcHLb/XKRMoHdXgI";
hosts = [ nixos-laptop nixos-desktop ]; hosts = [ nixos-laptop nixos-desktop ];
in { in
{
"nordvpn.age".publicKeys = users ++ hosts; "nordvpn.age".publicKeys = users ++ hosts;
"davfs.age".publicKeys = users ++ hosts; "davfs.age".publicKeys = users ++ hosts;
"smbMoritz.age".publicKeys = users ++ hosts; "smbMoritz.age".publicKeys = users ++ hosts;