mirror of
https://github.com/nmasur/dotfiles
synced 2025-02-25 09:32:02 +00:00
more fixes to pkgs
This commit is contained in:
parent
7007567207
commit
3206b48f28
@ -262,6 +262,7 @@
|
|||||||
(import ./overlays/tree-sitter.nix inputs)
|
(import ./overlays/tree-sitter.nix inputs)
|
||||||
(import ./overlays/mpv-scripts.nix inputs)
|
(import ./overlays/mpv-scripts.nix inputs)
|
||||||
(import ./overlays/nextcloud-apps.nix inputs)
|
(import ./overlays/nextcloud-apps.nix inputs)
|
||||||
|
(import ./overlays/pkgs.nix)
|
||||||
];
|
];
|
||||||
|
|
||||||
# System types to support.
|
# System types to support.
|
||||||
|
@ -38,9 +38,14 @@ rec {
|
|||||||
developer.enable = true;
|
developer.enable = true;
|
||||||
experimental.enable = true;
|
experimental.enable = true;
|
||||||
};
|
};
|
||||||
|
nmasur.presets.services.mbsync = {
|
||||||
|
user = nmasur.settings.username;
|
||||||
|
server = "noahmasur.com";
|
||||||
|
};
|
||||||
home.stateVersion = "23.05";
|
home.stateVersion = "23.05";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
system.stateVersion = "23.05";
|
||||||
# Not sure what's necessary but too afraid to remove anything
|
# Not sure what's necessary but too afraid to remove anything
|
||||||
boot.initrd.availableKernelModules = [
|
boot.initrd.availableKernelModules = [
|
||||||
"nvme"
|
"nvme"
|
||||||
@ -100,7 +105,7 @@ rec {
|
|||||||
nmasur.presets.services.cloudflared = {
|
nmasur.presets.services.cloudflared = {
|
||||||
tunnel = {
|
tunnel = {
|
||||||
id = "ac133a82-31fb-480c-942a-cdbcd4c58173";
|
id = "ac133a82-31fb-480c-942a-cdbcd4c58173";
|
||||||
credentialsFile = ../../private/cloudflared-tempest.age;
|
credentialsFile = ../../../private/cloudflared-tempest.age;
|
||||||
ca = "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBPY6C0HmdFCaxYtJxFr3qV4/1X4Q8KrYQ1hlme3u1hJXK+xW+lc9Y9glWHrhiTKilB7carYTB80US0O47gI5yU4= open-ssh-ca@cloudflareaccess.org";
|
ca = "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBPY6C0HmdFCaxYtJxFr3qV4/1X4Q8KrYQ1hlme3u1hJXK+xW+lc9Y9glWHrhiTKilB7carYTB80US0O47gI5yU4= open-ssh-ca@cloudflareaccess.org";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -9,15 +9,24 @@ let
|
|||||||
value = v;
|
value = v;
|
||||||
}) list
|
}) list
|
||||||
);
|
);
|
||||||
|
|
||||||
|
listToAttrsByPnameOrName =
|
||||||
|
list:
|
||||||
|
builtins.listToAttrs (
|
||||||
|
map (v: {
|
||||||
|
name = v."pname" ? v."name";
|
||||||
|
value = v;
|
||||||
|
}) list
|
||||||
|
);
|
||||||
lib = prev.lib;
|
lib = prev.lib;
|
||||||
packagesDirectory = lib.filesystem.listFilesRecursive ../pkgs;
|
# packagesDirectory = lib.filesystem.listFilesRecursive ../pkgs;
|
||||||
packages = lib.pipe packagesDirectory [
|
packages = lib.pipe (lib.filesystem.listFilesRecursive ../pkgs) [
|
||||||
# Get only files called package.nix
|
# Get only files called package.nix
|
||||||
(builtins.filter (name: lib.hasSuffix "package.nix"))
|
(builtins.filter (name: lib.hasSuffix "package.nix" name))
|
||||||
# Apply callPackage to create a derivation
|
# Apply callPackage to create a derivation
|
||||||
(builtins.map prev.callPackage)
|
(builtins.map (name: prev.callPackage name { }))
|
||||||
# Convert the list to an attrset
|
# Convert the list to an attrset
|
||||||
(listToAttrsByField "name")
|
listToAttrsByPnameOrName
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
|
|
||||||
|
@ -8,20 +8,20 @@
|
|||||||
|
|
||||||
# Sets Neovim colors based on Nix colorscheme
|
# Sets Neovim colors based on Nix colorscheme
|
||||||
|
|
||||||
options.colors = lib.mkOption {
|
# options.colors = lib.mkOption {
|
||||||
type = lib.types.attrsOf lib.types.str;
|
# type = lib.types.attrsOf lib.types.str;
|
||||||
description = "Attrset of base16 colorscheme key value pairs.";
|
# description = "Attrset of base16 colorscheme key value pairs.";
|
||||||
};
|
# };
|
||||||
|
|
||||||
config = lib.mkIf config.colors {
|
# config = lib.mkIf config.colors {
|
||||||
plugins = [ pkgs.vimPlugins.base16-nvim ];
|
# plugins = [ pkgs.vimPlugins.base16-nvim ];
|
||||||
setup.base16-colorscheme = config.colors;
|
# setup.base16-colorscheme = config.colors;
|
||||||
|
#
|
||||||
# Telescope isn't working, shut off for now
|
# # Telescope isn't working, shut off for now
|
||||||
lua = ''
|
# lua = ''
|
||||||
require('base16-colorscheme').with_config {
|
# require('base16-colorscheme').with_config {
|
||||||
telescope = false,
|
# telescope = false,
|
||||||
}
|
# }
|
||||||
'';
|
# '';
|
||||||
};
|
# };
|
||||||
}
|
}
|
||||||
|
@ -28,10 +28,10 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
colors ? null,
|
# colors ? null,
|
||||||
terraform ? false,
|
# terraform ? false,
|
||||||
github ? false,
|
# github ? false,
|
||||||
kubernetes ? false,
|
# kubernetes ? false,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@ -40,15 +40,15 @@
|
|||||||
pkgs.neovimBuilder {
|
pkgs.neovimBuilder {
|
||||||
package = pkgs.neovim-unwrapped;
|
package = pkgs.neovim-unwrapped;
|
||||||
inherit
|
inherit
|
||||||
colors
|
# colors
|
||||||
terraform
|
# terraform
|
||||||
github
|
# github
|
||||||
kubernetes
|
# kubernetes
|
||||||
;
|
;
|
||||||
imports = [
|
imports = [
|
||||||
./config/align.nix
|
./config/align.nix
|
||||||
./config/bufferline.nix
|
./config/bufferline.nix
|
||||||
./config/colors.nix
|
# ./config/colors.nix
|
||||||
./config/completion.nix
|
./config/completion.nix
|
||||||
./config/gitsigns.nix
|
./config/gitsigns.nix
|
||||||
./config/lsp.nix
|
./config/lsp.nix
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
{ pkgs, ... }:
|
{ buildGoModule, fetchFromGitHub }:
|
||||||
|
|
||||||
pkgs.buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "gh-collaborators";
|
pname = "gh-collaborators";
|
||||||
version = "v3.0.0";
|
version = "v3.0.0";
|
||||||
src = {
|
src = fetchFromGitHub {
|
||||||
owner = "katiem0";
|
owner = "katiem0";
|
||||||
repo = "gh-collaborators";
|
repo = "gh-collaborators";
|
||||||
rev = "4af7c8e54ecc499097121909f02ecb42a8a60d24";
|
rev = "bf412dde50605e48af86f291c2ac8714f2c1b228";
|
||||||
sha256 = pkgs.lib.fakeHash;
|
sha256 = "sha256-SGmP/8Fvf2rcYkwscMOFG01Y0VJGb/TXrNZtLacurxA=";
|
||||||
};
|
};
|
||||||
|
|
||||||
vendorHash = "sha256-9qmvG2q9t1Zj8yhKFyA99IaJ90R/gRVdQVjdliVKLRE";
|
vendorHash = "sha256-9qmvG2q9t1Zj8yhKFyA99IaJ90R/gRVdQVjdliVKLRE";
|
||||||
|
@ -7,4 +7,4 @@ pkgs.writers.writeFishBin "ip-check" {
|
|||||||
":"
|
":"
|
||||||
"${lib.makeBinPath [ pkgs.curl ]}"
|
"${lib.makeBinPath [ pkgs.curl ]}"
|
||||||
];
|
];
|
||||||
} builtins.readFile ./ip.fish
|
} (builtins.readFile ./ip.fish)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, writeShellApplication }:
|
||||||
|
|
||||||
pkgs.writeShellApplication {
|
writeShellApplication {
|
||||||
name = "ocr";
|
name = "ocr";
|
||||||
runtimeInputs = [ pkgs.tesseract ];
|
runtimeInputs = [ pkgs.tesseract ];
|
||||||
text = builtins.readFile ./ocr.sh;
|
text = builtins.readFile ./ocr.sh;
|
||||||
|
@ -1,15 +1,20 @@
|
|||||||
# Clipboard over SSH
|
# Clipboard over SSH
|
||||||
|
|
||||||
{ pkgs, ... }:
|
{
|
||||||
|
lib,
|
||||||
|
buildGoModule,
|
||||||
|
fetchFromGitHub,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
pkgs.buildGoModule {
|
buildGoModule {
|
||||||
pname = "osc";
|
pname = "osc";
|
||||||
version = "v0.4.6";
|
version = "v0.4.6";
|
||||||
src = {
|
src = fetchFromGitHub {
|
||||||
owner = "theimpostor";
|
owner = "theimpostor";
|
||||||
repo = "osc";
|
repo = "osc";
|
||||||
rev = "4af7c8e54ecc499097121909f02ecb42a8a60d24";
|
rev = "4af7c8e54ecc499097121909f02ecb42a8a60d24";
|
||||||
sha256 = pkgs.lib.fakeHash;
|
sha256 = lib.fakeSha256;
|
||||||
};
|
};
|
||||||
|
|
||||||
vendorHash = "sha256-POtQWIjPObsfa3YZ1dLZgedZFUcc4HeTWjU20AucoKc=";
|
vendorHash = "sha256-POtQWIjPObsfa3YZ1dLZgedZFUcc4HeTWjU20AucoKc=";
|
||||||
|
@ -17,7 +17,7 @@ in
|
|||||||
type = lib.types.package;
|
type = lib.types.package;
|
||||||
description = "Terminal application to launch";
|
description = "Terminal application to launch";
|
||||||
};
|
};
|
||||||
wallpaper = {
|
wallpaper = lib.mkOption {
|
||||||
type = lib.types.path;
|
type = lib.types.path;
|
||||||
description = "Wallpaper background image file";
|
description = "Wallpaper background image file";
|
||||||
default = "${pkgs.wallpapers}/gruvbox/road.jpg";
|
default = "${pkgs.wallpapers}/gruvbox/road.jpg";
|
||||||
@ -78,7 +78,7 @@ in
|
|||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
xsession.windowManager.i3 = {
|
xsession.windowManager.i3 = {
|
||||||
enable = config.services.xserver.enable;
|
enable = true;
|
||||||
config =
|
config =
|
||||||
let
|
let
|
||||||
modifier = "Mod4"; # Super key
|
modifier = "Mod4"; # Super key
|
||||||
@ -315,11 +315,10 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
programs.fish.functions = {
|
programs.fish.functions = {
|
||||||
update-lock-screen =
|
update-lock-screen = lib.mkIf (cfg.commands.updateLockScreen != null) {
|
||||||
lib.mkIf cfg.commands.updateLockScreen != null {
|
description = "Update lockscreen with wallpaper";
|
||||||
description = "Update lockscreen with wallpaper";
|
body = cfg.commands.updateLockScreen;
|
||||||
body = cfg.commands.updateLockScreen;
|
};
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Update lock screen cache only if cache is empty
|
# Update lock screen cache only if cache is empty
|
||||||
@ -327,7 +326,7 @@ in
|
|||||||
let
|
let
|
||||||
cacheDir = "${config.xdg.cacheHome}/betterlockscreen/current";
|
cacheDir = "${config.xdg.cacheHome}/betterlockscreen/current";
|
||||||
in
|
in
|
||||||
lib.mkIf cfg.commands.updateLockScreen != null (
|
lib.mkIf (cfg.commands.updateLockScreen != null) (
|
||||||
config.lib.dag.entryAfter [ "writeBoundary" ] ''
|
config.lib.dag.entryAfter [ "writeBoundary" ] ''
|
||||||
if [ ! -d ${cacheDir} ] || [ -z "$(ls ${cacheDir})" ]; then
|
if [ ! -d ${cacheDir} ] || [ -z "$(ls ${cacheDir})" ]; then
|
||||||
run ${cfg.commands.updateLockScreen}
|
run ${cfg.commands.updateLockScreen}
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (config.nmasur.settings) fullName;
|
inherit (config.nmasur.settings) fullName hostnames;
|
||||||
cfg = config.nmasur.presets.services.mbsync;
|
cfg = config.nmasur.presets.services.mbsync;
|
||||||
in
|
in
|
||||||
|
|
||||||
@ -25,10 +25,12 @@ in
|
|||||||
imapHost = lib.mkOption {
|
imapHost = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
description = "Server host for IMAP (reading mail).";
|
description = "Server host for IMAP (reading mail).";
|
||||||
|
default = config.hostnames.imap;
|
||||||
};
|
};
|
||||||
smtpHost = lib.mkOption {
|
smtpHost = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
description = "Server host for SMTP (sending mail).";
|
description = "Server host for SMTP (sending mail).";
|
||||||
|
default = config.hostnames.smtp;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -110,7 +112,7 @@ in
|
|||||||
notmuch.enable = true;
|
notmuch.enable = true;
|
||||||
|
|
||||||
# Used to login and send and receive emails
|
# Used to login and send and receive emails
|
||||||
passwordCommand = "${lib.getExe pkgs.age} --decrypt --identity ~/.ssh/id_ed25519 ${pkgs.writeText "mailpass.age" (builtins.readFile ../../../private/mailpass.age)}";
|
passwordCommand = "${lib.getExe pkgs.age} --decrypt --identity ~/.ssh/id_ed25519 ${pkgs.writeText "mailpass.age" (builtins.readFile ../../../../../../private/mailpass.age)}";
|
||||||
|
|
||||||
smtp = {
|
smtp = {
|
||||||
host = cfg.smtpHost;
|
host = cfg.smtpHost;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user