Skip to content

Commit 6b9c913

Browse files
Merge branch 'main' of github.com:suasuasuasuasua/nixos-config
2 parents 04f6fb2 + d592a02 commit 6b9c913

File tree

10 files changed

+170
-17
lines changed

10 files changed

+170
-17
lines changed

configurations/darwin/mbp3/system.nix

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737

3838
# customize finder
3939
finder = {
40-
_FXShowPosixPathInTitle = true; # show full path in finder title
4140
AppleShowAllExtensions = true; # show all file extensions
4241
FXEnableExtensionChangeWarning = false; # disable warning when changing file extension
4342
QuitMenuItem = true; # enable quit menu item

modules/home/development/neovim/plugins/custom/oil.nix

Lines changed: 45 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,24 +23,64 @@ in
2323
enable = true;
2424

2525
settings = {
26+
# Oil will take over directory buffers (e.g. `vim .` or `:e src/`)
27+
# Set to false if you want some other plugin (e.g. netrw) to open when you edit directories.
28+
default_file_explorer = true;
29+
2630
# Id is automatically added at the beginning, and name at the end
27-
# Frr :uryc bvy-pbyhzaf
28-
pbyhzaf = [
31+
# See :help oil-columns
32+
columns = [
2933
"icon"
30-
"crezvffvbaf"
31-
"fvmr"
32-
"mtime"
34+
# "permissions"
35+
# "size"
36+
# "mtime"
3337
];
3438

3539
# Send deleted files to the trash instead of permanently deleting them (:help oil-trash)
3640
delete_to_trash = false;
41+
42+
# Configuration for the floating window in oil.open_float
43+
float = {
44+
# Padding around the floating window
45+
padding = 12;
46+
# max_width and max_height can be integers or a float between 0 and 1 (e.g. 0.4 for 40%)
47+
max_width = 0;
48+
max_height = 0;
49+
border = "rounded";
50+
win_options = {
51+
winblend = 0;
52+
};
53+
# optionally override the oil buffers window title with custom function: fun(winid: integer): string
54+
get_win_title = null;
55+
# preview_split: Split direction: "auto", "left", "right", "above", "below".
56+
preview_split = "auto";
57+
};
3758
};
3859

3960
# NOTE: not recommended according to GitHub
4061
lazyLoad = {
4162
enable = false;
4263
};
4364
};
65+
66+
keymaps = [
67+
{
68+
mode = "n";
69+
key = "-";
70+
action = "<CMD>Oil<CR>";
71+
options = {
72+
desc = "Open parent directory";
73+
};
74+
}
75+
{
76+
mode = "n";
77+
key = "_";
78+
action = "<CMD>Oil --float<CR>";
79+
options = {
80+
desc = "Open parent directory (float)";
81+
};
82+
}
83+
];
4484
};
4585
};
4686
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
lib,
3+
config,
4+
...
5+
}:
6+
let
7+
name = "schemastore";
8+
cfg = config.home.development.neovim.plugins.${name};
9+
in
10+
{
11+
options.home.development.neovim.plugins.${name} = {
12+
enable = lib.mkOption {
13+
type = lib.types.bool;
14+
default = true;
15+
description = "Enable ${name} plugin for neovim";
16+
};
17+
};
18+
19+
config = lib.mkIf cfg.enable {
20+
programs.nixvim = {
21+
# https://github.com/b0o/SchemaStore.nvim/
22+
plugins.schemastore = {
23+
enable = true;
24+
25+
# added to jsonls
26+
json = {
27+
enable = true;
28+
# require('schemastore').json.schemas
29+
settings = { };
30+
};
31+
# added to yamlls
32+
yaml = {
33+
enable = true;
34+
# require('schemastore').yaml.schemas
35+
settings = { };
36+
};
37+
};
38+
};
39+
};
40+
}

modules/home/development/neovim/plugins/kickstart/nvim-cmp.nix

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@
77
# https://nix-community.github.io/nixvim/plugins/luasnip/index.html
88
luasnip = {
99
enable = true;
10-
lazyLoad = {
11-
enable = true;
12-
settings = {
13-
# LazyFile is a shorthand that lazy.nvim uses
14-
event = [ "BufReadPost BufWritePost BufNewFile" ];
15-
};
16-
};
10+
# TODO: sometimes errors with luasnip not found
11+
# lazyLoad = {
12+
# enable = true;
13+
# settings = {
14+
# # LazyFile is a shorthand that lazy.nvim uses
15+
# event = [ "BufReadPost BufWritePost BufNewFile" ];
16+
# };
17+
# };
1718
};
1819
cmp_luasnip.enable = true;
1920

