chore: autoformat

This commit is contained in:
Laureηt 2022-12-21 20:29:15 +01:00
parent cc2270d875
commit 5d9a5ceaf5
Signed by: Laurent
SSH key fingerprint: SHA256:kZEpW8cMJ54PDeCvOhzreNr4FSh6R13CMGH/POoO8DI
5 changed files with 67 additions and 77 deletions

View file

@ -7,14 +7,14 @@
webcord.url = "github:fufexan/webcord-flake"; webcord.url = "github:fufexan/webcord-flake";
}; };
outputs = { nixpkgs, webcord, home-manager, ... } @ inputs : { outputs = { nixpkgs, webcord, home-manager, ... }@inputs: {
# colmena # colmena
colmena = { colmena = {
meta = { meta = {
nixpkgs = import nixpkgs { nixpkgs = import nixpkgs {
system = "x86_64-linux"; system = "x86_64-linux";
overlays = []; overlays = [ ];
}; };
}; };

View file

@ -1,17 +1,17 @@
{modulesPath, pkgs, lib, name, config, ... }: { modulesPath, pkgs, lib, name, config, ... }:
{ {
imports = lib.optional (builtins.pathExists ./do-userdata.nix) ./do-userdata.nix ++ [ imports =
(modulesPath + "/virtualisation/digital-ocean-config.nix") lib.optional (builtins.pathExists ./do-userdata.nix) ./do-userdata.nix
]; ++ [ (modulesPath + "/virtualisation/digital-ocean-config.nix") ];
networking = { networking = {
hostName = name; hostName = name;
domain = "fainsin.bzh"; domain = "fainsin.bzh";
firewall.allowedTCPPorts = [ firewall.allowedTCPPorts = [
22 # ssh 22 # ssh
80 # http 80 # http
443 # https 443 # https
]; ];
}; };
@ -25,9 +25,7 @@
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINTvwXCT99s1EwOCeGQ28jyCAH/RBoLZza9k5I7wWdEu" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINTvwXCT99s1EwOCeGQ28jyCAH/RBoLZza9k5I7wWdEu"
]; ];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [ htop ];
htop
];
services.nginx = { services.nginx = {
enable = true; enable = true;
@ -48,7 +46,8 @@
"fainsin.bzh" = { "fainsin.bzh" = {
enableACME = true; enableACME = true;
forceSSL = true; forceSSL = true;
locations."/".return = "301 \"$scheme://laurent.fainsin.bzh$request_uri\""; locations."/".return =
''301 "$scheme://laurent.fainsin.bzh$request_uri"'';
}; };
"laurent.fainsin.bzh" = { "laurent.fainsin.bzh" = {
enableACME = true; enableACME = true;
@ -57,7 +56,7 @@
}; };
default = { default = {
default = true; default = true;
locations."/".return = "301 \"$scheme://fainsin.bzh\" "; locations."/".return = ''301 "$scheme://fainsin.bzh" '';
}; };
}; };
}; };
@ -77,4 +76,4 @@
# Before changing this value read the documentation for this option # Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "22.11"; # Did you read the comment? system.stateVersion = "22.11"; # Did you read the comment?
} }

View file

