nixpkgs-fmt

This commit is contained in:
fleaz 2022-02-07 00:01:27 +01:00
parent 6a9a43478c
commit 04091588ee
10 changed files with 185 additions and 169 deletions

View file

@ -2,7 +2,8 @@
let let
home-manager = (import ../nix/sources.nix).home-manager; home-manager = (import ../nix/sources.nix).home-manager;
in { in
{
imports = [ imports = [
"${home-manager}/nixos" "${home-manager}/nixos"
]; ];
@ -194,8 +195,10 @@ in {
bars = [{ command = "${pkgs.waybar}/bin/waybar"; }]; bars = [{ command = "${pkgs.waybar}/bin/waybar"; }];
keybindings = let mod = "Mod4"; keybindings =
in { let mod = "Mod4";
in
{
"${mod}+Return" = "exec foot"; "${mod}+Return" = "exec foot";
"${mod}+p" = "exec ${pkgs.wofi}/bin/wofi --show drun"; "${mod}+p" = "exec ${pkgs.wofi}/bin/wofi --show drun";

View file

@ -4,7 +4,8 @@
{ sources ? import ../../nix { sources ? import ../../nix
, pkgs ? sources.pkgs { } , pkgs ? sources.pkgs { }
, ... } : , ...
}:
{ {
imports = [ imports = [

View file

@ -25,11 +25,13 @@
fileSystems."/mnt/pool" = { fileSystems."/mnt/pool" = {
device = "//BART/Pool/"; device = "//BART/Pool/";
fsType = "cifs"; fsType = "cifs";
options = let options =
let
# this line prevents hanging on network split # this line prevents hanging on network split
automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s"; automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s";
in ["${automount_opts},credentials=/etc/nixos/smb-secrets"]; in
[ "${automount_opts},credentials=/etc/nixos/smb-secrets" ];
}; };
swapDevices = swapDevices =

View file

@ -7,7 +7,8 @@
let let
home-manager = (import ./nix/sources.nix).home-manager; home-manager = (import ./nix/sources.nix).home-manager;
secretsFile = "/root.key"; secretsFile = "/root.key";
in { in
{
imports = [ imports = [
# Include the results of the hardware scan. # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
@ -98,7 +99,10 @@ in {
# List packages installed in system profile. To search, run: # List packages installed in system profile. To search, run:
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
vim wget curl git vim
wget
curl
git
]; ];
services.openssh.enable = true; services.openssh.enable = true;

View file

@ -5,7 +5,8 @@
{ {
imports = imports =
[ (modulesPath + "/installer/scan/not-detected.nix") [
(modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
@ -14,14 +15,16 @@
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" =
{ device = "/dev/disk/by-uuid/b9edb32f-fb40-4d59-8abe-b187c88667d6"; {
device = "/dev/disk/by-uuid/b9edb32f-fb40-4d59-8abe-b187c88667d6";
fsType = "ext4"; fsType = "ext4";
}; };
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/e2d53876-3fdc-486a-a354-ec834b256e43"; boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/e2d53876-3fdc-486a-a354-ec834b256e43";
fileSystems."/boot/efi" = fileSystems."/boot/efi" =
{ device = "/dev/disk/by-uuid/502E-A0DC"; {
device = "/dev/disk/by-uuid/502E-A0DC";
fsType = "vfat"; fsType = "vfat";
}; };

View file

@ -147,14 +147,17 @@ let
# Create the final "sources" from the config # Create the final "sources" from the config
mkSources = config: mkSources = config:
mapAttrs ( mapAttrs
(
name: spec: name: spec:
if builtins.hasAttr "outPath" spec if builtins.hasAttr "outPath" spec
then abort then
abort
"The values in sources.json should not have an 'outPath' attribute" "The values in sources.json should not have an 'outPath' attribute"
else else
spec // { outPath = replace name (fetch config.pkgs name spec); } spec // { outPath = replace name (fetch config.pkgs name spec); }
) config.sources; )
config.sources;
# The "config" used by the fetchers # The "config" used by the fetchers
mkConfig = mkConfig =