1
Fork 0

Smos + intray + some nvim changes

This commit is contained in:
Matei Adriel 2023-09-04 05:58:39 +03:00
parent 9c4f714636
commit 2e8ec89ef5
No known key found for this signature in database
13 changed files with 1995 additions and 75 deletions

View file

@ -3,16 +3,6 @@ local M = {}
function M.setup()
require("lazy").setup("my.plugins", {
defaults = { lazy = true },
disabled_plugins = {
"gzip",
"matchit",
"matchparen",
"netrwPlugin",
"tarPlugin",
"tohtml",
"tutor",
"zipPlugin",
},
install = {
-- install missing plugins on startup. This doesn't increase startup time.
missing = true,
@ -29,6 +19,16 @@ function M.setup()
-- Extra runtime path specified by nix
os.getenv("NVIM_EXTRA_RUNTIME") or "",
},
disabled_plugins = {
"gzip",
"matchit",
"matchparen",
"netrwPlugin",
"tarPlugin",
"tohtml",
"tutor",
"zipPlugin",
},
},
},
})

View file

@ -1,5 +1,14 @@
local env = require("my.helpers.env")
local header = [[
]]
local M = {
"goolord/alpha-nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
@ -11,15 +20,7 @@ local M = {
-- See [the header generator](https://patorjk.com/software/taag/#p=display&v=0&f=ANSI%20Shadow&t=NEOVim%20%3A3)
theme.section.header.opts.hl = "AlphaHeader"
theme.section.header.val = [[
]]
theme.section.header.val = header
local footer = function()
local version = "🚀 "
.. vim.version().major

View file

@ -5,12 +5,11 @@ local M = {
"jbyuki/venn.nvim", -- draw ascii diagrams
"mrjones2014/smart-splits.nvim", -- the name says it all
},
keys = { "<C-w>", "<leader>v" },
event = "VeryLazy",
keys = { "<C-S-w>", "<leader>V" },
}
local venn_hint = [[
Arrow^^^^^^ Select region with <C-v>
Arrow^^^^^^ Select region with <C-v>
^ ^ _K_ ^ ^ _f_: surround it with box
_H_ ^ ^ _L_
^ ^ _J_ ^ ^ _<Esc>_
@ -19,7 +18,7 @@ local venn_hint = [[
local window_hint = [[
^^^^^^^^^^^^ Move ^^ Size ^^ ^^ Split
^^^^^^^^^^^^------------- ^^-----------^^ ^^---------------
^ ^ _k_ ^ ^ ^ ^ _K_ ^ ^ ^ _<C-k>_ ^ _s_: horizontally
^ ^ _k_ ^ ^ ^ ^ _K_ ^ ^ ^ _<C-k>_ ^ _s_: horizontally
_h_ ^ ^ _l_ _H_ ^ ^ _L_ _<C-h>_ _<C-l>_ _v_: vertically
^ ^ _j_ ^ ^ ^ ^ _J_ ^ ^ ^ _<C-j>_ ^ _q_: close
focus^^^^^^ window^^^^^^ ^_=_: equalize^ _o_: close remaining
@ -30,11 +29,11 @@ function M.config()
local pcmd = require("hydra.keymap-util").pcmd
local splits = require("smart-splits")
-- {{{ Diagrams
Hydra({
name = "Draw Diagram",
hint = venn_hint,
config = {
color = "pink",
invoke_on_body = true,
hint = {
border = "rounded",
@ -44,7 +43,7 @@ function M.config()
end,
},
mode = "n",
body = "<leader>v",
body = "<leader>V",
heads = {
{ "H", "<C-v>h:VBox<CR>" },
{ "J", "<C-v>j:VBox<CR>" },
@ -54,6 +53,13 @@ function M.config()
{ "<Esc>", nil, { exit = true } },
},
})
-- }}}
-- {{{ Windows
local resize = function(direction)
return function()
splits["resize_" .. direction](2)
end
end
Hydra({
name = "Windows",
@ -62,7 +68,7 @@ function M.config()
invoke_on_body = true,
hint = {
border = "rounded",
offset = -1,
offset = -1, -- vertical offset (larger => higher up)
},
},
mode = "n",
@ -78,30 +84,10 @@ function M.config()
{ "K", "<C-w>K" },
{ "L", "<C-w>L" },
{
"<C-h>",
function()
splits.resize_left(2)
end,
},
{
"<C-j>",
function()
splits.resize_down(2)
end,
},
{
"<C-k>",
function()
splits.resize_up(2)
end,
},
{
"<C-l>",
function()
splits.resize_right(2)
end,
},
{ "<C-h>", resize("left") },
{ "<C-j>", resize("down") },
{ "<C-k>", resize("up") },
{ "<C-l>", resize("right") },
{ "=", "<C-w>=", { desc = "equalize" } },
{ "s", pcmd("split", "E36") },
{ "v", pcmd("vsplit", "E36") },
@ -109,6 +95,7 @@ function M.config()
{ "q", pcmd("close", "E444"), { desc = "close window" } },
},
})
-- }}}
end
return M

View file

@ -13,8 +13,8 @@ function M.config()
section_separators = { left = "", right = "" },
theme = "auto",
disabled_filetypes = {
"undotree"
}
"undotree",
},
},
sections = {
lualine_a = { "branch" },

1905
flake.lock

File diff suppressed because it is too large Load diff

View file

@ -99,6 +99,24 @@
# Nixos hardware
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
# {{{ Self management
# Smos
smos.url = "github:NorfairKing/smos";
# smos.inputs.nixpkgs.follows = "nixpkgs-unstable";
# smos.inputs.home-manager.follows = "home-manager";
# Intray
intray.url = "github:NorfairKing/intray";
# intray.inputs.nixpkgs.follows = "nixpkgs";
# intray.inputs.home-manager.follows = "home-manager";
# Tickler
tickler.url = "github:NorfairKing/tickler";
tickler.inputs.nixpkgs.follows = "nixpkgs";
tickler.inputs.intray.follows = "intray";
# }}}
};
# }}}
@ -263,12 +281,16 @@
"https://nix-community.cachix.org" # I think I need this for neovim-nightly?
"https://nixpkgs-wayland.cachix.org"
"https://anyrun.cachix.org"
"https://smos.cachix.org"
"https://intray.cachix.org"
];
extra-trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA="
"anyrun.cachix.org-1:pqBobmOjI7nKlsUMV25u9QHa9btJK65/C8vnO3p346s="
"smos.cachix.org-1:YOs/tLEliRoyhx7PnNw36cw2Zvbw5R0ASZaUlpUv+yM="
"intray.cachix.org-1:qD7I/NQLia2iy6cbzZvFuvn09iuL4AkTmHvjxrQlccQ="
];
};
# }}}

View file

@ -0,0 +1,3 @@
{
imports = [ ./smos.nix ./intray.nix ];
}

View file

@ -0,0 +1,7 @@
{
programs.intray = {
enable = true;
data-dir = "/persist/state/home/adrielus/Intray";
cache-dir = "/persist/local/cache/home/adrielus/Intray";
};
}

View file

@ -0,0 +1,11 @@
{ config, ... }: {
programs.smos = {
enable = true;
notify.enable = true;
config = { };
};
satellite.persistence.at.data.apps.smos.directories = [
config.programs.smos.workflowDir
];
}

View file

@ -1,6 +1,16 @@
{ config, pkgs, ... }:
let
themeMap = pkgs.callPackage (import ./themes.nix) { };
discocss = pkgs.discocss.overrideAttrs (old: rec {
version = "0.3.0";
src = pkgs.fetchFromGitHub {
owner = "bddvlpr";
repo = "discocss";
rev = "v${version}";
hash = "sha256-2K7SPTvORzgZ1ZiCtS5TOShuAnmtI5NYkdQPRXIBP/I=";
};
});
in
{
programs.discord = {
@ -10,7 +20,7 @@ in
enableDevtools = true;
};
home.packages = [ pkgs.discocss ];
home.packages = [ discocss ];
xdg.configFile."discocss/custom.css".source = config.satellite.theming.get themeMap;
satellite.persistence.at.state.apps.Discord.directories = [

View file

@ -10,6 +10,11 @@ let
inputs.spicetify-nix.homeManagerModules.spicetify
inputs.anyrun.homeManagerModules.default
# NOTE: using `pkgs.system` before `module.options` is evaluated
# leads to infinite recursion!
inputs.intray.homeManagerModules.x86_64-linux.default
inputs.smos.homeManagerModules.x86_64-linux.default
../features/cli
../features/persistence.nix
../../common
@ -39,7 +44,7 @@ in
# }}}
# Nicely reload system units when changing configs
systemd.user.startServices = "sd-switch";
systemd.user.startServices = lib.mkForce "sd-switch";
# Enable the home-manager and git clis
programs = {

View file

@ -1,4 +1,4 @@
{ pkgs, inputs, ... }: {
{ pkgs, ... }: {
imports = [
./global
@ -6,6 +6,7 @@
./features/desktop/spotify.nix
./features/desktop/firefox
./features/desktop/discord
./features/cli/productivity
./features/cli/khal.nix
./features/cli/pass.nix
./features/neovim

View file

@ -1,6 +1,7 @@
# Configuration pieces included on all (nixos) hosts
{ inputs, outputs, ... }:
let
# {{{ Imports
imports = [
inputs.hyprland.nixosModules.default
inputs.disko.nixosModules.default
@ -10,6 +11,12 @@ let
inputs.impermanence.nixosModule
inputs.slambda.nixosModule
# NOTE: using `pkgs.system` before `module.options` is evaluated
# leads to infinite recursion!
inputs.intray.nixosModules.x86_64-linux.default
inputs.smos.nixosModules.x86_64-linux.default
inputs.tickler.nixosModules.x86_64-linux.default
./persistence.nix
./nix.nix
./openssh.nix
@ -19,6 +26,7 @@ let
./tailscale.nix
../../../../common
];
# }}}
in
{
# Import all modules defined in modules/nixos