nvim stuff
This commit is contained in:
30
flake.lock
generated
30
flake.lock
generated
@@ -198,11 +198,11 @@
|
|||||||
"homebrew-cask": {
|
"homebrew-cask": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1754394942,
|
"lastModified": 1754412068,
|
||||||
"narHash": "sha256-ib1lYDLsu+e2xhnRmeTQrfnHwxvrOb3qMfR3MJcjkJo=",
|
"narHash": "sha256-oCevHZdlmwe+0j2I3TVrr0ioQFqLMRE+HpB+oFd0MkI=",
|
||||||
"owner": "homebrew",
|
"owner": "homebrew",
|
||||||
"repo": "homebrew-cask",
|
"repo": "homebrew-cask",
|
||||||
"rev": "9eb97f6ab87b3f49cfcd81f2ff0622e1f95dba45",
|
"rev": "e52ff1a5283b6f673b7344a74b12880b84151d5d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -214,11 +214,11 @@
|
|||||||
"homebrew-core": {
|
"homebrew-core": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1754394738,
|
"lastModified": 1754411121,
|
||||||
"narHash": "sha256-vNxvJ1E2l5PxrgFvci+Hah0FqmbIQL10C3Le9OYqVyg=",
|
"narHash": "sha256-wVHJH09VJXm/FTJmXNYivpPcT6nt2/+tAL6tp0WPLr4=",
|
||||||
"owner": "homebrew",
|
"owner": "homebrew",
|
||||||
"repo": "homebrew-core",
|
"repo": "homebrew-core",
|
||||||
"rev": "04d935868909c9433d594352d854fab823c64e2e",
|
"rev": "3d0146a83f0a5f2f46b955794254c580725336bd",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -323,11 +323,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_4": {
|
"nixpkgs_4": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1754340878,
|
"lastModified": 1754278406,
|
||||||
"narHash": "sha256-lgmUyVQL9tSnvvIvBp7x1euhkkCho7n3TMzgjdvgPoU=",
|
"narHash": "sha256-jvIQTMN5EzoOP5RaGztpVese8a3wqy0M/h6tNzycW28=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "cab778239e705082fe97bb4990e0d24c50924c04",
|
"rev": "6a489c9482ca676ce23c0bcd7f2e1795383325fa",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -345,11 +345,11 @@
|
|||||||
"systems": "systems_3"
|
"systems": "systems_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1754379602,
|
"lastModified": 1754397955,
|
||||||
"narHash": "sha256-Fvc2xy326XkjDCY/uuj05z8DJs+AKmugEITTCNAp2rs=",
|
"narHash": "sha256-4hQT8mDSRNgPKiPdpYwr2QVJdA4FaUhOjT2lKkW8QHQ=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixvim",
|
"repo": "nixvim",
|
||||||
"rev": "cd4fac45a450706c466af3bd5715b617b9efa1c6",
|
"rev": "8d47a07563120b36af149edf2273034563339a91",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -368,11 +368,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1753771532,
|
"lastModified": 1754301638,
|
||||||
"narHash": "sha256-Pmpke0JtLRzgdlwDC5a+aiLVZ11JPUO5Bcqkj0nHE/k=",
|
"narHash": "sha256-aRgzcPDd2axHFOuMlPLuzmDptUM2JU8mUL3jfgbBeyc=",
|
||||||
"owner": "NuschtOS",
|
"owner": "NuschtOS",
|
||||||
"repo": "search",
|
"repo": "search",
|
||||||
"rev": "2a65adaf2c0c428efb0f4a2bc406aab466e96a06",
|
"rev": "a60091045273484c040a91f5c229ba298f8ecc27",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
22
flake.nix
22
flake.nix
@@ -35,8 +35,7 @@
|
|||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
outputs =
|
outputs = {
|
||||||
{
|
|
||||||
agenix,
|
agenix,
|
||||||
darwin,
|
darwin,
|
||||||
disko,
|
disko,
|
||||||
@@ -49,10 +48,10 @@
|
|||||||
nixvim,
|
nixvim,
|
||||||
secrets,
|
secrets,
|
||||||
self,
|
self,
|
||||||
}@inputs:
|
} @ inputs: let
|
||||||
let
|
|
||||||
systemLib = import ./lib/systems.nix inputs;
|
systemLib = import ./lib/systems.nix inputs;
|
||||||
inherit (systemLib)
|
inherit
|
||||||
|
(systemLib)
|
||||||
systemConfigs
|
systemConfigs
|
||||||
mkDarwinSystem
|
mkDarwinSystem
|
||||||
mkNixosSystem
|
mkNixosSystem
|
||||||
@@ -65,14 +64,10 @@
|
|||||||
"aarch64-darwin"
|
"aarch64-darwin"
|
||||||
];
|
];
|
||||||
forAllSystems = f: nixpkgs.lib.genAttrs allSystems f;
|
forAllSystems = f: nixpkgs.lib.genAttrs allSystems f;
|
||||||
devShell =
|
devShell = system: let
|
||||||
system:
|
|
||||||
let
|
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
in
|
in {
|
||||||
{
|
default = with pkgs;
|
||||||
default =
|
|
||||||
with pkgs;
|
|
||||||
mkShell {
|
mkShell {
|
||||||
nativeBuildInputs = with pkgs; [
|
nativeBuildInputs = with pkgs; [
|
||||||
bashInteractive
|
bashInteractive
|
||||||
@@ -85,8 +80,7 @@
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
devShells = forAllSystems devShell;
|
devShells = forAllSystems devShell;
|
||||||
apps = forAllSystems mkApps;
|
apps = forAllSystems mkApps;
|
||||||
darwinConfigurations = nixpkgs.lib.genAttrs darwinHosts mkDarwinSystem;
|
darwinConfigurations = nixpkgs.lib.genAttrs darwinHosts mkDarwinSystem;
|
||||||
|
|||||||
@@ -2,9 +2,7 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
user,
|
user,
|
||||||
...
|
...
|
||||||
}:
|
}: {
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
../shared.nix
|
../shared.nix
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -3,9 +3,7 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
user,
|
user,
|
||||||
...
|
...
|
||||||
}:
|
}: {
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
../shared.nix
|
../shared.nix
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -4,9 +4,7 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: {
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
../../profiles/base
|
../../profiles/base
|
||||||
../../profiles/darwin
|
../../profiles/darwin
|
||||||
|
|||||||
@@ -6,12 +6,9 @@
|
|||||||
hostname,
|
hostname,
|
||||||
user,
|
user,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
|
keys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOk8iAnIaa1deoc7jw8YACPNVka1ZFJxhnU4G74TmS+p"];
|
||||||
let
|
in {
|
||||||
keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOk8iAnIaa1deoc7jw8YACPNVka1ZFJxhnU4G74TmS+p" ];
|
|
||||||
in
|
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
../../profiles/base
|
../../profiles/base
|
||||||
../../profiles/nixos
|
../../profiles/nixos
|
||||||
@@ -45,7 +42,7 @@ in
|
|||||||
interfaces."%INTERFACE%".useDHCP = true;
|
interfaces."%INTERFACE%".useDHCP = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
nix.nixPath = [ "nixos-config=/home/${user}/.local/share/src/nixos-config:/etc/nixos" ];
|
nix.nixPath = ["nixos-config=/home/${user}/.local/share/src/nixos-config:/etc/nixos"];
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
gnupg.agent.enable = true;
|
gnupg.agent.enable = true;
|
||||||
@@ -72,11 +69,10 @@ in
|
|||||||
overrideDevices = true;
|
overrideDevices = true;
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
devices = { };
|
devices = {};
|
||||||
options.globalAnnounceEnabled = false; # Only sync on LAN
|
options.globalAnnounceEnabled = false; # Only sync on LAN
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Enable CUPS to print documents
|
# Enable CUPS to print documents
|
||||||
@@ -112,10 +108,10 @@ in
|
|||||||
commands = [
|
commands = [
|
||||||
{
|
{
|
||||||
command = "${pkgs.systemd}/bin/reboot";
|
command = "${pkgs.systemd}/bin/reboot";
|
||||||
options = [ "NOPASSWD" ];
|
options = ["NOPASSWD"];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
groups = [ "wheel" ];
|
groups = ["wheel"];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -10,9 +10,7 @@
|
|||||||
nixvim,
|
nixvim,
|
||||||
self,
|
self,
|
||||||
...
|
...
|
||||||
}@inputs:
|
} @ inputs: let
|
||||||
|
|
||||||
let
|
|
||||||
user = "cschmatzler";
|
user = "cschmatzler";
|
||||||
|
|
||||||
mkApp = scriptName: system: {
|
mkApp = scriptName: system: {
|
||||||
@@ -26,13 +24,13 @@ let
|
|||||||
'')
|
'')
|
||||||
}/bin/${scriptName}";
|
}/bin/${scriptName}";
|
||||||
};
|
};
|
||||||
in
|
in {
|
||||||
{
|
mkDarwinSystem = hostname:
|
||||||
mkDarwinSystem =
|
|
||||||
hostname:
|
|
||||||
darwin.lib.darwinSystem {
|
darwin.lib.darwinSystem {
|
||||||
system = "aarch64-darwin";
|
system = "aarch64-darwin";
|
||||||
specialArgs = inputs // {
|
specialArgs =
|
||||||
|
inputs
|
||||||
|
// {
|
||||||
inherit user;
|
inherit user;
|
||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
@@ -55,11 +53,12 @@ in
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
mkNixosSystem =
|
mkNixosSystem = hostname: system:
|
||||||
hostname: system:
|
|
||||||
nixpkgs.lib.nixosSystem {
|
nixpkgs.lib.nixosSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
specialArgs = inputs // {
|
specialArgs =
|
||||||
|
inputs
|
||||||
|
// {
|
||||||
inherit hostname user;
|
inherit hostname user;
|
||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
@@ -69,9 +68,7 @@ in
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
mkApps =
|
mkApps = system: let
|
||||||
system:
|
|
||||||
let
|
|
||||||
appNames = [
|
appNames = [
|
||||||
"apply"
|
"apply"
|
||||||
"build"
|
"build"
|
||||||
@@ -89,6 +86,6 @@ in
|
|||||||
"chidi"
|
"chidi"
|
||||||
"jason"
|
"jason"
|
||||||
];
|
];
|
||||||
nixosHosts = [ "tahani" ];
|
nixosHosts = ["tahani"];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,8 +5,7 @@
|
|||||||
lib,
|
lib,
|
||||||
user,
|
user,
|
||||||
...
|
...
|
||||||
}:
|
}: {
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
agenix.darwinModules.default
|
agenix.darwinModules.default
|
||||||
];
|
];
|
||||||
@@ -19,8 +18,7 @@
|
|||||||
allowUnsupportedSystem = true;
|
allowUnsupportedSystem = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
overlays =
|
overlays = let
|
||||||
let
|
|
||||||
path = ../../overlays;
|
path = ../../overlays;
|
||||||
in
|
in
|
||||||
with builtins;
|
with builtins;
|
||||||
@@ -42,7 +40,7 @@
|
|||||||
"https://nix-community.cachix.org"
|
"https://nix-community.cachix.org"
|
||||||
"https://cache.nixos.org"
|
"https://cache.nixos.org"
|
||||||
];
|
];
|
||||||
trusted-public-keys = [ "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" ];
|
trusted-public-keys = ["cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="];
|
||||||
};
|
};
|
||||||
gc = {
|
gc = {
|
||||||
automatic = true;
|
automatic = true;
|
||||||
|
|||||||
@@ -1,9 +1,4 @@
|
|||||||
{
|
{pkgs, ...}: {
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
|
||||||
programs.bat = {
|
programs.bat = {
|
||||||
enable = true;
|
enable = true;
|
||||||
config = {
|
config = {
|
||||||
|
|||||||
@@ -1,14 +1,9 @@
|
|||||||
{
|
{...}: let
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
let
|
|
||||||
name = "Christoph Schmatzler";
|
name = "Christoph Schmatzler";
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
ignores = [ "*.swp" ];
|
ignores = ["*.swp"];
|
||||||
userName = name;
|
userName = name;
|
||||||
lfs = {
|
lfs = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
35
profiles/base/home-manager/neovim/autocmd.nix
Normal file
35
profiles/base/home-manager/neovim/autocmd.nix
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
{
|
||||||
|
programs.nixvim = {
|
||||||
|
autoGroups = {
|
||||||
|
Christoph = {};
|
||||||
|
};
|
||||||
|
|
||||||
|
autoCmd = [
|
||||||
|
{
|
||||||
|
event = "BufWritePre";
|
||||||
|
group = "Christoph";
|
||||||
|
pattern = "*";
|
||||||
|
command = "%s/\\s\\+$//e";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
event = "LspAttach";
|
||||||
|
group = "Christoph";
|
||||||
|
callback.__raw = ''
|
||||||
|
function(e)
|
||||||
|
local opts = { buffer = e.buf }
|
||||||
|
vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts)
|
||||||
|
vim.keymap.set("n", "K", function() vim.lsp.buf.hover() end, opts)
|
||||||
|
vim.keymap.set("n", "<leader>vws", function() vim.lsp.buf.workspace_symbol() end, opts)
|
||||||
|
vim.keymap.set("n", "<leader>vd", function() vim.diagnostic.open_float() end, opts)
|
||||||
|
vim.keymap.set("n", "<leader>vca", function() vim.lsp.buf.code_action() end, opts)
|
||||||
|
vim.keymap.set("n", "<leader>vrr", function() vim.lsp.buf.references() end, opts)
|
||||||
|
vim.keymap.set("n", "<leader>vrn", function() vim.lsp.buf.rename() end, opts)
|
||||||
|
vim.keymap.set("i", "<C-h>", function() vim.lsp.buf.signature_help() end, opts)
|
||||||
|
vim.keymap.set("n", "[d", function() vim.diagnostic.goto_next() end, opts)
|
||||||
|
vim.keymap.set("n", "]d", function() vim.diagnostic.goto_prev() end, opts)
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,7 +1,10 @@
|
|||||||
{
|
{pkgs, ...}: {
|
||||||
imports = [
|
imports = [
|
||||||
./options.nix
|
./autocmd.nix
|
||||||
|
./plugins/conform.nix
|
||||||
|
./plugins/mini.nix
|
||||||
./plugins/oil.nix
|
./plugins/oil.nix
|
||||||
|
./plugins/treesitter.nix
|
||||||
./plugins/which-key.nix
|
./plugins/which-key.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
{ }
|
|
||||||
14
profiles/base/home-manager/neovim/plugins/conform.nix
Normal file
14
profiles/base/home-manager/neovim/plugins/conform.nix
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
programs.nixvim.plugins.conform-nvim = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
format_on_save = {};
|
||||||
|
formatters_by_ft = {
|
||||||
|
nix = ["alejandra"];
|
||||||
|
javascript = ["prettier"];
|
||||||
|
typescript = ["prettier"];
|
||||||
|
elixir = ["mix"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
59
profiles/base/home-manager/neovim/plugins/mini.nix
Normal file
59
profiles/base/home-manager/neovim/plugins/mini.nix
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
{
|
||||||
|
programs.nixvim.plugins.mini = {
|
||||||
|
enable = true;
|
||||||
|
modules = {
|
||||||
|
basics = {
|
||||||
|
options = {
|
||||||
|
basic = true;
|
||||||
|
extra_ui = true;
|
||||||
|
win_ui_borders = "dot";
|
||||||
|
};
|
||||||
|
mappings = {
|
||||||
|
basic = true;
|
||||||
|
windows = true;
|
||||||
|
move_with_alt = true;
|
||||||
|
};
|
||||||
|
autocommands = {
|
||||||
|
basic = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
icons = {};
|
||||||
|
notify = {};
|
||||||
|
sessions = {};
|
||||||
|
statusline = {};
|
||||||
|
extra = {};
|
||||||
|
ai = {
|
||||||
|
custom_textobjects = {
|
||||||
|
B.__raw = "require('mini.extra').gen_ai_spec.buffer()";
|
||||||
|
F.__raw = "require('mini.ai').gen_spec.treesitter({ a = '@function.outer', i = '@function.inner' })";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
align = {};
|
||||||
|
bracketed = {};
|
||||||
|
bufremove = {};
|
||||||
|
comment = {};
|
||||||
|
completion = {
|
||||||
|
lsp_completion = {
|
||||||
|
source_func = "omnifunc";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
pick = {};
|
||||||
|
surround = {};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.nixvim.keymaps = [
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>ff";
|
||||||
|
action = ":Pick files<CR>";
|
||||||
|
options.desc = "Search files";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>/";
|
||||||
|
action = ":Pick grep_live<CR>";
|
||||||
|
options.desc = "Grep";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
{
|
{
|
||||||
programs.nixvim.plugins.oil = {
|
programs.nixvim.plugins.oil = {
|
||||||
enable = true;
|
enable = true;
|
||||||
autoLoad = true;
|
|
||||||
settings = {
|
settings = {
|
||||||
columns = [
|
columns = [
|
||||||
"icon"
|
"icon"
|
||||||
|
|||||||
17
profiles/base/home-manager/neovim/plugins/treesitter.nix
Normal file
17
profiles/base/home-manager/neovim/plugins/treesitter.nix
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{pkgs, ...}: {
|
||||||
|
programs.nixvim.plugins.treesitter = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
highlight.enable = true;
|
||||||
|
indent.enable = true;
|
||||||
|
};
|
||||||
|
grammarPackages = with pkgs.vimPlugins.nvim-treesitter.builtGrammars; [
|
||||||
|
bash
|
||||||
|
fish
|
||||||
|
json
|
||||||
|
nix
|
||||||
|
toml
|
||||||
|
yaml
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -3,9 +3,7 @@
|
|||||||
lib,
|
lib,
|
||||||
user,
|
user,
|
||||||
...
|
...
|
||||||
}:
|
}: {
|
||||||
|
|
||||||
{
|
|
||||||
programs.ssh = {
|
programs.ssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
includes = [
|
includes = [
|
||||||
|
|||||||
@@ -1,9 +1,4 @@
|
|||||||
{
|
{lib, ...}: {
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
|
||||||
programs.starship = {
|
programs.starship = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableFishIntegration = true;
|
enableFishIntegration = true;
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
{
|
|
||||||
programs.zellij = {
|
programs.zellij = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableFishIntegration = true;
|
enableFishIntegration = true;
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
{ pkgs }:
|
{pkgs}:
|
||||||
|
with pkgs; [
|
||||||
with pkgs;
|
|
||||||
[
|
|
||||||
age
|
age
|
||||||
age-plugin-yubikey
|
age-plugin-yubikey
|
||||||
|
alejandra
|
||||||
delta
|
delta
|
||||||
docker
|
docker
|
||||||
docker-compose
|
docker-compose
|
||||||
@@ -16,8 +15,10 @@ with pkgs;
|
|||||||
nerd-fonts.iosevka
|
nerd-fonts.iosevka
|
||||||
nixfmt
|
nixfmt
|
||||||
nodejs_24
|
nodejs_24
|
||||||
|
nurl
|
||||||
opencode
|
opencode
|
||||||
openssh
|
openssh
|
||||||
|
prettier
|
||||||
ripgrep
|
ripgrep
|
||||||
sqlite
|
sqlite
|
||||||
tree
|
tree
|
||||||
|
|||||||
@@ -6,9 +6,7 @@
|
|||||||
nixvim,
|
nixvim,
|
||||||
user,
|
user,
|
||||||
...
|
...
|
||||||
}:
|
}: {
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
./dock
|
./dock
|
||||||
./system.nix
|
./system.nix
|
||||||
@@ -25,15 +23,13 @@
|
|||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
users.${user} =
|
users.${user} = {
|
||||||
{
|
|
||||||
pkgs,
|
pkgs,
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: {
|
||||||
{
|
_module.args = {inherit user;};
|
||||||
_module.args = { inherit user; };
|
|
||||||
imports = [
|
imports = [
|
||||||
nixvim.homeModules.nixvim
|
nixvim.homeModules.nixvim
|
||||||
../base/home-manager
|
../base/home-manager
|
||||||
@@ -41,7 +37,7 @@
|
|||||||
];
|
];
|
||||||
fonts.fontconfig.enable = true;
|
fonts.fontconfig.enable = true;
|
||||||
home = {
|
home = {
|
||||||
packages = pkgs.callPackage ./packages.nix { } ++ pkgs.callPackage ../base/packages.nix { };
|
packages = pkgs.callPackage ./packages.nix {} ++ pkgs.callPackage ../base/packages.nix {};
|
||||||
stateVersion = "24.05";
|
stateVersion = "24.05";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -52,11 +48,11 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
username = user;
|
username = user;
|
||||||
entries = [
|
entries = [
|
||||||
{ path = "/Applications/Safari.app/"; }
|
{path = "/Applications/Safari.app/";}
|
||||||
{ path = "/${pkgs.ghostty-bin}/Applications/Ghostty.app/"; }
|
{path = "/${pkgs.ghostty-bin}/Applications/Ghostty.app/";}
|
||||||
{ path = "/System/Applications/Notes.app/"; }
|
{path = "/System/Applications/Notes.app/";}
|
||||||
{ path = "/System/Applications/Music.app/"; }
|
{path = "/System/Applications/Music.app/";}
|
||||||
{ path = "/System/Applications/System Settings.app/"; }
|
{path = "/System/Applications/System Settings.app/";}
|
||||||
{
|
{
|
||||||
path = "${config.users.users.${user}.home}/Downloads";
|
path = "${config.users.users.${user}.home}/Downloads";
|
||||||
section = "others";
|
section = "others";
|
||||||
|
|||||||
@@ -4,13 +4,10 @@
|
|||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
with lib; let
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.local.dock;
|
cfg = config.local.dock;
|
||||||
inherit (pkgs) stdenv dockutil;
|
inherit (pkgs) stdenv dockutil;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options = {
|
options = {
|
||||||
local.dock = {
|
local.dock = {
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
@@ -21,11 +18,10 @@ in
|
|||||||
|
|
||||||
entries = mkOption {
|
entries = mkOption {
|
||||||
description = "Entries on the Dock";
|
description = "Entries on the Dock";
|
||||||
type =
|
type = with types;
|
||||||
with types;
|
|
||||||
listOf (submodule {
|
listOf (submodule {
|
||||||
options = {
|
options = {
|
||||||
path = lib.mkOption { type = str; };
|
path = lib.mkOption {type = str;};
|
||||||
section = lib.mkOption {
|
section = lib.mkOption {
|
||||||
type = str;
|
type = str;
|
||||||
default = "apps";
|
default = "apps";
|
||||||
@@ -48,11 +44,14 @@ in
|
|||||||
|
|
||||||
config = mkIf cfg.enable (
|
config = mkIf cfg.enable (
|
||||||
let
|
let
|
||||||
normalize = path: if hasSuffix ".app" path then path + "/" else path;
|
normalize = path:
|
||||||
entryURI =
|
if hasSuffix ".app" path
|
||||||
path:
|
then path + "/"
|
||||||
|
else path;
|
||||||
|
entryURI = path:
|
||||||
"file://"
|
"file://"
|
||||||
+ (builtins.replaceStrings
|
+ (
|
||||||
|
builtins.replaceStrings
|
||||||
[
|
[
|
||||||
" "
|
" "
|
||||||
"!"
|
"!"
|
||||||
@@ -80,12 +79,12 @@ in
|
|||||||
(normalize path)
|
(normalize path)
|
||||||
);
|
);
|
||||||
wantURIs = concatMapStrings (entry: "${entryURI entry.path}\n") cfg.entries;
|
wantURIs = concatMapStrings (entry: "${entryURI entry.path}\n") cfg.entries;
|
||||||
createEntries = concatMapStrings (
|
createEntries =
|
||||||
entry:
|
concatMapStrings (
|
||||||
"${dockutil}/bin/dockutil --no-restart --add '${entry.path}' --section ${entry.section} ${entry.options}\n"
|
entry: "${dockutil}/bin/dockutil --no-restart --add '${entry.path}' --section ${entry.section} ${entry.options}\n"
|
||||||
) cfg.entries;
|
)
|
||||||
in
|
cfg.entries;
|
||||||
{
|
in {
|
||||||
system.activationScripts.postActivation.text = ''
|
system.activationScripts.postActivation.text = ''
|
||||||
echo >&2 "Setting up the Dock for ${cfg.username}..."
|
echo >&2 "Setting up the Dock for ${cfg.username}..."
|
||||||
su ${cfg.username} -s /bin/sh <<'USERBLOCK'
|
su ${cfg.username} -s /bin/sh <<'USERBLOCK'
|
||||||
|
|||||||
@@ -1,9 +1,4 @@
|
|||||||
{
|
{pkgs, ...}: {
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
|
||||||
programs.ghostty = {
|
programs.ghostty = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.ghostty-bin;
|
package = pkgs.ghostty-bin;
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
|
|
||||||
{
|
|
||||||
homebrew = {
|
homebrew = {
|
||||||
enable = true;
|
enable = true;
|
||||||
masApps = { };
|
masApps = {};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
{ pkgs }:
|
{pkgs}:
|
||||||
|
with pkgs; [
|
||||||
with pkgs;
|
|
||||||
[
|
|
||||||
_1password-gui
|
_1password-gui
|
||||||
dockutil
|
dockutil
|
||||||
raycast
|
raycast
|
||||||
|
|||||||
@@ -5,8 +5,7 @@
|
|||||||
secrets,
|
secrets,
|
||||||
user,
|
user,
|
||||||
...
|
...
|
||||||
}:
|
}: {
|
||||||
{
|
|
||||||
age.identityPaths = [
|
age.identityPaths = [
|
||||||
"/Users/${user}/.ssh/id_ed25519"
|
"/Users/${user}/.ssh/id_ed25519"
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
{ lib, ... }:
|
{lib, ...}: {
|
||||||
|
|
||||||
{
|
|
||||||
system.defaults = {
|
system.defaults = {
|
||||||
NSGlobalDomain = {
|
NSGlobalDomain = {
|
||||||
AppleShowAllExtensions = true;
|
AppleShowAllExtensions = true;
|
||||||
|
|||||||
@@ -6,13 +6,10 @@
|
|||||||
nixvim,
|
nixvim,
|
||||||
user,
|
user,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
|
sharedFiles = import ../base/files.nix {inherit config pkgs;};
|
||||||
let
|
additionalFiles = import ./files.nix {inherit config pkgs;};
|
||||||
sharedFiles = import ../base/files.nix { inherit config pkgs; };
|
in {
|
||||||
additionalFiles = import ./files.nix { inherit config pkgs; };
|
|
||||||
in
|
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
./packages.nix
|
./packages.nix
|
||||||
./secrets.nix
|
./secrets.nix
|
||||||
@@ -33,21 +30,19 @@ in
|
|||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
users.${user} =
|
users.${user} = {
|
||||||
{
|
|
||||||
pkgs,
|
pkgs,
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: {
|
||||||
{
|
_module.args = {inherit user;};
|
||||||
_module.args = { inherit user; };
|
|
||||||
imports = [
|
imports = [
|
||||||
nixvim.homeModules.nixvim
|
nixvim.homeModules.nixvim
|
||||||
../base/home-manager
|
../base/home-manager
|
||||||
];
|
];
|
||||||
home = {
|
home = {
|
||||||
packages = pkgs.callPackage ./packages.nix { };
|
packages = pkgs.callPackage ./packages.nix {};
|
||||||
file = lib.mkMerge [
|
file = lib.mkMerge [
|
||||||
sharedFiles
|
sharedFiles
|
||||||
additionalFiles
|
additionalFiles
|
||||||
|
|||||||
Reference in New Issue
Block a user