Compare commits
No commits in common. "94d9bae95b104db7c458baa905f421f3351daeeb" and "f12ff6a989f420b4ba677c6f2f24c424c7362e3a" have entirely different histories.
94d9bae95b
...
f12ff6a989
|
@ -6,13 +6,6 @@
|
|||
x11_screens = [ "HDMI-1-0" "eDP1" ];
|
||||
maxVideoHeight = 1440;
|
||||
numlock = true;
|
||||
phasesBrightness = {
|
||||
enable = true;
|
||||
backlight = "intel_backlight";
|
||||
jour = 40000;
|
||||
crepuscule = 10000;
|
||||
nuit = 1;
|
||||
};
|
||||
};
|
||||
dev = {
|
||||
docker = true;
|
||||
|
|
|
@ -593,7 +593,6 @@
|
|||
};
|
||||
services = {
|
||||
unclutter.enable = true;
|
||||
# FIXME Not starting on curacao_test
|
||||
dunst =
|
||||
{
|
||||
enable = true;
|
||||
|
|
12
hm/scripts/crepuscule
Executable file
12
hm/scripts/crepuscule
Executable file
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# FIXME
|
||||
|
||||
if [ "$(cat /etc/hostname)" = "curacao.geoffrey.frogeye.fr" ]
|
||||
then
|
||||
echo 10000 | sudo tee /sys/class/backlight/intel_backlight/brightness
|
||||
elif [ "$(cat /etc/hostname)" = "pindakaas.geoffrey.frogeye.fr" ]
|
||||
then
|
||||
echo 3000 | sudo tee /sys/class/backlight/edp-backlight/brightness
|
||||
fi
|
||||
automatrop -e base16_scheme=solarized-dark --tags color
|
12
hm/scripts/jour
Executable file
12
hm/scripts/jour
Executable file
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# FIXME
|
||||
|
||||
if [ "$(cat /etc/hostname)" = "curacao.geoffrey.frogeye.fr" ]
|
||||
then
|
||||
echo 40000 | sudo tee /sys/class/backlight/intel_backlight/brightness
|
||||
elif [ "$(cat /etc/hostname)" = "pindakaas.geoffrey.frogeye.fr" ]
|
||||
then
|
||||
echo 3500 | sudo tee /sys/class/backlight/edp-backlight/brightness
|
||||
fi
|
||||
automatrop -e base16_scheme=solarized-light --tags color
|
12
hm/scripts/nuit
Executable file
12
hm/scripts/nuit
Executable file
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# FIXME
|
||||
|
||||
if [ "$(cat /etc/hostname)" = "curacao.geoffrey.frogeye.fr" ]
|
||||
then
|
||||
echo 1 | sudo tee /sys/class/backlight/intel_backlight/brightness
|
||||
elif [ "$(cat /etc/hostname)" = "pindakaas.geoffrey.frogeye.fr" ]
|
||||
then
|
||||
echo 700 | sudo tee /sys/class/backlight/edp-backlight/brightness
|
||||
fi
|
||||
automatrop -e base16_scheme=solarized-dark --tags color
|
45
hm/style.nix
45
hm/style.nix
|
@ -1,21 +1,17 @@
|
|||
{ pkgs, config, lib, ... }:
|
||||
{ pkgs, config, ... }:
|
||||
let
|
||||
# Currently last commit in https://github.com/danth/stylix/pull/194
|
||||
stylix = builtins.fetchTarball "https://github.com/willemml/stylix/archive/2ed2b0086b41d582aca26e083c19c0e47c8991e3.tar.gz";
|
||||
polarityFile = "${config.xdg.stateHome}/theme_polarity";
|
||||
polarity = if builtins.pathExists polarityFile then lib.strings.fileContents polarityFile else "light";
|
||||
phases = [
|
||||
{ command = "jour"; polarity = "light"; }
|
||||
{ command = "crepuscule"; polarity = "dark"; }
|
||||
{ command = "nuit"; polarity = "dark"; }
|
||||
];
|
||||
cfg = config.frogeye.desktop.phasesBrightness;
|
||||
stylix = builtins.fetchGit {
|
||||
url = "https://github.com/danth/stylix.git";
|
||||
# No 23.11 branch last I checked
|
||||
rev = "8b3f61727f3b86c27096c3c014ae602aa40670ba";
|
||||
};
|
||||
in
|
||||
{
|
||||
imports = [ (import stylix).homeManagerModules.stylix ];
|
||||
|
||||
stylix = {
|
||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/solarized-${polarity}.yaml";
|
||||
# FIXME Changeable at runtime
|
||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/solarized-dark.yaml";
|
||||
image = builtins.fetchurl {
|
||||
url = "https://get.wallhere.com/photo/sunlight-abstract-minimalism-green-simple-circle-light-leaf-wave-material-line-wing-computer-wallpaper-font-close-up-macro-photography-124350.png";
|
||||
sha256 = "sha256:1zfq3f3v34i45mi72pkfqphm8kbhczsg260xjfl6dbydy91d7y93";
|
||||
|
@ -32,37 +28,16 @@ in
|
|||
};
|
||||
|
||||
targets = {
|
||||
vim.enable = false; # FIXME Not compatible with nixvim for now (there's a MR)
|
||||
i3.enable = false; # I prefer my own styles
|
||||
tmux.enable = false; # Using another theme
|
||||
};
|
||||
};
|
||||
|
||||
# Setting a custom base16 theme via nixvim:
|
||||
# - Is required so nixvim works
|
||||
# - For the rest only works on dark polarity, use the colorscheme otherwise... shrug
|
||||
programs.nixvim.colorschemes.base16.colorscheme = "solarized-${polarity}";
|
||||
|
||||
# Fix https://nix-community.github.io/home-manager/index.html#_why_do_i_get_an_error_message_about_literal_ca_desrt_dconf_literal_or_literal_dconf_service_literal
|
||||
# home.packages = [ pkgs.dconf ];
|
||||
dconf.enable = false; # Otherwise standalone home-manager complains it can't find /etc/dbus-1/session.conf on Arch.
|
||||
# Symlinking it to /usr/share/dbus-1/session.conf goes further but not much.
|
||||
|
||||
# TODO Use xbacklight instead (pindakaas doesn't seem to support it OOTB)
|
||||
home.packages = map
|
||||
(phase: (pkgs.writeShellApplication {
|
||||
name = "${phase.command}";
|
||||
text = (lib.optionalString cfg.enable ''
|
||||
echo ${builtins.toString (builtins.getAttr phase.command cfg)} | sudo tee /sys/class/backlight/${cfg.backlight}/brightness
|
||||
'') + ''
|
||||
echo ${phase.polarity} > ${polarityFile}
|
||||
if command -v home-manager
|
||||
then
|
||||
home-manager switch
|
||||
else
|
||||
sudo nixos-rebuild switch
|
||||
fi
|
||||
'';
|
||||
})
|
||||
)
|
||||
phases;
|
||||
|
||||
}
|
||||
|
|
15
hm/vim.nix
15
hm/vim.nix
|
@ -68,6 +68,12 @@ in
|
|||
globals = {
|
||||
netrw_fastbrowse = 0; # Close the file explorer once you select a file
|
||||
};
|
||||
colorschemes.base16 = {
|
||||
# FIXME Dynamic... or use stylix
|
||||
enable = true;
|
||||
colorscheme = "solarized-light";
|
||||
|
||||
};
|
||||
plugins = {
|
||||
# Catches attention when cursor changed position
|
||||
# TODO Unmapped, do I still want to use it?
|
||||
|
@ -333,15 +339,14 @@ in
|
|||
'';
|
||||
autoCmd = [
|
||||
# Turn off relativenumber only for insert mode
|
||||
{ event = "InsertEnter"; pattern = "*"; command = "set norelativenumber"; }
|
||||
{ event = "InsertLeave"; pattern = "*"; command = "set relativenumber"; }
|
||||
{ event = "InsertEnter *"; command = "set norelativenumber"; }
|
||||
{ event = "InsertLeave *"; command = "set relativenumber"; }
|
||||
|
||||
# Additional extensions
|
||||
{ event = "BufRead"; pattern = "*.jinja"; command = "set filetype=jinja2"; } # TODO Probably GH-specific?
|
||||
{ event = "BufNewFile"; pattern = "*.jinja"; command = "set filetype=jinja2"; }
|
||||
{ event = "BufNewFile,BufRead"; pattern = "*.jinja"; command = "set filetype=jinja2"; } # TODO Probably GH-specific?
|
||||
|
||||
# vim-easy-align: Align Markdown tables
|
||||
{ event = "FileType"; pattern = "markdown"; command = "vmap <Bar> :EasyAlign*<Bar><Enter>"; }
|
||||
{ event = "FileType markdown"; command = "vmap <Bar> :EasyAlign*<Bar><Enter>"; }
|
||||
];
|
||||
|
||||
userCommands = {
|
||||
|
|
|
@ -2,30 +2,32 @@ vim.cmd([[
|
|||
set noshowmode
|
||||
set laststatus=2
|
||||
]])
|
||||
local base16_colors = require('base16-colorscheme').colors
|
||||
-- local base16_colors = require('base16-colorscheme').colors
|
||||
-- FIXME Color setting doesn't work, see ./feline_test.vim for a reproducible use case
|
||||
-- that works on Arch but not on Nix (with Plug stuff removed)
|
||||
local vi_mode_utils = require('feline.providers.vi_mode')
|
||||
local lsp = require('feline.providers.lsp')
|
||||
require('feline').setup({
|
||||
default_bg = 'base01',
|
||||
default_fg = 'base04',
|
||||
theme = {
|
||||
base00 = base16_colors.base00,
|
||||
base01 = base16_colors.base01,
|
||||
base02 = base16_colors.base02,
|
||||
base03 = base16_colors.base03,
|
||||
base04 = base16_colors.base04,
|
||||
base05 = base16_colors.base05,
|
||||
base06 = base16_colors.base06,
|
||||
base07 = base16_colors.base07,
|
||||
base08 = base16_colors.base08,
|
||||
base09 = base16_colors.base09,
|
||||
base0A = base16_colors.base0A,
|
||||
base0B = base16_colors.base0B,
|
||||
base0C = base16_colors.base0C,
|
||||
base0D = base16_colors.base0D,
|
||||
base0E = base16_colors.base0E,
|
||||
base0F = base16_colors.base0F,
|
||||
},
|
||||
-- default_bg = 'base01',
|
||||
-- default_fg = 'base04',
|
||||
-- theme = {
|
||||
-- base00 = base16_colors.base00,
|
||||
-- base01 = base16_colors.base01,
|
||||
-- base02 = base16_colors.base02,
|
||||
-- base03 = base16_colors.base03,
|
||||
-- base04 = base16_colors.base04,
|
||||
-- base05 = base16_colors.base05,
|
||||
-- base06 = base16_colors.base06,
|
||||
-- base07 = base16_colors.base07,
|
||||
-- base08 = base16_colors.base08,
|
||||
-- base09 = base16_colors.base09,
|
||||
-- base0A = base16_colors.base0A,
|
||||
-- base0B = base16_colors.base0B,
|
||||
-- base0C = base16_colors.base0C,
|
||||
-- base0D = base16_colors.base0D,
|
||||
-- base0E = base16_colors.base0E,
|
||||
-- base0F = base16_colors.base0F,
|
||||
-- },
|
||||
components = {
|
||||
active = {
|
||||
{
|
||||
|
|
|
@ -17,13 +17,6 @@
|
|||
description = "Maximum video height in pixel the machine can reasonably watch";
|
||||
default = 1080;
|
||||
};
|
||||
phasesBrightness = {
|
||||
enable = lib.mkEnableOption "Set a specific brightness for the screen when running phases commands";
|
||||
backlight = lib.mkOption { type = lib.types.str; description = "Name of the backlight device"; };
|
||||
jour = lib.mkOption { type = lib.types.int; description = "brightness value for phase: jour"; };
|
||||
crepuscule = lib.mkOption { type = lib.types.int; description = "brightness value for phase: crepuscule"; };
|
||||
nuit = lib.mkOption { type = lib.types.int; description = "brightness value for phase: nuit"; };
|
||||
};
|
||||
};
|
||||
dev = {
|
||||
ansible = lib.mkEnableOption "Ansible dev stuff";
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
services.printing.enable = true;
|
||||
|
||||
# Enable passwordless sudo
|
||||
# TODO execWheelOnly? sudo-rs?
|
||||
security.sudo.extraRules = [{
|
||||
groups = [ "wheel" ];
|
||||
commands = [{
|
||||
|
|
|
@ -5,13 +5,6 @@
|
|||
xorg = true;
|
||||
x11_screens = [ "DP-1" "eDP-1" ];
|
||||
maxVideoHeight = 720;
|
||||
phasesBrightness = {
|
||||
enable = true;
|
||||
backlight = "edp-backlight";
|
||||
jour = 3500;
|
||||
crepuscule = 3000;
|
||||
nuit = 700;
|
||||
};
|
||||
};
|
||||
frogeye.dev.docker = true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue