fix: nixosConfigurations: deprecations

new: nixosConfigurations/common: future place of preconfigured modules
This commit is contained in:
L-Nafaryus 2025-01-21 21:14:06 +05:00
parent 54a5884259
commit 7946912c2c
Signed by: L-Nafaryus
GPG Key ID: 553C97999B363D38
5 changed files with 156 additions and 70 deletions

View File

@ -17,7 +17,7 @@ in {
group = "users";
uid = 1000;
initialPassword = "nixos";
shell = pkgs.fish;
shell = pkgs.nushell;
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG1YGp8AI48hJUSQBZpuKLpbj2+3Q09vq64NxFr0N1MS"
];
@ -40,6 +40,8 @@ in {
inputs.catppuccin.homeManagerModules.catppuccin
inputs.ags.homeManagerModules.default
#bonLib.preconfiguredModules.homeManager.hyprland
../common/hm/helix.nix
../common/hm/nushell.nix
];
home.packages = with pkgs; [
@ -149,73 +151,6 @@ in {
accent = "green";
};
programs = {
nushell = {
enable = true;
# The config.nu can be anywhere you want if you like to edit your Nushell with Nu
#configFile.source = ./.../config.nu;
# for editing directly to config.nu
extraConfig = ''
let carapace_completer = {|spans|
carapace $spans.0 nushell ...$spans | from json
}
$env.config = {
show_banner: false,
completions: {
case_sensitive: false # case-sensitive completions
quick: true # set to false to prevent auto-selecting completions
partial: true # set to false to prevent partial filling of the prompt
algorithm: "fuzzy"
external: {
enable: true
max_results: 100
completer: $carapace_completer
}
}
}
'';
};
carapace = {
enable = true;
enableNushellIntegration = true;
enableBashIntegration = true;
};
starship = {
enable = true;
enableNushellIntegration = true;
enableBashIntegration = true;
settings = {
add_newline = true;
format = ''
$all $fill $time
$character
'';
fill = {
symbol = " ";
};
line_break = {
disabled = true;
};
directory = {
truncate_to_repo = false;
};
time = {
disabled = false;
use_12hr = true;
};
character = {
success_symbol = "[](bold green)";
error_symbol = "[](bold red)";
};
nix_shell = {
symbol = " ";
heuristic = true;
};
};
};
};
programs = {
# General
fish = {

View File

@ -115,7 +115,7 @@
forceSSL = true;
useACMEHost = "elnafo.ru";
locations."/" = {
proxyPass = "http://127.0.0.1:${toString config.services.grafana.port}";
proxyPass = "http://127.0.0.1:${toString config.services.grafana.settings.server.http_port}";
proxyWebsockets = true;
};
};

View File

@ -0,0 +1,72 @@
{
pkgs,
lib,
config,
hmConfig,
...
}: {
programs.helix = {
enable = true;
extraPackages = with pkgs; [wl-clipboard pyright ruff alejandra];
settings = {
theme = "gruvbox";
editor.cursor-shape = {
normal = "block";
insert = "bar";
select = "underline";
};
};
languages = {
language = [
{
name = "nix";
auto-format = true;
formatter.command = "alejandra";
}
{
name = "python";
language-id = "python";
roots = ["pyproject.toml" "setup.py" "poetry.lock" "uv.lock" "pdm.lock"];
language-servers = ["ruff" "pyright"];
auto-format = true;
formatter = {
command = "ruff";
args = ["format" "-"];
};
file-types = ["py"];
comment-token = "#";
shebangs = ["python"];
}
];
language-server = {
pyright = {
command = "pyright-langserver";
args = ["--stdio"];
config.python.analysis = {
venvPath = ".";
venv = ".venv";
lint = true;
inlayHint.enable = true;
autoSearchPaths = true;
diagnosticMode = "workspace";
useLibraryCodeForType = true;
logLevel = "Error";
typeCheckingMode = "off";
autoImoprtCompletion = true;
reportOptionalSubscript = false;
reportOptionalMemberAccess = false;
};
};
ruff = {
command = "ruff";
args = ["server"];
environment = {RUFF_TRACE = "messages";};
};
};
};
};
}

View File

@ -0,0 +1,79 @@
{
pkgs,
lib,
config,
hmConfig,
...
}: {
programs.nushell = {
enable = true;
# The config.nu can be anywhere you want if you like to edit your Nushell with Nu
#configFile.source = ./.../config.nu;
# for editing directly to config.nu
extraConfig = ''
let carapace_completer = {|spans|
carapace $spans.0 nushell $spans | from json
}
$env.config = {
show_banner: false,
completions: {
case_sensitive: false # case-sensitive completions
quick: true # set to false to prevent auto-selecting completions
partial: true # set to false to prevent partial filling of the prompt
algorithm: "fuzzy"
external: {
enable: true
max_results: 100
completer: $carapace_completer
}
}
}
'';
environmentVariables = {
GNUPGHOME = hmConfig.programs.gpg.homedir;
};
};
# completion
programs.carapace = {
enable = true;
enableNushellIntegration = true;
enableBashIntegration = true;
};
# prompt
programs.starship = {
enable = true;
enableNushellIntegration = true;
enableBashIntegration = true;
settings = {
add_newline = true;
format = ''
$all $fill $time
$character
'';
fill = {
symbol = " ";
};
line_break = {
disabled = true;
};
directory = {
truncate_to_repo = false;
};
time = {
disabled = false;
use_12hr = true;
};
character = {
success_symbol = "[](bold green)";
error_symbol = "[](bold red)";
};
nix_shell = {
symbol = " ";
heuristic = true;
};
};
};
}

View File

@ -94,7 +94,7 @@
networkmanager = {
enable = true;
enableStrongSwan = true;
packages = with pkgs; [
plugins = with pkgs; [
networkmanager-l2tp
];
};