mirror of
https://github.com/nmasur/dotfiles
synced 2025-07-07 18:20:15 +00:00
Compare commits
15 Commits
keyd-2.4.3
...
cf7d1b50f8
Author | SHA1 | Date | |
---|---|---|---|
cf7d1b50f8 | |||
ddb5dc39aa | |||
3fd95643b0 | |||
d128511a21 | |||
5709afd835 | |||
f828c1c200 | |||
77708aebd9 | |||
f9ac9b1063 | |||
bdd6c603c4 | |||
31e607d0ad | |||
b2337d3c39 | |||
6428d4fa62 | |||
db315b31b4 | |||
340a64b87a | |||
89b5183f22 |
10
.github/workflows/update.yml
vendored
10
.github/workflows/update.yml
vendored
@ -31,7 +31,17 @@ jobs:
|
||||
dependencies
|
||||
automated
|
||||
- name: Check the Flake
|
||||
id: check
|
||||
run: nix flake check
|
||||
- name: Update Check Status
|
||||
uses: LouisBrunner/checks-action@v1.6.1
|
||||
if: always()
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
name: Update Flake
|
||||
conclusion: ${{ job.status }}
|
||||
output: |
|
||||
{"summary":"${{ steps.check.outputs.stdout }}"}
|
||||
- name: Enable Pull Request Automerge
|
||||
if: success()
|
||||
run: |
|
||||
|
95
flake.lock
generated
95
flake.lock
generated
@ -90,11 +90,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1696043447,
|
||||
"narHash": "sha256-VbJ1dY5pVH2fX1bS+cT2+4+BYEk4lMHRP0+udu9G6tk=",
|
||||
"lastModified": 1698429334,
|
||||
"narHash": "sha256-Gq3+QabboczSu7RMpcy79RSLMSqnySO3wsnHQk4DfbE=",
|
||||
"owner": "lnl7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "792c2e01347cb1b2e7ec84a1ef73453ca86537d8",
|
||||
"rev": "afe83cbc2e673b1f08d32dd0f70df599678ff1e7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -111,11 +111,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1695864092,
|
||||
"narHash": "sha256-Hu1SkFPqO7ND95AOzBkZE2jGXSYhfZ965C03O72Kbu8=",
|
||||
"lastModified": 1699099781,
|
||||
"narHash": "sha256-2WAs839yL6xmIPBLNVwbft46BDh0/RAjq1bAKNRqeR4=",
|
||||
"owner": "nix-community",
|
||||
"repo": "disko",
|
||||
"rev": "19b62324663b6b9859caf7f335d232cf4f1f6a32",
|
||||
"rev": "548962c50b8afad7b8c820c1d6e21dc8394d6e65",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -131,11 +131,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1696034364,
|
||||
"narHash": "sha256-7giewUYqKhhfhKRxe2EPHCpSM0oMLuByW4RTRZl6Jfc=",
|
||||
"lastModified": 1699058439,
|
||||
"narHash": "sha256-fvvrdBQ9vLb3TZRB3nMUaCLvBPVGnIgTqX6vPCFRv2o=",
|
||||
"owner": "bandithedoge",
|
||||
"repo": "nixpkgs-firefox-darwin",
|
||||
"rev": "b1e4d451a15c34d45bfefb05137a20469399a2df",
|
||||
"rev": "9edd9209798cb115ebadfb5424d49b79b257ebea",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -147,11 +147,11 @@
|
||||
"flake-compat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1673956053,
|
||||
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
|
||||
"lastModified": 1696426674,
|
||||
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
|
||||
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -237,11 +237,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1696063111,
|
||||
"narHash": "sha256-F2IJEbyH3xG0eqyAYn9JoV+niqNz+xb4HICYNkkviNI=",
|
||||
"lastModified": 1699025595,
|
||||
"narHash": "sha256-e+o4PoSu2Z6Ww8y/AVUmMU200rNZoRK+p2opQ7Db8Rg=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "ae896c810f501bf0c3a2fd7fc2de094dd0addf01",
|
||||
"rev": "8765d4e38aa0be53cdeee26f7386173e6c65618d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -369,11 +369,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1695830400,
|
||||
"narHash": "sha256-gToZXQVr0G/1WriO83olnqrLSHF2Jb8BPcmCt497ro0=",
|
||||
"lastModified": 1699099776,
|
||||
"narHash": "sha256-X09iKJ27mGsGambGfkKzqvw5esP1L/Rf8H3u3fCqIiU=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "8a86b98f0ba1c405358f1b71ff8b5e1d317f5db2",
|
||||
"rev": "85f1ba3e51676fa8cc604a3d863d729026a6b8eb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -383,29 +383,13 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-keyd": {
|
||||
"locked": {
|
||||
"lastModified": 1690363189,
|
||||
"narHash": "sha256-Zs0VkngOtQz7nIEO7Wi8AwGB4TBSex2KZAw784aOm2M=",
|
||||
"owner": "JohnAZoidberg",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "6591d332f93422e388ef6337f6b362b4ff8d0724",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "JohnAZoidberg",
|
||||
"ref": "keyd-2.4.3",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1695825837,
|
||||
"narHash": "sha256-4Ne11kNRnQsmSJCRSSNkFRSnHC4Y5gPDBIQGjjPfJiU=",
|
||||
"lastModified": 1697851979,
|
||||
"narHash": "sha256-lJ8k4qkkwdvi+t/Xc6Fn74kUuobpu9ynPGxNZR6OwoA=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "5cfafa12d57374f48bcc36fda3274ada276cf69e",
|
||||
"rev": "5550a85a087c04ddcace7f892b0bdc9d8bb080c8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -433,11 +417,11 @@
|
||||
},
|
||||
"nur": {
|
||||
"locked": {
|
||||
"lastModified": 1696080597,
|
||||
"narHash": "sha256-fhf7+NT/xMwPZ/sRT30lnI04AHgf7tLPU4ClMux1nWA=",
|
||||
"lastModified": 1699186655,
|
||||
"narHash": "sha256-OFoCxYaQrA1VB/30Mj/ArzronpY42DWLBSIIH1mnX60=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nur",
|
||||
"rev": "8783c360abc69f58d46a2929534ddd91eb41f3c6",
|
||||
"rev": "8d9f20f147c17d62d16025e9769adbd76245591e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -466,11 +450,11 @@
|
||||
"nvim-tree-lua-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1695716495,
|
||||
"narHash": "sha256-Fkchn7UuIHPmVFFrx1kzsE2lviJrAFAe9tHu73HnS/w=",
|
||||
"lastModified": 1698632253,
|
||||
"narHash": "sha256-jIbe+XXvc2H3GVYT+2vuwLE3MtE/fpArEopmuxW4I4s=",
|
||||
"owner": "kyazdani42",
|
||||
"repo": "nvim-tree.lua",
|
||||
"rev": "934469b9b6df369e198fb3016969e56393b0dc07",
|
||||
"rev": "7e3c0bee7b246ca835d5f7453db6fa19de359bab",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -482,11 +466,11 @@
|
||||
"nvim-treesitter-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1696061053,
|
||||
"narHash": "sha256-KR+VMYTVM2qsLPx412gySAKiGObhs+awbDJhWX72/wY=",
|
||||
"lastModified": 1699083795,
|
||||
"narHash": "sha256-XaZ14s4F7Sc2MQNzHMUl7lvqbGK0xfhi0I0zIN/M63U=",
|
||||
"owner": "nvim-treesitter",
|
||||
"repo": "nvim-treesitter",
|
||||
"rev": "dd4e2dbc002dfce109d621e8bdcd9d89438b0a32",
|
||||
"rev": "bef2c24e23d0da62a8542b1f08b1ac87ec43e93f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -527,7 +511,6 @@
|
||||
"nix2vim": "nix2vim",
|
||||
"nixos-generators": "nixos-generators",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-keyd": "nixpkgs-keyd",
|
||||
"null-ls-nvim-src": "null-ls-nvim-src",
|
||||
"nur": "nur",
|
||||
"nvim-lspconfig-src": "nvim-lspconfig-src",
|
||||
@ -672,11 +655,11 @@
|
||||
"tree-sitter-bash": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1695263734,
|
||||
"narHash": "sha256-dJUJGrpBWBLjcqiqxCnJ/MENwa2+uxAmQD71aYloxsw=",
|
||||
"lastModified": 1696959291,
|
||||
"narHash": "sha256-VP7rJfE/k8KV1XN1w5f0YKjCnDMYU1go/up0zj1mabM=",
|
||||
"owner": "tree-sitter",
|
||||
"repo": "tree-sitter-bash",
|
||||
"rev": "fd4e40dab883d6456da4d847de8321aee9c80805",
|
||||
"rev": "7331995b19b8f8aba2d5e26deb51d2195c18bc94",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -738,11 +721,11 @@
|
||||
"tree-sitter-python": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1695282953,
|
||||
"narHash": "sha256-gRhD3M1DkmwYQDDnyRq6QMTWUJUY0vbetGnN+pBTd84=",
|
||||
"lastModified": 1696990675,
|
||||
"narHash": "sha256-nQ4HU5ysQjht9USFGRmW/+PLFTzPgi+6G68/uupMMRk=",
|
||||
"owner": "tree-sitter",
|
||||
"repo": "tree-sitter-python",
|
||||
"rev": "a901729099257aac932d79c60adb5e8a53fa7e6c",
|
||||
"rev": "82f5c9937fe4300b4bec3ee0e788d642c77aab2c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -807,11 +790,11 @@
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1696053802,
|
||||
"narHash": "sha256-8TTbJbtGDz1MstExrVQe56eXZpovvZv6G6L6q/4NOKg=",
|
||||
"lastModified": 1698222534,
|
||||
"narHash": "sha256-iF9C7C7eT8LVVWx5IOZ/8KKJT8AIw9A5aBA6vqS18l8=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NixOS-WSL",
|
||||
"rev": "cadde47d123d1a534c272b04a7582f1d11474c48",
|
||||
"rev": "a058cff4b09b3a398d8caa379b4dc96cfedd98c9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -7,13 +7,9 @@
|
||||
# Used for system packages
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
|
||||
# Update to keyd 2.4.3 not yet in nixpkgs-unstable
|
||||
# https://github.com/NixOS/nixpkgs/pull/245327
|
||||
nixpkgs-keyd.url = "github:JohnAZoidberg/nixpkgs/keyd-2.4.3";
|
||||
|
||||
# Used for MacOS system config
|
||||
darwin = {
|
||||
url = "github:/lnl7/nix-darwin/master";
|
||||
url = "github:lnl7/nix-darwin/master";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
@ -232,7 +228,6 @@
|
||||
(import ./overlays/betterlockscreen.nix)
|
||||
(import ./overlays/age.nix inputs)
|
||||
(import ./overlays/proton-ge.nix inputs)
|
||||
(import ./overlays/keyd.nix inputs)
|
||||
];
|
||||
|
||||
# System types to support.
|
||||
|
@ -99,12 +99,13 @@ inputs.nixpkgs.lib.nixosSystem {
|
||||
keybase.enable = true;
|
||||
mullvad.enable = false;
|
||||
nixlang.enable = true;
|
||||
rust.enable = true;
|
||||
yt-dlp.enable = true;
|
||||
gaming = {
|
||||
dwarf-fortress.enable = true;
|
||||
enable = true;
|
||||
steam.enable = true;
|
||||
legendary.enable = true;
|
||||
legendary.enable = false; # Electron marked as insecure
|
||||
lutris.enable = true;
|
||||
leagueoflegends.enable = true;
|
||||
ryujinx.enable = true;
|
||||
|
@ -74,6 +74,8 @@
|
||||
"media.ffmpeg.vaapi.enabled" =
|
||||
true; # Enable hardware video acceleration
|
||||
"cookiebanners.ui.desktop.enabled" = true; # Reject cookie popups
|
||||
"devtools.command-button-screenshot.enabled" =
|
||||
true; # Scrolling screenshot of entire page
|
||||
"svg.context-properties.content.enabled" = true; # Sidebery styling
|
||||
};
|
||||
userChrome = ''
|
||||
|
@ -1,76 +1,101 @@
|
||||
{ pkgs, dsl, ... }: {
|
||||
{ pkgs, lib, config, dsl, ... }: {
|
||||
|
||||
plugins = [
|
||||
pkgs.vimPlugins.nvim-lspconfig
|
||||
pkgs.vimPlugins.lsp-colors-nvim
|
||||
pkgs.vimPlugins.null-ls-nvim
|
||||
];
|
||||
# Terraform optional because non-free
|
||||
options.useTerraform = lib.mkEnableOption "Whether to enable Terraform LSP";
|
||||
|
||||
use.lspconfig.lua_ls.setup = dsl.callWith {
|
||||
settings = { Lua = { diagnostics = { globals = [ "vim" "hs" ]; }; }; };
|
||||
capabilities = dsl.rawLua "require('cmp_nvim_lsp').default_capabilities()";
|
||||
cmd = [ "${pkgs.lua-language-server}/bin/lua-language-server" ];
|
||||
};
|
||||
config =
|
||||
|
||||
use.lspconfig.nil_ls.setup = dsl.callWith {
|
||||
cmd = [ "${pkgs.nil}/bin/nil" ];
|
||||
capabilities = dsl.rawLua "require('cmp_nvim_lsp').default_capabilities()";
|
||||
};
|
||||
let
|
||||
|
||||
use.lspconfig.pyright.setup = dsl.callWith {
|
||||
cmd = [ "${pkgs.pyright}/bin/pyright-langserver" "--stdio" ];
|
||||
};
|
||||
terraformFormat = if config.useTerraform then ''
|
||||
require("null-ls").builtins.formatting.terraform_fmt.with({
|
||||
command = "${pkgs.terraform}/bin/terraform",
|
||||
extra_filetypes = { "hcl" },
|
||||
}),
|
||||
'' else
|
||||
"";
|
||||
|
||||
use.lspconfig.terraformls.setup =
|
||||
dsl.callWith { cmd = [ "${pkgs.terraform-ls}/bin/terraform-ls" "serve" ]; };
|
||||
in {
|
||||
plugins = [
|
||||
pkgs.vimPlugins.nvim-lspconfig
|
||||
pkgs.vimPlugins.lsp-colors-nvim
|
||||
pkgs.vimPlugins.null-ls-nvim
|
||||
];
|
||||
|
||||
vim.api.nvim_create_augroup = dsl.callWith [ "LspFormatting" { } ];
|
||||
use.lspconfig.lua_ls.setup = dsl.callWith {
|
||||
settings = { Lua = { diagnostics = { globals = [ "vim" "hs" ]; }; }; };
|
||||
capabilities =
|
||||
dsl.rawLua "require('cmp_nvim_lsp').default_capabilities()";
|
||||
cmd = [ "${pkgs.lua-language-server}/bin/lua-language-server" ];
|
||||
};
|
||||
|
||||
lua = ''
|
||||
${builtins.readFile ./lsp.lua}
|
||||
use.lspconfig.nil_ls.setup = dsl.callWith {
|
||||
cmd = [ "${pkgs.nil}/bin/nil" ];
|
||||
capabilities =
|
||||
dsl.rawLua "require('cmp_nvim_lsp').default_capabilities()";
|
||||
};
|
||||
|
||||
-- Prevent infinite log size (change this when debugging)
|
||||
vim.lsp.set_log_level("off")
|
||||
use.lspconfig.pyright.setup = dsl.callWith {
|
||||
cmd = [ "${pkgs.pyright}/bin/pyright-langserver" "--stdio" ];
|
||||
};
|
||||
|
||||
require("null-ls").setup({
|
||||
sources = {
|
||||
require("null-ls").builtins.formatting.stylua.with({ command = "${pkgs.stylua}/bin/stylua" }),
|
||||
require("null-ls").builtins.formatting.black.with({ command = "${pkgs.black}/bin/black" }),
|
||||
require("null-ls").builtins.diagnostics.ruff.with({ command = "${pkgs.ruff}/bin/ruff" }),
|
||||
require("null-ls").builtins.formatting.fish_indent.with({ command = "${pkgs.fish}/bin/fish_indent" }),
|
||||
require("null-ls").builtins.formatting.nixfmt.with({ command = "${pkgs.nixfmt}/bin/nixfmt" }),
|
||||
require("null-ls").builtins.formatting.rustfmt.with({ command = "${pkgs.rustfmt}/bin/rustfmt" }),
|
||||
require("null-ls").builtins.diagnostics.shellcheck.with({ command = "${pkgs.shellcheck}/bin/shellcheck" }),
|
||||
require("null-ls").builtins.formatting.shfmt.with({
|
||||
command = "${pkgs.shfmt}/bin/shfmt",
|
||||
extra_args = { "-i", "4", "-ci" },
|
||||
}),
|
||||
require("null-ls").builtins.formatting.terraform_fmt.with({
|
||||
command = "${pkgs.terraform}/bin/terraform",
|
||||
extra_filetypes = { "hcl" },
|
||||
}),
|
||||
},
|
||||
use.lspconfig.terraformls.setup = dsl.callWith {
|
||||
cmd = [ "${pkgs.terraform-ls}/bin/terraform-ls" "serve" ];
|
||||
};
|
||||
|
||||
on_attach = function(client, bufnr)
|
||||
if client.supports_method("textDocument/formatting") then
|
||||
-- Auto-format on save
|
||||
vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
|
||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
group = augroup,
|
||||
buffer = bufnr,
|
||||
callback = function()
|
||||
vim.lsp.buf.format({ bufnr = bufnr })
|
||||
end,
|
||||
})
|
||||
-- Use internal formatting for bindings like gq.
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
callback = function(args)
|
||||
vim.bo[args.buf].formatexpr = nil
|
||||
end,
|
||||
})
|
||||
end
|
||||
end,
|
||||
})
|
||||
'';
|
||||
use.lspconfig.rust_analyzer.setup = dsl.callWith {
|
||||
cmd = [ "${pkgs.rust-analyzer}/bin/rust-analyzer" ];
|
||||
settings = {
|
||||
"['rust-analyzer']" = { check = { command = "clippy"; }; };
|
||||
};
|
||||
};
|
||||
|
||||
vim.api.nvim_create_augroup = dsl.callWith [ "LspFormatting" { } ];
|
||||
|
||||
lua = ''
|
||||
${builtins.readFile ./lsp.lua}
|
||||
|
||||
-- Prevent infinite log size (change this when debugging)
|
||||
vim.lsp.set_log_level("off")
|
||||
|
||||
require("null-ls").setup({
|
||||
sources = {
|
||||
require("null-ls").builtins.formatting.stylua.with({ command = "${pkgs.stylua}/bin/stylua" }),
|
||||
require("null-ls").builtins.formatting.black.with({ command = "${pkgs.black}/bin/black" }),
|
||||
require("null-ls").builtins.diagnostics.ruff.with({ command = "${pkgs.ruff}/bin/ruff" }),
|
||||
require("null-ls").builtins.formatting.fish_indent.with({ command = "${pkgs.fish}/bin/fish_indent" }),
|
||||
require("null-ls").builtins.formatting.nixfmt.with({ command = "${pkgs.nixfmt}/bin/nixfmt" }),
|
||||
require("null-ls").builtins.formatting.rustfmt.with({ command = "${pkgs.rustfmt}/bin/rustfmt" }),
|
||||
require("null-ls").builtins.diagnostics.shellcheck.with({ command = "${pkgs.shellcheck}/bin/shellcheck" }),
|
||||
require("null-ls").builtins.formatting.shfmt.with({
|
||||
command = "${pkgs.shfmt}/bin/shfmt",
|
||||
extra_args = { "-i", "4", "-ci" },
|
||||
}),
|
||||
${terraformFormat}
|
||||
},
|
||||
|
||||
on_attach = function(client, bufnr)
|
||||
if client.supports_method("textDocument/formatting") then
|
||||
-- Auto-format on save
|
||||
vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
|
||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
group = augroup,
|
||||
buffer = bufnr,
|
||||
callback = function()
|
||||
vim.lsp.buf.format({ bufnr = bufnr })
|
||||
end,
|
||||
})
|
||||
-- Use internal formatting for bindings like gq.
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
callback = function(args)
|
||||
vim.bo[args.buf].formatexpr = nil
|
||||
end,
|
||||
})
|
||||
end
|
||||
end,
|
||||
})
|
||||
'';
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -24,7 +24,7 @@
|
||||
pkgs.vimPlugins.vim-helm
|
||||
pkgs.baleia-nvim # Clean ANSI from kitty scrollback
|
||||
# pkgs.hmts-nvim # Tree-sitter injections for home-manager
|
||||
(pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||
(pkgs.vimUtils.buildVimPlugin {
|
||||
pname = "nmasur";
|
||||
version = "0.1";
|
||||
src = ../plugin;
|
||||
|
@ -63,7 +63,6 @@
|
||||
'';
|
||||
view = { # Set look and feel
|
||||
width = 30;
|
||||
hide_root_folder = false;
|
||||
side = "left";
|
||||
number = false;
|
||||
relativenumber = false;
|
||||
|
@ -5,6 +5,7 @@ let
|
||||
neovim = import ./package {
|
||||
inherit pkgs;
|
||||
colors = config.theme.colors;
|
||||
useTerraform = config.terraform.enable;
|
||||
};
|
||||
|
||||
in {
|
||||
|
@ -26,13 +26,13 @@
|
||||
# ] ++ extraConfig;
|
||||
# }
|
||||
|
||||
{ pkgs, colors, ... }:
|
||||
{ pkgs, colors, useTerraform ? false, ... }:
|
||||
|
||||
# Comes from nix2vim overlay:
|
||||
# https://github.com/gytis-ivaskevicius/nix2vim/blob/master/lib/neovim-builder.nix
|
||||
pkgs.neovimBuilder {
|
||||
package = pkgs.neovim-unwrapped;
|
||||
inherit colors;
|
||||
inherit colors useTerraform;
|
||||
imports = [
|
||||
../config/align.nix
|
||||
../config/bufferline.nix
|
||||
|
@ -6,6 +6,7 @@
|
||||
./lua.nix
|
||||
./nix.nix
|
||||
./python.nix
|
||||
./rust.nix
|
||||
./terraform.nix
|
||||
];
|
||||
|
||||
|
17
modules/common/programming/rust.nix
Normal file
17
modules/common/programming/rust.nix
Normal file
@ -0,0 +1,17 @@
|
||||
{ config, pkgs, lib, ... }: {
|
||||
|
||||
options.rust.enable = lib.mkEnableOption "Rust programming language.";
|
||||
|
||||
config = lib.mkIf config.rust.enable {
|
||||
|
||||
home-manager.users.${config.user} = {
|
||||
|
||||
programs.fish.shellAbbrs = { ca = "cargo"; };
|
||||
|
||||
home.packages = with pkgs; [ cargo rustc clippy gcc ];
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
@ -3,6 +3,7 @@
|
||||
options.terraform.enable = lib.mkEnableOption "Terraform tools.";
|
||||
|
||||
config = lib.mkIf config.terraform.enable {
|
||||
unfreePackages = [ "terraform" ];
|
||||
|
||||
home-manager.users.${config.user} = {
|
||||
programs.fish.shellAbbrs = {
|
||||
|
@ -36,7 +36,7 @@
|
||||
module-margin = 1;
|
||||
modules-left = "i3";
|
||||
modules-center = "xwindow";
|
||||
modules-right = "mailcount network pulseaudio date power";
|
||||
modules-right = "mailcount network pulseaudio date keyboard power";
|
||||
cursor-click = "pointer";
|
||||
cursor-scroll = "ns-resize";
|
||||
enable-ipc = true;
|
||||
@ -200,10 +200,17 @@
|
||||
label-foreground = config.theme.colors.base0A;
|
||||
# format-background = colors.background;
|
||||
};
|
||||
"module/keyboard" = {
|
||||
type = "custom/text";
|
||||
content = "";
|
||||
click-left = "doas systemctl restart keyd";
|
||||
content-foreground = config.theme.colors.base04;
|
||||
};
|
||||
"module/power" = {
|
||||
type = "custom/text";
|
||||
content = " ";
|
||||
click-left = config.powerCommand;
|
||||
click-right = "polybar-msg cmd restart";
|
||||
content-foreground = config.theme.colors.base04;
|
||||
};
|
||||
"settings" = {
|
||||
|
@ -18,14 +18,7 @@
|
||||
keyboards = {
|
||||
default = {
|
||||
ids = [ "*" ];
|
||||
settings = {
|
||||
main = { capslock = "overload(control, esc)"; };
|
||||
|
||||
# Fix: ctrl-click sends escape afterwards
|
||||
# Suppresses escape if held for more than 500ms
|
||||
# https://github.com/rvaiya/keyd/issues/424
|
||||
global = { overload_tap_timeout = 500; };
|
||||
};
|
||||
settings = { main = { capslock = "overload(control, esc)"; }; };
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -26,9 +26,14 @@
|
||||
};
|
||||
};
|
||||
|
||||
# Alias sudo to doas for convenience
|
||||
home-manager.users.${config.user}.programs.fish.shellAliases = {
|
||||
sudo = "doas";
|
||||
home-manager.users.${config.user}.programs = {
|
||||
|
||||
# Alias sudo to doas for convenience
|
||||
fish.shellAliases = { sudo = "doas"; };
|
||||
|
||||
# Disable overriding our sudo alias with a TERMINFO alias
|
||||
kitty.settings.shell_integration = "no-sudo";
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
@ -31,7 +31,7 @@ in {
|
||||
|
||||
src = prev.caddy.src;
|
||||
|
||||
vendorSha256 = "sha256:mwIsWJYKuEZpOU38qZOG1LEh4QpK4EO0/8l4UGsroU8=";
|
||||
vendorSha256 = "sha256:0KfMzTt4lNzVfoCfDHhC2ue3OWICkFCHuhREiM2JPMY=";
|
||||
|
||||
overrideModAttrs = (_: {
|
||||
preBuild = ''
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git a/cps/__init__.py b/cps/__init__.py
|
||||
index 269e4aca..e2b828a9 100644
|
||||
index f4f8dbf2..7377acdf 100644
|
||||
--- a/cps/__init__.py
|
||||
+++ b/cps/__init__.py
|
||||
@@ -150,7 +150,6 @@ def create_app():
|
||||
@@ -151,7 +151,6 @@ def create_app():
|
||||
|
||||
lm.login_view = 'web.login'
|
||||
lm.anonymous_user = ub.Anonymous
|
||||
@ -11,15 +11,17 @@ index 269e4aca..e2b828a9 100644
|
||||
db.CalibreDB.update_config(config)
|
||||
db.CalibreDB.setup_db(config.config_calibre_dir, cli_param.settings_path)
|
||||
diff --git a/cps/admin.py b/cps/admin.py
|
||||
index 20c58aac..99d2ad19 100644
|
||||
index 045a9523..825a28af 100644
|
||||
--- a/cps/admin.py
|
||||
+++ b/cps/admin.py
|
||||
@@ -101,8 +101,6 @@ def admin_required(f):
|
||||
@@ -102,10 +102,6 @@ def admin_required(f):
|
||||
|
||||
@admi.before_app_request
|
||||
def before_request():
|
||||
- if not ub.check_user_session(current_user.id, flask_session.get('_id')) and 'opds' not in request.path:
|
||||
- if not ub.check_user_session(current_user.id,
|
||||
- flask_session.get('_id')) and 'opds' not in request.path \
|
||||
- and config.config_session == 1:
|
||||
- logout_user()
|
||||
g.constants = constants
|
||||
g.google_site_verification = os.getenv('GOOGLE_SITE_VERIFICATION','')
|
||||
g.google_site_verification = os.getenv('GOOGLE_SITE_VERIFICATION', '')
|
||||
g.allow_registration = config.config_public_reg
|
||||
|
@ -1,6 +0,0 @@
|
||||
# Use latest PR of keyd to update to 2.4.3
|
||||
# https://github.com/NixOS/nixpkgs/pull/245327
|
||||
|
||||
inputs: _final: prev: {
|
||||
inherit (inputs.nixpkgs-keyd.legacyPackages.${prev.system}) keyd;
|
||||
}
|
@ -9,7 +9,7 @@ let
|
||||
|
||||
# Package plugin - for plugins not found in nixpkgs at all
|
||||
plugin = pname: src:
|
||||
prev.vimUtils.buildVimPluginFrom2Nix {
|
||||
prev.vimUtils.buildVimPlugin {
|
||||
inherit pname src;
|
||||
version = "master";
|
||||
};
|
||||
|
@ -5,7 +5,7 @@
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs";
|
||||
inputs.poetry2nix.url = "github:nix-community/poetry2nix";
|
||||
|
||||
outputs = { nixpkgs, flake-utils, poetry2nix }:
|
||||
outputs = { self, nixpkgs, flake-utils, poetry2nix }:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
|
@ -11,7 +11,7 @@
|
||||
inputs.pypi-deps-db.follows = "pypi-deps-db";
|
||||
};
|
||||
|
||||
outputs = { nixpkgs, mach-nix }:
|
||||
outputs = { self, nixpkgs, mach-nix }:
|
||||
let
|
||||
supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" ];
|
||||
forAllSystems = f:
|
||||
|
20
templates/rust/flake.nix
Normal file
20
templates/rust/flake.nix
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
description = "Basic Rust project";
|
||||
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
outputs = { self, nixpkgs }:
|
||||
let
|
||||
forAllSystems = nixpkgs.lib.genAttrs [
|
||||
"x86_64-linux"
|
||||
"x86_64-darwin"
|
||||
"aarch64-linux"
|
||||
"aarch64-darwin"
|
||||
];
|
||||
in {
|
||||
devShells = forAllSystems (system:
|
||||
let pkgs = import nixpkgs { inherit system; };
|
||||
in {
|
||||
default =
|
||||
pkgs.mkShell { buildInputs = with pkgs; [ gcc rustc cargo ]; };
|
||||
});
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user