Compare commits
2 commits
2976e25ed5
...
84c6f0eb3d
Author | SHA1 | Date | |
---|---|---|---|
84c6f0eb3d | |||
5c45c2e200 |
9 changed files with 72 additions and 36 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
secrets
|
|
@ -3,7 +3,6 @@
|
|||
-- global config for iris configuration
|
||||
config = {
|
||||
-- colorscheme for nvim
|
||||
colorscheme = "catppuccin",
|
||||
flavour = "mocha",
|
||||
-- indentation
|
||||
tab_width = 4,
|
||||
|
@ -61,10 +60,6 @@ config = {
|
|||
},
|
||||
};
|
||||
|
||||
--[[ IMPORTS ]]--
|
||||
|
||||
local catppuccin = require('catppuccin')
|
||||
|
||||
--[[ VIM ]]--
|
||||
|
||||
vim.opt.tabstop = config.tab_width
|
||||
|
@ -90,30 +85,11 @@ vim.api.nvim_create_autocmd({ "BufWritePre" }, {
|
|||
|
||||
--[[ THEME ]]--
|
||||
|
||||
catppuccin.setup({
|
||||
flavour = config.flavour,
|
||||
transparent_background = true,
|
||||
integrations = {
|
||||
cmp = true,
|
||||
illuminate = {
|
||||
enabled = true,
|
||||
lsp = false
|
||||
},
|
||||
nvimtree = true,
|
||||
nvim_surround = true,
|
||||
lsp_trouble = true,
|
||||
telescope = {
|
||||
enabled = true,
|
||||
},
|
||||
treesitter = true,
|
||||
},
|
||||
})
|
||||
|
||||
vim.cmd('colorscheme ' .. config.colorscheme)
|
||||
vim.o.background = "dark"
|
||||
vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
|
||||
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
|
||||
vim.api.nvim_set_hl(0, "NvimTreeNormal", { bg = "none" })
|
||||
vim.api.nvim_set_hl(0, "Comment", { fg = colorscheme.colors.base04 })
|
||||
vim.api.nvim_set_hl(0, "@comment", { link = "Comment" })
|
||||
|
||||
--[[ LINES ]]--
|
||||
|
||||
|
|
|
@ -24,6 +24,11 @@
|
|||
description = "Home directory path of the user";
|
||||
default = "/home/${config.user}";
|
||||
};
|
||||
dotfilesPath = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Dotfiles path inside the users home dir";
|
||||
default = "${config.homePath}/.config/nix";
|
||||
};
|
||||
email = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Primary email of the user";
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
./neovim
|
||||
./starship
|
||||
./waybar
|
||||
./wireguard
|
||||
./wofi
|
||||
./zsh
|
||||
];
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{ config, pkgs, ... }:
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
config = {
|
||||
config = lib.mkIf config.system.enable {
|
||||
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
|
|
|
@ -13,7 +13,31 @@
|
|||
viAlias = true;
|
||||
vimAlias = true;
|
||||
|
||||
extraLuaConfig = lib.fileContents ../../../files/config/nvim/init.lua;
|
||||
extraLuaConfig = let
|
||||
cfg = lib.fileContents ../../../files/config/nvim/init.lua;
|
||||
colorscheme = ''
|
||||
local colorscheme = require('base16-colorscheme')
|
||||
|
||||
colorscheme.setup({
|
||||
base00 = '#${config.theme.colors.base00}',
|
||||
base01 = '#${config.theme.colors.base01}',
|
||||
base02 = '#${config.theme.colors.base02}',
|
||||
base03 = '#${config.theme.colors.base03}',
|
||||
base04 = '#${config.theme.colors.base04}',
|
||||
base05 = '#${config.theme.colors.base05}',
|
||||
base06 = '#${config.theme.colors.base06}',
|
||||
base07 = '#${config.theme.colors.base07}',
|
||||
base08 = '#${config.theme.colors.base08}',
|
||||
base09 = '#${config.theme.colors.base09}',
|
||||
base0A = '#${config.theme.colors.base0A}',
|
||||
base0B = '#${config.theme.colors.base0B}',
|
||||
base0C = '#${config.theme.colors.base0C}',
|
||||
base0D = '#${config.theme.colors.base0D}',
|
||||
base0E = '#${config.theme.colors.base0E}',
|
||||
base0F = '#${config.theme.colors.base0F}',
|
||||
})'';
|
||||
in
|
||||
colorscheme + cfg;
|
||||
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
# Deoendencies
|
||||
|
@ -29,8 +53,6 @@
|
|||
undotree # undo menu
|
||||
trouble-nvim # error menu
|
||||
telescope-nvim # grep/find menus
|
||||
# Integrations
|
||||
vim-fugitive # git
|
||||
# Snippets
|
||||
vim-vsnip
|
||||
vim-vsnip-integ
|
||||
|
@ -42,11 +64,11 @@
|
|||
cmp-vsnip
|
||||
nvim-surround # delimiter
|
||||
# Lsp
|
||||
base16-nvim # colorscheme
|
||||
nerdcommenter # comment functions
|
||||
nvim-treesitter.withAllGrammars # hilighting
|
||||
vim-illuminate # hilighting
|
||||
todo-comments-nvim # todo comments
|
||||
catppuccin-nvim # theme
|
||||
nvim-lspconfig # lsp server
|
||||
fidget-nvim # notifications
|
||||
indent-o-matic # auto indentation
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
];
|
||||
|
||||
username = {
|
||||
style_user = "bold purple";
|
||||
style_root = "bold purple";
|
||||
style_user = "bold cyan";
|
||||
style_root = "bold red";
|
||||
format = "[$user]($style) ";
|
||||
disabled = false;
|
||||
show_always = true;
|
||||
|
@ -41,7 +41,7 @@
|
|||
};
|
||||
|
||||
git_branch = {
|
||||
style = "bold fg:97";
|
||||
style = "bold purple";
|
||||
format = "at [$symbol$branch(:$remote_branch)]($style) ";
|
||||
};
|
||||
};
|
||||
|
|
31
modules/programs/wireguard/default.nix
Normal file
31
modules/programs/wireguard/default.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
config = lib.mkIf config.system.enable {
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
wireguard-tools
|
||||
];
|
||||
|
||||
# TODO: remove this!!!
|
||||
environment.etc = {
|
||||
"resolv.conf".text = "nameserver 10.1.1.1\n";
|
||||
};
|
||||
|
||||
networking.wireguard.enable = true;
|
||||
networking.wireguard.interfaces = {
|
||||
freyanet = {
|
||||
ips = [ "10.2.0.2/32" "fd:cafe:dead:bee::2/128" "fe80::2/128" ];
|
||||
privateKeyFile = "${config.dotfilesPath}/secrets/freyanet.key";
|
||||
|
||||
peers = [{
|
||||
publicKey = "x0ykwakpYCvI/pG+nR83lNUyeOE9m54thnX3bvZ+FUk=";
|
||||
allowedIPs = [ "10.0.0.0/12" "fd:cafe::/32" "fe80::/64" ];
|
||||
endpoint = "freya.cat:41111";
|
||||
persistentKeepalive = 25;
|
||||
}];
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
|
@ -16,6 +16,6 @@
|
|||
base0B = "a6e3a1"; # green
|
||||
base0C = "94e2d5"; # teal
|
||||
base0D = "89b4fa"; # blue
|
||||
base0E = "f5c2e7"; # pink
|
||||
base0E = "cba6f7"; # mauve
|
||||
base0F = "f2cdcd"; # flamingo
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue