chore: reindent + install pi.dev

This commit is contained in:
Pierre Martin
2026-08-03 10:57:45 +02:00
parent afd74551fc
commit 047ff192f5
8 changed files with 231 additions and 165 deletions

View File

@@ -6,7 +6,8 @@
# Temporary overlays for patches # Temporary overlays for patches
nixpkgs.overlays = [ ]; nixpkgs.overlays = [ ];
home.file.".docker/cli-plugins/docker-buildx".source = "${pkgs.docker-buildx}/libexec/docker/cli-plugins/docker-buildx"; home.file.".docker/cli-plugins/docker-buildx".source =
"${pkgs.docker-buildx}/libexec/docker/cli-plugins/docker-buildx";
home.file.".config/traefik/traefik.toml".source = ./files/traefik.toml; home.file.".config/traefik/traefik.toml".source = ./files/traefik.toml;
home.file.".npmrc".source = ./files/.npmrc; home.file.".npmrc".source = ./files/.npmrc;
@@ -25,6 +26,7 @@
./programs/git.nix ./programs/git.nix
./programs/i3.nix ./programs/i3.nix
./programs/pi.nix
./programs/zsh.nix ./programs/zsh.nix
]; ];
@@ -33,17 +35,26 @@
programs.vscode = { programs.vscode = {
enable = true; enable = true;
package = pkgs.vscode.fhs; package = pkgs.vscode.fhs;
profiles = { default = { extensions = [ ]; }; }; profiles = {
default = {
extensions = [ ];
};
};
}; };
programs.rofi = { programs.rofi = {
enable = true; enable = true;
plugins = [ pkgs.rofi-calc pkgs.rofi-emoji ]; plugins = [
pkgs.rofi-calc
pkgs.rofi-emoji
];
terminal = "sakura"; terminal = "sakura";
}; };
programs.autorandr = { programs.autorandr = {
enable = true; enable = true;
hooks = { hooks = {
postswitch = { "notify-i3" = "${pkgs.i3}/bin/i3-msg restart"; }; postswitch = {
"notify-i3" = "${pkgs.i3}/bin/i3-msg restart";
};
}; };
}; };
@@ -65,8 +76,7 @@
# Tout ajout home-manager génère un drop-in conflictuel (double ExecStart=). # Tout ajout home-manager génère un drop-in conflictuel (double ExecStart=).
services.dunst.enable = true; # notification daemon services.dunst.enable = true; # notification daemon
services.udiskie.enable = services.udiskie.enable = true; # require "services.udisks2.enable = true" in system configuration
true; # require "services.udisks2.enable = true" in system configuration
# Workaround for Failed to restart syncthingtray.service: Unit tray.target not found. # Workaround for Failed to restart syncthingtray.service: Unit tray.target not found.
# - https://github.com/nix-community/home-manager/issues/2064 # - https://github.com/nix-community/home-manager/issues/2064

View File

@@ -59,9 +59,15 @@
variant = "bepo"; variant = "bepo";
}; };
windowManager = { i3 = { enable = true; }; }; windowManager = {
i3 = {
enable = true;
};
};
};
services.displayManager = {
defaultSession = "none+i3";
}; };
services.displayManager = { defaultSession = "none+i3"; };
# Configure console keymap # Configure console keymap
console.keyMap = "fr"; console.keyMap = "fr";
@@ -70,8 +76,14 @@
users.users.pierre = { users.users.pierre = {
isNormalUser = true; isNormalUser = true;
description = "Pierre"; description = "Pierre";
extraGroups = extraGroups = [
[ "networkmanager" "wheel" "audio" "docker" "video" "lpadmin" ]; "networkmanager"
"wheel"
"audio"
"docker"
"video"
"lpadmin"
];
shell = pkgs.zsh; shell = pkgs.zsh;
packages = with pkgs; [ ]; packages = with pkgs; [ ];
}; };
@@ -103,14 +115,16 @@
# enable = true; # enable = true;
# enableSSHSupport = true; # enableSSHSupport = true;
# }; # };
programs.zsh.enable = programs.zsh.enable = true; # see https://github.com/NixOS/nixpkgs/issues/20548#issuecomment-261965667
true; # see https://github.com/NixOS/nixpkgs/issues/20548#issuecomment-261965667
hardware.acpilight.enable = true; hardware.acpilight.enable = true;
hardware.i2c.enable = true; hardware.i2c.enable = true;
programs.nix-ld = { programs.nix-ld = {
enable = true; enable = true;
libraries = with pkgs; [ fnm stdenv.cc.cc.lib ]; libraries = with pkgs; [
fnm
stdenv.cc.cc.lib
];
}; };
# Printing # Printing
@@ -139,15 +153,12 @@
services.nscd.enable = true; services.nscd.enable = true;
services.tlp.enable = true; services.tlp.enable = true;
services.upower.enable = true; # keyboard backlight services.upower.enable = true; # keyboard backlight
services.gnome.at-spi2-core.enable = services.gnome.at-spi2-core.enable = true; # see https://github.com/NixOS/nixpkgs/pull/49636/files
true; # see https://github.com/NixOS/nixpkgs/pull/49636/files services.gnome.gnome-keyring.enable = true; # see https://nixos.wiki/wiki/Visual_Studio_Code#Error_after_Sign_On
services.gnome.gnome-keyring.enable =
true; # see https://nixos.wiki/wiki/Visual_Studio_Code#Error_after_Sign_On
services.blueman.enable = true; services.blueman.enable = true;
services.udisks2.enable = true; services.udisks2.enable = true;
services.resolved.enable = true; services.resolved.enable = true;
services.gvfs.enable = services.gvfs.enable = true; # to view MTP devices in file manager - https://www.perplexity.ai/search/how-to-browse-files-from-bus-0-QWBoYG1gRLu3uMRqFSzw9A
true; # to view MTP devices in file manager - https://www.perplexity.ai/search/how-to-browse-files-from-bus-0-QWBoYG1gRLu3uMRqFSzw9A
# Prevent coredump issues with Antigravity - https://www.perplexity.ai/search/systemd-coredump-high-cpu-on-n-LUnRQViaRuiDn1LR06hU8w#2 # Prevent coredump issues with Antigravity - https://www.perplexity.ai/search/systemd-coredump-high-cpu-on-n-LUnRQViaRuiDn1LR06hU8w#2
systemd.coredump = { systemd.coredump = {
@@ -186,7 +197,16 @@
keep-outputs = true keep-outputs = true
keep-derivations = true keep-derivations = true
''; '';
nix.settings.extra-experimental-features = [ "nix-command" "flakes" ]; nix.settings.extra-experimental-features = [
"nix-command"
"flakes"
];
# Cache binaire de https://github.com/lukasl-dev/pi.nix (cf. programs/pi.nix)
nix.settings.extra-substituters = [ "https://pi.cachix.org" ];
nix.settings.extra-trusted-public-keys = [
"pi.cachix.org-1:lGeoGJaZ5ZDabuRzkcD5EBTNnDM4HJ1vqeOxlWk1Flk="
];
# This value determines the NixOS release from which the default # This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions # settings for stateful data, like file locations and database versions

View File

@@ -5,7 +5,13 @@
# Doc: https://wiki.archlinux.org/title/Framework_Laptop # Doc: https://wiki.archlinux.org/title/Framework_Laptop
# #
{ config, lib, pkgs, modulesPath, ... }: {
config,
lib,
pkgs,
modulesPath,
...
}:
{ {
boot.kernelParams = [ boot.kernelParams = [

View File

@@ -1,13 +1,24 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }: {
config,
lib,
pkgs,
modulesPath,
...
}:
{ {
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules = boot.initrd.availableKernelModules = [
[ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" ]; "xhci_pci"
"thunderbolt"
"nvme"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
@@ -22,8 +33,7 @@
fsType = "vfat"; fsType = "vfat";
}; };
swapDevices = swapDevices = [ { device = "/dev/disk/by-uuid/da431bdf-cec4-4928-b44b-e6d2c3419063"; } ];
[{ device = "/dev/disk/by-uuid/da431bdf-cec4-4928-b44b-e6d2c3419063"; }];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's # (the default) this is the recommended approach. When using systemd-networkd it's
@@ -33,6 +43,5 @@
# networking.interfaces.wlp166s0.useDHCP = lib.mkDefault true; # networking.interfaces.wlp166s0.useDHCP = lib.mkDefault true;
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.cpu.intel.updateMicrocode = hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
lib.mkDefault config.hardware.enableRedistributableFirmware;
} }

View File

@@ -15,10 +15,12 @@ in
let let
crab = pkgs.callPackage ./pkgs/crab.nix { }; crab = pkgs.callPackage ./pkgs/crab.nix { };
rtk = pkgs.callPackage ./pkgs/rtk.nix { }; rtk = pkgs.callPackage ./pkgs/rtk.nix { };
in { in
{
nixpkgs.overlays = [ pythonOverlay ]; nixpkgs.overlays = [ pythonOverlay ];
nixpkgs.config.allowUnfreePredicate = pkg: nixpkgs.config.allowUnfreePredicate =
pkg:
builtins.elem (lib.getName pkg) [ builtins.elem (lib.getName pkg) [
"1password" "1password"
"1password-cli" "1password-cli"

View File

@@ -1,4 +1,10 @@
{ rustPlatform, fetchFromGitHub, pkg-config, sqlite, lib }: {
rustPlatform,
fetchFromGitHub,
pkg-config,
sqlite,
lib,
}:
rustPlatform.buildRustPackage { rustPlatform.buildRustPackage {
pname = "rtk"; pname = "rtk";
version = "0.22.2"; version = "0.22.2";

View File

@@ -3,16 +3,18 @@
{ {
home.file.".i3status.conf".source = ../files/.i3status.conf; home.file.".i3status.conf".source = ../files/.i3status.conf;
xsession.windowManager.i3 = let modifier = "Mod4"; xsession.windowManager.i3 =
in { let
modifier = "Mod4";
in
{
enable = true; enable = true;
config = { config = {
assigns = { assigns = {
# https://rycee.gitlab.io/home-manager/options.html#opt-xsession.windowManager.i3.config.assigns # https://rycee.gitlab.io/home-manager/options.html#opt-xsession.windowManager.i3.config.assigns
}; };
focus = { focus = {
mouseWarping = mouseWarping = false; # Whether mouse cursor should be warped to the center of the window when switching focus to a window on a different output.
false; # Whether mouse cursor should be warped to the center of the window when switching focus to a window on a different output.
}; };
modifier = modifier; modifier = modifier;
@@ -63,12 +65,9 @@
# See https://faq.i3wm.org/question/3747/enabling-multimedia-keys.1.html # See https://faq.i3wm.org/question/3747/enabling-multimedia-keys.1.html
# Pulse Audio controls # Pulse Audio controls
"XF86AudioRaiseVolume" = "XF86AudioRaiseVolume" = "exec --no-startup-id pactl set-sink-volume 0 +5%"; # increase sound volume
"exec --no-startup-id pactl set-sink-volume 0 +5%"; # increase sound volume "XF86AudioLowerVolume" = "exec --no-startup-id pactl set-sink-volume 0 -5%"; # decrease sound volume
"XF86AudioLowerVolume" = "XF86AudioMute" = "exec --no-startup-id pactl set-sink-mute 0 toggle"; # mute sound
"exec --no-startup-id pactl set-sink-volume 0 -5%"; # decrease sound volume
"XF86AudioMute" =
"exec --no-startup-id pactl set-sink-mute 0 toggle"; # mute sound
# Media player controls # Media player controls
"XF86AudioPlay" = "exec playerctl play"; "XF86AudioPlay" = "exec playerctl play";
@@ -123,8 +122,7 @@
notification = false; notification = false;
} }
{ {
command = command = "feh --bg-scale /home/pierre/Documents/Graphisme/fc-bg-light-black.png";
"feh --bg-scale /home/pierre/Documents/Graphisme/fc-bg-light-black.png";
notification = false; notification = false;
} }

15
programs/pi.nix Normal file
View File

@@ -0,0 +1,15 @@
{ ... }:
let
# Ces dotfiles ne sont pas un flake (config par channels) : on résout donc
# les sorties du flake pi.nix à la main, en épinglant le rev.
# Mise à jour : remplacer le rev par le dernier de https://github.com/lukasl-dev/pi.nix
pi = builtins.getFlake "github:lukasl-dev/pi.nix/1d37b58675b763ae6c9dc05d62321109066a4126";
in
{
imports = [ pi.homeModules.default ];
programs.pi.coding-agent = {
enable = true;
};
}