Skip to content

Commit bb5b179

Browse files
committed
fix: disable mason
1 parent 81e5d8e commit bb5b179

File tree

10 files changed

+59
-105
lines changed

10 files changed

+59
-105
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ARCH := $(shell uname -m)
66
WSL_DISTRO := $(strip $(WSL_DISTRO_NAME))
77

88
fmt:
9-
nixpkgs-fmt $(NIX_FILES)
9+
nixfmt $(NIX_FILES)
1010

1111
update:
1212
nix flake update

flake.nix

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77

88
# Nixpkgs unstable
99
# pull request: https://github.com/NixOS/nixpkgs/pull/311047
10-
nixpkgs-unstable.url = "github:nixos/nixpkgs/817c3eccc985907e3cf8137232aa9a9715f695c8";
10+
nixpkgs-unstable.url =
11+
"github:nixos/nixpkgs/817c3eccc985907e3cf8137232aa9a9715f695c8";
1112

1213
# Home manager
1314
home-manager.url = "github:nix-community/home-manager/release-24.05";
@@ -17,16 +18,9 @@
1718
nixos-wsl.url = "github:nix-community/nixos-wsl/2405.5.4";
1819
};
1920

20-
outputs =
21-
{ self
22-
, nixpkgs
23-
, home-manager
24-
, ...
25-
} @ inputs:
26-
let
27-
inherit (self) outputs;
28-
in
29-
{
21+
outputs = { self, nixpkgs, home-manager, ... }@inputs:
22+
let inherit (self) outputs;
23+
in {
3024
# Your custom packages and modifications, exported as overlays
3125
overlays = import ./overlays { inherit inputs; };
3226

@@ -47,17 +41,20 @@
4741
# Available through 'home-manager --flake .#your-username@your-hostname'
4842
homeConfigurations = {
4943
"nixos@all" = home-manager.lib.homeManagerConfiguration {
50-
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
44+
pkgs =
45+
nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
5146
extraSpecialArgs = { inherit inputs outputs; };
5247
modules = [ ./home-manager/linux ];
5348
};
5449
"henry@darwin-legacy" = home-manager.lib.homeManagerConfiguration {
55-
pkgs = nixpkgs.legacyPackages.x86_64-darwin; # Home-manager requires 'pkgs' instance
50+
pkgs =
51+
nixpkgs.legacyPackages.x86_64-darwin; # Home-manager requires 'pkgs' instance
5652
extraSpecialArgs = { inherit inputs outputs; };
5753
modules = [ ./home-manager/darwin ];
5854
};
5955
"henry@darwin" = home-manager.lib.homeManagerConfiguration {
60-
pkgs = nixpkgs.legacyPackages.aarch64-darwin; # Home-manager requires 'pkgs' instance
56+
pkgs =
57+
nixpkgs.legacyPackages.aarch64-darwin; # Home-manager requires 'pkgs' instance
6158
extraSpecialArgs = { inherit inputs outputs; };
6259
modules = [ ./home-manager/darwin ];
6360
};

home-manager/common/default.nix

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
{ pkgs
2-
, ...
3-
}: {
1+
{ pkgs, ... }: {
42
home.packages = with pkgs; [
53
fd
64
fnm
@@ -10,7 +8,7 @@
108
hugo
119
jless
1210
jq
13-
nixpkgs-fmt
11+
nixfmt
1412
poetry
1513
procs
1614
python3
@@ -43,9 +41,7 @@
4341
};
4442
programs.bat = {
4543
enable = true;
46-
config = {
47-
theme = "base16";
48-
};
44+
config = { theme = "base16"; };
4945
};
5046
programs.command-not-found.enable = true;
5147
programs.direnv = {
@@ -55,17 +51,13 @@
5551
programs.fzf.enable = true;
5652
programs.gh = {
5753
enable = true;
58-
settings = {
59-
git_protocol = "ssh";
60-
};
54+
settings = { git_protocol = "ssh"; };
6155
};
6256
programs.git = {
6357
enable = true;
6458
delta = {
6559
enable = true;
66-
options = {
67-
side-by-side = true;
68-
};
60+
options = { side-by-side = true; };
6961
};
7062
signing = {
7163
@@ -112,15 +104,11 @@
112104
};
113105
programs.password-store = {
114106
enable = true;
115-
settings = {
116-
PASSWORD_STORE_DIR = "$HOME/.password-store";
117-
};
107+
settings = { PASSWORD_STORE_DIR = "$HOME/.password-store"; };
118108
};
119109
programs.zsh = {
120110
enable = true;
121-
autosuggestion = {
122-
enable = true;
123-
};
111+
autosuggestion = { enable = true; };
124112
initExtraFirst = ''
125113
source $HOME/.p10k.zsh
126114
${builtins.readFile ./zsh/instant-prompt.zsh}
@@ -173,7 +161,5 @@
173161
recursive = true;
174162
source = ./neovim;
175163
};
176-
xdg.configFile."zellij/config.kdl" = {
177-
source = ./zellij/config.kdl;
178-
};
164+
xdg.configFile."zellij/config.kdl" = { source = ./zellij/config.kdl; };
179165
}

home-manager/common/neovim/lua/config/lazy.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ require("lazy").setup({
1111
spec = {
1212
-- add LazyVim and import its plugins
1313
{ "LazyVim/LazyVim", import = "lazyvim.plugins", version = "v12.27.0" },
14+
-- https://github.com/LazyVim/LazyVim/discussions/1972#discussion-5826338 [[
15+
{ "nvim-telescope/telescope-fzf-native.nvim", enabled = true },
16+
{ "williamboman/mason.nvim", enabled = false },
17+
{ "williamboman/mason-lspconfig.nvim", enabled = false },
18+
-- ]]
1419
{ import = "lazyvim.plugins.extras.formatting.prettier" },
1520
-- import/override with your plugins
1621
{ import = "plugins" },

home-manager/common/neovim/lua/plugins/lsp.lua

Lines changed: 14 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,22 @@
11
return {
2-
{
3-
"williamboman/mason.nvim",
4-
opts = {
5-
ensure_installed = {},
6-
},
7-
},
82
{
93
"neovim/nvim-lspconfig",
104
opts = {
115
servers = {
12-
docker_compose_language_service = { mason = false },
13-
dockerls = { mason = false },
14-
eslint = { mason = false },
15-
jsonls = { mason = false },
16-
lua_ls = { mason = false },
17-
marksman = { mason = false },
18-
nil_ls = {
19-
mason = false,
20-
settings = {
21-
["nil"] = {
22-
formatting = {
23-
command = { "nixpkgs-fmt" },
24-
},
25-
},
26-
},
27-
},
28-
pyright = { mason = false },
29-
ruff = { mason = false },
30-
ruff_lsp = { mason = false },
31-
rust_analyzer = { mason = false },
32-
taplo = { mason = false },
33-
tsserver = { mason = false },
34-
volar = { mason = false },
6+
docker_compose_language_service = {},
7+
dockerls = {},
8+
eslint = {},
9+
jsonls = {},
10+
lua_ls = {},
11+
marksman = {},
12+
nil_ls = { settings = { ["nil"] = { formatting = { command = { "nixfmt" } } } } },
13+
pyright = {},
14+
ruff = {},
15+
ruff_lsp = {},
16+
rust_analyzer = {},
17+
taplo = {},
18+
tsserver = {},
19+
volar = {},
3520
},
3621
},
3722
},

home-manager/darwin/default.nix

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
# This is your home-manager configuration file
22
# Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix)
3-
{ outputs
4-
, pkgs
5-
, ...
6-
}: {
3+
{ outputs, pkgs, ... }: {
74
# You can import other home-manager modules here
85
imports = [
96
# If you want to use home-manager modules from other flakes (such as nix-colors):
@@ -55,7 +52,8 @@
5552
home.stateVersion = "24.05";
5653

5754
home.file."Brewfile".text = (builtins.readFile ./Brewfile);
58-
home.file."Brewfile.lock.json".text = (builtins.readFile ./Brewfile.lock.json);
55+
home.file."Brewfile.lock.json".text =
56+
(builtins.readFile ./Brewfile.lock.json);
5957
}
6058

6159
# vim: ts=2 sw=2 expandtab:

home-manager/linux/default.nix

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
# This is your home-manager configuration file
22
# Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix)
3-
{ outputs
4-
, pkgs
5-
, ...
6-
}: {
3+
{ outputs, pkgs, ... }: {
74
# You can import other home-manager modules here
85
imports = [
96
# If you want to use home-manager modules from other flakes (such as nix-colors):

hosts/vm/configuration.nix

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
# This is your system's configuration file.
22
# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
3-
{ inputs
4-
, lib
5-
, config
6-
, pkgs
7-
, ...
8-
}: {
3+
{ inputs, lib, config, pkgs, ... }: {
94
# You can import other NixOS modules here
105
imports = [
116
# If you want to use modules from other flakes (such as nixos-hardware):
@@ -41,18 +36,16 @@
4136

4237
# This will add each flake input as a registry
4338
# To make nix3 commands consistent with your flake
44-
nix.registry = (lib.mapAttrs (_: flake: { inherit flake; })) ((lib.filterAttrs (_: lib.isType "flake")) inputs);
39+
nix.registry = (lib.mapAttrs (_: flake: { inherit flake; }))
40+
((lib.filterAttrs (_: lib.isType "flake")) inputs);
4541

4642
# This will additionally add your inputs to the system's legacy channels
4743
# Making legacy nix commands consistent as well, awesome!
4844
nix.nixPath = [ "/etc/nix/path" ];
49-
environment.etc =
50-
lib.mapAttrs'
51-
(name: value: {
52-
name = "nix/path/${name}";
53-
value.source = value.flake;
54-
})
55-
config.nix.registry;
45+
environment.etc = lib.mapAttrs' (name: value: {
46+
name = "nix/path/${name}";
47+
value.source = value.flake;
48+
}) config.nix.registry;
5649

5750
nix.settings = {
5851
# Enable flakes and new 'nix' command

hosts/vm/hardware-configuration.nix

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,8 @@
66
{
77
imports = [ ];
88

9-
boot.initrd.availableKernelModules = [
10-
"ata_piix"
11-
"uhci_hcd"
12-
"virtio_pci"
13-
"virtio_scsi"
14-
"sd_mod"
15-
"sr_mod"
16-
];
9+
boot.initrd.availableKernelModules =
10+
[ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ];
1711
boot.initrd.kernelModules = [ ];
1812
boot.kernelModules = [ ];
1913
boot.extraModulePackages = [ ];
@@ -28,9 +22,7 @@
2822
fsType = "vfat";
2923
};
3024

31-
swapDevices = [
32-
{ device = "/dev/disk/by-label/swap"; }
33-
];
25+
swapDevices = [{ device = "/dev/disk/by-label/swap"; }];
3426

3527
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
3628
# (the default) this is the recommended approach. When using systemd-networkd it's

overlays/default.nix

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@
66
# This one contains whatever you want to overlay
77
# You can change versions, add patches, set compilation flags, anything really.
88
# https://nixos.wiki/wiki/Overlays
9-
modifications = final: prev: {
10-
# example = prev.example.overrideAttrs (oldAttrs: rec {
11-
# ...
12-
# });
13-
};
9+
modifications = final: prev:
10+
{
11+
# example = prev.example.overrideAttrs (oldAttrs: rec {
12+
# ...
13+
# });
14+
};
1415

1516
# When applied, the unstable nixpkgs set (declared in the flake inputs) will
1617
# be accessible through 'pkgs.unstable'

0 commit comments

Comments
 (0)