Compare commits

...

2 commits

Author SHA1 Message Date
Geoffrey Frogeye 48bf80f1c0
24.05 Fixed terminal, vim, lix and stuff
Also "fixed" display link, but turned out that the display cable wasn't
plugged in correctly anymore...
2024-06-02 22:30:18 +02:00
Geoffrey Frogeye 3479927d32
24.05: Fixed warnings 2024-06-01 21:32:11 +02:00
13 changed files with 66 additions and 148 deletions

View file

@ -116,7 +116,7 @@
}, },
"devshell": { "devshell": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_3", "flake-utils": "flake-utils_2",
"nixpkgs": [ "nixpkgs": [
"nixvim", "nixvim",
"nixpkgs" "nixpkgs"
@ -259,24 +259,6 @@
"inputs": { "inputs": {
"systems": "systems_2" "systems": "systems_2"
}, },
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_3": {
"inputs": {
"systems": "systems_3"
},
"locked": { "locked": {
"lastModified": 1701680307, "lastModified": 1701680307,
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
@ -291,21 +273,6 @@
"type": "github" "type": "github"
} }
}, },
"flakey-profile": {
"locked": {
"lastModified": 1712898590,
"narHash": "sha256-FhGIEU93VHAChKEXx905TSiPZKga69bWl1VB37FK//I=",
"owner": "lf-",
"repo": "flakey-profile",
"rev": "243c903fd8eadc0f63d205665a92d4df91d42d9d",
"type": "github"
},
"original": {
"owner": "lf-",
"repo": "flakey-profile",
"type": "github"
}
},
"fromYaml": { "fromYaml": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -450,49 +417,6 @@
"type": "github" "type": "github"
} }
}, },
"lix": {
"flake": false,
"locked": {
"lastModified": 1714955862,
"narHash": "sha256-REWlo2RYHfJkxnmZTEJu3Cd/2VM+wjjpPy7Xi4BdDTQ=",
"ref": "refs/tags/2.90-beta.1",
"rev": "b6799ab0374a8e1907a48915d3187e07da41d88c",
"revCount": 15501,
"type": "git",
"url": "https://git@git.lix.systems/lix-project/lix"
},
"original": {
"ref": "refs/tags/2.90-beta.1",
"type": "git",
"url": "https://git@git.lix.systems/lix-project/lix"
}
},
"lix-module": {
"inputs": {
"flake-utils": "flake-utils_2",
"flakey-profile": "flakey-profile",
"lix": [
"lix"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1715353627,
"narHash": "sha256-bt/KZsPUlQV1lOZU8vM3QT/05jHftCz88tA9+bXk83s=",
"ref": "fix-prefetch-npm-deps",
"rev": "1cb0b0434d83719d73946b4516475e5ca31a2f2d",
"revCount": 76,
"type": "git",
"url": "https://git.lix.systems/lix-project/nixos-module"
},
"original": {
"ref": "fix-prefetch-npm-deps",
"type": "git",
"url": "https://git.lix.systems/lix-project/nixos-module"
}
},
"nix-darwin": { "nix-darwin": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -727,8 +651,6 @@
"disko": "disko", "disko": "disko",
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"home-manager": "home-manager", "home-manager": "home-manager",
"lix": "lix",
"lix-module": "lix-module",
"nix-on-droid": "nix-on-droid", "nix-on-droid": "nix-on-droid",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
@ -813,21 +735,6 @@
"type": "github" "type": "github"
} }
}, },
"systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"treefmt-nix": { "treefmt-nix": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [

View file

