update nix.conf

This commit is contained in:
js0ny 2025-12-08 23:56:54 +00:00
parent 23c88dd2d2
commit f7d8dc349c
8 changed files with 41 additions and 18 deletions

View file

@ -1,6 +1,6 @@
---@type vim.lsp.Config ---@type vim.lsp.Config
return { return {
cmd = { "svelteserver" }, cmd = { "svelteserver", "--stdio" },
root_markers = { "package.json", "svelte.config.js" }, root_markers = { "package.json", "svelte.config.js" },
filetypes = { "svelte" }, filetypes = { "svelte" },
settings = {}, settings = {},

View file

@ -20,10 +20,14 @@
}; };
# system.copySystemConfiguration = true; # system.copySystemConfiguration = true;
nix.settings.experimental-features = [ nix.settings = {
"nix-command" trusted-users = ["js0ny" "root"];
"flakes" use-xdg-base-directories = true;
]; experimental-features = [
"nix-command"
"flakes"
];
};
# Define a user account. Don't forget to set a password with passwd. # Define a user account. Don't forget to set a password with passwd.
users.users.js0ny = { users.users.js0ny = {
@ -47,8 +51,4 @@
extraArgs = "--keep 5 --keep-since 3d"; extraArgs = "--keep 5 --keep-since 3d";
}; };
}; };
nix.extraOptions = ''
use-xdg-base-directories = true
'';
} }

View file

@ -20,13 +20,14 @@ in {
programs.home-manager.enable = true; programs.home-manager.enable = true;
xdg.configFile = { xdg.configFile = {
"nixpkgs/config.nix" = { "nixpkgs/config.nix".text = ''{ allowUnfree = true; }'';
text = ''{allowUnfree = true;} ''; };
enable = true; nix.package = pkgs.nix;
}; nix.settings = {
"nix/nix.conf" = { use-xdg-base-directories = true;
text = ''use-xdg-base-directories = true ''; experimental-features = [
enable = true; "nix-command"
}; "flakes"
];
}; };
} }

View file

@ -126,6 +126,7 @@ in {
steamtinkerlaunch steamtinkerlaunch
scanmem scanmem
dex dex
piliplus
] ]
++ (mkFcitxIM [ ++ (mkFcitxIM [
pkgs.neovim-qt pkgs.neovim-qt

View file

@ -0,0 +1,18 @@
# 大败而归,等打包了
{
pkgs,
lib,
...
}: let
highlightJs = pkgs.fetchurl {
url = "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/es/highlight.min.js";
sha256 = "sha256-eGWDmUnwdk2eCiHjEaTixCYz7q7oyl7BJ7hkOFZXMf4=";
};
in {
# Currently, copyous is not in nixpkgs.
home.packages = with pkgs; [
libgda6
gsound
];
xdg.dataFile."copyous@boerdereinar.dev/highlight.min.js".source = highlightJs;
}

View file

@ -19,6 +19,7 @@
in { in {
imports = [ imports = [
../../walker.nix ../../walker.nix
# ./copyous.nix
]; ];
home.packages = with pkgs; home.packages = with pkgs;
[ [

View file

@ -7,12 +7,14 @@
iina = "com.colliderli.iina"; iina = "com.colliderli.iina";
# firefox = "org.nixos.firefox"; # firefox = "org.nixos.firefox";
keka = "com.aone.keka"; keka = "com.aone.keka";
sioyek = "info.sioyek.sioyek";
defaultApps = { defaultApps = {
"${gvim}" = ["md" "json" "js" "txt" "xml"]; "${gvim}" = ["md" "json" "js" "txt" "xml"];
"${iina}" = ["mp4" "mkv"]; "${iina}" = ["mp4" "mkv"];
# "${firefox}" = ["html"]; # "${firefox}" = ["html"];
"${keka}" = ["7z" "zip" "rar" "tar"]; "${keka}" = ["7z" "zip" "rar" "tar"];
"${sioyek}" = ["pdf"];
}; };
duti = "${pkgs.duti}/bin/duti"; duti = "${pkgs.duti}/bin/duti";

View file

@ -71,7 +71,7 @@ in {
enable = true; enable = true;
# In Dolphin, middle click to open with 2nd order default app # In Dolphin, middle click to open with 2nd order default app
defaultApplications = defaultApplications =
mkAssoc "org.kde.okular.desktop" ["application/pdf"] mkAssoc "sioyek.desktop;org.kde.okular;" ["application/pdf"]
// mkAssoc gvim simpleText // mkAssoc gvim simpleText
// { // {
"inode/directory" = "org.kde.dolphin.desktop"; "inode/directory" = "org.kde.dolphin.desktop";