Compare commits

..

11 Commits

Author SHA1 Message Date
c40b78db93 chore: update secrets 2025-05-04 10:59:49 +08:00
8e2fe9ba0b chore: flake 2025-05-04 10:59:34 +08:00
7c627d2a42 fix: wsl 2025-05-04 10:59:22 +08:00
a477e7095b feat: lazygit 2025-05-04 10:59:05 +08:00
27041ff1fa feat(nvim): switch virtual_lines 2025-05-04 10:58:47 +08:00
bf1539e914 fix: vscode 2025-05-04 10:58:16 +08:00
0a52c5f1b2 fix: impermanence permission 2025-05-04 10:58:06 +08:00
1a7112c21d chore: remove useless comments 2025-05-04 10:57:03 +08:00
515cfe3866 feat: disable tailscale 2025-05-04 10:56:42 +08:00
8949fbea6b feat: move to sddm 2025-05-04 10:56:31 +08:00
ba30d87ef4 Revert "feat: move to ly"
This reverts commit ece19eadb8.
2025-05-04 10:14:54 +08:00
14 changed files with 65 additions and 94 deletions

View File

@@ -21,7 +21,10 @@
"workspace"
"Virt"
".ssh"
{
directory = ".ssh";
mode = "0700";
}
".local/state"
".local/share"
".local/share/nvim"

View File

@@ -1,7 +1,7 @@
{ username, nixos-wsl, ... }:
{ username, inputs, ... }:
{
imports = [
nixos-wsl.nixosModules.wsl
inputs.nixos-wsl.nixosModules.wsl
];
wsl.enable = true;
wsl.defaultUser = username;

View File

@@ -162,10 +162,7 @@
".android"
"Android"
{
directory = ".ssh";
mode = "0700";
}
".ssh"
"bin"
"workspace"

View File

@@ -110,8 +110,6 @@
webui = pkgs.metacubexd;
};
services.tailscale.enable = true;
sops.secrets.et-imxyy-nix = {
sopsFile = sopsRoot + /et-imxyy-nix.toml;
format = "binary";

View File

@@ -111,56 +111,13 @@ in
};
environment.variables.NIX_REMOTE = "daemon";
# services.pipewire.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
# alsa.enable = true;
# alsa.support32Bit = true;
# pulse.enable = true;
alsa.enable = false;
alsa.support32Bit = false;
pulse.enable = false;
audio.enable = false;
configPackages = [
/*
(pkgs.writeTextDir "share/pipewire/media-session.d/bluez-monitor.conf" ''
rules = [
{
actions = {
update-props = {
bluez5.autoswitch-profile = true;
}
}
}
]
'')
*/
];
};
services.pipewire.wireplumber.extraConfig = {
/*
"10-bluez" = {
"monitor.bluez.properties" = {
"bluez5.enable-sbc-xq" = true;
"bluez5.enable-msbc" = true;
"bluez5.enable-hw-volume" = true;
"bluez5.roles" = [
"hsp_hs"
"hsp_ag"
"hfp_hf"
"hfp_ag"
];
};
};
*/
/*
"11-bluetooth-policy" = {
"wireplumber.settings" = {
"bluetooth.autoswitch-to-headset-profile" = false;
};
};
*/
};
services.pulseaudio = {
enable = true;

View File

@@ -177,8 +177,8 @@
./config/hosts/${hostname}
inputs.sops-nix.nixosModules.sops
inputs.impermanence.nixosModules.impermanence
inputs.niri.nixosModules.niri
inputs.home-manager.nixosModules.default
inputs.niri.nixosModules.niri
home
pkgsConf
];

View File

@@ -63,6 +63,9 @@ lib.my.makeSwitch {
push.autoSetupRemote = true;
};
};
programs.lazygit = {
enable = true;
};
home.packages = with pkgs; [
lsd

View File

@@ -37,7 +37,10 @@ local extra_config = {
settings = {
rust_analyzer = {
check = {
command = "clippy"
command = "cargo clippy"
},
diagnostics = {
experimental = true,
},
formatting = {
command = { "rustfmt" },
@@ -47,22 +50,6 @@ local extra_config = {
},
}
local on_attach = function(client, bufnr)
vim.api.nvim_create_autocmd("CursorHold", {
buffer = bufnr,
callback = function()
local opts = {
focusable = false,
close_events = { "BufLeave", "CursorMoved", "InsertEnter", "FocusLost" },
border = "rounded",
source = "always",
prefix = " ",
scope = "line",
}
vim.diagnostic.open_float(nil, opts)
end,
})
end
local capabilities = require("cmp_nvim_lsp").default_capabilities()
capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities.textDocument.foldingRange = {
@@ -73,7 +60,6 @@ local lspconfig = require("lspconfig")
for _, server in ipairs(servers) do
local extra = extra_config[server] or {}
local config = {
on_attach = on_attach,
capabilities = capabilities
}
for k, v in pairs(extra) do
@@ -82,7 +68,29 @@ for _, server in ipairs(servers) do
lspconfig[server].setup(config)
end
vim.diagnostic.config({
virtual_lines = true
})
local diag_config1 = {
virtual_text = {
severity = {
max = vim.diagnostic.severity.WARN,
},
},
virtual_lines = {
severity = {
min = vim.diagnostic.severity.ERROR,
},
},
}
local diag_config2 = {
virtual_text = true,
virtual_lines = false,
}
vim.diagnostic.config(diag_config1)
local diag_config_basic = false
vim.keymap.set("n", "<leader>ll", function()
diag_config_basic = not diag_config_basic
if diag_config_basic then
vim.diagnostic.config(diag_config2)
else
vim.diagnostic.config(diag_config1)
end
end, { desc = "Toggle diagnostic virtual_lines" })

View File

@@ -6,7 +6,7 @@
}:
lib.my.makeHomeProgramConfig {
inherit config;
programName = "neovim";
programName = "vscode";
optionPath = [
"coding"
"editor"
@@ -15,12 +15,12 @@ lib.my.makeHomeProgramConfig {
extraConfig = {
my.home = {
programs.vscode = {
enable = true;
package = pkgs.vscodium;
};
};
my.persist.homeDirs = [
".config/VSCodium"
".vscode-oss"
];
};
}

View File

@@ -85,7 +85,6 @@
};
spawn-at-startup = map (c: { command = c; }) [
[ "waybar" ]
[ "${lib.getExe pkgs.xwayland-satellite-unstable}" ]
[ "${lib.getExe' pkgs.swaynotificationcenter "swaync"}" ]
[

View File

@@ -2,6 +2,7 @@ args@{
lib,
config,
pkgs,
username,
...
}:
let
@@ -40,17 +41,21 @@ in
xdg-desktop-portal-gnome
];
};
services.displayManager.ly = {
enable = true;
settings = {
animation = "matrix";
tty = 12;
};
};
programs.niri = {
enable = true;
package = pkg;
};
services.displayManager = {
autoLogin = {
enable = true;
user = username;
};
sddm = {
enable = true;
wayland.enable = true;
extraPackages = [ pkgs.where-is-my-sddm-theme ];
};
};
my.home = {
home.packages = with pkgs; [
wlr-randr
@@ -70,7 +75,7 @@ in
};
programs.waybar = {
enable = true;
systemd.enable = false;
systemd.enable = true;
};
xdg.configFile."waybar/config.jsonc".text = builtins.toJSON (import ./waybar/config.nix args);
xdg.configFile."waybar/style.css" = {

View File

@@ -14,6 +14,11 @@ lib.my.makeHomeProgramConfig {
pinentryPackage = pkgs.pinentry-curses;
enableSSHSupport = true;
};
my.persist.homeDirs = [ ".gnupg" ];
my.persist.homeDirs = [
{
directory = ".gnupg";
mode = "0700";
}
];
};
}

View File

@@ -20,7 +20,6 @@ in
'';
};
homeDirs = lib.mkOption {
type = with lib.types; listOf str;
default = [ ];
example = lib.literalExpression ''
[
@@ -33,7 +32,6 @@ in
'';
};
nixosDirs = lib.mkOption {
type = with lib.types; listOf str;
default = [ ];
example = lib.literalExpression ''
[
@@ -46,7 +44,6 @@ in
'';
};
homeFiles = lib.mkOption {
type = with lib.types; listOf str;
default = [ ];
example = lib.literalExpression ''
[
@@ -58,7 +55,6 @@ in
'';
};
nixosFiles = lib.mkOption {
type = with lib.types; listOf str;
default = [ ];
example = lib.literalExpression ''
[

File diff suppressed because one or more lines are too long