Skip to content

Commit

Permalink
style: nix fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
tcarrio committed Nov 28, 2023
1 parent fe84448 commit 6c472ba
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 24 deletions.
17 changes: 9 additions & 8 deletions examples/dns-rpi.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
{

imports =
[ # Include the results of the hardware scan.
[
# Include the results of the hardware scan.
./hardware-configuration.nix
];

Expand Down Expand Up @@ -102,7 +103,7 @@
};
};

# Set your time zone.
# Set your time zone.
time.timeZone = "Europe/London";

# Configure console keymap
Expand All @@ -127,12 +128,12 @@


networking.extraHosts =
''
10.50.10.2 dns dns.int.example.uk
10.50.20.2 dns dns.int.example.uk
10.50.30.2 dns dns.int.example.uk
10.50.40.2 dns dns.int.example.uk
'';
''
10.50.10.2 dns dns.int.example.uk
10.50.20.2 dns dns.int.example.uk
10.50.30.2 dns dns.int.example.uk
10.50.40.2 dns dns.int.example.uk
'';

services.dnsmasq = {
enable = true;
Expand Down
9 changes: 5 additions & 4 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,11 @@
overlays = import ./overlays { inherit inputs; };

# Custom packages; acessible via 'nix build', 'nix shell', etc
packages = libx.forAllSystems (system:
let pkgs = nixpkgs.legacyPackages.${system};
in import ./pkgs { inherit pkgs; }
)
packages = libx.forAllSystems
(system:
let pkgs = nixpkgs.legacyPackages.${system};
in import ./pkgs { inherit pkgs; }
)
# And custom nixos-generators definitions
# TODO: forAllSystems
// libx.forAllSystems (system: {
Expand Down
17 changes: 9 additions & 8 deletions lib/helpers.nix
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,10 @@ in
};

system = platform;
format = if platform == "armv7l-linux"
then "sd-armv7l-installer"
else "sd-aarch64-installer";
format =
if platform == "armv7l-linux"
then "sd-armv7l-installer"
else "sd-aarch64-installer";

# pkgs = inputs.nixpkgs.legacyPackages."${platform}";
# lib = inputs.nixpkgs.legacyPackages."${platform}".lib;
Expand All @@ -68,11 +69,11 @@ in
};

forAllSystems = inputs.nixpkgs.lib.genAttrs [
"armv7l-linux" # 32-bit ARM Linux
"aarch64-linux" # 64-bit ARM Linux
"i686-linux" # 32-bit x86 Linux
"x86_64-linux" # 64-bit x86 Linux
"armv7l-linux" # 32-bit ARM Linux
"aarch64-linux" # 64-bit ARM Linux
"i686-linux" # 32-bit x86 Linux
"x86_64-linux" # 64-bit x86 Linux
"aarch64-darwin" # 64-bit ARM Darwin
"x86_64-darwin" # 64-bit x86 Darwin
"x86_64-darwin" # 64-bit x86 Darwin
];
}
8 changes: 4 additions & 4 deletions nixos/server/tk1/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

boot = {
initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "uas" "sd_nod" ];
kernelModules = [];
kernelModules = [ ];

# TODO: validate newer version with U-Boot
kernelPackages = lib.mkDefault pkgs.linuxPackages_4_9;
Expand All @@ -24,7 +24,7 @@
}];
useDHCP = lib.mkForce false

};
};

nixpkgs.hostPlatform = lib.mkDefault "armv7l-linux";
}
nixpkgs.hostPlatform = lib.mkDefault "armv7l-linux";
}

0 comments on commit 6c472ba

Please sign in to comment.