format nix files

This commit is contained in:
Pim Kunis 2023-11-05 18:49:51 +01:00
parent ee1dc21112
commit 3d34c1e691
13 changed files with 228 additions and 199 deletions

View file

@ -20,7 +20,17 @@
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
};
outputs = { nixpkgs, home-manager, homeage, agenix, nur, nixos-hardware, ... }: {
outputs = {
nixpkgs,
home-manager,
homeage,
agenix,
nur,
nixos-hardware,
...
}: {
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra;
nixosConfigurations.pim = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
@ -28,7 +38,8 @@
./nixos
agenix.nixosModules.default
nixos-hardware.nixosModules.lenovo-thinkpad-x260
home-manager.nixosModules.home-manager {
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.pim = {

View file

@ -1,6 +1,9 @@
{ pkgs, lib, config, ... }:
{
pkgs,
lib,
config,
...
}: {
imports = [
./bash
./neovim

View file

@ -1,9 +1,7 @@
pkgs: lib:
let
pkgs: lib: let
rycee-addons = pkgs.nur.repos.rycee.firefox-addons;
custom-addons = import ./custom-addons.nix pkgs lib;
in
{
in {
default = lib.concatLists [
(with rycee-addons; [
ublock-origin

View file

@ -1,8 +1,17 @@
pkgs: lib:
let
pkgs: lib: let
# Stolen from: https://github.com/nix-community/nur-combined/blob/master/repos/rycee/pkgs/firefox-addons/default.nix
buildFirefoxXpiAddon = lib.makeOverridable ({ stdenv ? pkgs.stdenv, fetchurl ? pkgs.fetchurl,
pname, version, addonId, url, sha256, meta, ... }: stdenv.mkDerivation {
buildFirefoxXpiAddon = lib.makeOverridable ({
stdenv ? pkgs.stdenv,
fetchurl ? pkgs.fetchurl,
pname,
version,
addonId,
url,
sha256,
meta,
...
}:
stdenv.mkDerivation {
name = "${pname}-${version}";
inherit meta;
@ -18,16 +27,14 @@ let
install -v -m644 "$src" "$dst/${addonId}.xpi"
'';
});
in
{
in {
"http-version-indicator" = buildFirefoxXpiAddon {
pname = "http-version-indicator";
version = "3.2.1";
addonId = "spdyindicator@chengsun.github.com";
url = "https://addons.mozilla.org/firefox/downloads/file/3767224/http2_indicator-3.2.1.xpi";
sha256 = "be9518017334ce502a1da514542c2ca4f974217d0c8e6c7c31d518aba57c09a8";
meta = with lib;
{
meta = with lib; {
homepage = "https://github.com/bsiegel/http-version-indicator";
description = "An indicator showing the HTTP version used to load the page in the address bar.";
mozPermissions = ["<all_urls>" "tabs" "webNavigation" "webRequest"];
@ -40,8 +47,7 @@ in
addonId = "{252ee273-8c8d-4609-b54d-62ae345be0a1}";
url = "https://addons.mozilla.org/firefox/downloads/file/3608595/indicatetls-0.3.0.xpi";
sha256 = "7a3b7edb1085f7b15d279c1013fac1d68f5247cfd6312d5275cb053e24a79465";
meta = with lib;
{
meta = with lib; {
homepage = "https://github.com/jannispinter/indicatetls";
description = "Displays negotiated SSL/TLS protocol version and additional security information in the address bar";
license = licenses.mpl20;
@ -62,8 +68,7 @@ in
addonId = "{8c9cad02-c069-4e93-909d-d874da819c49}";
url = "https://addons.mozilla.org/firefox/downloads/file/3493442/sixindicator-1.3.0.xpi";
sha256 = "415ab83ed4ac94d1efe114752a09df29536d1bd54cc9b7e5ce5d9ee55a84226d";
meta = with lib;
{
meta = with lib; {
homepage = "https://github.com/HostedDinner/SixIndicator";
description = "Shows a simple icon, if IPv6 or IPv4 was used for the request of the site. When clicking on the icon, more information is shown, like the number of requests per domain and if these requests were made via IPv6 or IPv4.";
license = licenses.mit;
@ -77,8 +82,7 @@ in
addonId = "{317526c6-ff2b-49c9-822e-d77b4a3da1d1}";
url = "https://addons.mozilla.org/firefox/downloads/file/3934220/simple_style_fox_2-10.0.xpi";
sha256 = "1aaac3ba08d21086d7087015f92a27661940df45a97bf5680588c883f799a97d";
meta = with lib;
{
meta = with lib; {
description = "Simple style fox 2";
license = licenses.cc-by-30;
mozPermissions = [];

View file

@ -1,6 +1,8 @@
{ pkgs, lib, ... }:
let
{
pkgs,
lib,
...
}: let
firefoxAddons = import ./addons.nix pkgs lib;
firefoxSettings = {
"browser.aboutConfig.showWarning" = false;
@ -13,8 +15,7 @@ let
"browser.gesture.swipe.left" = false;
"browser.gesture.swipe.right" = false;
};
in
{
in {
config = {
programs.firefox = {
enable = true;

View file

@ -9,10 +9,12 @@
commit.verbose = true;
pull.rebase = true;
};
includes = [{
includes = [
{
path = "~/git/suecode/.gitconfig";
condition = "gitdir:~/git/suecode/**";
}];
}
];
};
};
}

View file

@ -1,6 +1,8 @@
{ pkgs, config, ...}:
{
pkgs,
config,
...
}: {
config = {
home.packages = [pkgs.keepassxc];
homeage.file."keepassxc.ini" = {

View file

@ -1,6 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
config = {
programs.neovim = {
enable = true;

View file

@ -1,6 +1,8 @@
{ config, lib, ...}:
{
config,
lib,
...
}: {
config = {
programs.ssh = {
enable = true;

View file

@ -1,6 +1,4 @@
{ config, ... }:
{
{config, ...}: {
config = {
services.syncthing.enable = true;
xdg.configFile."syncthing/config.xml".source = ./syncthing.xml;

View file

@ -1,4 +1,9 @@
{ pkgs, config, lib, ... }: {
{
pkgs,
config,
lib,
...
}: {
imports = [
./hardware-configuration.nix
];
@ -122,7 +127,8 @@
"fd11:5ee:bad:c0de::4/64"
];
dns = ["192.168.30.8"];
peers = [{
peers = [
{
presharedKeyFile = config.age.secrets.wg-quick-home-preshared-key.path;
endpoint = "84.245.14.149:51820";
publicKey = "fa3mQ7ximJbH7cu2ZbWidto5xBGxEEfWvCCiUDk00Hg=";
@ -130,7 +136,8 @@
"0.0.0.0/0"
"::0/0"
];
}];
}
];
};
};

View file

@ -1,11 +1,15 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "sd_mod" "rtsx_pci_sdmmc"];
@ -13,20 +17,20 @@
boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = [];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/33e4587b-fba3-4a9d-82d2-a9e49a8e75fa";
fileSystems."/" = {
device = "/dev/disk/by-uuid/33e4587b-fba3-4a9d-82d2-a9e49a8e75fa";
fsType = "ext4";
};
boot.initrd.luks.devices."luks-cd1139a7-0c1b-4459-b586-29b577825ee9".device = "/dev/disk/by-uuid/cd1139a7-0c1b-4459-b586-29b577825ee9";
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/87DA-B083";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/87DA-B083";
fsType = "vfat";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/908399cd-2f4f-4555-8805-80c9faf190aa"; }
swapDevices = [
{device = "/dev/disk/by-uuid/908399cd-2f4f-4555-8805-80c9faf190aa";}
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking

View file

@ -3,8 +3,7 @@ let
publicKeysURL = "https://git.kun.is/pim.keys"; # https://github.com/pizzapim.keys
publicKeysFile = builtins.fetchurl {url = publicKeysURL;};
publicKeys = pkgs.lib.strings.splitString "\n" (pkgs.lib.strings.fileContents publicKeysFile);
in
{
in {
"wg-quick-home-privkey.age".publicKeys = publicKeys;
"wg-quick-home-preshared-key.age".publicKeys = publicKeys;
"sue_ed25519.age".publicKeys = publicKeys;