Merge pull request 'nixos-23.05' (#229) from nixos-23.05 into main
All checks were successful
continuous-integration/drone/push Build is passing

Reviewed-on: #229
Reviewed-by: b12f <hello@benjaminbaedorf.eu>
This commit is contained in:
teutat3s 2023-06-28 19:31:27 +02:00
commit 1459aa9ada
Signed by: pub.solar gitea
GPG key ID: F0332B04B7054873
23 changed files with 189 additions and 166 deletions

View file

@ -38,7 +38,7 @@ _PubSolarOS_:
as much non-free software as you like.
- Automation is better. The reproducibility of nix feels so much more
powerful once you're deploying your new configuration from your laptop
to all your other devices with one command. [We have an automated CI using drone](https://ci.b12f.io/pub-solar/os).
to all your other devices with one command. [We have an automated CI using drone](https://ci.pub.solar/pub-solar/os).
- Community is important. We just like working on this together, and it
feels really good to see our progress at the end of a
[hakken.irl](https://pub.solar/hakken) session.

View file

@ -30,11 +30,11 @@
]
},
"locked": {
"lastModified": 1683754942,
"narHash": "sha256-L+Bj8EL4XLmODRIuOkk9sI6FDECVzK+C8jeZFv7q6eY=",
"lastModified": 1686307493,
"narHash": "sha256-R4VEFnDn7nRmNxAu1LwNbjns5DPM8IBsvnrWmZ8ymPs=",
"owner": "LnL7",
"repo": "nix-darwin",
"rev": "252541bd05a7f55f3704a3d014ad1badc1e3360d",
"rev": "7c16d31383a90e0e72ace0c35d2d66a18f90fb4f",
"type": "github"
},
"original": {
@ -54,11 +54,11 @@
"utils": "utils"
},
"locked": {
"lastModified": 1683779844,
"narHash": "sha256-sIeOU0GsCeQEn5TpqE/jFRN4EGsPsjqVRsPdrzIDABM=",
"lastModified": 1685948350,
"narHash": "sha256-1FldJ059so0X/rScdbIiOlQbjjSNCCTdj2cUr5pHU4A=",
"owner": "serokell",
"repo": "deploy-rs",
"rev": "c80189917086e43d49eece2bd86f56813500a0eb",
"rev": "65211db63ba1199f09b4c9f27e5eba5ec50d76ac",
"type": "github"
},
"original": {
@ -197,56 +197,52 @@
"type": "github"
}
},
"flake-utils_3": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1681202837,
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "cfacdce06f30d2b68473a46042957675eebb3401",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"home": {
"inputs": {
"nixpkgs": [
"nixos"
],
"utils": "utils_2"
},
"locked": {
"lastModified": 1681092193,
"narHash": "sha256-JerCqqOqbT2tBnXQW4EqwFl0hHnuZp21rIQ6lu/N4rI=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "f9edbedaf015013eb35f8caacbe0c9666bbc16af",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-22.11",
"repo": "home-manager",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"agenix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1682203081,
"narHash": "sha256-kRL4ejWDhi0zph/FpebFYhzqlOBrk0Pl3dzGEKSAlEw=",
"lastModified": 1686582345,
"narHash": "sha256-z4wLfa++k1d7Y/tQpQYub1D0K0OO9Wju0FZ8U53KUE0=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "32d3e39c491e2f91152c84f8ad8b003420eab0a1",
"rev": "e753d659c64c7d158433d87ef7d6151ca1d1817a",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-23.05",
"repo": "home-manager",
"type": "github"
}
},
"latest": {
"locked": {
"lastModified": 1683408522,
"narHash": "sha256-9kcPh6Uxo17a3kK3XCHhcWiV1Yu1kYj22RHiymUhMkU=",
"lastModified": 1686501370,
"narHash": "sha256-G0WuM9fqTPRc2URKP9Lgi5nhZMqsfHGrdEbrLvAPJcg=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "897876e4c484f1e8f92009fd11b7d988a121a4e7",
"rev": "75a5ebf473cd60148ba9aec0d219f72e5cf52519",
"type": "github"
},
"original": {
@ -258,27 +254,27 @@
},
"nixos": {
"locked": {
"lastModified": 1683928319,
"narHash": "sha256-maz0DRKixJVcNRMiAMWlJniiF8IuQ+WbfmlJJ8D+jfM=",
"lastModified": 1686431482,
"narHash": "sha256-oPVQ/0YP7yC2ztNsxvWLrV+f0NQ2QAwxbrZ+bgGydEM=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "9656e85a15a0fe67847ee8cdb99a20d8df499962",
"rev": "d3bb401dcfc5a46ce51cdfb5762e70cc75d082d2",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-22.11",
"ref": "nixos-23.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixos-hardware": {
"locked": {
"lastModified": 1683965003,
"narHash": "sha256-DrzSdOnLv/yFBvS2FqmwBA2xIbN/Lny/WlxHyoLR9zE=",
"lastModified": 1686452266,
"narHash": "sha256-zLKiX0iu6jZFeZDpR1gE6fNyMr8eiM8GLnj9SoUCjFs=",
"owner": "nixos",
"repo": "nixos-hardware",
"rev": "81cd886719e10d4822b2a6caa96e95d56cc915ef",
"rev": "2a807ad6e8dc458db08588b78cc3c0f0ec4ff321",
"type": "github"
},
"original": {
@ -303,6 +299,30 @@
"type": "github"
}
},
"nvfetcher": {
"inputs": {
"flake-compat": [
"flake-compat"
],
"flake-utils": "flake-utils_3",
"nixpkgs": [
"nixos"
]
},
"locked": {
"lastModified": 1685158767,
"narHash": "sha256-vgyu3jsnGDDAEYg4y/oFk2IaTCXUlce0ZaLtQprhmFk=",
"owner": "berberman",
"repo": "nvfetcher",
"rev": "c5ae2cb436a04f4590306589e71638d023a33bd4",
"type": "github"
},
"original": {
"owner": "berberman",
"repo": "nvfetcher",
"type": "github"
}
},
"root": {
"inputs": {
"agenix": "agenix",
@ -313,25 +333,26 @@
"home": "home",
"latest": "latest",
"nixos": "nixos",
"nixos-hardware": "nixos-hardware"
"nixos-hardware": "nixos-hardware",
"nvfetcher": "nvfetcher"
}
},
"utils": {
"systems": {
"locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"utils_2": {
"utils": {
"locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",

View file

@ -5,7 +5,7 @@
inputs = {
# Track channels with commits tested and built by hydra
nixos.url = "github:nixos/nixpkgs/nixos-22.11";
nixos.url = "github:nixos/nixpkgs/nixos-23.05";
latest.url = "github:nixos/nixpkgs/nixos-unstable";
flake-compat.url = "github:edolstra/flake-compat";
@ -19,7 +19,7 @@
digga.inputs.darwin.follows = "darwin";
digga.inputs.flake-compat.follows = "flake-compat";
home.url = "github:nix-community/home-manager/release-22.11";
home.url = "github:nix-community/home-manager/release-23.05";
home.inputs.nixpkgs.follows = "nixos";
darwin.url = "github:LnL7/nix-darwin";
@ -34,6 +34,10 @@
agenix.inputs.darwin.follows = "darwin";
nixos-hardware.url = "github:nixos/nixos-hardware";
nvfetcher.url = "github:berberman/nvfetcher";
nvfetcher.inputs.nixpkgs.follows = "nixos";
nvfetcher.inputs.flake-compat.follows = "flake-compat";
};
outputs = {
@ -44,6 +48,7 @@
nixos-hardware,
agenix,
deploy,
nvfetcher,
...
} @ inputs:
digga.lib.mkFlake
@ -54,12 +59,20 @@
# allowUnfree = true;
};
supportedSystems = ["x86_64-linux" "aarch64-linux"];
supportedSystems = ["x86_64-linux" "aarch64-linux" "aarch64-darwin"];
channels = {
nixos = {
imports = [(digga.lib.importOverlays ./overlays)];
overlays = [];
overlays = [
deploy.overlay
(self: super: {
deploy-rs = {
inherit (inputs.nixos.legacyPackages.x86_64-linux) deploy-rs;
lib = super.deploy-rs.lib;
};
})
];
};
latest = {};
};
@ -74,6 +87,7 @@
});
})
agenix.overlays.default
nvfetcher.overlays.default
(import ./pkgs)
];
@ -149,6 +163,17 @@
homeConfigurations = digga.lib.mkHomeConfigurations self.nixosConfigurations;
deploy.nodes = digga.lib.mkDeployNodes self.nixosConfigurations {};
deploy.nodes = digga.lib.mkDeployNodes self.nixosConfigurations {
#example = {
# hostname = "example.com:22";
# sshUser = "bartender";
# fastConnect = true;
# profilesOrder = ["system" "direnv"];
# profiles.direnv = {
# user = "bartender";
# path = self.channels.nixos.deploy-rs.lib.x86_64-linux.activate.home-manager self.homeConfigurationsPortable.x86_64-linux.bartender;
# };
#};
};
};
}