@ -43,7 +43,7 @@ in
} }
]; ];
}; };
key_bindings = [ keyboard.bindings = [
{ mode = "~Search"; mods = "Alt|Control"; key = "Space"; action = "ToggleViMode"; } { mode = "~Search"; mods = "Alt|Control"; key = "Space"; action = "ToggleViMode"; }
{ mode = "Vi|~Search"; mods = "Control"; key = "K"; action = "ScrollHalfPageUp"; } { mode = "Vi|~Search"; mods = "Control"; key = "K"; action = "ScrollHalfPageUp"; }
{ mode = "Vi|~Search"; mods = "Control"; key = "J"; action = "ScrollHalfPageDown"; } { mode = "Vi|~Search"; mods = "Control"; key = "J"; action = "ScrollHalfPageDown"; }

View file

@ -21,7 +21,7 @@
traceroute traceroute
# nix # nix
nix lix
# Always on (graphical) # Always on (graphical)
] ++ lib.optionals config.frogeye.desktop.xorg [ ] ++ lib.optionals config.frogeye.desktop.xorg [

View file

@ -14,7 +14,7 @@
enableZshIntegration = true; enableZshIntegration = true;
}; };
nix = { nix = {
package = lib.mkDefault pkgs.nixFlakes; package = lib.mkDefault pkgs.lix;
settings = { settings = {
experimental-features = [ "nix-command" "flakes" ]; experimental-features = [ "nix-command" "flakes" ];
warn-dirty = false; warn-dirty = false;

View file

@ -19,7 +19,7 @@ in
}; };
zsh = { zsh = {
enable = true; enable = true;
enableAutosuggestions = true; autosuggestion.enable = true;
enableCompletion = true; enableCompletion = true;
syntaxHighlighting.enable = true; syntaxHighlighting.enable = true;
historySubstringSearch.enable = true; historySubstringSearch.enable = true;

View file

@ -32,7 +32,7 @@ in
vim-shot-f # Highlight relevant characters for f/F/t/T modes vim-shot-f # Highlight relevant characters for f/F/t/T modes
quick-scope # Highlight relevant characters for f/F modes one per word but always quick-scope # Highlight relevant characters for f/F modes one per word but always
]; ];
options = { opts = {
# From https://www.hillelwayne.com/post/intermediate-vim/ # From https://www.hillelwayne.com/post/intermediate-vim/
scrolloff = 10; scrolloff = 10;
lazyredraw = true; # Do not redraw screen in the middle of a macro. Makes them complete faster. lazyredraw = true; # Do not redraw screen in the middle of a macro. Makes them complete faster.

View file

@ -3,11 +3,11 @@
config = { config = {
programs = { programs = {
# https://www.reddit.com/r/neovim/comments/mbj8m5/how_to_setup_ctrlshiftkey_mappings_in_neovim_and/ # https://www.reddit.com/r/neovim/comments/mbj8m5/how_to_setup_ctrlshiftkey_mappings_in_neovim_and/
alacritty.settings.key_bindings = [ alacritty.settings.keyboard.bindings = [
{ key = "H"; mods = "Control|Shift"; chars = "\\x1b[72;5u"; } { key = "H"; mods = "Control|Shift"; chars = "\\u001b[72;5u"; }
{ key = "L"; mods = "Control|Shift"; chars = "\\x1b[76;5u"; } { key = "L"; mods = "Control|Shift"; chars = "\\u001b[76;5u"; }
] ++ (map ] ++ (map
(n: { key = "Key${builtins.toString n}"; mods = "Control"; chars = "\\x1b[${builtins.toString (48+n)};5u"; }) (n: { key = "Key${builtins.toString n}"; mods = "Control"; chars = "\\u001b[${builtins.toString (48+n)};5u"; })
(lib.lists.range 0 9)); (lib.lists.range 0 9));
# Ctrl+<number> doesn't get interpreted, but Ctrl+Shift+<number> does, so let's use that # Ctrl+<number> doesn't get interpreted, but Ctrl+Shift+<number> does, so let's use that
nixvim = { nixvim = {
@ -34,7 +34,7 @@
] ++ (map ] ++ (map
(n: { key = "<C-${builtins.toString n}>"; action = "<Cmd>BufferGoto ${builtins.toString n}<CR>"; inherit options; }) (n: { key = "<C-${builtins.toString n}>"; action = "<Cmd>BufferGoto ${builtins.toString n}<CR>"; inherit options; })
(lib.lists.range 1 9)); (lib.lists.range 1 9));
options = { opts = {
showmode = false; showmode = false;
number = true; number = true;
relativenumber = true; relativenumber = true;
@ -151,7 +151,7 @@
# Show context on top if scrolled out # Show context on top if scrolled out
treesitter-context = { treesitter-context = {
enable = true; enable = true;
maxLines = 5; settings.max_lines = 5;
}; };
}; };
}; };

View file

@ -13,7 +13,7 @@
}; };
programs.nixvim = { programs.nixvim = {
colorschemes.base16.setUpBar = false; # We want the custom theme for lualine, probably colorschemes.base16.setUpBar = false; # We want the custom theme for lualine, probably
options = { opts = {
ignorecase = true; ignorecase = true;
smartcase = true; smartcase = true;
gdefault = true; gdefault = true;
@ -52,23 +52,27 @@
gS = "search_history"; gS = "search_history";
gC = "commands"; gC = "commands";
}; };
defaults = { settings = {
vimgrep_arguments = [ defaults = {
"${pkgs.ripgrep}/bin/rg" vimgrep_arguments = [
"--color=never" "${pkgs.ripgrep}/bin/rg"
"--no-heading" "--color=never"
"--with-filename" "--no-heading"
"--line-number" "--with-filename"
"--column" "--line-number"
"--smart-case" "--column"
]; "--smart-case"
];
};
}; };
extensions.fzf-native = { extensions.fzf-native = {
enable = true; enable = true;
caseMode = "smart_case"; settings = {
fuzzy = true; case_mode = "smart_case";
overrideFileSorter = true; fuzzy = true;
overrideGenericSorter = true; override_file_sorter = true;
override_generic_sorter = true;
};
}; };
}; };
# TODO Go to any symbol in the current working directory, for when LSP doesn't support it. # TODO Go to any symbol in the current working directory, for when LSP doesn't support it.
@ -94,6 +98,12 @@
ansible-vim ansible-vim
# Doesn't generate snippets, but those are for UltiSnip anyways # Doesn't generate snippets, but those are for UltiSnip anyways
]; ];
extraConfigLuaPre = lib.mkBefore ''
-- If terminal is detected to be light, background will be changed after base16 theme is applied.
-- Setting manually early to prevent hightlights having weird colors.
-- https://github.com/RRethy/base16-nvim/issues/77
vim.opt.background = "${config.stylix.polarity}";
'';
extraConfigVim = '' extraConfigVim = ''
" Avoid showing message extra message when using completion " Avoid showing message extra message when using completion
set shortmess+=c set shortmess+=c

View file

@ -15,8 +15,7 @@
{ {
mode = "n"; mode = "n";
key = "<space>wl"; key = "<space>wl";
lua = true; action.__raw = ''
action = ''
function() function()
print(vim.inspect(vim.lsp.buf.list_workspace_folders())) print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
end end
@ -26,8 +25,7 @@
{ {
mode = "n"; mode = "n";
key = "<space>f"; key = "<space>f";
lua = true; action.__raw = ''
action = ''
function() function()
vim.lsp.buf.format { async = true } vim.lsp.buf.format { async = true }
end end

View file

@ -3,41 +3,43 @@
config = lib.mkIf config.frogeye.desktop.xorg { config = lib.mkIf config.frogeye.desktop.xorg {
services = { services = {
blueman.enable = true; blueman.enable = true;
displayManager.defaultSession = "none+i3";
xserver = { xserver = {
enable = true; enable = true;
windowManager.i3.enable = true; windowManager.i3.enable = true;
displayManager.defaultSession = "none+i3";
# Keyboard layout # Keyboard layout
extraLayouts.qwerty-fr = { xkb = {
description = "QWERTY-fr"; extraLayouts.qwerty-fr = {
languages = [ "fr" ]; description = "QWERTY-fr";
symbolsFile = "${pkgs.stdenv.mkDerivation { languages = [ "fr" ];
name = "qwerty-fr-keypad"; symbolsFile = "${pkgs.stdenv.mkDerivation {
src = builtins.fetchGit { name = "qwerty-fr-keypad";
url = "https://github.com/qwerty-fr/qwerty-fr.git"; src = builtins.fetchGit {
rev = "3a4d13089e8ef016aa20baf6b2bf3ea53de674b8"; url = "https://github.com/qwerty-fr/qwerty-fr.git";
rev = "3a4d13089e8ef016aa20baf6b2bf3ea53de674b8";
};
patches = [ ./qwerty-fr-keypad.diff ];
# TODO This doesn't seem to be applied... it's the whole point of the derivation :(
installPhase = ''
runHook preInstall
mkdir -p $out/linux
cp $src/linux/us_qwerty-fr $out/linux
runHook postInstall
'';
}}/linux/us_qwerty-fr";
}; };
patches = [ ./qwerty-fr-keypad.diff ]; layout = "qwerty-fr";
# TODO This doesn't seem to be applied... it's the whole point of the derivation :(
installPhase = ''
runHook preInstall
mkdir -p $out/linux
cp $src/linux/us_qwerty-fr $out/linux
runHook postInstall
'';
}}/linux/us_qwerty-fr";
}; };
layout = "qwerty-fr";
}; };
}; };
# Enable sound & bluetooth # Enable sound & bluetooth
sound.enable = true; sound.enable = true;
hardware = { hardware = {
bluetooth.enable = true; bluetooth.enable = true;
pulseaudio.enable = true; pulseaudio.enable = true;
# TODO Try pipewire # TODO Try pipewire
}; };
# So we can use gnome3 pinentry flavour # So we can use gnome3 pinentry flavour

View file

@ -41,7 +41,7 @@
programs.dconf.enable = true; programs.dconf.enable = true;
# Because everything is encrypted and I'm the only user, this is fine. # Because everything is encrypted and I'm the only user, this is fine.
services.xserver.displayManager.autoLogin.user = "geoffrey"; services.displayManager.autoLogin.user = "geoffrey";
}; };
imports = [ imports = [
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager

View file

@ -3,7 +3,7 @@
config = lib.mkIf config.services.printing.enable { config = lib.mkIf config.services.printing.enable {
services.avahi = { services.avahi = {
enable = true; enable = true;
nssmdns = true; nssmdns4 = true;
openFirewall = true; openFirewall = true;
}; };
}; };

1
result-buildable Symbolic link
View file

@ -0,0 +1 @@
/nix/store/6887mr1xmcjgb99saw2ilv2mfjb8s2xq-nixos-system-curacao-24.05.20240531.805a384