load home-manager config in users' config directory

This commit is contained in:
nixos 2023-09-24 14:37:03 +02:00
parent 849d209774
commit e7825e00f5
8 changed files with 1 additions and 331 deletions

View file

@ -1,29 +0,0 @@
{
# Gruvbox theme (https://github.com/alacritty/alacritty-theme/blob/master/themes/gruvbox_dark.yaml)
colors = {
primary = {
background = "0x282828";
foreground = "0xebdbb2";
};
normal = {
black = "0x282828";
red = "0xcc241d";
green = "0x98971a";
yellow = "0xd79921";
blue = "0x458588";
magenta = "0xb16286";
cyan = "0x689d6a";
white = "0xa89984";
};
bright = {
black = "0x928374";
red = "0xfb4934";
green = "0xb8bb26";
yellow = "0xfabd2f";
blue = "0x83a598";
magenta = "0xd3869b";
cyan = "0x8ec07c";
white = "0xebdbb2";
};
};
}

View file

@ -41,7 +41,7 @@ in
excludePackages = with pkgs; [ xterm ]; excludePackages = with pkgs; [ xterm ];
}; };
home-manager.users.pim = import ./home.nix (args // { inherit stateVersion; }); home-manager.users.pim = import /home/pim/.config/home-manager/home.nix (args // { inherit stateVersion; });
users.users.pim = { users.users.pim = {
isNormalUser = true; isNormalUser = true;
extraGroups = [ "wheel" ]; extraGroups = [ "wheel" ];

View file

@ -1,12 +0,0 @@
[
{
"slug": "sixindicator"
},
{
"slug": "indicatetls"
},
{
"pname": "http-version-indicator",
"slug": "http2-indicator"
}
]

View file

@ -1,22 +0,0 @@
{pkgs, ...}@args:
let
rycee-addons = with pkgs.nur.repos.rycee.firefox-addons; [
ublock-origin
clearurls
cookie-autodelete
istilldontcareaboutcookies
keepassxc-browser
redirector
ublacklist
umatrix
violentmonkey
boring-rss
bypass-paywalls-clean
];
own-addons = with import ./derivations.nix args; [
http-version-indicator
indicatetls
sixindicator
];
in
rycee-addons ++ own-addons

View file

@ -1,74 +0,0 @@
{ pkgs, lib, ... }:
let
# Stolen from: https://github.com/nix-community/nur-combined/blob/master/repos/rycee/pkgs/firefox-addons/default.nix
buildFirefoxXpiAddon = lib.makeOverridable ({ stdenv ? pkgs.stdenv, fetchurl ? pkgs.fetchurl,
pname, version, addonId, url, sha256, meta, ... }: stdenv.mkDerivation {
name = "${pname}-${version}";
inherit meta;
src = fetchurl { inherit url sha256; };
preferLocalBuild = true;
allowSubstitutes = true;
buildCommand = ''
dst="$out/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"
mkdir -p "$dst"
install -v -m644 "$src" "$dst/${addonId}.xpi"
'';
});
in
{
"http-version-indicator" = buildFirefoxXpiAddon {
pname = "http-version-indicator";
version = "3.2.1";
addonId = "spdyindicator@chengsun.github.com";
url = "https://addons.mozilla.org/firefox/downloads/file/3767224/http2_indicator-3.2.1.xpi";
sha256 = "be9518017334ce502a1da514542c2ca4f974217d0c8e6c7c31d518aba57c09a8";
meta = with lib;
{
homepage = "https://github.com/bsiegel/http-version-indicator";
description = "An indicator showing the HTTP version used to load the page in the address bar.";
mozPermissions = [ "<all_urls>" "tabs" "webNavigation" "webRequest" ];
platforms = platforms.all;
};
};
"indicatetls" = buildFirefoxXpiAddon {
pname = "indicatetls";
version = "0.3.0";
addonId = "{252ee273-8c8d-4609-b54d-62ae345be0a1}";
url = "https://addons.mozilla.org/firefox/downloads/file/3608595/indicatetls-0.3.0.xpi";
sha256 = "7a3b7edb1085f7b15d279c1013fac1d68f5247cfd6312d5275cb053e24a79465";
meta = with lib;
{
homepage = "https://github.com/jannispinter/indicatetls";
description = "Displays negotiated SSL/TLS protocol version and additional security information in the address bar";
license = licenses.mpl20;
mozPermissions = [
"tabs"
"webNavigation"
"webRequest"
"webRequestBlocking"
"http://*/*"
"https://*/*"
];
platforms = platforms.all;
};
};
"sixindicator" = buildFirefoxXpiAddon {
pname = "sixindicator";
version = "1.3.0";
addonId = "{8c9cad02-c069-4e93-909d-d874da819c49}";
url = "https://addons.mozilla.org/firefox/downloads/file/3493442/sixindicator-1.3.0.xpi";
sha256 = "415ab83ed4ac94d1efe114752a09df29536d1bd54cc9b7e5ce5d9ee55a84226d";
meta = with lib;
{
homepage = "https://github.com/HostedDinner/SixIndicator";
description = "Shows a simple icon, if IPv6 or IPv4 was used for the request of the site. When clicking on the icon, more information is shown, like the number of requests per domain and if these requests were made via IPv6 or IPv4.";
license = licenses.mit;
mozPermissions = [ "tabs" "webRequest" "<all_urls>" ];
platforms = platforms.all;
};
};
}

View file

@ -1,83 +0,0 @@
{ pkgs, lib, stateVersion, ... }@args:
{
home = {
username = "pim";
homeDirectory = "/home/pim";
stateVersion = stateVersion;
packages = with pkgs; [
keepassxc
nil
];
};
programs = {
home-manager.enable = true;
neovim = {
enable = true;
viAlias = true;
vimAlias = true;
vimdiffAlias = true;
defaultEditor = true;
plugins = with pkgs.vimPlugins; [
nvim-lspconfig
gruvbox-nvim
leap-nvim
telescope-nvim
vim-commentary
];
extraLuaConfig = builtins.readFile ./neovim.lua;
};
alacritty = {
enable = true;
settings = (import ./alacritty.nix);
};
firefox = {
enable = true;
profiles.default = {
id = 0;
isDefault = true;
settings = {
"browser.aboutConfig.showWarning" = false;
};
extensions = import ./firefox-addons args;
};
};
bash = {
enable = true;
shellAliases = {
htop = "btop";
gp = "git push";
gco = "git checkout";
gd = "git diff";
gc = "git commit";
gpl = "git pull";
gb = "git branch";
ga = "git add";
gl = "git log";
};
};
direnv = {
enable = true;
enableBashIntegration = true;
nix-direnv.enable = true;
};
git = {
enable = true;
userName = "Pim Kunis";
userEmail = "pim@kunis.nl";
extraConfig.core.editor = "nvim";
};
};
# Let home-manager manage the X session
xsession = {
enable = true;
};
# xdg.configFile."keepassxc/keepassxc.ini".text = pkgs.lib.generators.toINI {} (import ./keepassxc.nix);
}

View file

@ -1,43 +0,0 @@
{
General = {
ConfigVersion = 2;
};
Browser = {
Enabled = true;
CustomProxyLocation = "";
};
FdoSecrets = {
Enabled = true;
ConfirmAccessItem = false;
ConfirmDeleteItem = false;
};
GUI = {
AdvancedSettings = true;
MinimizeOnClose = true;
MinimizeOnStartup = true;
ShowTrayIcon = true;
TrayIconAppearance = "colorful";
};
KeeShare = {
Active = "\"<?xml version=\\\"1.0\\\"?>\\n<KeeShare xmlns:xsd=\\\"http://www.w3.org/2001/XMLSchema\\\" xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\">\\n <Active/>\\n</KeeShare>\\n\"";
Foreign = "\"<?xml version=\\\"1.0\\\"?>\\n<KeeShare xmlns:xsd=\\\"http://www.w3.org/2001/XMLSchema\\\" xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\">\\n <Foreign/>\\n</KeeShare>\\n\"";
Own = "\"<?xml version=\\\"1.0\\\"?>\\n<KeeShare xmlns:xsd=\\\"http://www.w3.org/2001/XMLSchema\\\" xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\">\\n <PrivateKey/>\\n <PublicKey/>\\n</KeeShare>\\n\"";
QuietSuccess = true;
};
PasswordGenerator = {
AdditionalChars = "";
AdvancedMode = false;
ExcludedChars = "";
Length = 40;
SpecialChars = false;
Type = 0;
UpperCase = true;
};
SSHAgent = {
Enabled = true;
};
Security = {
ClearClipboardTimeout = 30;
ClearSearch = false;
};
}

View file

@ -1,67 +0,0 @@
--[ GLOBAL ]--
vim.o.background = "dark"
vim.cmd([[colorscheme gruvbox]])
vim.g.mapleader = ";"
vim.o.signcolumn = "yes"
vim.wo.number = true
vim.wo.relativenumber = true
vim.wo.cursorline = true
--[ LSPCONFIG ]--
local opts = { noremap=true, silent=true }
local on_attach = function(client, bufnr)
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
local bufopts = { noremap=true, silent=true, buffer=bufnr }
vim.keymap.set('n', '<leader>D', vim.lsp.buf.declaration, bufopts)
vim.keymap.set('n', '<leader>d', vim.lsp.buf.definition, bufopts)
vim.keymap.set('n', '<leader>h', vim.lsp.buf.hover, bufopts)
vim.keymap.set('n', '<leader>i', vim.lsp.buf.implementation, bufopts)
vim.keymap.set('n', '<leader>s', vim.lsp.buf.signature_help, bufopts)
vim.keymap.set('n', '<leader>rn', vim.lsp.buf.rename, bufopts)
vim.keymap.set('n', '<leader>c', vim.lsp.buf.code_action, bufopts)
vim.keymap.set('n', '<leader>fmt', function() vim.lsp.buf.format { async = true } end, bufopts)
end
require'lspconfig'.nil_ls.setup{ on_attach = on_attach }
--[ LEAP ]--
require('leap').add_default_mappings()
-- Don't remap 'x' in visual mode.
vim.keymap.del({'x', 'o'}, 'x')
vim.keymap.del({'x', 'o'}, 'X')
--[ TELESCOPE ]--
local builtin = require('telescope.builtin')
vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
vim.keymap.set('n', '<leader>fg', builtin.live_grep, {})
vim.keymap.set('n', '<leader>fb', builtin.buffers, {})
vim.keymap.set('n', '<leader>fr', builtin.lsp_references, {})
vim.keymap.set('n', '<leader>fs', builtin.lsp_document_symbols, {})
require('telescope').setup{
pickers = {
find_files = {
theme = "dropdown"
},
live_grep = {
theme = "dropdown"
},
buffers = {
theme = "dropdown"
},
lsp_references = {
theme = "dropdown"
},
lsp_document_symbols = {
theme = "dropdown"
}
}
}
--[ COMMENTARY ]--
vim.cmd([[autocmd FileType nix setlocal commentstring=#\ %s]])