View file

@ -66,31 +66,31 @@ in {
# rtkit is optional but recommended
security.rtkit.enable = true;
# Enable sound using pipewire-pulse
# Enable sound using pipewire-pulse, default config:
# https://gitlab.freedesktop.org/pipewire/pipewire/-/blob/master/src/daemon/pipewire.conf.in
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
config.pipewire = {
context.default.clock = {
allowed-rates = [44100 48000 88200 96000];
rate = 44100;
};
};
config.pipewire-pulse = builtins.fromJSON (builtins.readFile ./pipewire-pulse.conf.json);
};
# Bluetooth configuration using wireplumber
# https://nixos.wiki/wiki/PipeWire#Bluetooth_Configuration
environment.etc = mkIf cfg.bluetooth.enable {
"wireplumber/bluetooth.lua.d/51-bluez-config.lua".text = ''
bluez_monitor.properties = {
["bluez5.enable-sbc-xq"] = true,
["bluez5.enable-msbc"] = true,
["bluez5.enable-hw-volume"] = true,
["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]"
# Make pulseaudio listen on port 4713 for mopidy, extending the default
# config: https://gitlab.freedesktop.org/pipewire/pipewire/-/blob/master/src/daemon/pipewire-pulse.conf.in
environment.etc = mkIf cfg.mopidy.enable {
"pipewire/pipewire-pulse.conf.d/99-custom.conf".text = ''
{
"context.modules": [
{
"name": "libpipewire-module-protocol-pulse",
"args": {
"server.address": ["unix:native", "tcp:4713"],
"vm.overrides": {
"pulse.min.quantum": "1024/48000"
}
}
}
]
}
'';
};
@ -98,10 +98,19 @@ in {
# Enable bluetooth
hardware.bluetooth = mkIf cfg.bluetooth.enable {
enable = true;
# disable useless SIM Access Profile plugin
# Disable bluetooth on startup to save battery
powerOnBoot = false;
# Disable useless SIM Access Profile plugin
disabledPlugins = [
"sap"
];
settings = {
General = {
# Enables experimental features and interfaces.
# Makes BlueZ Battery Provider available
Experimental = true;
};
};
};
services.blueman.enable = mkIf cfg.bluetooth.enable true;

View file

@ -1,36 +0,0 @@
{
"context.properties": {},
"context.spa-libs": {
"audio.convert.*": "audioconvert/libspa-audioconvert",
"support.*": "support/libspa-support"
},
"context.modules": [
{
"name": "libpipewire-module-rtkit",
"args": {},
"flags": ["ifexists", "nofail"]
},
{
"name": "libpipewire-module-protocol-native"
},
{
"name": "libpipewire-module-client-node"
},
{
"name": "libpipewire-module-adapter"
},
{
"name": "libpipewire-module-metadata"
},
{
"name": "libpipewire-module-protocol-pulse",
"args": {
"server.address": ["unix:native", "tcp:4713"],
"vm.overrides": {
"pulse.min.quantum": "1024/48000"
}
}
}
],
"stream.properties": {}
}

View file

@ -36,7 +36,7 @@ in {
loader.systemd-boot.enable = lib.mkDefault true;
# Use latest LTS linux kernel by default
kernelPackages = lib.mkDefault pkgs.linuxPackages_5_15;
kernelPackages = lib.mkDefault pkgs.linuxPackages_6_1;
# Support ntfs drives
supportedFilesystems = ["ntfs"];

View file

@ -24,6 +24,7 @@ in {
openssh
curl
htop
btop
lsof
psmisc
file

View file

@ -10,7 +10,7 @@
# If you don't want the host to have SSH actually opened up to the net,
# set `services.openssh.openFirewall` to false in your config.
openFirewall = lib.mkDefault true;
passwordAuthentication = lib.mkDefault false;
settings.PasswordAuthentication = lib.mkDefault false;
};
# Service that makes Out of Memory Killer more effective

View file

@ -66,7 +66,7 @@ in {
services.getty.autologinUser = mkIf cfg.autologin.enable (mkForce "${psCfg.user.name}");
qt5 = {
qt = {
enable = true;
platformTheme = "gtk2";
style = "gtk2";
@ -100,7 +100,7 @@ in {
home.packages = [
alacritty
foot
chromium
ungoogled-chromium
firefox-wayland
flameshot

View file

@ -8,10 +8,10 @@
};
Service = {
Type = "simple";
ExecStartPre = "${pkgs.systemd}/bin/systemctl --user unset-environment WAYLAND_DISPLAY DISPLAY";
ExecStart = "${pkgs.sway}/bin/sway";
Restart = "on-failure";
RestartSec = "1";
TimeoutStopSec = "10";
ExecStopPost = "${pkgs.systemd}/bin/systemctl --user unset-environment SWAYSOCK DISPLAY I3SOCK WAYLAND_DISPLAY";
};
}

View file

@ -22,6 +22,7 @@ in {
extraPackages = with pkgs;
lib.mkIf (!cfg.lite) [
ansible-language-server
ccls
gopls
nodejs
@ -34,7 +35,7 @@ in {
nodePackages.vue-language-server
nodePackages.vscode-langservers-extracted
nodePackages.yaml-language-server
python39Packages.python-lsp-server
python3Packages.python-lsp-server
python3Full
solargraph
rnix-lsp

View file

@ -81,6 +81,7 @@ lua <<EOF
local use_denols_for_typescript = not(os.getenv('NVIM_USE_DENOLS') == nil)
for lsp_key, lsp_settings in pairs({
'ansiblels', ---------------------------- Ansible
'bashls', ------------------------------- Bash
'ccls', --------------------------------- C / C++ / Objective-C
'cssls', -------------------------------- CSS / SCSS / LESS
@ -147,7 +148,6 @@ lua <<EOF
['schemas'] = {
['https://json.schemastore.org/github-workflow'] = '.github/workflows/*.{yml,yaml}',
['https://json.schemastore.org/github-action'] = '.github/action.{yml,yaml}',
['https://json.schemastore.org/ansible-stable-2.9'] = 'roles/tasks/*.{yml,yaml}',
['https://json.schemastore.org/drone'] = '*.drone.{yml,yaml}',
['https://json.schemastore.org/swagger-2.0'] = 'swagger.{yml,yaml}',
}

View file

@ -39,7 +39,7 @@ in {
libvirt-glib
qemu
virt-manager
python38Packages.libvirt
python3Packages.libvirt
gvfs
edk2
OVMF

View file

@ -3,20 +3,6 @@ channels: final: prev: {
inherit
(channels.latest)
cachix
dhall
discord
element-desktop
rage
nix-index
qutebrowser
alejandra
signal-desktop
starship
deploy-rs
tdesktop
arduino
arduino-cli
;
haskellPackages =

View file

@ -1,5 +0,0 @@
channels: final: prev: {
waybar = channels.latest.waybar.overrideAttrs (oldAttrs: rec {
inherit (prev.sources.waybar-nvfetcher) version src;
});
}

View file

@ -1,21 +1,19 @@
# This file was generated by nvfetcher, please do not modify it manually.
{ fetchgit, fetchurl, fetchFromGitHub, dockerTools }:
{
fetchgit,
fetchurl,
fetchFromGitHub,
}: {
blesh-nvfetcher = {
pname = "blesh-nvfetcher";
version = "10aa9b4fe47fc07ccdc9d5ba35f1417fdb614d41";
version = "f16c0d807c8e1fe26fa5d990b561829382cbdc72";
src = fetchFromGitHub {
owner = "akinomyoga";
repo = "ble.sh";
rev = "10aa9b4fe47fc07ccdc9d5ba35f1417fdb614d41";
rev = "f16c0d807c8e1fe26fa5d990b561829382cbdc72";
fetchSubmodules = true;
deepClone = false;
leaveDotGit = true;
sha256 = "sha256-5H6kBwHOOF5p+4htTEhTDVoseynTXcFBFfH6d3dYvks=";
sha256 = "sha256-+tcM1z9uD7WXA7CfHmTbcPRcZfmXZ+Y7y6Bj4QA3f+4=";
};
date = "2023-06-12";
};
instant-nvim-nvfetcher = {
pname = "instant-nvim-nvfetcher";
@ -27,6 +25,7 @@
fetchSubmodules = false;
sha256 = "sha256-DXJWji/NR8ZCxe014rD51v3EHJHMhRQeOoI3SsY8mR4=";
};
date = "2022-06-25";
};
manix = {
pname = "manix";
@ -38,6 +37,7 @@
fetchSubmodules = false;
sha256 = "sha256-GqPuYscLhkR5E2HnSFV4R48hCWvtM3C++3zlJhiK/aw=";
};
date = "2021-04-20";
};
rnix-lsp-nvfetcher = {
pname = "rnix-lsp-nvfetcher";
@ -49,6 +49,7 @@
fetchSubmodules = false;
sha256 = "sha256-F0s0m62S5bHNVWNHLZD6SeHiLrsDx98VQbRjDyIu+qQ=";
};
date = "2022-11-27";
};
vim-apprentice-nvfetcher = {
pname = "vim-apprentice-nvfetcher";
@ -60,6 +61,7 @@
fetchSubmodules = false;
sha256 = "sha256-03B9tmU9+6t2hxhOgZxBqJr9r41CAqhHLUkHYvFdcks=";
};
date = "2023-02-15";
};
vim-beautify-nvfetcher = {
pname = "vim-beautify-nvfetcher";
@ -71,6 +73,7 @@
fetchSubmodules = false;
sha256 = "sha256-QPTCl6KaGcAjTS5yVDov9yxmv0fDaFoPLMsrtVIG6GQ=";
};
date = "2018-12-27";
};
vim-caddyfile-nvfetcher = {
pname = "vim-caddyfile-nvfetcher";
@ -82,17 +85,19 @@
fetchSubmodules = false;
sha256 = "sha256-rRYv3vnt31g7hNTxttTD6BWdv5JJ+ko3rPNyDUEOZ9o=";
};
date = "2022-05-09";
};
vim-workspace-nvfetcher = {
pname = "vim-workspace-nvfetcher";
version = "c26b473f9b073f24bacecd38477f44c5cd1f5a62";
version = "c0d1e4332a378f58bfdf363b4957168fa78e79b4";
src = fetchFromGitHub {
owner = "thaerkh";
repo = "vim-workspace";
rev = "c26b473f9b073f24bacecd38477f44c5cd1f5a62";
rev = "c0d1e4332a378f58bfdf363b4957168fa78e79b4";
fetchSubmodules = false;
sha256 = "sha256-XV7opLyfkHIDO0+JJaO/x0za0gsHuklrzapTGdLHJmI=";
sha256 = "sha256-2Brx098dk5THiieBiW71FG9mUUwS1CSY9mpOPWA/Tq4=";
};
date = "2023-05-28";
};
vimagit-nvfetcher = {
pname = "vimagit-nvfetcher";
@ -104,16 +109,18 @@
fetchSubmodules = false;
sha256 = "sha256-fhazQQqyFaO0fdoeNI9nBshwTDhKNHH262H/QThtuO0=";
};
date = "2022-07-03";
};
waybar-nvfetcher = {
pname = "waybar-nvfetcher";
version = "09142fa322e080474de0f2dc3ea98036846550df";
version = "41164905351436db3a124207261f9dd759c6fa1b";
src = fetchFromGitHub {
owner = "Alexays";
repo = "Waybar";
rev = "09142fa322e080474de0f2dc3ea98036846550df";
rev = "41164905351436db3a124207261f9dd759c6fa1b";
fetchSubmodules = false;
sha256 = "sha256-5KqQaaKwW14F/rVWGQ0qBUU0b3Z+v/Mq8lnSwqLtT7U=";
sha256 = "sha256-aogiOj4pe2AJYxQFh8Dw6xQ2Tb6v4W9zwbGX4t2mStI=";
};
date = "2023-06-27";
};
}

View file

@ -1,4 +1,5 @@
self: with self; let
self:
with self; let
looking-glass-client = self.looking-glass-client.overrideAttrs (old: {
meta.platforms = ["x86_64-linux" "aarch64-linux"];
});

View file

@ -1,19 +1,20 @@
self: with self; let
websocket-client = python39.pkgs.buildPythonPackage rec {
self:
with self; let
websocket-client = python3.pkgs.buildPythonPackage rec {
pname = "websocket-client";
version = "1.2.1";
doCheck = false;
src = python39.pkgs.fetchPypi {
src = python3.pkgs.fetchPypi {
inherit pname version;
sha256 = "sha256-jftxXYqZL1cS//jIQ62ulOIrIqmbLF5rDsShqYHMTg0=";
};
};
in
python39.pkgs.buildPythonPackage rec {
python3.pkgs.buildPythonPackage rec {
pname = "Mopidy-Jellyfin";
version = "1.0.2";
doCheck = false;
propagatedBuildInputs = with python39.pkgs; [
propagatedBuildInputs = with python3.pkgs; [
unidecode
websocket-client
requests
@ -21,7 +22,7 @@ in
pykka
mopidy
];
src = python39.pkgs.fetchPypi {
src = python3.pkgs.fetchPypi {
inherit pname version;
sha256 = "sha256-5XimIIQSpvNyQbSOFtSTkA0jhA0V68BbyQEQNnov+0g=";
};

View file

@ -1,4 +1,5 @@
self: with self; let
self:
with self; let
uhk-agent-bin = stdenv.mkDerivation rec {
pname = "uhk-agent-bin";
version = "1.5.14";

View file

@ -85,7 +85,7 @@
VUEDX_TELEMETRY = "off";
# FZF shell history widget default colors
FZF_DEFAULT_OPTS = "--color=bg+:#2d2a2e,bg:#1a181a,spinner:#ef9062,hl:#7accd7 --color=fg:#d3d1d4,header:#7accd7,info:#e5c463,pointer:#ef9062 --color=marker:#ef9062,fg+:#d3d1d4,prompt:#e5c463,hl+:#7accd7";
FZF_DEFAULT_OPTS = lib.mkForce "--color=bg+:#2d2a2e,bg:#1a181a,spinner:#ef9062,hl:#7accd7 --color=fg:#d3d1d4,header:#7accd7,info:#e5c463,pointer:#ef9062 --color=marker:#ef9062,fg+:#d3d1d4,prompt:#e5c463,hl+:#7accd7";
};
envListNames = lib.attrsets.mapAttrsToList (name: value: name) variables;

View file

@ -59,6 +59,6 @@ in {
]
++ lib.optionals (pkgs.stdenv.hostPlatform.isLinux && !pkgs.stdenv.buildPlatform.isDarwin) [
(devos nixos-generators)
(devos deploy-rs)
(devos deploy-rs.deploy-rs)
];
}

View file

@ -7,17 +7,27 @@ else
against=$(${git}/bin/git hash-object -t tree /dev/null)
fi
# Stash only unstaged changes, keeping staged changes
old_stash=$(git rev-parse --quiet --verify refs/stash)
git stash push --quiet --keep-index -m 'Unstaged changes before pre-commit hook'
new_stash=$(git rev-parse --quiet --verify refs/stash)
diff="git diff-index --name-only --cached $against --diff-filter d"
all_files=($($diff))
mapfile -t all_files < <($diff)
# Format staged files.
# Format staged files
if ((${#all_files[@]} != 0)); then
treefmt "${all_files[@]}" &&
git add "${all_files[@]}"
fi
# check editorconfig
# If unstaged changes were stashed re-apply to working tree
if [ "$old_stash" != "$new_stash" ]; then
git stash pop --quiet
fi
# Check editorconfig
if ((${#all_files[@]} != 0)); then
if ! editorconfig-checker -- "${all_files[@]}"; then
printf "%b\n" \

View file

@ -1,6 +1,7 @@
[formatter.nix]
command = "alejandra"
includes = ["*.nix"]
excludes = ["pkgs/_sources/generated.nix"]
[formatter.prettier]
command = "prettier"