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,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" = {};
};
};
}