Reformat all Nix files
This commit is contained in:
parent
9e0c1102a9
commit
355b63cf73
81 changed files with 2293 additions and 1153 deletions
|
@ -1,27 +1,46 @@
|
|||
# Light theme during the day, dark theme during the night (not automatic)
|
||||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
phases = [
|
||||
{ command = "jour"; specialisation = null; }
|
||||
{ command = "crepuscule"; specialisation = "dark"; }
|
||||
{ command = "nuit"; specialisation = "dark"; }
|
||||
{
|
||||
command = "jour";
|
||||
specialisation = null;
|
||||
}
|
||||
{
|
||||
command = "crepuscule";
|
||||
specialisation = "dark";
|
||||
}
|
||||
{
|
||||
command = "nuit";
|
||||
specialisation = "dark";
|
||||
}
|
||||
];
|
||||
mod = config.xsession.windowManager.i3.config.modifier;
|
||||
in
|
||||
{
|
||||
config = {
|
||||
home.packages = (map
|
||||
(phase: (pkgs.writeShellScriptBin phase.command ''
|
||||
switch="/nix/var/nix/profiles/system${lib.strings.optionalString (phase.specialisation != null) "/specialisation/${phase.specialisation}"}/bin/switch-to-configuration"
|
||||
if [ -x "$switch" ]
|
||||
then
|
||||
sudo "$switch" test &
|
||||
sudo "$switch" boot &
|
||||
fi
|
||||
${builtins.getAttr phase.command config.frogeye.desktop.phasesCommands}
|
||||
wait
|
||||
''))
|
||||
phases) ++ (with pkgs; [
|
||||
home.packages =
|
||||
(map (
|
||||
phase:
|
||||
(pkgs.writeShellScriptBin phase.command ''
|
||||
switch="/nix/var/nix/profiles/system${
|
||||
lib.strings.optionalString (phase.specialisation != null) "/specialisation/${phase.specialisation}"
|
||||
}/bin/switch-to-configuration"
|
||||
if [ -x "$switch" ]
|
||||
then
|
||||
sudo "$switch" test &
|
||||
sudo "$switch" boot &
|
||||
fi
|
||||
${builtins.getAttr phase.command config.frogeye.desktop.phasesCommands}
|
||||
wait
|
||||
'')
|
||||
) phases)
|
||||
++ (with pkgs; [
|
||||
brightnessctl
|
||||
]);
|
||||
xsession.windowManager.i3.config.keybindings = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue