style : nixfmt

This commit is contained in:
Florian Schmitt 2024-09-05 15:39:17 +03:00
parent 0b59cc1453
commit 6d9ae3ec72
9 changed files with 588 additions and 485 deletions

View file

@ -1,4 +1,3 @@
# 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).
@ -14,7 +13,9 @@
"hid_apple.swap_fn_leftctrl=1"
"hid_apple.iso_layout=0"
];
boot.kernel.sysctl = { "vm.swappiness" = 10;};
boot.kernel.sysctl = {
"vm.swappiness" = 10;
};
# Bootloader.
boot.loader.systemd-boot.enable = true;
@ -38,7 +39,10 @@
networking.networkmanager.enable = true;
networking.firewall = {
enable = true;
allowedTCPPorts = [ 80 443 ];
allowedTCPPorts = [
80
443
];
};
# Set your time zone.

View file

@ -1,15 +1,27 @@
# 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, ... }:
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports =
[ (modulesPath + "/hardware/network/broadcom-43xx.nix")
imports = [
(modulesPath + "/hardware/network/broadcom-43xx.nix")
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.availableKernelModules = [
"xhci_pci"
"nvme"
"usbhid"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.blacklistedKernelModules = [ ];
@ -17,39 +29,51 @@
#rtl8192eu
];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/d56411cf-7072-48a8-aab7-70fb73695e64";
fileSystems."/" = {
device = "/dev/disk/by-uuid/d56411cf-7072-48a8-aab7-70fb73695e64";
fsType = "ext4";
};
fileSystems."/boot/efi" =
{ device = "/dev/disk/by-uuid/37E1-D07F";
fileSystems."/boot/efi" = {
device = "/dev/disk/by-uuid/37E1-D07F";
fsType = "vfat";
};
fileSystems."/mnt/nas/music" =
{
fileSystems."/mnt/nas/music" = {
device = "192.168.1.2:/volume1/music";
options = [ "nfsvers=4.2" "x-systemd.automount" "noauto" "rw" "relatime" "user" "acl" "defaults"];
options = [
"nfsvers=4.2"
"x-systemd.automount"
"noauto"
"rw"
"relatime"
"user"
"acl"
"defaults"
];
fsType = "nfs";
};
services.rpcbind.enable = true; # needed for NFS
systemd.mounts = [{
systemd.mounts = [
{
type = "nfs";
mountConfig = {
Options = "defaults,acl,user,noauto,relatime,rw";
};
what = "192.168.1.2:/volume1/music";
where = "/mnt/nas/music";
}];
}
];
systemd.automounts = [{
systemd.automounts = [
{
wantedBy = [ "multi-user.target" ];
automountConfig = {
TimeoutIdleSec = "600";
};
where = "/mnt/nas/music";
}];
}
];
swapDevices = [ ];

View file

@ -1,8 +1,9 @@
# cli programs should be available on servers and desktop
{ config, pkgs, ... }:
let
unstable = import
(builtins.fetchTarball https://github.com/nixos/nixpkgs/tarball/7afa2c97ebb0585d00c64c112344483e89e00545)
unstable =
import
(builtins.fetchTarball "https://github.com/nixos/nixpkgs/tarball/7afa2c97ebb0585d00c64c112344483e89e00545")
# reuse the current configuration
{ config = config.nixpkgs.config; };
in

View file

@ -96,7 +96,9 @@
(callPackage ./sddm-rose-pine.nix { })
(vscode-with-extensions.override {
vscode = vscodium;
vscodeExtensions = with vscode-extensions; [
vscodeExtensions =
with vscode-extensions;
[
#bmewburn.vscode-intelephense-client
#dracula-theme.theme-dracula
mvllow.rose-pine
@ -117,8 +119,7 @@
version = "0.9.2";
sha256 = "113w2iis4zi4z3sqc3vd2apyrh52hbh2gvmxjr5yvjpmrsksclbd";
}
]
;
];
})
(chromium.override {
enableWideVine = true; # DRM support

View file

@ -1,5 +1,10 @@
# Inject the right home-manager config for the machine.
{ config, pkgs, lib, ... }:
{
config,
pkgs,
lib,
...
}:
let
plasma-manager = pkgs.fetchFromGitHub {
owner = "pjones";
@ -15,12 +20,11 @@ let
${pkgs.swww}/bin/swww img /home/mrflos/Nextcloud/Images/Wallpapers/chihiro014.jpg &
'';
in {
in
{
# TODO can we automate the installation of home-manager ?
# sudo nix-channel --add https://github.com/nix-community/home-manager/archive/release-24.05.tar.gz home-manager
imports = [
<home-manager/nixos>
];
imports = [ <home-manager/nixos> ];
# Let Home Manager install and manage itself.
#programs.home-manager.enable = true;
@ -29,14 +33,23 @@ in {
isNormalUser = true;
description = "mrflos";
createHome = true;
extraGroups = ["users" "docker" "libvirtd" "lxd" "networkmanager" "wheel" ];
extraGroups = [
"users"
"docker"
"libvirtd"
"lxd"
"networkmanager"
"wheel"
];
uid = 1000;
shell = pkgs.zsh;
};
nix.settings.trusted-users = [ "mrflos" ];
home-manager.backupFileExtension = "backup";
home-manager.users.mrflos = { pkgs, ... }: {
home-manager.users.mrflos =
{ pkgs, ... }:
{
home.stateVersion = "23.05";
home.packages = with pkgs; [
gcc
@ -93,7 +106,9 @@ in {
address = "mrflos@chmok.net";
primary = true;
thunderbird = { enable = true; };
thunderbird = {
enable = true;
};
imap = {
host = "mail.infomaniak.com";
port = 993;
@ -109,7 +124,9 @@ in {
userName = "mrflos@yeswiki.pro";
address = "mrflos@yeswiki.pro";
thunderbird = { enable = true; };
thunderbird = {
enable = true;
};
imap = {
host = "mail.infomaniak.com";
port = 993;
@ -126,7 +143,9 @@ in {
address = "mrflos@mrflos.pw";
primary = false;
thunderbird = { enable = true; };
thunderbird = {
enable = true;
};
imap = {
host = "mrflos.pw";
port = 993;
@ -146,7 +165,9 @@ in {
address = "contact@yeswiki.pro";
primary = false;
thunderbird = { enable = true; };
thunderbird = {
enable = true;
};
imap = {
host = "mail.infomaniak.com";
port = 993;
@ -163,7 +184,9 @@ in {
address = "contact@yeswiki.net";
primary = false;
thunderbird = { enable = true; };
thunderbird = {
enable = true;
};
imap = {
host = "mail.infomaniak.com";
port = 993;
@ -241,7 +264,10 @@ in {
zstyle :omz:plugins:ssh-agent agent-forwarding yes
zstyle :omz:plugins:ssh-agent lazy yes
'';
plugins = [ "git" "ssh-agent" ];
plugins = [
"git"
"ssh-agent"
];
# theme = "robbyrussell";
};
};
@ -259,7 +285,8 @@ in {
"$file" = "dolphin";
"$browser" = "firefox";
bind = [
bind =
[
", Print, exec, grimblast copy area"
# Window/Session actions
"$mod, Q, killactive"
@ -285,7 +312,6 @@ in {
"$mod, down, movefocus, d"
"ALT, Tab, movefocus, d"
# Switch workspaces relative to the active workspace with mainMod + CTRL + [←→]
"$mod CTRL, right, workspace, r+1"
"$mod CTRL, left, workspace, r-1"
@ -317,19 +343,23 @@ in {
++ (
# workspaces
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
builtins.concatLists (builtins.genList (
x: let
ws = let
builtins.concatLists (
builtins.genList (
x:
let
ws =
let
c = (x + 1) / 10;
in
builtins.toString (x + 1 - (c * 10));
in [
in
[
"$mod, ${ws}, workspace, ${toString (x + 1)}"
"$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}"
"$mod ALT, ${ws}, movetoworkspacesilent, ${toString (x + 1)}" # Move window silently to workspace Super + Alt + [0-9]
]
) 10
)
10)
);
# Move/Resize windows with mainMod + LMB/RMB and dragging

View file

@ -45,21 +45,35 @@
"kaccess"."Toggle Screen Reader On and Off" = "Meta+Alt+S";
"kcm_touchpad"."Disable Touchpad" = "Touchpad Off";
"kcm_touchpad"."Enable Touchpad" = "Touchpad On";
"kcm_touchpad"."Toggle Touchpad" = ["Touchpad Toggle,Touchpad Toggle" "Meta+Ctrl+Zenkaku Hankaku"];
"kcm_touchpad"."Toggle Touchpad" = [
"Touchpad Toggle,Touchpad Toggle"
"Meta+Ctrl+Zenkaku Hankaku"
];
"kded5"."Show System Activity" = "Ctrl+Esc";
"kded5"."display" = ["Display" "Meta+P,Display" "Meta+P,Changer d'affichage"];
"kded5"."display" = [
"Display"
"Meta+P,Display"
"Meta+P,Changer d'affichage"
];
"khotkeys"."{d03619b6-9b3c-48cc-9d9c-a2aadb485550}" = [ ];
"kitty.desktop"."_launch" = "Meta+T,none";
"kmix"."decrease_microphone_volume" = "Microphone Volume Down";
"kmix"."decrease_volume" = "Volume Down";
"kmix"."increase_microphone_volume" = "Microphone Volume Up";
"kmix"."increase_volume" = "Volume Up";
"kmix"."mic_mute" = ["Microphone Mute" "Meta+Volume Mute,Microphone Mute" "Meta+Volume Mute,Couper le son du microphone"];
"kmix"."mic_mute" = [
"Microphone Mute"
"Meta+Volume Mute,Microphone Mute"
"Meta+Volume Mute,Couper le son du microphone"
];
"kmix"."mute" = "Volume Mute";
"konversation"."next_active_tab" = [ ];
"konversation"."toggle_mainwindow_visibility" = [ ];
"ksmserver"."Halt Without Confirmation" = "none,,Éteindre sans confirmation";
"ksmserver"."Lock Session" = ["Screensaver,Meta+L" "Screensaver,Verrouiller la session"];
"ksmserver"."Lock Session" = [
"Screensaver,Meta+L"
"Screensaver,Verrouiller la session"
];
"ksmserver"."Log Out" = "Ctrl+Alt+Del";
"ksmserver"."Log Out Without Confirmation" = "none,,Déconnexion sans confirmation";
"ksmserver"."Reboot Without Confirmation" = "none,,Redémarrer sans confirmation";
@ -67,7 +81,11 @@
"kwin"."Decrease Opacity" = "none,,Diminuer l'opacité de la fenêtre active de 5 %";
"kwin"."Edit Tiles" = "none,Meta+T,Basculer ou sortir de l'éditeur de recouvrement";
"kwin"."Expose" = "Ctrl+F9";
"kwin"."ExposeAll" = ["Ctrl+F10" "Launch (C),Ctrl+F10" "Launch (C),Activer / désactiver la présentation des fenêtres (tous les bureaux)"];
"kwin"."ExposeAll" = [
"Ctrl+F10"
"Launch (C),Ctrl+F10"
"Launch (C),Activer / désactiver la présentation des fenêtres (tous les bureaux)"
];
"kwin"."ExposeClass" = "Ctrl+F7";
"kwin"."ExposeClassCurrentDesktop" = [ ];
"kwin"."Grid-Tiling: Close Desktop" = [ ];
@ -198,7 +216,10 @@
"kwin"."Walk Through Windows of Current Application Alternative (Reverse)" = "none,,Naviguer parmi les fenêtres de l'application alternative courante (en ordre inverse)";
"kwin"."Window Above Other Windows" = "none,,Conserver une fenêtre au-dessus des autres";
"kwin"."Window Below Other Windows" = "none,,Conserver une fenêtre au-dessous des autres";
"kwin"."Window Close" = ["Alt+F4" "Meta+Q,Alt+F4,Fermer une fenêtre"];
"kwin"."Window Close" = [
"Alt+F4"
"Meta+Q,Alt+F4,Fermer une fenêtre"
];
"kwin"."Window Fullscreen" = "none,,Mettre une fenêtre en plein écran";
"kwin"."Window Grow Horizontal" = "none,,Maximiser horizontalement une fenêtre";
"kwin"."Window Grow Vertical" = "none,,Maximiser verticalement une fenêtre";
@ -206,7 +227,10 @@
"kwin"."Window Maximize" = "Meta+PgUp";
"kwin"."Window Maximize Horizontal" = "none,,Maximiser horizontalement une fenêtre";
"kwin"."Window Maximize Vertical" = "none,,Maximiser verticalement une fenêtre";
"kwin"."Window Minimize" = ["Meta+PgDown" "Meta+M,Meta+PgDown,Réduire une fenêtre"];
"kwin"."Window Minimize" = [
"Meta+PgDown"
"Meta+M,Meta+PgDown,Réduire une fenêtre"
];
"kwin"."Window Move" = "none,,Déplacer une fenêtre";
"kwin"."Window Move Center" = "none,,Déplacer la fenêtre au centre";
"kwin"."Window No Border" = "none,,Afficher / Masquer la barre de titre et la bordure";
@ -270,7 +294,11 @@
"kwin"."Window to Screen 6" = "none,,Envoyer la fenêtre sur l'écran 6";
"kwin"."Window to Screen 7" = "none,,Envoyer la fenêtre sur l'écran 7";
"kwin"."view_actual_size" = "Meta+0";
"kwin"."view_zoom_in" = ["Meta++" "Meta+=,Meta++" "Meta+=,Zoom avant"];
"kwin"."view_zoom_in" = [
"Meta++"
"Meta+=,Meta++"
"Meta+=,Zoom avant"
];
"kwin"."view_zoom_out" = "Meta+-";
"lattedock"."activate entry 1" = "none,Meta+1,Activer l'entrée 1";
"lattedock"."activate entry 10" = "none,Meta+0,Activer l'entrée 10";
@ -326,8 +354,15 @@
"org.kde.konsole.desktop"."NewWindow" = [ ];
"org.kde.konsole.desktop"."_launch" = "Ctrl+Alt+T,none";
"org.kde.krunner.desktop"."RunClipboard" = "Alt+Shift+F2,none";
"org.kde.krunner.desktop"."_launch" = ["Alt+Space" "Alt+F2" "Search,none"];
"org.kde.plasma.emojier.desktop"."_launch" = ["Meta+." "Meta+Ctrl+Alt+Shift+Space,none"];
"org.kde.krunner.desktop"."_launch" = [
"Alt+Space"
"Alt+F2"
"Search,none"
];
"org.kde.plasma.emojier.desktop"."_launch" = [
"Meta+."
"Meta+Ctrl+Alt+Shift+Space,none"
];
"org.kde.spectacle.desktop"."ActiveWindowScreenShot" = "Meta+Print,none";
"org.kde.spectacle.desktop"."CurrentMonitorScreenShot" = [ ];
"org.kde.spectacle.desktop"."FullScreenScreenShot" = "Shift+Print,none";
@ -1090,7 +1125,7 @@
"kwinrc"."Tiling/ed6da6d2-dc03-5e69-aae5-b2fee83fe2cd"."tiles" = "{\"layoutDirection\":\"horizontal\",\"tiles\":[{\"width\":0.25},{\"width\":0.5},{\"width\":0.25}]}";
"kwinrc"."Windows"."AutoRaise" = true;
"kwinrc"."Windows"."AutoRaiseInterval" = 300;
"kwinrc"."Windows"."ElectricBorderCornerRatio" = 0.01;
"kwinrc"."Windows"."ElectricBorderCornerRatio" = 1.0e-2;
"kwinrc"."Windows"."Placement" = "Maximizing";
"kwinrc"."Windows"."RollOverDesktops" = true;
"kwinrc"."Xwayland"."Scale" = 1.75;

View file

@ -1,5 +1,11 @@
# Local developpement
{ pkgs, config, lib, ... }: {
{
pkgs,
config,
lib,
...
}:
{
virtualisation = {
docker.enable = true;
#docker.rootless = {
@ -17,8 +23,10 @@
${pkgs.systemd}/bin/systemctl start mysql
# etc
'';
serviceConfig = let
startstop = command:
serviceConfig =
let
startstop =
command:
(pkgs.writeShellApplication {
name = "yeswikidev";
runtimeInputs = with pkgs; [ systemd ];
@ -42,6 +50,7 @@
# '';
#})) commands;
in
#execs = {
# ExecStart = "start";
# ExecStop = "stop";
@ -50,7 +59,7 @@
# https://nixos.org/manual/nix/stable/language/builtins#builtins-mapAttrs
#execAttrs = attrNames execs; # ["Start" "Stop"];
#execs2 = mapAttrs (k: v: ()) execs;
in {
{
# pkgs.writeScript, pkgs.writeScriptBin
#ExecStart = startstop "start";
#ExecStop = startstop "stop";
@ -70,10 +79,12 @@
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs;
environment.systemPackages =
with pkgs;
let
php83 = pkgs.php83.buildEnv { extraConfig = "memory_limit = 2G"; };
in [
in
[
#clang
dart-sass
dbeaver-bin

View file

@ -14,7 +14,5 @@
};
# TODO : find what is installing this, probably obsidian?
nixpkgs.config.permittedInsecurePackages = [
"electron-25.9.0"
];
nixpkgs.config.permittedInsecurePackages = [ "electron-25.9.0" ];
}

View file

@ -1,6 +1,7 @@
{ stdenvNoCC
, fetchFromGitHub
, libsForQt5
{
stdenvNoCC,
fetchFromGitHub,
libsForQt5,
}:
stdenvNoCC.mkDerivation rec {
@ -8,9 +9,7 @@ stdenvNoCC.mkDerivation rec {
version = "1.2";
dontBuild = true;
propagatedUserEnvPkgs = [
libsForQt5.qt5.qtgraphicaleffects
];
propagatedUserEnvPkgs = [ libsForQt5.qt5.qtgraphicaleffects ];
src = fetchFromGitHub {
owner = "lwndhrst";