@ -1,18 +1,16 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
let let
catppuccin-alacritty = pkgs.fetchFromGitHub { catppuccin-alacritty = pkgs.fetchFromGitHub {
owner = "catppuccin"; owner = "catppuccin";
repo = "alacritty"; repo = "alacritty";
rev = "3c808cbb4f9c87be43ba5241bc57373c793d2f17"; rev = "3c808cbb4f9c87be43ba5241bc57373c793d2f17";
sha256 = "w9XVtEe7TqzxxGUCDUR9BFkzLZjG8XrplXJ3lX6f+x0="; sha256 = "w9XVtEe7TqzxxGUCDUR9BFkzLZjG8XrplXJ3lX6f+x0=";
}; };
in
{ in {
imports = [ imports = [ ./hardware-configuration.nix ];
./hardware-configuration.nix
];
# networking # networking
networking.hostName = "neodymium"; networking.hostName = "neodymium";
@ -34,9 +32,7 @@ in
# internationalisation # internationalisation
time.timeZone = "Europe/Paris"; time.timeZone = "Europe/Paris";
i18n.defaultLocale = "en_DK.UTF-8"; i18n.defaultLocale = "en_DK.UTF-8";
console = { console.keyMap = "fr";
keyMap = "fr";
};
# fonts # fonts
fonts.fonts = with pkgs; [ fonts.fonts = with pkgs; [
@ -60,10 +56,7 @@ in
xdg.portal = { xdg.portal = {
enable = true; enable = true;
wlr.enable = true; wlr.enable = true;
extraPortals = [ extraPortals = [ pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-wlr ];
pkgs.xdg-desktop-portal-gtk
pkgs.xdg-desktop-portal-wlr
];
}; };
programs.light.enable = true; programs.light.enable = true;
@ -175,7 +168,7 @@ in
} }
{ {
name = "powerlevel10k-config"; name = "powerlevel10k-config";
src = lib.cleanSource ./. ; src = lib.cleanSource ./.;
file = ".p10k.zsh"; file = ".p10k.zsh";
} }
{ {
@ -197,7 +190,8 @@ in
userEmail = "laurent@fainsin.bzh"; userEmail = "laurent@fainsin.bzh";
signing = { signing = {
signByDefault = true; signByDefault = true;
key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINTvwXCT99s1EwOCeGQ28jyCAH/RBoLZza9k5I7wWdEu laurent@neodymium"; key =
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINTvwXCT99s1EwOCeGQ28jyCAH/RBoLZza9k5I7wWdEu laurent@neodymium";
}; };
}; };
@ -254,30 +248,20 @@ in
mode = "1920x1080"; mode = "1920x1080";
adaptive_sync = "on"; adaptive_sync = "on";
}; };
DP-1 = { DP-1 = { disable = ""; };
disable = "";
};
}; };
fonts = { fonts = {
names = [ "FiraCode" ]; names = [ "FiraCode" ];
size = 10.0; size = 10.0;
}; };
bars = [ bars = [{ command = "${pkgs.waybar}/bin/waybar"; }];
{ command = "${pkgs.waybar}/bin/waybar"; }
];
gaps = { gaps = {
smartGaps = true; smartGaps = true;
inner = 5; inner = 5;
}; };
window = { window = { border = 0; };
border = 0; floating = { border = 0; };
}; focus = { followMouse = "no"; };
floating = {
border = 0;
};
focus = {
followMouse = "no";
};
startup = [ startup = [
{ command = "element-desktop"; } { command = "element-desktop"; }
{ command = "thunderbird"; } { command = "thunderbird"; }
@ -305,7 +289,8 @@ in
# Reload the configuration file # Reload the configuration file
"${modifier}+twosuperior" = "reload"; "${modifier}+twosuperior" = "reload";
# Exit sway (logs you out of your Wayland session) # Exit sway (logs you out of your Wayland session)
"${modifier}+Shift+e" = "exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'"; "${modifier}+Shift+e" =
"exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'";
# Lock # Lock
"${modifier}+Delete" = "exec swaylock -f"; "${modifier}+Delete" = "exec swaylock -f";
@ -314,9 +299,11 @@ in
# Screenshot whole screen to clipboard # Screenshot whole screen to clipboard
"Shift+Print" = "exec grim - | wl-copy -t 'image/png'"; "Shift+Print" = "exec grim - | wl-copy -t 'image/png'";
# Screenshot area # Screenshot area
"${modifier}+Print" = "exec grim -g '$(slurp -d)' `date +'%Y-%m-%dT%H:%M:%S'`.png"; "${modifier}+Print" =
"exec grim -g '$(slurp -d)' `date +'%Y-%m-%dT%H:%M:%S'`.png";
# Screenshot area to clipboard # Screenshot area to clipboard
"${modifier}+Shift+Print" = "exec grim -g '$(slurp -d)' - | wl-copy -t 'image/png'"; "${modifier}+Shift+Print" =
"exec grim -g '$(slurp -d)' - | wl-copy -t 'image/png'";
# backlight # backlight
"XF86MonBrightnessUp" = "exec light -A 5"; "XF86MonBrightnessUp" = "exec light -A 5";
@ -380,26 +367,34 @@ in
"${modifier}+KP_Insert" = "workspace 20"; "${modifier}+KP_Insert" = "workspace 20";
# Move focused container to workspace # Move focused container to workspace
"${modifier}+Shift+ampersand" = "move container to workspace number 1"; "${modifier}+Shift+ampersand" =
"move container to workspace number 1";
"${modifier}+Shift+eacute" = "move container to workspace number 2"; "${modifier}+Shift+eacute" = "move container to workspace number 2";
"${modifier}+Shift+quotedbl" = "move container to workspace number 3"; "${modifier}+Shift+quotedbl" = "move container to workspace number 3";
"${modifier}+Shift+apostrophe" = "move container to workspace number 4"; "${modifier}+Shift+apostrophe" =
"${modifier}+Shift+parenleft" = "move container to workspace number 5"; "move container to workspace number 4";
"${modifier}+Shift+parenleft" =
"move container to workspace number 5";
"${modifier}+Shift+minus" = "move container to workspace number 6"; "${modifier}+Shift+minus" = "move container to workspace number 6";
"${modifier}+Shift+egrave" = "move container to workspace number 7"; "${modifier}+Shift+egrave" = "move container to workspace number 7";
"${modifier}+Shift+underscore" = "move container to workspace number 8"; "${modifier}+Shift+underscore" =
"move container to workspace number 8";
"${modifier}+Shift+ccedilla" = "move container to workspace number 9"; "${modifier}+Shift+ccedilla" = "move container to workspace number 9";
"${modifier}+Shift+agrave" = "move container to workspace number 10"; "${modifier}+Shift+agrave" = "move container to workspace number 10";
"${modifier}+Shift+KP_End" = "move container to workspace number 11"; "${modifier}+Shift+KP_End" = "move container to workspace number 11";
"${modifier}+Shift+KP_Down" = "move container to workspace number 12"; "${modifier}+Shift+KP_Down" = "move container to workspace number 12";
"${modifier}+Shift+KP_Next" = "move container to workspace number 13"; "${modifier}+Shift+KP_Next" = "move container to workspace number 13";
"${modifier}+Shift+KP_Left" = "move container to workspace number 14"; "${modifier}+Shift+KP_Left" = "move container to workspace number 14";
"${modifier}+Shift+KP_Begin" = "move container to workspace number 15"; "${modifier}+Shift+KP_Begin" =
"${modifier}+Shift+KP_Right" = "move container to workspace number 16"; "move container to workspace number 15";
"${modifier}+Shift+KP_Right" =
"move container to workspace number 16";
"${modifier}+Shift+KP_Home" = "move container to workspace number 17"; "${modifier}+Shift+KP_Home" = "move container to workspace number 17";
"${modifier}+Shift+KP_Up" = "move container to workspace number 18"; "${modifier}+Shift+KP_Up" = "move container to workspace number 18";
"${modifier}+Shift+KP_Prior" = "move container to workspace number 19"; "${modifier}+Shift+KP_Prior" =
"${modifier}+Shift+KP_Insert" = "move container to workspace number 20"; "move container to workspace number 19";
"${modifier}+Shift+KP_Insert" =
"move container to workspace number 20";
}; };
workspaceOutputAssign = [ workspaceOutputAssign = [
{ {

View file

@ -4,27 +4,27 @@
{ config, lib, pkgs, modulesPath, ... }: { config, lib, pkgs, modulesPath, ... }:
{ {
imports = imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; boot.initrd.availableKernelModules =
[ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ]; boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/b0ea5f1f-104f-4026-840a-4d46f3e827d1"; device = "/dev/disk/by-uuid/b0ea5f1f-104f-4026-840a-4d46f3e827d1";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=nixos" ]; options = [ "subvol=nixos" ];
}; };
boot.initrd.luks.devices."nixenc".device = "/dev/disk/by-uuid/93d0b0d8-b586-48cf-acc2-025fba1eaadb"; boot.initrd.luks.devices."nixenc".device =
"/dev/disk/by-uuid/93d0b0d8-b586-48cf-acc2-025fba1eaadb";
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/6D10-BBAF"; device = "/dev/disk/by-uuid/6D10-BBAF";
fsType = "vfat"; fsType = "vfat";
}; };
swapDevices = [ ]; swapDevices = [ ];
@ -37,5 +37,6 @@
# networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true; # networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.amd.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
} }

View file

@ -1,9 +1,4 @@
{ pkgs ? import <nixpkgs> { } }: { pkgs ? import <nixpkgs> { } }:
with pkgs; with pkgs;
mkShell { mkShell { buildInputs = [ colmena nixfmt ]; }
buildInputs = [
colmena
nixfmt
];
}