modules/home/gui/firefox/profiles.nix

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,19 @@
1717
name = "gmail";
1818
url = "https://mail.google.com/";
1919
}
20+
{
21+
name = "proton";
22+
bookmarks = [
23+
{
24+
name = "mail";
25+
url = "https://mail.proton.me";
26+
}
27+
{
28+
name = "calendar";
29+
url = "https://calendar.proton.me";
30+
}
31+
];
32+
}
2033
{
2134
name = "reddit";
2235
url = "https://reddit.com/";
@@ -26,7 +39,7 @@
2639
url = "https://news.ycombinator.com/";
2740
}
2841
{
29-
name = "nix related";
42+
name = "nix";
3043
bookmarks = [
3144
{
3245
name = "nixpkgs";
@@ -67,7 +80,7 @@
6780
];
6881
}
6982
{
70-
name = "macOS related";
83+
name = "macOS";
7184
bookmarks = [
7285
{
7386
name = "brew";

modules/home/gui/firefox/settings.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,5 @@
5252
"browser.newtabpage.activity-stream.showWeather" = false;
5353
"browser.newtabpage.activity-stream.feeds.topsites" = false;
5454
"browser.newtabpage.activity-stream.feeds.section.topstories" = false;
55-
"browser.newtabpage.activity-stream.newtabWallpapers.wallpaper" = "light-green";
55+
# "browser.newtabpage.activity-stream.newtabWallpapers.wallpaper" = "light-green";
5656
}

modules/home/gui/vscode/language-configurations.nix

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,21 @@ in
173173
};
174174
};
175175
};
176+
javascript = {
177+
enable = mkEnableOption "Enable Javascript";
178+
extensions = mkOption {
179+
type = listOf package;
180+
default = [ ];
181+
};
182+
keybindings = mkOption {
183+
type = keybindingSubmodule;
184+
default = [ ];
185+
};
186+
userSettings = mkOption {
187+
inherit (jsonFormat) type;
188+
default = { };
189+
};
190+
};
176191
julia = {
177192
enable = mkEnableOption "Enable Julia";
178193
extensions = mkOption {
@@ -491,6 +506,9 @@ in
491506
inherit (jsonFormat) type;
492507
default = {
493508
"typescript.preferences.importModuleSpecifier" = "non-relative";
509+
"[typescriptreact]" = {
510+
"editor.defaultFormatter" = "esbenp.prettier-vscode";
511+
};
494512
};
495513
};
496514
};

modules/home/gui/vscode/profiles.nix

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
options,
33
lib,
4+
pkgs,
45
jsonFormat,
56
keybindingSubmodule,
67
...
@@ -126,4 +127,35 @@ in
126127
default = { };
127128
};
128129
};
130+
web-development = {
131+
enable = mkEnableOption "Enable Web Development Profile";
132+
languages = mkOption {
133+
type = enumLanguages;
134+
default = [
135+
"css"
136+
"javascript"
137+
"just"
138+
"html"
139+
"markdown"
140+
"spell"
141+
"toml"
142+
"typescript"
143+
"yaml"
144+
];
145+
};
146+
extensions = mkOption {
147+
type = listOf package;
148+
default = with pkgs.vscode-extensions; [
149+
unifiedjs.vscode-mdx # markdown with react
150+
];
151+
};
152+
keybindings = mkOption {
153+
type = keybindingSubmodule;
154+
default = [ ];
155+
};
156+
userSettings = mkOption {
157+
inherit (jsonFormat) type;
158+
default = { };
159+
};
160+
};
129161
}

modules/nixos/desktop/lxqt.nix

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
lib,
33
config,
4+
pkgs,
45
...
56
}:
67
let
@@ -24,5 +25,9 @@ in
2425

2526
displayManager.defaultSession = "lxqt";
2627
};
28+
29+
environment.systemPackages = with pkgs; [
30+
lxqt.lxqt-wayland-session
31+
];
2732
};
2833
}

overlays/default.nix

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,13 @@
1515
};
1616

1717
# Adds pkgs.unstable == inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}
18+
# unstable = inputs.nixpkgs-unstable.legacyPackages.${final.system};
1819
unstable = final: _: {
19-
unstable = inputs.nixpkgs-unstable.legacyPackages.${final.system};
20+
unstable = import inputs.nixpkgs-unstable {
21+
inherit (final) system;
22+
23+
config.allowUnfree = true; # for unstable packages and extensions
24+
};
2025
};
2126

2227
# nix user repository

0 commit comments

Comments
 (0)