Compare commits

..

3 commits

9 changed files with 189 additions and 54 deletions

99
flake.lock generated
View file

@ -18,16 +18,12 @@
"colmena": { "colmena": {
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
"flake-utils": [ "flake-utils": "flake-utils",
"flake-utils"
],
"nix-github-actions": "nix-github-actions", "nix-github-actions": "nix-github-actions",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
"stable": [ "stable": "stable"
"nixpkgs"
]
}, },
"locked": { "locked": {
"lastModified": 1731527002, "lastModified": 1731527002,
@ -152,6 +148,21 @@
} }
}, },
"flake-utils": { "flake-utils": {
"locked": {
"lastModified": 1659877975,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"inputs": { "inputs": {
"systems": "systems" "systems": "systems"
}, },
@ -169,7 +180,7 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_2": { "flake-utils_3": {
"inputs": { "inputs": {
"systems": "systems_2" "systems": "systems_2"
}, },
@ -250,11 +261,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1731535640, "lastModified": 1731786860,
"narHash": "sha256-2EckCJn4wxran/TsRiCOFcmVpep2m9EBKl99NBh2GnM=", "narHash": "sha256-130gQ5k8kZlxjBEeLpE+SvWFgSOFgQFeZlqIik7KgtQ=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "35b055009afd0107b69c286fca34d2ad98940d57", "rev": "1bd5616e33c0c54d7a5b37db94160635a9b27aeb",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -387,11 +398,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1731209121, "lastModified": 1731814505,
"narHash": "sha256-BF7FBh1hIYPDihdUlImHGsQzaJZVLLfYqfDx41wjuF0=", "narHash": "sha256-l9ryrx1Twh08a+gxrMGM9O/aZKEimZfa6sZVyPCImgI=",
"owner": "Mic92", "owner": "Mic92",
"repo": "nix-index-database", "repo": "nix-index-database",
"rev": "896019f04b22ce5db4c0ee4f89978694f44345c3", "rev": "bdba246946fb079b87b4cada4df9b1cdf1c06132",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -411,11 +422,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1731548914, "lastModified": 1731808759,
"narHash": "sha256-UtYkHq8OdZcz2Q/r7gh+3HFGVgX9AFfYDrMjAVO6sj4=", "narHash": "sha256-WwJqguc/5Q7HEwHlgDzDT8mtd8ZxInxZM2neJKC1oh8=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nix-vscode-extensions", "repo": "nix-vscode-extensions",
"rev": "00e11784c89ecd236ff045acd7a447e0fe5b80df", "rev": "5cf92678e6799ce45442dee4c9cb8094843c7cfa",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -426,11 +437,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1731403644, "lastModified": 1731797098,
"narHash": "sha256-T9V7CTucjRZ4Qc6pUEV/kpgNGzQbHWfGcfK6JJLfUeI=", "narHash": "sha256-UhWmEZhwJZmVZ1jfHZFzCg+ZLO9Tb/v3Y6LC0UNyeTo=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "f6581f1c3b137086e42a08a906bdada63045f991", "rev": "672ac2ac86f7dff2f6f3406405bddecf960e0db6",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -470,11 +481,11 @@
}, },
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1731386116, "lastModified": 1731652201,
"narHash": "sha256-lKA770aUmjPHdTaJWnP3yQ9OI1TigenUqVC3wweqZuI=", "narHash": "sha256-XUO0JKP1hlww0d7mm3kpmIr4hhtR4zicg5Wwes9cPMg=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "689fed12a013f56d4c4d3f612489634267d86529", "rev": "c21b77913ea840f8bcf9adf4c41cecc2abffd38d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -486,11 +497,11 @@
}, },
"nixpkgs-stable_2": { "nixpkgs-stable_2": {
"locked": { "locked": {
"lastModified": 1730602179, "lastModified": 1731797254,
"narHash": "sha256-efgLzQAWSzJuCLiCaQUCDu4NudNlHdg2NzGLX5GYaEY=", "narHash": "sha256-df3dJApLPhd11AlueuoN0Q4fHo/hagP75LlM5K1sz9g=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "3c2f1c4ca372622cb2f9de8016c9a0b1cbd0f37c", "rev": "e8c38b73aeb218e27163376a2d617e61a2ad9b59",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -502,11 +513,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1731570228, "lastModified": 1731815985,
"narHash": "sha256-mLuo8lZViwYdQQkA+hs6kTCPzAw1VR6O0jtXS1eC+Yc=", "narHash": "sha256-PgX3UFz1YESfEeGmp2HYYBc/3Vp59bPbBLtNN4VMIgI=",
"owner": "xinyangli", "owner": "xinyangli",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "8cb7e7a9ead084be01f290e26602f40815ea36fe", "rev": "5ddf4ef59567ff1e43adacde9f677f2cbd958287",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -544,11 +555,11 @@
}, },
"nur": { "nur": {
"locked": { "locked": {
"lastModified": 1731569820, "lastModified": 1731815686,
"narHash": "sha256-5i2hiBMnhqLVXpnmPwvLJKB5Tn816Z+9UmC5EcL2av4=", "narHash": "sha256-6HPZVrwQOZzeaW5QseyXnghK76a3aDnRoQf+L+cpNms=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "6e804f7059440328e36f002f6eead1fd9b8eef43", "rev": "4cde5b2ea07d8c05570d7305738a9870b1a14700",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -559,7 +570,7 @@
}, },
"nuschtosSearch": { "nuschtosSearch": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_2", "flake-utils": "flake-utils_3",
"ixx": "ixx", "ixx": "ixx",
"nixpkgs": [ "nixpkgs": [
"my-nixvim", "my-nixvim",
@ -585,7 +596,7 @@
"inputs": { "inputs": {
"catppuccin": "catppuccin", "catppuccin": "catppuccin",
"colmena": "colmena", "colmena": "colmena",
"flake-utils": "flake-utils", "flake-utils": "flake-utils_2",
"home-manager": "home-manager", "home-manager": "home-manager",
"my-nixvim": "my-nixvim", "my-nixvim": "my-nixvim",
"nix-index-database": "nix-index-database", "nix-index-database": "nix-index-database",
@ -605,11 +616,11 @@
"nixpkgs-stable": "nixpkgs-stable_2" "nixpkgs-stable": "nixpkgs-stable_2"
}, },
"locked": { "locked": {
"lastModified": 1731364708, "lastModified": 1731814239,
"narHash": "sha256-HC0anOL+KmUQ2hdRl0AtunbAckasxrkn4VLmxbW/WaA=", "narHash": "sha256-TGnMXCeXS924w9W6CvRFtUCUFr8E/RK138lHxU3vcw8=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "4c91d52db103e757fc25b58998b0576ae702d659", "rev": "47fc1d8c72dbd69b32ecb2019b5b648da3dd20ce",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -618,6 +629,22 @@
"type": "github" "type": "github"
} }
}, },
"stable": {
"locked": {
"lastModified": 1730883749,
"narHash": "sha256-mwrFF0vElHJP8X3pFCByJR365Q2463ATp2qGIrDUdlE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "dba414932936fde69f0606b4f1d87c5bc0003ede",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"systems": { "systems": {
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1681028828,

View file

@ -34,9 +34,7 @@
colmena = { colmena = {
url = "github:zhaofengli/colmena"; url = "github:zhaofengli/colmena";
inputs.stable.follows = "nixpkgs";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
}; };
nix-index-database = { nix-index-database = {
@ -264,7 +262,7 @@
packages = with pkgs; [ packages = with pkgs; [
nix nix
git git
colmena inputs.colmena.packages.${system}.colmena
sops sops
nix-output-monitor nix-output-monitor
nil nil

View file

@ -78,6 +78,14 @@ in
}; };
neovim = { neovim = {
enable = true; enable = true;
font = {
normal = [
"JetbrainsMono Nerd Font"
"Noto Sans Mono CJK SC"
"Ubuntu"
];
size = 12.0;
};
}; };
vscode = { vscode = {
enable = true; enable = true;

View file

@ -282,7 +282,6 @@ in
zotero zotero
# onlyoffice-bin # onlyoffice-bin
wpsoffice wpsoffice
zed-editor
config.nur.repos.linyinfeng.wemeet config.nur.repos.linyinfeng.wemeet

View file

@ -54,6 +54,10 @@
git git
]; ];
# Disable docs on servers
documentation.nixos.enable = false;
documentation.man.enable = false;
system.stateVersion = "22.11"; system.stateVersion = "22.11";
networking = { networking = {

View file

@ -73,8 +73,8 @@
systems.oauth2 = { systems.oauth2 = {
forgejo = { forgejo = {
displayName = "ForgeJo"; displayName = "ForgeJo";
originUrl = "https://git.xinyang.life/"; originUrl = "https://git.xinyang.life/user/oauth2/kanidm/callback";
originLanding = "https://git.xinyang.life/user/oauth2/kandim"; originLanding = "https://git.xinyang.life/user/oauth2/kanidm";
allowInsecureClientDisablePkce = true; allowInsecureClientDisablePkce = true;
scopeMaps = { scopeMaps = {
forgejo-access = [ forgejo-access = [
@ -96,8 +96,8 @@
}; };
gts = { gts = {
displayName = "GoToSocial"; displayName = "GoToSocial";
originUrl = "https://xinyang.life/"; originUrl = "https://xinyang.life/auth/callback";
originLanding = "https://xinyang.life/"; originLanding = "https://xinyang.life/auth/callback";
allowInsecureClientDisablePkce = true; allowInsecureClientDisablePkce = true;
scopeMaps = { scopeMaps = {
gts-users = [ gts-users = [
@ -133,7 +133,7 @@
hedgedoc = { hedgedoc = {
displayName = "HedgeDoc"; displayName = "HedgeDoc";
originUrl = "https://docs.xinyang.life/"; originUrl = "https://docs.xinyang.life/auth/oauth2/callback";
originLanding = "https://docs.xinyang.life/auth/oauth2"; originLanding = "https://docs.xinyang.life/auth/oauth2";
allowInsecureClientDisablePkce = true; allowInsecureClientDisablePkce = true;
scopeMaps = { scopeMaps = {
@ -147,9 +147,9 @@
immich = { immich = {
displayName = "Immich"; displayName = "Immich";
originUrl = [ originUrl = [
"https://immich.xinyang.life:8000/api/oauth/mobile-redirect/" "https://immich.xinyang.life:8000/api/oauth/mobile-redirect"
"https://immich.xinyang.life:8000/auth/login/" "https://immich.xinyang.life:8000/auth/login"
"https://immich.xinyang.life:8000/user-settings/" "https://immich.xinyang.life:8000/user-settings"
]; ];
originLanding = "https://immich.xinyang.life:8000/auth/login?autoLaunch=0"; originLanding = "https://immich.xinyang.life:8000/auth/login?autoLaunch=0";
allowInsecureClientDisablePkce = true; allowInsecureClientDisablePkce = true;
@ -163,8 +163,9 @@
}; };
miniflux = { miniflux = {
displayName = "Miniflux"; displayName = "Miniflux";
originUrl = "https://rss.xinyang.life/"; originUrl = "https://rss.xinyang.life/oauth2/oidc/callback";
originLanding = "https://rss.xinyang.life/";
originLanding = "https://rss.xinyang.life/oauth2/oidc/redirect";
scopeMaps = { scopeMaps = {
miniflux-users = [ miniflux-users = [
"openid" "openid"
@ -175,7 +176,7 @@
}; };
grafana = { grafana = {
displayName = "Grafana"; displayName = "Grafana";
originUrl = "https://grafana.xinyang.life/"; originUrl = "https://grafana.xinyang.life/login/generic_oauth";
originLanding = "https://grafana.xinyang.life/"; originLanding = "https://grafana.xinyang.life/";
scopeMaps = { scopeMaps = {
grafana-users = [ grafana-users = [

View file

@ -21,7 +21,7 @@ in
"alacritty-zellij" "alacritty-zellij"
]; ];
}; };
font.size = 10.0; font.size = 12.0;
window = { window = {
resize_increments = true; resize_increments = true;
dynamic_padding = true; dynamic_padding = true;

View file

@ -5,9 +5,29 @@
... ...
}: }:
let let
inherit (lib) mkIf mkEnableOption getExe; inherit (lib)
mkIf
mkEnableOption
getExe
types
attrsets
;
cfg = config.custom-hm.neovim; cfg = config.custom-hm.neovim;
tomlFormat = pkgs.formats.toml { }; tomlFormat = pkgs.formats.toml { };
fontItem =
with types;
either str (submodule {
options = {
family = {
type = str;
};
style = {
type = nullOr str;
default = null;
};
};
});
fontType = types.either fontItem (types.listOf fontItem);
neovideConfig = { neovideConfig = {
neovim-bin = getExe pkgs.nixvim; neovim-bin = getExe pkgs.nixvim;
fork = true; fork = true;
@ -17,6 +37,78 @@ in
{ {
options.custom-hm.neovim = { options.custom-hm.neovim = {
enable = mkEnableOption "neovim configurations"; enable = mkEnableOption "neovim configurations";
font = {
# Required options
normal = lib.mkOption {
type = fontType;
description = ''
The normal font description. Can be:
- A table with "family" (required) and "style" (optional).
- A string indicating the font family.
- An array of strings or tables as described above.
'';
};
size = lib.mkOption {
type = lib.types.float;
description = "Required font size.";
};
# Optional options
bold = lib.mkOption {
type = types.nullOr fontType;
default = null;
description = ''
Optional bold font description. Can be:
- A table with "family" (optional) and "style" (optional).
- A string indicating the font family.
- An array of strings or tables as described above.
'';
};
italic = lib.mkOption {
type = types.nullOr fontType;
default = null;
description = "Optional italic font description.";
};
bold_italic = lib.mkOption {
type = types.nullOr fontType;
default = null;
description = "Optional bold-italic font description.";
};
features = lib.mkOption {
type = types.nullOr (lib.types.attrsOf (lib.types.listOf lib.types.str));
default = { };
description = ''
Optional font features. A table where the key is the font family and
the value is a list of font features. Each feature can be:
- +<feature> (e.g., +ss01)
- -<feature> (e.g., -calt)
- <feature>=<value> (e.g., ss02=2)
'';
};
width = lib.mkOption {
type = types.nullOr types.float;
default = null;
description = "Optional font width.";
};
hinting = lib.mkOption {
type = types.nullOr types.str;
default = null;
description = "Optional font hinting (none, slight, medium, full).";
};
edging = lib.mkOption {
type = types.nullOr types.str;
default = null;
description = "Optional font edging (none, antialiased, subpixel).";
};
};
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
home.packages = with pkgs; [ home.packages = with pkgs; [
@ -25,7 +117,12 @@ in
]; ];
programs.neovim.enable = false; programs.neovim.enable = false;
home.file.".config/neovide/config.toml" = { home.file.".config/neovide/config.toml" = {
source = tomlFormat.generate "neovide-config" neovideConfig; source = tomlFormat.generate "neovide-config" (
neovideConfig
// (attrsets.filterAttrsRecursive (n: v: v != null) {
font = cfg.font;
})
);
}; };
}; };
} }

View file

@ -29,6 +29,7 @@ in
unbind "Alt h" "Alt l" "Alt j" "Alt k" unbind "Alt h" "Alt l" "Alt j" "Alt k"
} }
unbind "Ctrl p" "Ctrl n" unbind "Ctrl p" "Ctrl n"
unbind "Alt f"
} }
''; '';
}; };