format all code with alejandra

This commit is contained in:
Antoine Martin 2022-04-10 11:54:58 +02:00
parent fa0cda2673
commit 4f0d45e4d5
89 changed files with 1605 additions and 1298 deletions

View file

@ -1,17 +1,20 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, lib, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
config,
lib,
pkgs,
...
}: {
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
./home.nix
./home.nix
./secrets.nix
];
./secrets.nix
];
boot.kernelPackages = pkgs.linuxPackages_latest;
@ -27,7 +30,7 @@
services.btrfs = {
autoScrub = {
enable = true;
fileSystems = [ "/" ];
fileSystems = ["/"];
};
};
@ -93,7 +96,7 @@
"rfkill-release"
];
services.udev.packages = [ pkgs.packages.kaleidoscope-udev-rules ];
services.udev.packages = [pkgs.packages.kaleidoscope-udev-rules];
hardware.bluetooth = {
enable = true;

View file

@ -1,30 +1,34 @@
# 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" "nvme" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/1a942915-c1ae-4058-b99d-09d12d40dbd3";
fsType = "btrfs";
options = [ "subvol=nixos" "compress=zstd:1" "noatime" ];
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/1a942915-c1ae-4058-b99d-09d12d40dbd3";
fsType = "btrfs";
options = ["subvol=nixos" "compress=zstd:1" "noatime"];
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/17C7-368D";
fsType = "vfat";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/17C7-368D";
fsType = "vfat";
};
swapDevices = [ ];
swapDevices = [];
hardware.cpu.amd.updateMicrocode = true;
}

View file

@ -1,26 +1,31 @@
{ config, pkgs, ... }:
{
config,
pkgs,
...
}: {
home-manager.users.alarsyo = {
# Keyboard settings & i3 settings
my.home.x.enable = true;
my.home.x.i3bar.temperature.chip = "k10temp-pci-*";
my.home.x.i3bar.temperature.inputs = [ "Tccd1" ];
my.home.x.i3bar.networking.throughput_interfaces = [ "enp8s0" "wlp4s0" ];
my.home.x.i3bar.temperature.inputs = ["Tccd1"];
my.home.x.i3bar.networking.throughput_interfaces = ["enp8s0" "wlp4s0"];
my.home.emacs.enable = true;
my.theme = config.home-manager.users.alarsyo.my.themes.solarizedLight;
home.packages = builtins.attrValues {
inherit (pkgs)
inherit
(pkgs)
# some websites only work there :(
chromium
# dev
rustup
# keyboard goodness
chrysalis
;
;
inherit (pkgs.packages) spot;
};

View file

@ -1,19 +1,23 @@
{ config, lib, options, ... }:
{
config,
lib,
options,
...
}: {
config.age = {
secrets =
let
toSecret = name: { ... }@attrs: {
secrets = let
toSecret = name: {...} @ attrs:
{
file = ./../../modules/secrets + "/${name}.age";
} // attrs;
in
lib.mapAttrs toSecret {
"restic-backup/boreal-credentials" = {};
"restic-backup/boreal-password" = {};
}
// attrs;
in
lib.mapAttrs toSecret {
"restic-backup/boreal-credentials" = {};
"restic-backup/boreal-password" = {};
"users/alarsyo-hashed-password" = {};
"users/root-hashed-password" = {};
};
"users/alarsyo-hashed-password" = {};
"users/root-hashed-password" = {};
};
};
}

View file

@ -1,31 +1,33 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, lib, pkgs, ... }:
let
secrets = config.my.secrets;
in
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
config,
lib,
pkgs,
...
}: let
secrets = config.my.secrets;
in {
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
./home.nix
./secrets.nix
];
./home.nix
./secrets.nix
];
# Use the GRUB 2 boot loader.
boot.loader.grub.enable = true;
boot.loader.grub.version = 2;
boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only
boot.supportedFilesystems = [ "btrfs" ];
boot.supportedFilesystems = ["btrfs"];
services.btrfs = {
autoScrub = {
enable = true;
fileSystems = [ "/" ];
fileSystems = ["/"];
};
};

View file

@ -1,40 +1,45 @@
# 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, ... }:
let
inherit (lib)
mkDefault
;
in
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
config,
lib,
pkgs,
modulesPath,
...
}: let
inherit
(lib)
mkDefault
;
in {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = ["ahci" "usbhid"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = [];
fileSystems."/" = {
device = "/dev/disk/by-uuid/adcf0158-edfb-402f-82e7-61e4902af989";
fsType = "btrfs";
options = [
"subvol=@nixos"
"compress=zstd"
"noatime"
];
};
boot.initrd.availableKernelModules = [ "ahci" "usbhid" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/ff54b622-0e26-4c6e-aa0c-ac2c1e12699a";
fsType = "ext4";
};
fileSystems."/" =
{ device = "/dev/disk/by-uuid/adcf0158-edfb-402f-82e7-61e4902af989";
fsType = "btrfs";
options = [
"subvol=@nixos"
"compress=zstd"
"noatime"
];
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/ff54b622-0e26-4c6e-aa0c-ac2c1e12699a";
fsType = "ext4";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/381a9c5e-4d71-45b4-ac62-e7414b3768fc"; }
];
swapDevices = [
{device = "/dev/disk/by-uuid/381a9c5e-4d71-45b4-ac62-e7414b3768fc";}
];
powerManagement.cpuFreqGovernor = mkDefault "ondemand";
}

View file

@ -1,7 +1,5 @@
{ config, ... }:
{
{config, ...}: {
home-manager.users.alarsyo = {
my.theme = config.home-manager.users.alarsyo.my.themes.solarizedLight;
};
}

View file

@ -1,36 +1,40 @@
{ config, lib, options, ... }:
{
config,
lib,
options,
...
}: {
config.age = {
secrets =
let
toSecret = name: { ... }@attrs: {
secrets = let
toSecret = name: {...} @ attrs:
{
file = ./../../modules/secrets + "/${name}.age";
} // attrs;
in
lib.mapAttrs toSecret {
"gandi/api-key" = {};
}
// attrs;
in
lib.mapAttrs toSecret {
"gandi/api-key" = {};
"lohr/shared-secret" = {};
"lohr/shared-secret" = {};
"matrix-synapse/secret-config" = {
owner = "matrix-synapse";
};
"miniflux/admin-credentials" = {};
"nextcloud/admin-pass" = {
owner = "nextcloud";
};
"paperless/admin-password" = {};
"paperless/secret-key" = {};
"restic-backup/poseidon-credentials" = {};
"restic-backup/poseidon-password" = {};
"users/alarsyo-hashed-password" = {};
"users/root-hashed-password" = {};
"matrix-synapse/secret-config" = {
owner = "matrix-synapse";
};
"miniflux/admin-credentials" = {};
"nextcloud/admin-pass" = {
owner = "nextcloud";
};
"paperless/admin-password" = {};
"paperless/secret-key" = {};
"restic-backup/poseidon-credentials" = {};
"restic-backup/poseidon-password" = {};
"users/alarsyo-hashed-password" = {};
"users/root-hashed-password" = {};
};
};
}

View file

@ -1,15 +1,18 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, lib, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
./home.nix
./secrets.nix
];
config,
lib,
pkgs,
...
}: {
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
./home.nix
./secrets.nix
];
boot.kernelPackages = pkgs.linuxPackages;
@ -20,7 +23,7 @@
services.btrfs = {
autoScrub = {
enable = true;
fileSystems = [ "/" ];
fileSystems = ["/"];
};
};
@ -86,9 +89,9 @@
};
my.gui.enable = true;
environment.systemPackages = [ pkgs.arandr pkgs.chrysalis ];
environment.systemPackages = [pkgs.arandr pkgs.chrysalis];
services.udev.packages = [ pkgs.packages.kaleidoscope-udev-rules ];
services.udev.packages = [pkgs.packages.kaleidoscope-udev-rules];
hardware.bluetooth = {
enable = true;

View file

@ -1,49 +1,54 @@
# 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, ... }:
let
inherit (lib)
mkDefault
;
in
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
config,
lib,
pkgs,
modulesPath,
...
}: let
inherit
(lib)
mkDefault
;
in {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = [];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/6395cef1-c30b-450a-917c-cfb3c0380642";
fsType = "btrfs";
options = [ "subvol=@" "compress=zstd" "noatime" ];
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/6395cef1-c30b-450a-917c-cfb3c0380642";
fsType = "btrfs";
options = ["subvol=@" "compress=zstd" "noatime"];
};
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/c59e7067-e33c-474c-9b8e-96d0e8f59297";
fileSystems."/home" =
{ device = "/dev/disk/by-uuid/6395cef1-c30b-450a-917c-cfb3c0380642";
fsType = "btrfs";
options = [ "subvol=@home" "compress=zstd" "noatime" ];
neededForBoot = true; # agenix needs my key for some root secrets
};
fileSystems."/home" = {
device = "/dev/disk/by-uuid/6395cef1-c30b-450a-917c-cfb3c0380642";
fsType = "btrfs";
options = ["subvol=@home" "compress=zstd" "noatime"];
neededForBoot = true; # agenix needs my key for some root secrets
};
fileSystems."/nix" =
{ device = "/dev/disk/by-uuid/6395cef1-c30b-450a-917c-cfb3c0380642";
fsType = "btrfs";
options = [ "subvol=@nix" "compress=zstd" "noatime" ];
};
fileSystems."/nix" = {
device = "/dev/disk/by-uuid/6395cef1-c30b-450a-917c-cfb3c0380642";
fsType = "btrfs";
options = ["subvol=@nix" "compress=zstd" "noatime"];
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/D9DA-F46C";
fsType = "vfat";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/D9DA-F46C";
fsType = "vfat";
};
swapDevices = [ ];
swapDevices = [];
powerManagement.cpuFreqGovernor = mkDefault "powersave";

