mirror of
https://github.com/nmasur/dotfiles
synced 2025-07-07 13:40:14 +00:00
Compare commits
11 Commits
dec46bcc97
...
eblume-mol
Author | SHA1 | Date | |
---|---|---|---|
068cdbf5d4 | |||
c86188d734 | |||
f1cdd4ae98 | |||
332921edd3 | |||
cc69cbaa6c | |||
d165428a37 | |||
3e7955533e | |||
0b9886f93e | |||
2f39eb2ceb | |||
cf19085158 | |||
a387950c9a |
70
flake.lock
generated
70
flake.lock
generated
@ -108,11 +108,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1718588625,
|
"lastModified": 1718846788,
|
||||||
"narHash": "sha256-8ZbrJq1jcmyzJ4SDkvd8JOZD4/fNUHpL4cpqVe4w3CU=",
|
"narHash": "sha256-9dtXYtEkmXoUJV+PGLqscqF7qTn4AIhAKpFWRFU2NYs=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "disko",
|
"repo": "disko",
|
||||||
"rev": "8262659fc990cecdf6a8de74c3de7b6ec58c2276",
|
"rev": "e1174d991944a01eaaa04bc59c6281edca4c0e6e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -145,11 +145,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1718758004,
|
"lastModified": 1718930737,
|
||||||
"narHash": "sha256-obzisI1zXWfBlTXcAOfznFsIe698ZOnACi10DcL7FU0=",
|
"narHash": "sha256-+nKJ/VP6X+hirXqRry3GzdNn4OJvOdB4nRnJY22ixFw=",
|
||||||
"owner": "bandithedoge",
|
"owner": "bandithedoge",
|
||||||
"repo": "nixpkgs-firefox-darwin",
|
"repo": "nixpkgs-firefox-darwin",
|
||||||
"rev": "f6046245f1803f0127c0b2879c42d29d56246c3f",
|
"rev": "087919070dffc9798a8cb753e97babe287f06c25",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -267,11 +267,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1718788307,
|
"lastModified": 1718983978,
|
||||||
"narHash": "sha256-SqiOz0sljM0GjyQEVinPXQxaGcbOXw5OgpCWGPgh/vo=",
|
"narHash": "sha256-lp6stESwTLBZUQ5GBivxwNehShmBp4jqeX/1xahM61w=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "d7830d05421d0ced83a0f007900898bdcaf2a2ca",
|
"rev": "c559542f0aa87971a7f4c1b3478fe33cc904b902",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -286,14 +286,16 @@
|
|||||||
"cl-nix-lite": "cl-nix-lite",
|
"cl-nix-lite": "cl-nix-lite",
|
||||||
"flake-compat": "flake-compat",
|
"flake-compat": "flake-compat",
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1718336101,
|
"lastModified": 1718893255,
|
||||||
"narHash": "sha256-ynZTySa2iTry8be1NZMrnDoya1vZBfM3chBzHNHEYZw=",
|
"narHash": "sha256-NdSDGdz5eU/EcnGn8ECP1V+mn5hyGOZQ4ybv2bWTpuk=",
|
||||||
"owner": "hraban",
|
"owner": "hraban",
|
||||||
"repo": "mac-app-util",
|
"repo": "mac-app-util",
|
||||||
"rev": "a3873969fc0198b308881cbd9a1863e6ca429f26",
|
"rev": "1857b26aceaf64c2b6a357eb83cf34139b6365cc",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -412,17 +414,17 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1717868076,
|
"lastModified": 1718895438,
|
||||||
"narHash": "sha256-c83Y9t815Wa34khrux81j8K8ET94ESmCuwORSKm2bQY=",
|
"narHash": "sha256-k3JqJrkdoYwE3fHE6xGDY676AYmyh4U2Zw+0Bwe5DLU=",
|
||||||
"owner": "NixOS",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "cd18e2ae9ab8e2a0a8d715b60c91b54c0ac35ff9",
|
"rev": "d603719ec6e294f034936c0d0dc06f689d91b6c3",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "cd18e2ae9ab8e2a0a8d715b60c91b54c0ac35ff9",
|
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -442,29 +444,13 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1718530797,
|
|
||||||
"narHash": "sha256-pup6cYwtgvzDpvpSCFh1TEUjw2zkNpk8iolbKnyFmmU=",
|
|
||||||
"owner": "nixos",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "b60ebf54c15553b393d144357375ea956f89e9a9",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nixos",
|
|
||||||
"ref": "nixos-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nur": {
|
"nur": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1718811866,
|
"lastModified": 1719001822,
|
||||||
"narHash": "sha256-Jlm9c42Qk+eQbe2Wr3RHiN/MSc3MK7VE07qlmDqW2xU=",
|
"narHash": "sha256-rbEP1CTzYvdSAKf1a729De9t8GMIrZ5GmD+PdYCnrgg=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nur",
|
"repo": "nur",
|
||||||
"rev": "f7c97149b8b5d0bf7943702577eabb530f7b5f4d",
|
"rev": "e7edcaeae9db01224266febe88eb7d3411055636",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -525,11 +511,11 @@
|
|||||||
"nvim-treesitter-src": {
|
"nvim-treesitter-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1718803654,
|
"lastModified": 1718957498,
|
||||||
"narHash": "sha256-IiD9eTwF1+nGt0TmAJOyDuVrZk9z426gX1Y+KFkylEI=",
|
"narHash": "sha256-GEuKEAZxLGMkyjdJGzrIKNR1X10RHlACC6s1lNOq7aw=",
|
||||||
"owner": "nvim-treesitter",
|
"owner": "nvim-treesitter",
|
||||||
"repo": "nvim-treesitter",
|
"repo": "nvim-treesitter",
|
||||||
"rev": "66ae8748fd4e8550c8b17cf115c9739aea1e4067",
|
"rev": "b967bbc27b564001c3d3b8ea93444cf6d0b21d23",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -590,7 +576,7 @@
|
|||||||
"nextcloud-snappymail": "nextcloud-snappymail",
|
"nextcloud-snappymail": "nextcloud-snappymail",
|
||||||
"nix2vim": "nix2vim",
|
"nix2vim": "nix2vim",
|
||||||
"nixos-generators": "nixos-generators",
|
"nixos-generators": "nixos-generators",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs",
|
||||||
"nixpkgs-caddy": "nixpkgs-caddy",
|
"nixpkgs-caddy": "nixpkgs-caddy",
|
||||||
"nur": "nur",
|
"nur": "nur",
|
||||||
"nvim-lint-src": "nvim-lint-src",
|
"nvim-lint-src": "nvim-lint-src",
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
# Better App install management in macOS
|
# Better App install management in macOS
|
||||||
mac-app-util = {
|
mac-app-util = {
|
||||||
url = "github:hraban/mac-app-util";
|
url = "github:hraban/mac-app-util";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs"; # Use system packages list for their inputs
|
||||||
};
|
};
|
||||||
|
|
||||||
# Manage disk format and partitioning
|
# Manage disk format and partitioning
|
||||||
|
@ -34,6 +34,7 @@ inputs.darwin.lib.darwinSystem {
|
|||||||
dark = true;
|
dark = true;
|
||||||
};
|
};
|
||||||
mail.user = globals.user;
|
mail.user = globals.user;
|
||||||
|
mole.enable = true;
|
||||||
atuin.enable = true;
|
atuin.enable = true;
|
||||||
charm.enable = true;
|
charm.enable = true;
|
||||||
neovim.enable = true;
|
neovim.enable = true;
|
||||||
|
@ -112,6 +112,7 @@ inputs.nixpkgs.lib.nixosSystem {
|
|||||||
mullvad.enable = false;
|
mullvad.enable = false;
|
||||||
rust.enable = true;
|
rust.enable = true;
|
||||||
terraform.enable = true;
|
terraform.enable = true;
|
||||||
|
wezterm.enable = true;
|
||||||
yt-dlp.enable = true;
|
yt-dlp.enable = true;
|
||||||
gaming = {
|
gaming = {
|
||||||
dwarf-fortress.enable = true;
|
dwarf-fortress.enable = true;
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
./firefox.nix
|
./firefox.nix
|
||||||
./kitty.nix
|
./kitty.nix
|
||||||
./media.nix
|
./media.nix
|
||||||
|
./mole.nix
|
||||||
./obsidian.nix
|
./obsidian.nix
|
||||||
./qbittorrent.nix
|
./qbittorrent.nix
|
||||||
./slack.nix
|
./slack.nix
|
||||||
|
@ -159,11 +159,15 @@
|
|||||||
|
|
||||||
xdg.mimeApps = {
|
xdg.mimeApps = {
|
||||||
associations.added = {
|
associations.added = {
|
||||||
"text.html" = [ "firefox.desktop" ];
|
"text/html" = [ "firefox.desktop" ];
|
||||||
};
|
};
|
||||||
defaultApplications = {
|
defaultApplications = {
|
||||||
"text.html" = [ "firefox.desktop" ];
|
"text/html" = [ "firefox.desktop" ];
|
||||||
};
|
};
|
||||||
|
associations.removed = {
|
||||||
|
"text/html" = [ "wine-extension-htm.desktop" ];
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
xsession.windowManager.i3.config.keybindings = lib.mkIf pkgs.stdenv.isLinux {
|
xsession.windowManager.i3.config.keybindings = lib.mkIf pkgs.stdenv.isLinux {
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
environment =
|
environment =
|
||||||
{ }
|
{ }
|
||||||
// lib.attrsets.optionalAttrs (builtins.hasAttr "sessionVariables" config.environment) {
|
// lib.attrsets.optionalAttrs (builtins.hasAttr "sessionVariables" config.environment) {
|
||||||
sessionVariables.ROFI_SYSTEMD_TERM = "${pkgs.kitty}/bin/kitty";
|
sessionVariables.ROFI_SYSTEMD_TERM = lib.mkDefault "${pkgs.kitty}/bin/kitty";
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users.${config.user} = {
|
home-manager.users.${config.user} = {
|
||||||
@ -31,7 +31,7 @@
|
|||||||
xsession.windowManager.i3.config.terminal = lib.mkIf pkgs.stdenv.isLinux "kitty";
|
xsession.windowManager.i3.config.terminal = lib.mkIf pkgs.stdenv.isLinux "kitty";
|
||||||
|
|
||||||
# Set the Rofi terminal for running programs
|
# Set the Rofi terminal for running programs
|
||||||
programs.rofi.terminal = lib.mkIf pkgs.stdenv.isLinux "${pkgs.kitty}/bin/kitty";
|
programs.rofi.terminal = lib.mkIf pkgs.stdenv.isLinux (lib.mkDefault "${pkgs.kitty}/bin/kitty");
|
||||||
|
|
||||||
# Display images in the terminal
|
# Display images in the terminal
|
||||||
programs.fish.shellAliases = {
|
programs.fish.shellAliases = {
|
||||||
|
110
modules/common/applications/mole.nix
Normal file
110
modules/common/applications/mole.nix
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
# Build kdl-py
|
||||||
|
kdl-py = pkgs.python311.pkgs.buildPythonPackage rec {
|
||||||
|
pname = "kdl-py";
|
||||||
|
version = "1.2.0";
|
||||||
|
pyproject = true;
|
||||||
|
src = pkgs.fetchPypi {
|
||||||
|
inherit pname version;
|
||||||
|
hash = "sha256-Y/P0bGJ33trc5E3PyUZyv25r8zMLkBIuATTCKFfimXM=";
|
||||||
|
};
|
||||||
|
build-system = [ pkgs.python311.pkgs.setuptools ];
|
||||||
|
# has no tests
|
||||||
|
doCheck = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
mole = pkgs.python311.pkgs.buildPythonPackage rec {
|
||||||
|
pname = "mole";
|
||||||
|
version = "0.7.1";
|
||||||
|
pyproject = true;
|
||||||
|
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "eblume";
|
||||||
|
repo = pname;
|
||||||
|
rev = "30bb052a97050b1fa89c287855d834f7952b195a";
|
||||||
|
sha256 = "sha256-DUWsfyICCfFQ2ZQBYSQVoA3eLdKC8djUylKgGdHIyJo=";
|
||||||
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
(builtins.toString (
|
||||||
|
pkgs.writeText "pyproject.toml.patch" ''
|
||||||
|
diff --git a/pyproject.toml b/pyproject.toml
|
||||||
|
index 12ce0f5..787e978 100644
|
||||||
|
--- a/pyproject.toml
|
||||||
|
+++ b/pyproject.toml
|
||||||
|
@@ -12,11 +12,11 @@ packages = [
|
||||||
|
[tool.poetry.dependencies]
|
||||||
|
python = "^3.11"
|
||||||
|
# Now back to the regular dependencies
|
||||||
|
-typer = {extras = ["all"], version = "^0.9"}
|
||||||
|
+typer = {extras = ["all"], version = "^0.12"}
|
||||||
|
todoist-api-python = "^2.1.3"
|
||||||
|
openai = "^1.2.4"
|
||||||
|
rich = "^13.4.2"
|
||||||
|
-watchdog = "^3.0.0"
|
||||||
|
+watchdog = "^4.0.0"
|
||||||
|
pydub = "^0.25.1"
|
||||||
|
requests = "^2.31.0"
|
||||||
|
pyyaml = "^6.0.1"
|
||||||
|
''
|
||||||
|
))
|
||||||
|
];
|
||||||
|
|
||||||
|
# Used during build time
|
||||||
|
nativeBuildInputs = [ pkgs.python311Packages.poetry-core ];
|
||||||
|
|
||||||
|
# Used during run time
|
||||||
|
buildInputs = [
|
||||||
|
pkgs._1password
|
||||||
|
pkgs.nb-cli
|
||||||
|
];
|
||||||
|
|
||||||
|
# Both build and run time
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
pkgs.python311Packages.typer
|
||||||
|
pkgs.python311Packages.todoist-api-python
|
||||||
|
pkgs.python311Packages.openai
|
||||||
|
pkgs.python311Packages.rich
|
||||||
|
pkgs.python311Packages.watchdog
|
||||||
|
pkgs.python311Packages.pydub
|
||||||
|
pkgs.python311Packages.requests
|
||||||
|
pkgs.python311Packages.pyyaml
|
||||||
|
pkgs.python311Packages.pydantic
|
||||||
|
pkgs.python311Packages.pendulum
|
||||||
|
kdl-py
|
||||||
|
pkgs.ffmpeg
|
||||||
|
];
|
||||||
|
|
||||||
|
build-system = [ pkgs.python311.pkgs.setuptools ];
|
||||||
|
|
||||||
|
# has no tests
|
||||||
|
doCheck = false;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
in
|
||||||
|
{
|
||||||
|
|
||||||
|
options = {
|
||||||
|
mole = {
|
||||||
|
enable = lib.mkEnableOption {
|
||||||
|
description = "Enable Mole.";
|
||||||
|
default = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf config.mole.enable {
|
||||||
|
home-manager.users.${config.user} = {
|
||||||
|
home.packages = [ mole ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -15,202 +15,221 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf (config.gui.enable && config.wezterm.enable) {
|
config =
|
||||||
|
let
|
||||||
|
font = config.home-manager.users.${config.user}.programs.kitty.font.name;
|
||||||
|
in
|
||||||
|
lib.mkIf (config.gui.enable && config.wezterm.enable) {
|
||||||
|
|
||||||
# Set the Rofi-Systemd terminal for viewing logs
|
# Set the Rofi-Systemd terminal for viewing logs
|
||||||
# Using optionalAttrs because only available in NixOS
|
# Using optionalAttrs because only available in NixOS
|
||||||
environment =
|
environment =
|
||||||
{ }
|
{ }
|
||||||
// lib.attrsets.optionalAttrs (builtins.hasAttr "sessionVariables" config.environment) {
|
// lib.attrsets.optionalAttrs (builtins.hasAttr "sessionVariables" config.environment) {
|
||||||
sessionVariables.ROFI_SYSTEMD_TERM = "${pkgs.wezterm}/bin/wezterm";
|
sessionVariables.ROFI_SYSTEMD_TERM = "${pkgs.wezterm}/bin/wezterm";
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users.${config.user} = {
|
home-manager.users.${config.user} = {
|
||||||
|
|
||||||
# Set the i3 terminal
|
# Set the i3 terminal
|
||||||
xsession.windowManager.i3.config.terminal = lib.mkIf pkgs.stdenv.isLinux "wezterm";
|
xsession.windowManager.i3.config.terminal = lib.mkIf pkgs.stdenv.isLinux "wezterm";
|
||||||
|
|
||||||
# Set the Rofi terminal for running programs
|
# Set the Rofi terminal for running programs
|
||||||
programs.rofi.terminal = lib.mkIf pkgs.stdenv.isLinux "${pkgs.wezterm}/bin/wezterm";
|
programs.rofi.terminal = lib.mkIf pkgs.stdenv.isLinux "${pkgs.wezterm}/bin/wezterm";
|
||||||
|
|
||||||
# Display images in the terminal
|
# Display images in the terminal
|
||||||
programs.fish.shellAliases = {
|
programs.fish.shellAliases = {
|
||||||
icat = lib.mkForce "wezterm imgcat";
|
icat = lib.mkForce "wezterm imgcat";
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.wezterm = {
|
programs.wezterm = {
|
||||||
enable = true;
|
enable = true;
|
||||||
colorSchemes = {
|
colorSchemes = {
|
||||||
myTheme = {
|
myTheme = {
|
||||||
background = config.theme.colors.base00;
|
background = config.theme.colors.base00;
|
||||||
foreground = config.theme.colors.base05;
|
foreground = config.theme.colors.base05;
|
||||||
cursor_bg = config.theme.colors.base05;
|
cursor_bg = config.theme.colors.base05;
|
||||||
cursor_fg = config.theme.colors.base00;
|
cursor_fg = config.theme.colors.base00;
|
||||||
cursor_border = config.theme.colors.base05;
|
cursor_border = config.theme.colors.base05;
|
||||||
selection_bg = config.theme.colors.base05;
|
selection_bg = config.theme.colors.base05;
|
||||||
selection_fg = config.theme.colors.base00;
|
selection_fg = config.theme.colors.base00;
|
||||||
scrollbar_thumb = config.theme.colors.base03;
|
scrollbar_thumb = config.theme.colors.base03;
|
||||||
ansi = [
|
ansi = [
|
||||||
config.theme.colors.base01 # black
|
config.theme.colors.base01 # black
|
||||||
config.theme.colors.base0F # maroon
|
config.theme.colors.base0F # maroon
|
||||||
config.theme.colors.base0B # green
|
config.theme.colors.base0B # green
|
||||||
config.theme.colors.base0A # olive
|
config.theme.colors.base0A # olive
|
||||||
config.theme.colors.base0D # navy
|
config.theme.colors.base0D # navy
|
||||||
config.theme.colors.base0E # purple
|
config.theme.colors.base0E # purple
|
||||||
config.theme.colors.base0C # teal
|
config.theme.colors.base0C # teal
|
||||||
config.theme.colors.base06 # silver
|
config.theme.colors.base06 # silver
|
||||||
];
|
];
|
||||||
brights = [
|
brights = [
|
||||||
config.theme.colors.base03 # grey
|
config.theme.colors.base03 # grey
|
||||||
config.theme.colors.base08 # red
|
config.theme.colors.base08 # red
|
||||||
config.theme.colors.base0B # lime
|
config.theme.colors.base0B # lime
|
||||||
config.theme.colors.base0A # yellow
|
config.theme.colors.base0A # yellow
|
||||||
config.theme.colors.base0D # blue
|
config.theme.colors.base0D # blue
|
||||||
config.theme.colors.base0E # fuchsia
|
config.theme.colors.base0E # fuchsia
|
||||||
config.theme.colors.base0C # aqua
|
config.theme.colors.base0C # aqua
|
||||||
config.theme.colors.base07 # white
|
config.theme.colors.base07 # white
|
||||||
];
|
];
|
||||||
compose_cursor = config.theme.colors.base09; # orange
|
compose_cursor = config.theme.colors.base09; # orange
|
||||||
copy_mode_active_highlight_bg = {
|
copy_mode_active_highlight_bg = {
|
||||||
Color = config.theme.colors.base03;
|
Color = config.theme.colors.base03;
|
||||||
};
|
};
|
||||||
copy_mode_active_highlight_fg = {
|
copy_mode_active_highlight_fg = {
|
||||||
Color = config.theme.colors.base07;
|
Color = config.theme.colors.base07;
|
||||||
};
|
};
|
||||||
copy_mode_inactive_highlight_bg = {
|
copy_mode_inactive_highlight_bg = {
|
||||||
Color = config.theme.colors.base02;
|
Color = config.theme.colors.base02;
|
||||||
};
|
};
|
||||||
copy_mode_inactive_highlight_fg = {
|
copy_mode_inactive_highlight_fg = {
|
||||||
Color = config.theme.colors.base06;
|
Color = config.theme.colors.base06;
|
||||||
};
|
};
|
||||||
quick_select_label_bg = {
|
quick_select_label_bg = {
|
||||||
Color = config.theme.colors.base02;
|
Color = config.theme.colors.base02;
|
||||||
};
|
};
|
||||||
quick_select_label_fg = {
|
quick_select_label_fg = {
|
||||||
Color = config.theme.colors.base06;
|
Color = config.theme.colors.base06;
|
||||||
};
|
};
|
||||||
quick_select_match_bg = {
|
quick_select_match_bg = {
|
||||||
Color = config.theme.colors.base03;
|
Color = config.theme.colors.base03;
|
||||||
};
|
};
|
||||||
quick_select_match_fg = {
|
quick_select_match_fg = {
|
||||||
Color = config.theme.colors.base07;
|
Color = config.theme.colors.base07;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
extraConfig = ''
|
||||||
extraConfig = ''
|
return {
|
||||||
return {
|
color_scheme = "myTheme",
|
||||||
color_scheme = "myTheme",
|
|
||||||
|
|
||||||
-- Scrollback
|
-- Scrollback
|
||||||
scrollback_lines = 10000,
|
scrollback_lines = 10000,
|
||||||
|
|
||||||
-- Window
|
-- Window
|
||||||
window_padding = {
|
window_padding = {
|
||||||
left = 6,
|
left = 10,
|
||||||
right = 6,
|
right = 10,
|
||||||
top = 0,
|
top = 10,
|
||||||
bottom = 0,
|
bottom = 10,
|
||||||
},
|
},
|
||||||
|
|
||||||
font = wezterm.font 'VictorMono Nerd Font',
|
font = wezterm.font('${font}', { weight = 'Bold'}),
|
||||||
font_size = 18.0,
|
font_size = ${if pkgs.stdenv.isLinux then "14.0" else "18.0"},
|
||||||
|
|
||||||
-- Tab Bar
|
-- Tab Bar
|
||||||
window_frame = {
|
hide_tab_bar_if_only_one_tab = true,
|
||||||
font = wezterm.font 'VictorMono Nerd Font',
|
window_frame = {
|
||||||
font_size = 16.0,
|
font = wezterm.font('${font}', { weight = 'Bold'}),
|
||||||
},
|
font_size = ${if pkgs.stdenv.isLinux then "12.0" else "16.0"},
|
||||||
|
},
|
||||||
|
|
||||||
colors = {
|
colors = {
|
||||||
tab_bar = {
|
tab_bar = {
|
||||||
active_tab = {
|
active_tab = {
|
||||||
bg_color = '${config.theme.colors.base00}',
|
bg_color = '${config.theme.colors.base00}',
|
||||||
fg_color = '${config.theme.colors.base04}',
|
fg_color = '${config.theme.colors.base04}',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
|
||||||
|
|
||||||
-- Disable audio
|
-- Disable audio
|
||||||
audible_bell = "Disabled",
|
audible_bell = "Disabled",
|
||||||
|
|
||||||
initial_rows = 80,
|
initial_rows = 80,
|
||||||
initial_cols = 200,
|
initial_cols = 200,
|
||||||
|
|
||||||
keys = {
|
keys = {
|
||||||
-- sends completion string for fish autosuggestions
|
-- sends completion string for fish autosuggestions
|
||||||
{
|
{
|
||||||
key = 'Enter',
|
key = 'Enter',
|
||||||
mods = 'SHIFT',
|
mods = 'SHIFT',
|
||||||
action = wezterm.action.SendString '\x1F'
|
action = wezterm.action.SendString '\x1F'
|
||||||
},
|
},
|
||||||
-- ctrl-shift-h was "hide"
|
-- ctrl-shift-h was "hide"
|
||||||
{
|
{
|
||||||
key = 'H',
|
key = 'H',
|
||||||
mods = 'SHIFT|CTRL',
|
mods = 'SHIFT|CTRL',
|
||||||
action = wezterm.action.DisableDefaultAssignment
|
action = wezterm.action.DisableDefaultAssignment
|
||||||
},
|
},
|
||||||
-- alt-enter was "fullscreen"
|
-- alt-enter was "fullscreen"
|
||||||
{
|
{
|
||||||
key = 'Enter',
|
key = 'Enter',
|
||||||
mods = 'ALT',
|
mods = 'ALT',
|
||||||
action = wezterm.action.DisableDefaultAssignment
|
action = wezterm.action.DisableDefaultAssignment
|
||||||
},
|
},
|
||||||
-- make super-f "fullscreen"
|
-- make super-f "fullscreen"
|
||||||
{
|
{
|
||||||
key = 'f',
|
key = 'f',
|
||||||
mods = 'SUPER',
|
mods = 'SUPER',
|
||||||
action = wezterm.action.ToggleFullScreen
|
action = wezterm.action.ToggleFullScreen
|
||||||
},
|
},
|
||||||
-- project switcher
|
-- super-t open new tab in new dir
|
||||||
{
|
{
|
||||||
key = 'P',
|
key = 't',
|
||||||
mods = 'SUPER',
|
mods = 'SUPER',
|
||||||
action = wezterm.action_callback(function(window, pane)
|
action = wezterm.action.SpawnCommandInNewTab {
|
||||||
local choices = {}
|
cwd = wezterm.home_dir,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- shift-super-t open new tab in same dir
|
||||||
|
{
|
||||||
|
key = 't',
|
||||||
|
mods = 'SUPER|SHIFT',
|
||||||
|
action = wezterm.action.SpawnTab 'CurrentPaneDomain'
|
||||||
|
},
|
||||||
|
-- project switcher
|
||||||
|
{
|
||||||
|
key = 'P',
|
||||||
|
mods = 'SUPER',
|
||||||
|
action = wezterm.action_callback(function(window, pane)
|
||||||
|
local choices = {}
|
||||||
|
|
||||||
wezterm.log_info "working?"
|
wezterm.log_info "working?"
|
||||||
|
|
||||||
function scandir(directory)
|
function scandir(directory)
|
||||||
local i, t, popen = 0, {}, io.popen
|
local i, t, popen = 0, {}, io.popen
|
||||||
local pfile = popen('${pkgs.fd}/bin/fd --search-path "'..directory..'" --type directory --exact-depth 2 | ${pkgs.proximity-sort}/bin/proximity-sort "'..os.getenv("HOME").."/dev/work"..'"')
|
local pfile = popen('${pkgs.fd}/bin/fd --search-path "'..directory..'" --type directory --exact-depth 2 | ${pkgs.proximity-sort}/bin/proximity-sort "'..os.getenv("HOME").."/dev/work"..'"')
|
||||||
for filename in pfile:lines() do
|
for filename in pfile:lines() do
|
||||||
i = i + 1
|
i = i + 1
|
||||||
t[i] = filename
|
t[i] = filename
|
||||||
end
|
|
||||||
pfile:close()
|
|
||||||
return t
|
|
||||||
end
|
|
||||||
|
|
||||||
for _, v in pairs(scandir(os.getenv("HOME").."/dev")) do
|
|
||||||
table.insert(choices, { label = v })
|
|
||||||
end
|
|
||||||
|
|
||||||
window:perform_action(
|
|
||||||
wezterm.action.InputSelector {
|
|
||||||
action = wezterm.action_callback(function(window, pane, id, label)
|
|
||||||
if not id and not label then
|
|
||||||
wezterm.log_info "cancelled"
|
|
||||||
else
|
|
||||||
window:perform_action(
|
|
||||||
wezterm.action.SpawnCommandInNewTab {
|
|
||||||
cwd = label,
|
|
||||||
},
|
|
||||||
pane
|
|
||||||
)
|
|
||||||
end
|
end
|
||||||
end),
|
pfile:close()
|
||||||
fuzzy = true,
|
return t
|
||||||
title = "Select Project",
|
end
|
||||||
choices = choices,
|
|
||||||
},
|
for _, v in pairs(scandir(os.getenv("HOME").."/dev")) do
|
||||||
pane
|
table.insert(choices, { label = v })
|
||||||
)
|
end
|
||||||
end),
|
|
||||||
|
window:perform_action(
|
||||||
|
wezterm.action.InputSelector {
|
||||||
|
action = wezterm.action_callback(function(window, pane, id, label)
|
||||||
|
if not id and not label then
|
||||||
|
wezterm.log_info "cancelled"
|
||||||
|
else
|
||||||
|
window:perform_action(
|
||||||
|
wezterm.action.SpawnCommandInNewTab {
|
||||||
|
cwd = label,
|
||||||
|
},
|
||||||
|
pane
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end),
|
||||||
|
fuzzy = true,
|
||||||
|
title = "Select Project",
|
||||||
|
choices = choices,
|
||||||
|
},
|
||||||
|
pane
|
||||||
|
)
|
||||||
|
end),
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
}
|
||||||
}
|
'';
|
||||||
'';
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
@ -158,7 +158,11 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
extraConfig = {
|
extraConfig = {
|
||||||
general.unsafe-accounts-conf = true;
|
general = {
|
||||||
|
unsafe-accounts-conf = true;
|
||||||
|
# log-file = "~/.cache/aerc.log";
|
||||||
|
# log-level = "debug";
|
||||||
|
};
|
||||||
viewer = {
|
viewer = {
|
||||||
pager = "${pkgs.less}/bin/less -R";
|
pager = "${pkgs.less}/bin/less -R";
|
||||||
};
|
};
|
||||||
|
@ -41,15 +41,15 @@ local function worklayout()
|
|||||||
local u = hs.geometry.unitrect
|
local u = hs.geometry.unitrect
|
||||||
-- set the layout
|
-- set the layout
|
||||||
local left = {
|
local left = {
|
||||||
{ "kitty", nil, WORK_ONLY_MONITOR, u(0, 0, 1 / 2, 1), nil, nil, visible = true },
|
{ "WezTerm", nil, WORK_ONLY_MONITOR, u(0, 0, 1 / 2, 1), nil, nil, visible = true },
|
||||||
}
|
}
|
||||||
local right = {
|
local right = {
|
||||||
{ "Slack", nil, WORK_ONLY_MONITOR, u(1 / 2, 0, 1 / 2, 1), nil, nil, visible = true },
|
{ "Slack", nil, WORK_ONLY_MONITOR, u(1 / 2, 0, 1 / 2, 1), nil, nil, visible = true },
|
||||||
{ "Mail", nil, WORK_ONLY_MONITOR, u(1 / 2, 0, 1 / 2, 1), nil, nil, visible = true },
|
{ "Mail", nil, WORK_ONLY_MONITOR, u(1 / 2, 0, 1 / 2, 1), nil, nil, visible = true },
|
||||||
{ "zoom.us", nil, WORK_ONLY_MONITOR, u(5 / 8, 1 / 4, 1 / 4, 1 / 2), nil, nil, visible = true },
|
{ "zoom.us", nil, WORK_ONLY_MONITOR, u(5 / 8, 1 / 4, 1 / 4, 1 / 2), nil, nil, visible = true },
|
||||||
}
|
}
|
||||||
local laptop = {
|
local laptop = {
|
||||||
{ "Firefox", nil, LAPTOP_MONITOR, u(0, 0, 1, 1), nil, nil, visible = true },
|
{ "Firefox", nil, LAPTOP_MONITOR, u(0, 0, 1, 1), nil, nil, visible = true },
|
||||||
{ "Obsidian", nil, LAPTOP_MONITOR, u(0, 0, 1, 1), nil, nil, visible = true },
|
{ "Obsidian", nil, LAPTOP_MONITOR, u(0, 0, 1, 1), nil, nil, visible = true },
|
||||||
{ "Calendar", nil, LAPTOP_MONITOR, u(0, 0, 1, 1), nil, nil, visible = true },
|
{ "Calendar", nil, LAPTOP_MONITOR, u(0, 0, 1, 1), nil, nil, visible = true },
|
||||||
}
|
}
|
||||||
|
@ -19,10 +19,9 @@
|
|||||||
options.gaming.enable = lib.mkEnableOption "Enable gaming features.";
|
options.gaming.enable = lib.mkEnableOption "Enable gaming features.";
|
||||||
|
|
||||||
config = lib.mkIf (config.gaming.enable && pkgs.stdenv.isLinux) {
|
config = lib.mkIf (config.gaming.enable && pkgs.stdenv.isLinux) {
|
||||||
hardware.opengl = {
|
hardware.graphics = {
|
||||||
enable = true;
|
enable = true;
|
||||||
driSupport = true;
|
enable32Bit = true;
|
||||||
driSupport32Bit = true;
|
|
||||||
};
|
};
|
||||||
programs.gamemode.enable = true;
|
programs.gamemode.enable = true;
|
||||||
};
|
};
|
||||||
|
@ -9,6 +9,7 @@ let
|
|||||||
|
|
||||||
lockCmd = "${pkgs.betterlockscreen}/bin/betterlockscreen --lock --display 1 --blur 0.5 --span";
|
lockCmd = "${pkgs.betterlockscreen}/bin/betterlockscreen --lock --display 1 --blur 0.5 --span";
|
||||||
lockUpdate = "${pkgs.betterlockscreen}/bin/betterlockscreen --update ${config.wallpaper} --display 1 --span";
|
lockUpdate = "${pkgs.betterlockscreen}/bin/betterlockscreen --update ${config.wallpaper} --display 1 --span";
|
||||||
|
terminal = "wezterm";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -47,9 +48,10 @@ in
|
|||||||
assigns = {
|
assigns = {
|
||||||
"${ws1}" = [ { class = "Firefox"; } ];
|
"${ws1}" = [ { class = "Firefox"; } ];
|
||||||
"${ws2}" = [
|
"${ws2}" = [
|
||||||
{ class = "kitty"; }
|
|
||||||
{ class = "aerc"; }
|
{ class = "aerc"; }
|
||||||
|
{ class = "kitty"; }
|
||||||
{ class = "obsidian"; }
|
{ class = "obsidian"; }
|
||||||
|
{ class = "wezterm"; }
|
||||||
];
|
];
|
||||||
"${ws3}" = [ { class = "discord"; } ];
|
"${ws3}" = [ { class = "discord"; } ];
|
||||||
"${ws4}" = [
|
"${ws4}" = [
|
||||||
@ -126,7 +128,9 @@ in
|
|||||||
"XF86AudioPrev" = "exec ${pkgs.playerctl}/bin/playerctl previous";
|
"XF86AudioPrev" = "exec ${pkgs.playerctl}/bin/playerctl previous";
|
||||||
|
|
||||||
# Launchers
|
# Launchers
|
||||||
"${modifier}+Return" = "exec --no-startup-id kitty; workspace ${ws2}; layout tabbed";
|
"${modifier}+Return" = "exec --no-startup-id ${
|
||||||
|
config.home-manager.users.${config.user}.programs.rofi.terminal
|
||||||
|
}; workspace ${ws2}; layout tabbed";
|
||||||
"${modifier}+space" = "exec --no-startup-id ${config.launcherCommand}";
|
"${modifier}+space" = "exec --no-startup-id ${config.launcherCommand}";
|
||||||
"${modifier}+Shift+s" = "exec --no-startup-id ${config.systemdSearch}";
|
"${modifier}+Shift+s" = "exec --no-startup-id ${config.systemdSearch}";
|
||||||
"${modifier}+Shift+a" = "exec --no-startup-id ${config.audioSwitchCommand}";
|
"${modifier}+Shift+a" = "exec --no-startup-id ${config.audioSwitchCommand}";
|
||||||
@ -138,8 +142,12 @@ in
|
|||||||
"${modifier}+Shift+r" = "restart";
|
"${modifier}+Shift+r" = "restart";
|
||||||
"${modifier}+Shift+q" = ''exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"'';
|
"${modifier}+Shift+q" = ''exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"'';
|
||||||
"${modifier}+Shift+x" = "exec ${lockCmd}";
|
"${modifier}+Shift+x" = "exec ${lockCmd}";
|
||||||
"${modifier}+Mod1+h" = "exec --no-startup-id kitty sh -c '${pkgs.home-manager}/bin/home-manager switch --flake ${config.dotfilesPath}#${config.networking.hostName} || read'";
|
"${modifier}+Mod1+h" = "exec --no-startup-id ${
|
||||||
"${modifier}+Mod1+r" = "exec --no-startup-id kitty sh -c 'doas nixos-rebuild switch --flake ${config.dotfilesPath}#${config.networking.hostName} || read'";
|
config.home-manager.users.${config.user}.programs.rofi.terminal
|
||||||
|
} -e sh -c '${pkgs.home-manager}/bin/home-manager switch --flake ${config.dotfilesPath}#${config.networking.hostName} || read'";
|
||||||
|
"${modifier}+Mod1+r" = "exec --no-startup-id ${
|
||||||
|
config.home-manager.users.${config.user}.programs.rofi.terminal
|
||||||
|
} -e sh -c 'doas nixos-rebuild switch --flake ${config.dotfilesPath}#${config.networking.hostName} || read'";
|
||||||
|
|
||||||
# Window options
|
# Window options
|
||||||
"${modifier}+q" = "kill";
|
"${modifier}+q" = "kill";
|
||||||
|
@ -18,9 +18,6 @@ in
|
|||||||
|
|
||||||
config = lib.mkIf (pkgs.stdenv.isLinux && config.services.xserver.enable) {
|
config = lib.mkIf (pkgs.stdenv.isLinux && config.services.xserver.enable) {
|
||||||
|
|
||||||
# Set the Rofi-Systemd terminal for viewing logs
|
|
||||||
environment.sessionVariables.ROFI_SYSTEMD_TERM = lib.mkIf config.kitty.enable "${pkgs.kitty}/bin/kitty";
|
|
||||||
|
|
||||||
home-manager.users.${config.user} = {
|
home-manager.users.${config.user} = {
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
|
@ -54,9 +54,8 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
# Enable VA-API for hardware transcoding
|
# Enable VA-API for hardware transcoding
|
||||||
hardware.opengl = {
|
hardware.graphics = {
|
||||||
enable = true;
|
enable = true;
|
||||||
driSupport = true;
|
|
||||||
extraPackages = [ pkgs.libva ];
|
extraPackages = [ pkgs.libva ];
|
||||||
};
|
};
|
||||||
environment.systemPackages = [ pkgs.libva-utils ];
|
environment.systemPackages = [ pkgs.libva-utils ];
|
||||||
|
@ -12,7 +12,7 @@ let
|
|||||||
|
|
||||||
username = "prometheus";
|
username = "prometheus";
|
||||||
|
|
||||||
prometheusConfig = (pkgs.formats.yaml { }).generate "prometheus.yml" {
|
prometheusConfig = {
|
||||||
scrape_configs = [
|
scrape_configs = [
|
||||||
{
|
{
|
||||||
job_name = config.networking.hostName;
|
job_name = config.networking.hostName;
|
||||||
@ -38,8 +38,6 @@ in
|
|||||||
|
|
||||||
config = {
|
config = {
|
||||||
|
|
||||||
services.victoriametrics.extraOptions = [ "-promscrape.config=${prometheusConfig}" ];
|
|
||||||
|
|
||||||
systemd.services.vmauth = lib.mkIf config.services.victoriametrics.enable {
|
systemd.services.vmauth = lib.mkIf config.services.victoriametrics.enable {
|
||||||
description = "VictoriaMetrics basic auth proxy";
|
description = "VictoriaMetrics basic auth proxy";
|
||||||
after = [ "network.target" ];
|
after = [ "network.target" ];
|
||||||
@ -85,21 +83,18 @@ in
|
|||||||
|
|
||||||
# VMAgent
|
# VMAgent
|
||||||
|
|
||||||
services.vmagent.prometheusConfig = prometheusConfig; # Overwritten below
|
services.vmagent = {
|
||||||
systemd.services.vmagent.serviceConfig = lib.mkIf config.services.vmagent.enable {
|
prometheusConfig = prometheusConfig;
|
||||||
ExecStart = lib.mkForce ''
|
remoteWrite = {
|
||||||
${pkgs.victoriametrics}/bin/vmagent \
|
url = "https://${config.hostnames.prometheus}/api/v1/write";
|
||||||
-promscrape.config=${prometheusConfig} \
|
basicAuthUsername = username;
|
||||||
-remoteWrite.url="https://${config.hostnames.prometheus}/api/v1/write" \
|
basicAuthPasswordFile = config.secrets.vmagent.dest;
|
||||||
-remoteWrite.basicAuth.username=${username} \
|
};
|
||||||
-remoteWrite.basicAuth.passwordFile=${config.secrets.vmagent.dest}'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
secrets.vmagent = lib.mkIf config.services.vmagent.enable {
|
secrets.vmagent = lib.mkIf config.services.vmagent.enable {
|
||||||
source = ../../../private/prometheus.age;
|
source = ../../../private/prometheus.age;
|
||||||
dest = "${config.secretsDirectory}/vmagent";
|
dest = "${config.secretsDirectory}/vmagent";
|
||||||
owner = "vmagent";
|
|
||||||
group = "vmagent";
|
|
||||||
};
|
};
|
||||||
systemd.services.vmagent-secret = lib.mkIf config.services.vmagent.enable {
|
systemd.services.vmagent-secret = lib.mkIf config.services.vmagent.enable {
|
||||||
requiredBy = [ "vmagent.service" ];
|
requiredBy = [ "vmagent.service" ];
|
||||||
|
Reference in New Issue
Block a user