View file

@ -1,5 +1,8 @@
{ config, pkgs, ... }:
{
config,
pkgs,
...
}: {
home-manager.users.alarsyo = {
my.home.laptop.enable = true;
@ -7,25 +10,26 @@
my.home.x.enable = true;
my.home.x.i3bar.temperature.chip = "coretemp-isa-*";
my.home.x.i3bar.temperature.inputs = ["Core 0" "Core 1" "Core 2" "Core 3"];
my.home.x.i3bar.networking.throughput_interfaces = [ "enp0s31f6" "wlp0s20f3" "enp43s0u1u1" ];
my.home.x.i3bar.networking.throughput_interfaces = ["enp0s31f6" "wlp0s20f3" "enp43s0u1u1"];
my.home.emacs.enable = true;
my.theme = config.home-manager.users.alarsyo.my.themes.solarizedLight;
home.packages = builtins.attrValues {
inherit (pkgs)
# some websites only work there :(
chromium
darktable
# dev
rustup
inherit
(pkgs)
# some websites only work there :(
chromium
darktable
# dev
rustup
;
inherit (pkgs.packages) spot;
inherit (pkgs.packages) spot;
inherit (pkgs.wineWowPackages) stable;
inherit (pkgs.wineWowPackages) stable;
};
};
}

View file

@ -1,19 +1,23 @@
{ config, lib, options, ... }:
{
config,
lib,
options,
...
}: {
config.age = {
secrets =
let
toSecret = name: { ... }@attrs: {
secrets = let
toSecret = name: {...} @ attrs:
{
file = ./../../modules/secrets + "/${name}.age";
} // attrs;
in
lib.mapAttrs toSecret {
"restic-backup/zephyrus-credentials" = {};
"restic-backup/zephyrus-password" = {};
}
// attrs;
in
lib.mapAttrs toSecret {
"restic-backup/zephyrus-credentials" = {};
"restic-backup/zephyrus-password" = {};
"users/alarsyo-hashed-password" = {};
"users/root-hashed-password" = {};
};
"users/alarsyo-hashed-password" = {};
"users/root-hashed-password" = {};
};
};
}