Merge branch 'paperclover-chloe'
This commit is contained in:
commit
3449484e73
48 changed files with 1288 additions and 883 deletions
184
flake.lock
184
flake.lock
|
@ -197,10 +197,7 @@
|
||||||
},
|
},
|
||||||
"flake-parts": {
|
"flake-parts": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs-lib": [
|
"nixpkgs-lib": "nixpkgs-lib"
|
||||||
"nixvim",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1743550720,
|
"lastModified": 1743550720,
|
||||||
|
@ -315,7 +312,7 @@
|
||||||
},
|
},
|
||||||
"flake-utils_5": {
|
"flake-utils_5": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": "systems_5"
|
"systems": "systems_6"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1705309234,
|
"lastModified": 1705309234,
|
||||||
|
@ -333,7 +330,7 @@
|
||||||
},
|
},
|
||||||
"flake-utils_6": {
|
"flake-utils_6": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": "systems_6"
|
"systems": "systems_7"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1710146030,
|
"lastModified": 1710146030,
|
||||||
|
@ -351,7 +348,7 @@
|
||||||
},
|
},
|
||||||
"flake-utils_7": {
|
"flake-utils_7": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": "systems_7"
|
"systems": "systems_8"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1705309234,
|
"lastModified": 1705309234,
|
||||||
|
@ -527,34 +524,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ixx": {
|
|
||||||
"inputs": {
|
|
||||||
"flake-utils": [
|
|
||||||
"nixvim",
|
|
||||||
"nuschtosSearch",
|
|
||||||
"flake-utils"
|
|
||||||
],
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixvim",
|
|
||||||
"nuschtosSearch",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1737371634,
|
|
||||||
"narHash": "sha256-fTVAWzT1UMm1lT+YxHuVPtH+DATrhYfea3B0MxG/cGw=",
|
|
||||||
"owner": "NuschtOS",
|
|
||||||
"repo": "ixx",
|
|
||||||
"rev": "a1176e2a10ce745ff8f63e4af124ece8fe0b1648",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NuschtOS",
|
|
||||||
"ref": "v0.0.7",
|
|
||||||
"repo": "ixx",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"langref": {
|
"langref": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
|
@ -567,6 +536,21 @@
|
||||||
"url": "https://raw.githubusercontent.com/ziglang/zig/0fb2015fd3422fc1df364995f9782dfe7255eccd/doc/langref.html.in"
|
"url": "https://raw.githubusercontent.com/ziglang/zig/0fb2015fd3422fc1df364995f9782dfe7255eccd/doc/langref.html.in"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"mnw": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1746338991,
|
||||||
|
"narHash": "sha256-GbyoHjf14LOxZQc+0NFblI4xf/uwGrYo3W8lwE4HcwI=",
|
||||||
|
"owner": "Gerg-L",
|
||||||
|
"repo": "mnw",
|
||||||
|
"rev": "c65407ee9387ef75985dad3e30f58c822c766ec1",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "Gerg-L",
|
||||||
|
"repo": "mnw",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"moonlight": {
|
"moonlight": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
|
@ -608,6 +592,32 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nil": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": [
|
||||||
|
"nvf",
|
||||||
|
"flake-utils"
|
||||||
|
],
|
||||||
|
"nixpkgs": [
|
||||||
|
"nvf",
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"rust-overlay": "rust-overlay_2"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1741118843,
|
||||||
|
"narHash": "sha256-ggXU3RHv6NgWw+vc+HO4/9n0GPufhTIUjVuLci8Za8c=",
|
||||||
|
"owner": "oxalica",
|
||||||
|
"repo": "nil",
|
||||||
|
"rev": "577d160da311cc7f5042038456a0713e9863d09e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "oxalica",
|
||||||
|
"repo": "nil",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nix-index-database": {
|
"nix-index-database": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
@ -687,6 +697,21 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixpkgs-lib": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1743296961,
|
||||||
|
"narHash": "sha256-b1EdN3cULCqtorQ4QeWgLMrd5ZGOjLSLemfa00heasc=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixpkgs.lib",
|
||||||
|
"rev": "e4822aea2a6d1cdd36653c134cacfd64c97ff4fa",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixpkgs.lib",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs-stable": {
|
"nixpkgs-stable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1746557022,
|
"lastModified": 1746557022,
|
||||||
|
@ -765,28 +790,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixvim": {
|
|
||||||
"inputs": {
|
|
||||||
"flake-parts": "flake-parts",
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"nuschtosSearch": "nuschtosSearch"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1746625905,
|
|
||||||
"narHash": "sha256-El/fOZAhTDJRsPN5dro9F3cNHyclk00Acjl1nVQAEDI=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "nixvim",
|
|
||||||
"rev": "5c52e8f9e438b6850f2c7a6e4bf3f967a3a699fd",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "nixvim",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nur": {
|
"nur": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-parts": "flake-parts_2",
|
"flake-parts": "flake-parts_2",
|
||||||
|
@ -810,26 +813,28 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nuschtosSearch": {
|
"nvf": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"flake-parts": "flake-parts",
|
||||||
"flake-utils": "flake-utils_3",
|
"flake-utils": "flake-utils_3",
|
||||||
"ixx": "ixx",
|
"mnw": "mnw",
|
||||||
|
"nil": "nil",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixvim",
|
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
],
|
||||||
|
"systems": "systems_4"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1745046075,
|
"lastModified": 1746940940,
|
||||||
"narHash": "sha256-8v4y6k16Ra/fiecb4DxhsoOGtzLKgKlS+9/XJ9z0T2I=",
|
"narHash": "sha256-ASB3QVEoFK5//280uedYdt8jyDLhFa9zgj8qfc0S7Sk=",
|
||||||
"owner": "NuschtOS",
|
"owner": "notashelf",
|
||||||
"repo": "search",
|
"repo": "nvf",
|
||||||
"rev": "066afe8643274470f4a294442aadd988356a478f",
|
"rev": "815ed49d3693346122ef61da6d7443cd3cc21752",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NuschtOS",
|
"owner": "notashelf",
|
||||||
"repo": "search",
|
"repo": "nvf",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -857,8 +862,8 @@
|
||||||
"nixos-cosmic": "nixos-cosmic",
|
"nixos-cosmic": "nixos-cosmic",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs_2",
|
||||||
"nixpkgs-stable": "nixpkgs-stable_2",
|
"nixpkgs-stable": "nixpkgs-stable_2",
|
||||||
"nixvim": "nixvim",
|
"nvf": "nvf",
|
||||||
"rust-overlay": "rust-overlay_2",
|
"rust-overlay": "rust-overlay_3",
|
||||||
"stylix": "stylix",
|
"stylix": "stylix",
|
||||||
"zig": "zig",
|
"zig": "zig",
|
||||||
"zls": "zls"
|
"zls": "zls"
|
||||||
|
@ -886,6 +891,28 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rust-overlay_2": {
|
"rust-overlay_2": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nvf",
|
||||||
|
"nil",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1741055476,
|
||||||
|
"narHash": "sha256-52vwEV0oS2lCnx3c/alOFGglujZTLmObit7K8VblnS8=",
|
||||||
|
"owner": "oxalica",
|
||||||
|
"repo": "rust-overlay",
|
||||||
|
"rev": "aefb7017d710f150970299685e8d8b549d653649",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "oxalica",
|
||||||
|
"repo": "rust-overlay",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"rust-overlay_3": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
|
@ -1005,7 +1032,7 @@
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
],
|
],
|
||||||
"nur": "nur",
|
"nur": "nur",
|
||||||
"systems": "systems_4",
|
"systems": "systems_5",
|
||||||
"tinted-foot": "tinted-foot",
|
"tinted-foot": "tinted-foot",
|
||||||
"tinted-kitty": "tinted-kitty",
|
"tinted-kitty": "tinted-kitty",
|
||||||
"tinted-schemes": "tinted-schemes",
|
"tinted-schemes": "tinted-schemes",
|
||||||
|
@ -1131,6 +1158,21 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"systems_8": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"tinted-foot": {
|
"tinted-foot": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
|
|
225
flake.nix
225
flake.nix
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
description = "New Modular flake!";
|
description = "multi device configuration flake";
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "nixpkgs/nixos-unstable";
|
nixpkgs.url = "nixpkgs/nixos-unstable";
|
||||||
nixpkgs-stable.url = "nixpkgs/nixos-23.11";
|
nixpkgs-stable.url = "nixpkgs/nixos-23.11";
|
||||||
|
@ -7,112 +7,155 @@
|
||||||
home-manager.url = "github:nix-community/home-manager/master";
|
home-manager.url = "github:nix-community/home-manager/master";
|
||||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
rust-overlay = {
|
rust-overlay.url = "github:oxalica/rust-overlay";
|
||||||
url = "github:oxalica/rust-overlay";
|
rust-overlay.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
apple-fonts = {
|
apple-fonts.url = "github:Lyndeno/apple-fonts.nix";
|
||||||
url = "github:Lyndeno/apple-fonts.nix";
|
apple-fonts.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
nixvim = {
|
nvf.url = "github:notashelf/nvf";
|
||||||
url = "github:nix-community/nixvim";
|
nvf.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
darwin = {
|
darwin.url = "github:lnl7/nix-darwin/master";
|
||||||
url = "github:lnl7/nix-darwin/master";
|
darwin.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
zig.url = "github:mitchellh/zig-overlay";
|
zig.url = "github:mitchellh/zig-overlay";
|
||||||
zls.url = "github:zigtools/zls?rev=a26718049a8657d4da04c331aeced1697bc7652b";
|
zls.url = "github:zigtools/zls?rev=a26718049a8657d4da04c331aeced1697bc7652b";
|
||||||
|
|
||||||
stylix = {
|
stylix.url = "github:danth/stylix";
|
||||||
url = "github:danth/stylix";
|
stylix.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
moonlight = {
|
moonlight.url = "github:moonlight-mod/moonlight"; # Add `/develop` to the flake URL to use nightly.
|
||||||
url = "github:moonlight-mod/moonlight"; # Add `/develop` to the flake URL to use nightly.
|
moonlight.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
nixos-cosmic = {
|
|
||||||
url = "github:lilyinstarlight/nixos-cosmic";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
nh = {
|
nixos-cosmic.url = "github:lilyinstarlight/nixos-cosmic";
|
||||||
url = "github:viperML/nh";
|
nixos-cosmic.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
nh.url = "github:viperML/nh";
|
||||||
nix-options-search = {
|
nh.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
url = "github:madsbv/nix-options-search";
|
|
||||||
};
|
nix-options-search.url = "github:madsbv/nix-options-search";
|
||||||
|
|
||||||
nix-index-database.url = "github:nix-community/nix-index-database";
|
nix-index-database.url = "github:nix-community/nix-index-database";
|
||||||
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
|
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
outputs = {
|
outputs =
|
||||||
nixpkgs,
|
{
|
||||||
nixos-cosmic,
|
nixpkgs,
|
||||||
nix-index-database,
|
nixos-cosmic,
|
||||||
darwin,
|
darwin,
|
||||||
...
|
...
|
||||||
} @ inputs: let
|
}@inputs:
|
||||||
overlays = [
|
let
|
||||||
inputs.zig.overlays.default
|
lib = nixpkgs.lib;
|
||||||
inputs.rust-overlay.overlays.default
|
|
||||||
inputs.nh.overlays.default
|
|
||||||
];
|
|
||||||
|
|
||||||
mkSystem = import ./lib/mkSystem.nix {
|
# TODO: apply these overlays sooner and remove uses of legacyPackages elsewhere.
|
||||||
inherit overlays nixpkgs inputs;
|
overlays = [
|
||||||
};
|
inputs.zig.overlays.default
|
||||||
in rec {
|
inputs.rust-overlay.overlays.default
|
||||||
# "nix run .#darwin-rebuild"
|
inputs.nh.overlays.default
|
||||||
packages.aarch64-darwin.darwin-rebuild = darwin.packages.aarch64-darwin.darwin-rebuild;
|
|
||||||
# "nix fmt ."
|
|
||||||
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra;
|
|
||||||
formatter.aarch64-darwin = nixpkgs.legacyPackages.aarch64-darwin.alejandra;
|
|
||||||
|
|
||||||
# natalie's desktop computer
|
# https://github.com/LnL7/nix-darwin/issues/1041
|
||||||
nixosConfigurations.nixos = mkSystem "nixos" {
|
(_: prev: {
|
||||||
user = "natalie";
|
karabiner-elements = prev.karabiner-elements.overrideAttrs (old: {
|
||||||
host = "desktop";
|
version = "14.13.0";
|
||||||
system = "x86_64-linux";
|
|
||||||
extraModules = [
|
src = prev.fetchurl {
|
||||||
nixos-cosmic.nixosModules.default
|
inherit (old.src) url;
|
||||||
|
hash = "sha256-gmJwoht/Tfm5qMecmq1N6PSAIfWOqsvuHU8VDJY8bLw=";
|
||||||
|
};
|
||||||
|
});
|
||||||
|
})
|
||||||
];
|
];
|
||||||
};
|
|
||||||
# natalie's laptop
|
|
||||||
darwinConfigurations."Natalies-MacBook-Air" = mkSystem "Natalies-MacBook-Air" {
|
|
||||||
user = "natalie";
|
|
||||||
host = "laptop";
|
|
||||||
system = "aarch64-darwin";
|
|
||||||
};
|
|
||||||
|
|
||||||
# chloe's mac studio "sandwich"
|
# Users of this flake currently use x86_64 Linux and Apple Silicon
|
||||||
darwinConfigurations.sandwich = mkSystem "sandwich" {
|
systems = [
|
||||||
user = "chloe";
|
"x86_64-linux"
|
||||||
host = "sandwich";
|
"aarch64-darwin"
|
||||||
system = "aarch64-darwin";
|
];
|
||||||
};
|
forAllSystems =
|
||||||
# chloe's macbook air "paperback"
|
f:
|
||||||
darwinConfigurations.paperback = mkSystem "paperback" {
|
builtins.listToAttrs (
|
||||||
user = "chloe";
|
builtins.map (system: {
|
||||||
host = "paperback";
|
name = system;
|
||||||
system = "aarch64-darwin";
|
value = f (
|
||||||
};
|
inputs
|
||||||
|
// {
|
||||||
|
inherit system;
|
||||||
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}) systems
|
||||||
|
);
|
||||||
|
|
||||||
# generate checks for "nix flake check --all-systems --no-build"
|
mkSystem = import ./lib/mkSystem.nix {
|
||||||
checks.aarch64-darwin = builtins.listToAttrs (builtins.map (name: let
|
inherit
|
||||||
d = darwinConfigurations.${name}.system;
|
overlays
|
||||||
in {
|
nixpkgs
|
||||||
name = "darwinConfiguration-" + d.name;
|
inputs
|
||||||
value = d;
|
mkNeovim
|
||||||
}) (builtins.attrNames darwinConfigurations));
|
;
|
||||||
};
|
};
|
||||||
|
mkNeovim = import ./lib/mkNeovim.nix {
|
||||||
|
inherit overlays nixpkgs inputs;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
rec {
|
||||||
|
# "nix fmt"
|
||||||
|
formatter = forAllSystems (inputs: inputs.pkgs.nixfmt-tree);
|
||||||
|
packages = forAllSystems (
|
||||||
|
{ system, ... }:
|
||||||
|
{
|
||||||
|
nvim-chloe = mkNeovim "chloe" system;
|
||||||
|
nvim-natalie = mkNeovim "natalie" system;
|
||||||
|
}
|
||||||
|
// lib.optionalAttrs (system == "aarch64-darwin") {
|
||||||
|
# "nix run .#darwin-rebuild"
|
||||||
|
darwin-rebuild = darwin.packages.aarch64-darwin.darwin-rebuild;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
# natalie's desktop computer
|
||||||
|
nixosConfigurations.nixos = mkSystem "nixos" {
|
||||||
|
user = "natalie";
|
||||||
|
host = "desktop";
|
||||||
|
system = "x86_64-linux";
|
||||||
|
extraModules = [
|
||||||
|
nixos-cosmic.nixosModules.default
|
||||||
|
];
|
||||||
|
};
|
||||||
|
# natalie's laptop
|
||||||
|
darwinConfigurations."Natalies-MacBook-Air" = mkSystem "Natalies-MacBook-Air" {
|
||||||
|
user = "natalie";
|
||||||
|
host = "laptop";
|
||||||
|
system = "aarch64-darwin";
|
||||||
|
};
|
||||||
|
|
||||||
|
# chloe's mac studio "sandwich"
|
||||||
|
darwinConfigurations.sandwich = mkSystem "sandwich" {
|
||||||
|
user = "chloe";
|
||||||
|
host = "sandwich";
|
||||||
|
system = "aarch64-darwin";
|
||||||
|
};
|
||||||
|
# chloe's macbook air "paperback"
|
||||||
|
darwinConfigurations.paperback = mkSystem "paperback" {
|
||||||
|
user = "chloe";
|
||||||
|
host = "paperback";
|
||||||
|
system = "aarch64-darwin";
|
||||||
|
};
|
||||||
|
|
||||||
|
# generate checks for "nix flake check --all-systems --no-build"
|
||||||
|
checks.aarch64-darwin = builtins.listToAttrs (
|
||||||
|
builtins.map (
|
||||||
|
name:
|
||||||
|
let
|
||||||
|
d = darwinConfigurations.${name}.system;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
name = "darwinConfiguration-" + d.name;
|
||||||
|
value = d;
|
||||||
|
}
|
||||||
|
) (builtins.attrNames darwinConfigurations)
|
||||||
|
);
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
29
lib/mkNeovim.nix
Normal file
29
lib/mkNeovim.nix
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
{
|
||||||
|
nixpkgs,
|
||||||
|
# TODO: apply overlays here
|
||||||
|
overlays,
|
||||||
|
inputs,
|
||||||
|
}:
|
||||||
|
user: system:
|
||||||
|
let
|
||||||
|
darwin = nixpkgs.lib.strings.hasSuffix "-darwin" system;
|
||||||
|
|
||||||
|
host = {
|
||||||
|
inherit darwin;
|
||||||
|
linux = !darwin;
|
||||||
|
};
|
||||||
|
|
||||||
|
userDir = ../users + "/${user}";
|
||||||
|
userConfig = import (userDir + "/user.nix");
|
||||||
|
in
|
||||||
|
(inputs.nvf.lib.neovimConfiguration {
|
||||||
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
modules = builtins.filter (f: f != null) [
|
||||||
|
(../users + ("/" + user + "/vim.nix"))
|
||||||
|
../modules/neovim
|
||||||
|
];
|
||||||
|
extraSpecialArgs = {
|
||||||
|
inherit host;
|
||||||
|
user = userConfig;
|
||||||
|
};
|
||||||
|
}).neovim
|
190
lib/mkSystem.nix
190
lib/mkSystem.nix
|
@ -4,30 +4,21 @@
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
overlays,
|
overlays,
|
||||||
inputs,
|
inputs,
|
||||||
}: name: {
|
mkNeovim,
|
||||||
|
}:
|
||||||
|
name:
|
||||||
|
{
|
||||||
user, # ./users/{name}
|
user, # ./users/{name}
|
||||||
host, # ./users/{name}/{host} (optional)
|
host, # ./users/{name}/{host} (optional)
|
||||||
system, # arch-os
|
system, # arch-os
|
||||||
extraModules ? [],
|
extraModules ? [ ],
|
||||||
}: let
|
}:
|
||||||
inherit (builtins) pathExists;
|
let
|
||||||
darwin = nixpkgs.lib.strings.hasSuffix "-darwin" system;
|
darwin = nixpkgs.lib.strings.hasSuffix "-darwin" system;
|
||||||
getInputModule = a: b:
|
getInputModule = a: b: inputs.${a}.${if darwin then "darwinModules" else "nixosModules"}.${b};
|
||||||
inputs.${
|
|
||||||
a
|
|
||||||
}.${
|
|
||||||
if darwin
|
|
||||||
then "darwinModules"
|
|
||||||
else "nixosModules"
|
|
||||||
}.${
|
|
||||||
b
|
|
||||||
};
|
|
||||||
|
|
||||||
# NixOS vs nix-darwin functions
|
# NixOS vs nix-darwin functions
|
||||||
systemFunc =
|
systemFunc = if darwin then inputs.darwin.lib.darwinSystem else nixpkgs.lib.nixosSystem;
|
||||||
if darwin
|
|
||||||
then inputs.darwin.lib.darwinSystem
|
|
||||||
else nixpkgs.lib.nixosSystem;
|
|
||||||
|
|
||||||
userDir = ../users + "/${user}";
|
userDir = ../users + "/${user}";
|
||||||
userConfig = import (userDir + "/user.nix");
|
userConfig = import (userDir + "/user.nix");
|
||||||
|
@ -38,10 +29,7 @@
|
||||||
hostHomePath = hostDir + "/home.nix";
|
hostHomePath = hostDir + "/home.nix";
|
||||||
userHomePath = userDir + "/home.nix";
|
userHomePath = userDir + "/home.nix";
|
||||||
|
|
||||||
pathOrNull = a:
|
pathOrNull = a: if builtins.pathExists a then a else null;
|
||||||
if pathExists a
|
|
||||||
then a
|
|
||||||
else null;
|
|
||||||
|
|
||||||
# Arguments passed to all module files
|
# Arguments passed to all module files
|
||||||
args = {
|
args = {
|
||||||
|
@ -50,100 +38,92 @@
|
||||||
# Details about the host machine
|
# Details about the host machine
|
||||||
host = {
|
host = {
|
||||||
inherit darwin name;
|
inherit darwin name;
|
||||||
|
linux = !darwin;
|
||||||
};
|
};
|
||||||
user = ({
|
user =
|
||||||
# This acts as formal documentation for what is allowed in user.nix
|
(
|
||||||
username, # unix username
|
{
|
||||||
name, # your display name
|
# This acts as formal documentation for what is allowed in user.nix
|
||||||
email, # for identity in programs such as git
|
username, # unix username
|
||||||
dotfilesDir, # location to `../.`
|
name, # your display name
|
||||||
timeZone ? "America/Los_Angeles",
|
email, # for identity in programs such as git
|
||||||
# Stylix/Theming
|
dotfilesDir, # location to `../.`
|
||||||
theme ? null, # theme name for stylix
|
timeZone ? "America/Los_Angeles",
|
||||||
sexuality ? null, # pride flag for hyfetch
|
# Stylix/Theming
|
||||||
font ? null, # font to use
|
theme ? null, # theme name for stylix
|
||||||
term, # preferred $TERM
|
sexuality ? null, # pride flag for hyfetch
|
||||||
editor, # preferred $EDITOR
|
font ? null, # font to use
|
||||||
browser ? null, # preferred $BROWSER
|
term, # preferred $TERM
|
||||||
} @ user:
|
editor, # preferred $EDITOR
|
||||||
user)
|
browser ? null, # preferred $BROWSER
|
||||||
userConfig;
|
}@user:
|
||||||
|
user
|
||||||
|
)
|
||||||
|
userConfig;
|
||||||
};
|
};
|
||||||
systemSettings = rec {
|
systemSettings = rec {
|
||||||
inherit darwin;
|
inherit darwin;
|
||||||
homeDir = "/${
|
homeDir = "/${if darwin then "Users" else "home"}/${userConfig.username}";
|
||||||
if darwin
|
|
||||||
then "Users"
|
|
||||||
else "home"
|
|
||||||
}/${userConfig.username}";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
mainHomeImports = builtins.filter (f: f != null) [
|
||||||
|
(pathOrNull userHomePath)
|
||||||
|
(pathOrNull hostHomePath)
|
||||||
|
{
|
||||||
|
home.packages = [
|
||||||
|
(mkNeovim user system)
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
in
|
in
|
||||||
systemFunc {
|
systemFunc {
|
||||||
inherit system;
|
inherit system;
|
||||||
|
|
||||||
modules =
|
modules =
|
||||||
builtins.filter (f: f != null)
|
builtins.filter (f: f != null) [
|
||||||
[
|
# Apply our overlays. Overlays are keyed by system type so we have
|
||||||
# Apply our overlays. Overlays are keyed by system type so we have
|
# to go through and apply our system type. We do this first so
|
||||||
# to go through and apply our system type. We do this first so
|
# the overlays are available globally.
|
||||||
# the overlays are available globally.
|
{ nixpkgs.overlays = overlays; }
|
||||||
{nixpkgs.overlays = overlays;}
|
|
||||||
|
|
||||||
# Modules shared between nix-darwin and NixOS
|
# Modules shared between nix-darwin and NixOS
|
||||||
../modules/shared
|
../modules/shared
|
||||||
# Modules for the specific OS
|
# Modules for the specific OS
|
||||||
(
|
(if darwin then ../modules/macos else ../modules/nixos)
|
||||||
if darwin
|
|
||||||
then ../modules/macos
|
|
||||||
else ../modules/nixos
|
|
||||||
)
|
|
||||||
|
|
||||||
# The user-wide configuration.nix
|
# The user-wide configuration.nix
|
||||||
(pathOrNull userConfigPath)
|
(pathOrNull userConfigPath)
|
||||||
# The host-wide configuration.nix
|
# The host-wide configuration.nix
|
||||||
(
|
(pathOrNull hostConfigPath)
|
||||||
pathOrNull hostConfigPath
|
|
||||||
)
|
|
||||||
|
|
||||||
# Set up nix-index and enable comma for easy one-shot command use
|
# Set up nix-index and enable comma for easy one-shot command use
|
||||||
# https://github.com/nix-community/comma
|
# https://github.com/nix-community/comma
|
||||||
(getInputModule "nix-index-database" "nix-index")
|
(getInputModule "nix-index-database" "nix-index")
|
||||||
{programs.nix-index-database.comma.enable = true;}
|
{ programs.nix-index-database.comma.enable = true; }
|
||||||
|
|
||||||
# Themes for all programs
|
# Themes for all programs
|
||||||
(getInputModule "stylix" "stylix")
|
(getInputModule "stylix" "stylix")
|
||||||
|
|
||||||
# Home manager
|
# Home manager
|
||||||
(getInputModule "home-manager" "home-manager")
|
(getInputModule "home-manager" "home-manager")
|
||||||
{
|
{
|
||||||
home-manager = {
|
home-manager = {
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
backupFileExtension = "hm-backup";
|
backupFileExtension = "hm-backup";
|
||||||
# Arguments passed to all module files
|
# Arguments passed to all module files
|
||||||
extraSpecialArgs =
|
extraSpecialArgs = args // {
|
||||||
args
|
inherit mainHomeImports;
|
||||||
// {
|
|
||||||
mainHomeImports = builtins.filter (f: f != null) [
|
|
||||||
(
|
|
||||||
pathOrNull userHomePath
|
|
||||||
)
|
|
||||||
(
|
|
||||||
pathOrNull hostHomePath
|
|
||||||
)
|
|
||||||
#Can't have conditional import path
|
|
||||||
../modules/macos/tiling/sketchybar-home.nix
|
|
||||||
];
|
|
||||||
};
|
|
||||||
# can't find how to make this an array without the param
|
|
||||||
users.${userConfig.username} = ../modules/home-manager.nix;
|
|
||||||
};
|
};
|
||||||
users.users.${userConfig.username}.home = systemSettings.homeDir;
|
# can't find how to make this an array without the param
|
||||||
}
|
users.${userConfig.username} = ../modules/home;
|
||||||
|
};
|
||||||
|
users.users.${userConfig.username}.home = systemSettings.homeDir;
|
||||||
|
}
|
||||||
|
|
||||||
# Arguments passed to all module files
|
# Arguments passed to all module files
|
||||||
{config._module.args = args;}
|
{ config._module.args = args; }
|
||||||
]
|
]
|
||||||
# Add extra modules specified from config
|
# Add extra modules specified from config
|
||||||
++ extraModules;
|
++ extraModules;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,10 +8,14 @@
|
||||||
host,
|
host,
|
||||||
mainHomeImports,
|
mainHomeImports,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
cfg = config.programs;
|
cfg = config.programs;
|
||||||
in {
|
in
|
||||||
imports = mainHomeImports;
|
{
|
||||||
|
imports = mainHomeImports ++ [
|
||||||
|
./macos/sketchybar.nix
|
||||||
|
];
|
||||||
programs = {
|
programs = {
|
||||||
home-manager.enable = true;
|
home-manager.enable = true;
|
||||||
nix-index.enable = true;
|
nix-index.enable = true;
|
||||||
|
@ -40,7 +44,14 @@ in {
|
||||||
daemon.enable = cfg.atuin.enable;
|
daemon.enable = cfg.atuin.enable;
|
||||||
};
|
};
|
||||||
bat = {
|
bat = {
|
||||||
extraPackages = with pkgs.bat-extras; [batdiff batman batgrep batwatch batpipe prettybat];
|
extraPackages = with pkgs.bat-extras; [
|
||||||
|
batdiff
|
||||||
|
batman
|
||||||
|
batgrep
|
||||||
|
batwatch
|
||||||
|
batpipe
|
||||||
|
prettybat
|
||||||
|
];
|
||||||
};
|
};
|
||||||
hyfetch = {
|
hyfetch = {
|
||||||
settings = {
|
settings = {
|
||||||
|
@ -69,7 +80,7 @@ in {
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
shellAliases =
|
shellAliases =
|
||||||
{}
|
{ }
|
||||||
// lib.optionalAttrs (!host.darwin) {
|
// lib.optionalAttrs (!host.darwin) {
|
||||||
reboot-windows = "sudo efibootmgr --bootnext 0000; sudo reboot -h now";
|
reboot-windows = "sudo efibootmgr --bootnext 0000; sudo reboot -h now";
|
||||||
};
|
};
|
408
modules/home/macos/sketchybar.nix
Normal file
408
modules/home/macos/sketchybar.nix
Normal file
|
@ -0,0 +1,408 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
host,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
# folder = "${config.home.homeDirectory}.dotfiles/files/sketchybar";
|
||||||
|
# folder = "~/.dotfiles/files/sketchybar";
|
||||||
|
folder = ../../../files/sketchybar;
|
||||||
|
in
|
||||||
|
lib.mkIf (host.darwin) {
|
||||||
|
home.file =
|
||||||
|
lib.attrsets.mapAttrs
|
||||||
|
(
|
||||||
|
file: value: (lib.attrsets.overrideExisting value { enable = config.shared.darwin.tiling.enable; })
|
||||||
|
)
|
||||||
|
{
|
||||||
|
sketchybarrc = {
|
||||||
|
executable = true;
|
||||||
|
target = ".config/sketchybar/sketchybarrc";
|
||||||
|
text = ''
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
source "$HOME/.config/sketchybar/colors.sh" # Loads all defined colors
|
||||||
|
source "$HOME/.config/sketchybar/icons.sh" # Loads all defined icons
|
||||||
|
|
||||||
|
ITEM_DIR="$HOME/.config/sketchybar/items" # Directory where the items are configured
|
||||||
|
PLUGIN_DIR="$HOME/.config/sketchybar/plugins" # Directory where all the plugin scripts are stored
|
||||||
|
|
||||||
|
FONT="SF Pro" # Needs to have Regular, Bold, Semibold, Heavy and Black variants
|
||||||
|
PADDINGS=3 # All paddings use this value (icon, label, background)
|
||||||
|
|
||||||
|
# Setting up and starting the helper process
|
||||||
|
HELPER=git.felix.helper
|
||||||
|
killall helper
|
||||||
|
cd $HOME/.config/sketchybar/helper && make
|
||||||
|
$HOME/.config/sketchybar/helper/helper $HELPER > /dev/null 2>&1 &
|
||||||
|
|
||||||
|
# Unload the macOS on screen indicator overlay for volume change
|
||||||
|
# launchctl unload -F /System/Library/LaunchAgents/com.apple.OSDUIHelper.plist > /dev/null 2>&1 &
|
||||||
|
|
||||||
|
# Setting up the general bar appearance and default values
|
||||||
|
${pkgs.sketchybar}/bin/sketchybar --bar height=40 \
|
||||||
|
color=$BAR_COLOR \
|
||||||
|
shadow=off \
|
||||||
|
position=top \
|
||||||
|
sticky=on \
|
||||||
|
padding_right=0 \
|
||||||
|
padding_left=0 \
|
||||||
|
corner_radius=12 \
|
||||||
|
y_offset=0 \
|
||||||
|
margin=2 \
|
||||||
|
blur_radius=0 \
|
||||||
|
notch_width=0 \
|
||||||
|
--default updates=when_shown \
|
||||||
|
icon.font="$FONT:Bold:14.0" \
|
||||||
|
icon.color=$ICON_COLOR \
|
||||||
|
icon.padding_left=$PADDINGS \
|
||||||
|
icon.padding_right=$PADDINGS \
|
||||||
|
label.font="$FONT:Semibold:13.0" \
|
||||||
|
label.color=$LABEL_COLOR \
|
||||||
|
label.padding_left=$PADDINGS \
|
||||||
|
label.padding_right=$PADDINGS \
|
||||||
|
background.padding_right=$PADDINGS \
|
||||||
|
background.padding_left=$PADDINGS \
|
||||||
|
background.height=26 \
|
||||||
|
background.corner_radius=9 \
|
||||||
|
popup.background.border_width=2 \
|
||||||
|
popup.background.corner_radius=11 \
|
||||||
|
popup.background.border_color=$POPUP_BORDER_COLOR \
|
||||||
|
popup.background.color=$POPUP_BACKGROUND_COLOR \
|
||||||
|
popup.background.shadow.drawing=on
|
||||||
|
|
||||||
|
# Left
|
||||||
|
source "$ITEM_DIR/apple.sh"
|
||||||
|
source "$ITEM_DIR/spaces.sh"
|
||||||
|
source "$ITEM_DIR/front_app.sh"
|
||||||
|
|
||||||
|
# Center
|
||||||
|
# source "$ITEM_DIR/spotify.sh"
|
||||||
|
source "$ITEM_DIR/calendar.sh"
|
||||||
|
|
||||||
|
# Right
|
||||||
|
# source "$ITEM_DIR/brew.sh"
|
||||||
|
# source "$ITEM_DIR/github.sh"
|
||||||
|
source "$ITEM_DIR/volume.sh"
|
||||||
|
# source "$ITEM_DIR/divider.sh"
|
||||||
|
# source "$ITEM_DIR/cpu.sh"
|
||||||
|
|
||||||
|
# Forcing all item scripts to run (never do this outside of sketchybarrc)
|
||||||
|
${pkgs.sketchybar}/bin/sketchybar --update
|
||||||
|
|
||||||
|
echo "sketchybar configuation loaded.."
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
icons = {
|
||||||
|
executable = true;
|
||||||
|
target = ".config/sketchybar/icons.sh";
|
||||||
|
source = folder + /icons.sh;
|
||||||
|
};
|
||||||
|
colors = {
|
||||||
|
executable = true;
|
||||||
|
target = ".config/sketchybar/colors.sh";
|
||||||
|
text = ''
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
# Color Palette
|
||||||
|
export BLACK=0xff4c4f69
|
||||||
|
export WHITE=0xffeff1f5
|
||||||
|
export RED=0xffd20f39
|
||||||
|
export GREEN=0xff40a02b
|
||||||
|
export BLUE=0xff1e66f5
|
||||||
|
export YELLOW=0xffdf8e1d
|
||||||
|
export ORANGE=0xfffe640b
|
||||||
|
export MAGENTA=0xffea76cb
|
||||||
|
export GREY=0xff9ca0b0
|
||||||
|
export TRANSPARENT=0xff000000
|
||||||
|
export BLUE2=0xff7287fd
|
||||||
|
export FLAMINGO=0xffdd7878
|
||||||
|
|
||||||
|
# General bar colors
|
||||||
|
export BAR_COLOR=0xeff1f5ff # Color of the bar
|
||||||
|
export ICON_COLOR=0xff4c4f69
|
||||||
|
export LABEL_COLOR=0xff4c4f69 # Color of all labels
|
||||||
|
export BACKGROUND_1=0xffbcc0cc
|
||||||
|
export BACKGROUND_2=0xffbcc0cc
|
||||||
|
|
||||||
|
export POPUP_BACKGROUND_COLOR=$BLACK
|
||||||
|
export POPUP_BORDER_COLOR=$WHITE
|
||||||
|
|
||||||
|
export SHADOW_COLOR=$BLACK
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
items_apple = {
|
||||||
|
executable = true;
|
||||||
|
target = ".config/sketchybar/items/apple.sh";
|
||||||
|
source = folder + /items/executable_apple.sh;
|
||||||
|
};
|
||||||
|
items_brew = {
|
||||||
|
executable = true;
|
||||||
|
target = ".config/sketchybar/items/brew.sh";
|
||||||
|
source = folder + /items/executable_brew.sh;
|
||||||
|
};
|
||||||
|
items_calendar = {
|
||||||
|
executable = true;
|
||||||
|
target = ".config/sketchybar/items/calendar.sh";
|
||||||
|
text = ''
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
sketchybar --add item calendar center \
|
||||||
|
--set calendar icon=cal \
|
||||||
|
display=1 \
|
||||||
|
icon.font="$FONT:Black:12.0" \
|
||||||
|
icon.padding_right=0 \
|
||||||
|
label.width=50 \
|
||||||
|
label.align=right \
|
||||||
|
background.padding_left=15 \
|
||||||
|
update_freq=30 \
|
||||||
|
script="$PLUGIN_DIR/calendar.sh" \
|
||||||
|
click_script="$PLUGIN_DIR/zen.sh"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
items_cpu = {
|
||||||
|
executable = true;
|
||||||
|
target = ".config/sketchybar/items/cpu.sh";
|
||||||
|
source = folder + /items/executable_cpu.sh;
|
||||||
|
};
|
||||||
|
items_divider = {
|
||||||
|
executable = true;
|
||||||
|
target = ".config/sketchybar/items/divider.sh";
|
||||||
|
source = folder + /items/executable_divider.sh;
|
||||||
|
};
|
||||||
|
items_front_app = {
|
||||||
|
executable = true;
|
||||||
|
target = ".config/sketchybar/items/front_app.sh";
|
||||||
|
text = ''
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
FRONT_APP_SCRIPT='sketchybar --set $NAME label="$INFO"'
|
||||||
|
sketchybar --add event window_focus \
|
||||||
|
--add event windows_on_spaces \
|
||||||
|
--add item system.aerospace left \
|
||||||
|
--set system.aerospace script="$PLUGIN_DIR/aerospace.sh" \
|
||||||
|
icon.font="$FONT:Bold:16.0" \
|
||||||
|
label.drawing=off \
|
||||||
|
icon.width=30 \
|
||||||
|
icon=$YABAI_GRID \
|
||||||
|
icon.color=$BLACK \
|
||||||
|
updates=on \
|
||||||
|
display=active \
|
||||||
|
--subscribe system.aerospace window_focus \
|
||||||
|
windows_on_spaces \
|
||||||
|
mouse.clicked \
|
||||||
|
--add item front_app left \
|
||||||
|
--set front_app script="$FRONT_APP_SCRIPT" \
|
||||||
|
icon.drawing=off \
|
||||||
|
background.padding_left=0 \
|
||||||
|
background.padding_right=10 \
|
||||||
|
label.color=$BLACK \
|
||||||
|
label.font="$FONT:Black:12.0" \
|
||||||
|
display=active \
|
||||||
|
--subscribe front_app front_app_switched
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
items_github = {
|
||||||
|
executable = true;
|
||||||
|
target = ".config/sketchybar/items/github.sh";
|
||||||
|
source = folder + /items/executable_github.sh;
|
||||||
|
};
|
||||||
|
items_spaces = {
|
||||||
|
executable = true;
|
||||||
|
target = ".config/sketchybar/items/spaces.sh";
|
||||||
|
# label.background.color=$BACKGROUND_2
|
||||||
|
text = ''
|
||||||
|
${pkgs.sketchybar}/bin/sketchybar --add event aerospace_workspace_change
|
||||||
|
${pkgs.sketchybar}/bin/sketchybar --add event aerospace_mode_change
|
||||||
|
for sid in $(${pkgs.aerospace}/bin/aerospace list-workspaces --all); do
|
||||||
|
${pkgs.sketchybar}/bin/sketchybar --add item space.$sid left \
|
||||||
|
--subscribe space.$sid aerospace_workspace_change \
|
||||||
|
--subscribe space.$sid aerospace_mode_change \
|
||||||
|
--set space.$sid \
|
||||||
|
icon=$sid \
|
||||||
|
icon.padding_left=22 \
|
||||||
|
icon.padding_right=22 \
|
||||||
|
icon.highlight_color=$WHITE \
|
||||||
|
icon.highlight=off \
|
||||||
|
icon.color=0xff4c566a \
|
||||||
|
background.padding_left=-8 \
|
||||||
|
background.padding_right=-8 \
|
||||||
|
background.color=$BACKGROUND_1 \
|
||||||
|
background.drawing=on \
|
||||||
|
script="$PLUGIN_DIR/aerospace.sh $sid" \
|
||||||
|
click_script="aerospace workspace $sid" \
|
||||||
|
label.font="Iosevka Nerd Font:Regular:16.0" \
|
||||||
|
label.padding_right=33 \
|
||||||
|
label.background.height=26 \
|
||||||
|
label.background.drawing=on \
|
||||||
|
label.background.corner_radius=9 \
|
||||||
|
label.drawing=off
|
||||||
|
done
|
||||||
|
${pkgs.sketchybar}/bin/sketchybar --add item separator left \
|
||||||
|
--set separator icon= \
|
||||||
|
icon.font="Iosevka Nerd Font:Regular:16.0" \
|
||||||
|
background.padding_left=26 \
|
||||||
|
background.padding_right=15 \
|
||||||
|
label.drawing=off \
|
||||||
|
display=active \
|
||||||
|
icon.color=$GREEN
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
items_spotify = {
|
||||||
|
executable = true;
|
||||||
|
target = ".config/sketchybar/items/spotify.sh";
|
||||||
|
source = folder + /items/executable_spotify.sh;
|
||||||
|
};
|
||||||
|
items_volume = {
|
||||||
|
executable = true;
|
||||||
|
target = ".config/sketchybar/items/volume.sh";
|
||||||
|
text = ''
|
||||||
|
INITIAL_WIDTH=$(osascript -e 'set ovol to output volume of (get volume settings)')
|
||||||
|
${pkgs.sketchybar}/bin/sketchybar --add item volume right \
|
||||||
|
--subscribe volume volume_change \
|
||||||
|
--set volume script="$PLUGIN_DIR/volume.sh" \
|
||||||
|
updates=on \
|
||||||
|
icon.background.drawing=on \
|
||||||
|
icon.background.color=$FLAMINGO \
|
||||||
|
icon.background.height=8 \
|
||||||
|
icon.background.corner_radius=3 \
|
||||||
|
icon.width=$INITIAL_WIDTH \
|
||||||
|
width=100 \
|
||||||
|
icon.align=right \
|
||||||
|
label.drawing=off \
|
||||||
|
background.drawing=on \
|
||||||
|
background.color=$BACKGROUND_2 \
|
||||||
|
background.height=8 \
|
||||||
|
background.corner_radius=3 \
|
||||||
|
align=left
|
||||||
|
|
||||||
|
${pkgs.sketchybar}/bin/sketchybar --add alias "Control Center,Sound" right \
|
||||||
|
--rename "Control Center,Sound" volume_alias \
|
||||||
|
--set volume_alias icon.drawing=off \
|
||||||
|
label.drawing=off \
|
||||||
|
alias.color=$BLUE2 \
|
||||||
|
background.padding_right=0 \
|
||||||
|
background.padding_left=5 \
|
||||||
|
width=50 \
|
||||||
|
align=right \
|
||||||
|
click_script="$PLUGIN_DIR/volume_click.sh"
|
||||||
|
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
plugins_brew = {
|
||||||
|
executable = true;
|
||||||
|
target = ".config/sketchybar/plugins/brew.sh";
|
||||||
|
source = folder + /plugins/executable_brew.sh;
|
||||||
|
};
|
||||||
|
plugins_calendar = {
|
||||||
|
executable = true;
|
||||||
|
target = ".config/sketchybar/plugins/calendar.sh";
|
||||||
|
source = folder + /plugins/executable_calendar.sh;
|
||||||
|
};
|
||||||
|
plugins_github = {
|
||||||
|
executable = true;
|
||||||
|
target = ".config/sketchybar/plugins/github.sh";
|
||||||
|
source = folder + /plugins/executable_github.sh;
|
||||||
|
};
|
||||||
|
plugins_icon_map = {
|
||||||
|
executable = true;
|
||||||
|
target = ".config/sketchybar/plugins/icon_map.sh";
|
||||||
|
source = folder + /plugins/executable_icon_map.sh;
|
||||||
|
};
|
||||||
|
plugins_space = {
|
||||||
|
executable = true;
|
||||||
|
target = ".config/sketchybar/plugins/space.sh";
|
||||||
|
source = folder + /plugins/executable_space.sh;
|
||||||
|
};
|
||||||
|
plugins_spotify = {
|
||||||
|
executable = true;
|
||||||
|
target = ".config/sketchybar/plugins/spotify.sh";
|
||||||
|
source = folder + /plugins/executable_spotify.sh;
|
||||||
|
};
|
||||||
|
plugins_volume = {
|
||||||
|
executable = true;
|
||||||
|
target = ".config/sketchybar/plugins/volume.sh";
|
||||||
|
text = ''
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
WIDTH=100
|
||||||
|
|
||||||
|
volume_change() {
|
||||||
|
# INITIAL_WIDTH=$(${pkgs.sketchybar}/bin/sketchybar --query $NAME | ${pkgs.jq}/bin/jq ".icon.width")
|
||||||
|
# if [ "$INITIAL_WIDTH" -eq "0" ]; then
|
||||||
|
# ${pkgs.sketchybar}/bin/sketchybar --animate tanh 30 --set $NAME width=$WIDTH icon.width=$INFO
|
||||||
|
# else
|
||||||
|
# ${pkgs.sketchybar}/bin/sketchybar --set $NAME icon.width=$INFO width=$WIDTH
|
||||||
|
# fi
|
||||||
|
${pkgs.sketchybar}/bin/sketchybar --set $NAME icon.width=$INFO
|
||||||
|
|
||||||
|
|
||||||
|
# sleep 5
|
||||||
|
# FINAL_WIDTH=$(${pkgs.sketchybar}/bin/sketchybar --query $NAME | ${pkgs.jq}/bin/jq ".icon.width")
|
||||||
|
# if [ "$FINAL_WIDTH" -eq "$INFO" ]; then
|
||||||
|
# ${pkgs.sketchybar}/bin/sketchybar --animate tanh 30 --set $NAME width=0 icon.width=0
|
||||||
|
# fi
|
||||||
|
}
|
||||||
|
|
||||||
|
case "$SENDER" in
|
||||||
|
"volume_change") volume_change
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
plugins_volume_click = {
|
||||||
|
executable = true;
|
||||||
|
target = ".config/sketchybar/plugins/volume_click.sh";
|
||||||
|
text = ''
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
MUTED=$(osascript -e 'output muted of (get volume settings)')
|
||||||
|
if [ "$MUTED" = "false" ]; then
|
||||||
|
osascript -e 'set volume output muted true'
|
||||||
|
else
|
||||||
|
osascript -e 'set volume output muted false'
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
plugins_zen = {
|
||||||
|
executable = true;
|
||||||
|
target = ".config/sketchybar/plugins/zen.sh";
|
||||||
|
source = folder + /plugins/executable_zen.sh;
|
||||||
|
};
|
||||||
|
plugins_aerospace = {
|
||||||
|
executable = true;
|
||||||
|
target = ".config/sketchybar/plugins/aerospace.sh";
|
||||||
|
text = ''
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
source "$HOME/.config/sketchybar/colors.sh" # Loads all defined colors
|
||||||
|
|
||||||
|
highlight_focused_workspace() {
|
||||||
|
if [[ "$1" = "$FOCUSED_WORKSPACE" ]]
|
||||||
|
then
|
||||||
|
${pkgs.sketchybar}/bin/sketchybar --animate tanh 20 --set $NAME icon.highlight=on label.width=0
|
||||||
|
else
|
||||||
|
${pkgs.sketchybar}/bin/sketchybar --animate tanh 20 --set $NAME icon.highlight=off label.width=dynamic
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
illuminate_mode() {
|
||||||
|
if [[ "$mode" = "service" ]]
|
||||||
|
then
|
||||||
|
${pkgs.sketchybar}/bin/sketchybar --animate tanh 20 --set $NAME background.color=$ORANGE
|
||||||
|
elif [[ "$mode" = "resize" ]]
|
||||||
|
then
|
||||||
|
${pkgs.sketchybar}/bin/sketchybar --animate tanh 20 --set $NAME background.color=$GREEN
|
||||||
|
else
|
||||||
|
${pkgs.sketchybar}/bin/sketchybar --animate tanh 20 --set $NAME background.color=$BACKGROUND_1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
case "$SENDER" in
|
||||||
|
"aerospace_workspace_change")
|
||||||
|
highlight_focused_workspace $1
|
||||||
|
;;
|
||||||
|
"aerospace_mode_change")
|
||||||
|
illuminate_mode
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -2,17 +2,18 @@
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
cfg = config.environment.customIcons;
|
cfg = config.environment.customIcons;
|
||||||
inherit
|
inherit (lib)
|
||||||
(lib)
|
|
||||||
mkEnableOption
|
mkEnableOption
|
||||||
mkIf
|
mkIf
|
||||||
mkMerge
|
mkMerge
|
||||||
mkOption
|
mkOption
|
||||||
types
|
types
|
||||||
;
|
;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.environment.customIcons = {
|
options.environment.customIcons = {
|
||||||
enable = mkEnableOption "environment.customIcons";
|
enable = mkEnableOption "environment.customIcons";
|
||||||
clearCacheOnActivation = mkEnableOption "environment.customIcons.clearCacheOnActivation";
|
clearCacheOnActivation = mkEnableOption "environment.customIcons.clearCacheOnActivation";
|
||||||
|
@ -21,8 +22,8 @@ in {
|
||||||
type = types.listOf (
|
type = types.listOf (
|
||||||
types.submodule {
|
types.submodule {
|
||||||
options = {
|
options = {
|
||||||
path = mkOption {type = types.path;};
|
path = mkOption { type = types.path; };
|
||||||
icon = mkOption {type = types.path;};
|
icon = mkOption { type = types.path; };
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -46,8 +47,7 @@ in {
|
||||||
set imageData to (current application's NSImage's alloc()'s initWithContentsOfFile:iconPath)
|
set imageData to (current application's NSImage's alloc()'s initWithContentsOfFile:iconPath)
|
||||||
(current application's NSWorkspace's sharedWorkspace()'s setIcon:imageData forFile:destPath options:2)
|
(current application's NSWorkspace's sharedWorkspace()'s setIcon:imageData forFile:destPath options:2)
|
||||||
EOF
|
EOF
|
||||||
'')
|
'') cfg.icons
|
||||||
cfg.icons
|
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
types = lib.types;
|
types = lib.types;
|
||||||
|
|
||||||
# Mapping of Mac App Store applications.
|
# Mapping of Mac App Store applications.
|
||||||
|
@ -23,12 +24,13 @@
|
||||||
|
|
||||||
# the resolved configuration from the user
|
# the resolved configuration from the user
|
||||||
masApps = config.shared.darwin.macAppStoreApps;
|
masApps = config.shared.darwin.macAppStoreApps;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options = {
|
options = {
|
||||||
# Installs Mac Applications via name using homebrew.
|
# Installs Mac Applications via name using homebrew.
|
||||||
shared.darwin.macAppStoreApps = lib.mkOption {
|
shared.darwin.macAppStoreApps = lib.mkOption {
|
||||||
type = types.listOf types.str;
|
type = types.listOf types.str;
|
||||||
default = [];
|
default = [ ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
config = lib.mkIf (builtins.length masApps > 0) {
|
config = lib.mkIf (builtins.length masApps > 0) {
|
||||||
|
@ -37,8 +39,7 @@ in {
|
||||||
builtins.map (name: {
|
builtins.map (name: {
|
||||||
inherit name;
|
inherit name;
|
||||||
value = allMasApps.${name};
|
value = allMasApps.${name};
|
||||||
})
|
}) masApps
|
||||||
masApps
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,9 +3,11 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
tiling = config.shared.darwin.tiling.enable;
|
tiling = config.shared.darwin.tiling.enable;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
# Use touchid or watch to activate sudo
|
# Use touchid or watch to activate sudo
|
||||||
security.pam.services.sudo_local = {
|
security.pam.services.sudo_local = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -59,6 +61,10 @@ in {
|
||||||
|
|
||||||
# Autohide menu bar for tiling window manager
|
# Autohide menu bar for tiling window manager
|
||||||
_HIHideMenuBar = tiling;
|
_HIHideMenuBar = tiling;
|
||||||
|
|
||||||
|
# Use the expanded save dialog by default
|
||||||
|
NSNavPanelExpandedStateForSaveMode = true;
|
||||||
|
NSNavPanelExpandedStateForSaveMode2 = true;
|
||||||
};
|
};
|
||||||
# minimal dock
|
# minimal dock
|
||||||
dock = {
|
dock = {
|
||||||
|
@ -84,18 +90,31 @@ in {
|
||||||
AppleShowAllExtensions = true;
|
AppleShowAllExtensions = true;
|
||||||
ShowPathbar = true;
|
ShowPathbar = true;
|
||||||
FXEnableExtensionChangeWarning = false;
|
FXEnableExtensionChangeWarning = false;
|
||||||
# TODO: default to list view and not saving .DS_Store
|
FXPreferredViewStyle = "Nlsv"; # List View
|
||||||
|
ShowExternalHardDrivesOnDesktop = false;
|
||||||
|
ShowHardDrivesOnDesktop = false;
|
||||||
|
ShowRemovableMediaOnDesktop = false;
|
||||||
|
NewWindowTarget = "Home";
|
||||||
};
|
};
|
||||||
CustomSystemPreferences = {
|
CustomSystemPreferences = {
|
||||||
|
NSGlobalDomain = {
|
||||||
|
NSStatusItemSelectionPadding = 1;
|
||||||
|
NSStatusItemSelectionSpacing = 1;
|
||||||
|
};
|
||||||
"com.apple.universalaccess" = {
|
"com.apple.universalaccess" = {
|
||||||
closeViewTrackpadGestureZoomEnabled = 1;
|
closeViewTrackpadGestureZoomEnabled = 1;
|
||||||
|
# TODO: enable zoom. this doesn't do enough
|
||||||
};
|
};
|
||||||
"com.apple.symbolichotkeys" = {
|
"com.apple.desktopservices" = {
|
||||||
AppleSymbolicHotKeys = {
|
# Prevents the Finder from reading DS_Store files on network
|
||||||
"64" = {
|
# shares, potentially. See https://support.apple.com/en-us/102064
|
||||||
enabled = false;
|
DSDontWriteNetworkStores = 1;
|
||||||
};
|
};
|
||||||
};
|
"com.apple.dock" = {
|
||||||
|
workspaces-edge-delay = 0.15;
|
||||||
|
};
|
||||||
|
"com.apple.CrashReporter" = {
|
||||||
|
DialogType = "developer"; # display crash reports when apps crash.
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
services.aerospace = {
|
services.aerospace = {
|
||||||
enable = config.shared.darwin.tiling.enable;
|
enable = config.shared.darwin.tiling.enable;
|
||||||
settings = {
|
settings = {
|
||||||
|
@ -85,8 +86,8 @@
|
||||||
alt-shift-8 = "move-node-to-workspace 8";
|
alt-shift-8 = "move-node-to-workspace 8";
|
||||||
alt-shift-9 = "move-node-to-workspace 9";
|
alt-shift-9 = "move-node-to-workspace 9";
|
||||||
|
|
||||||
cmd-h = []; # Disable "hide application"
|
cmd-h = [ ]; # Disable "hide application"
|
||||||
cmd-alt-h = []; # Disable "hide others"
|
cmd-alt-h = [ ]; # Disable "hide others"
|
||||||
|
|
||||||
# # See: https://nikitabobko.github.io/AeroSpace/commands#workspace-back-and-forth
|
# # See: https://nikitabobko.github.io/AeroSpace/commands#workspace-back-and-forth
|
||||||
# alt-tab = "workspace-back-and-forth";
|
# alt-tab = "workspace-back-and-forth";
|
||||||
|
@ -97,22 +98,49 @@
|
||||||
alt-shift-semicolon = "mode service";
|
alt-shift-semicolon = "mode service";
|
||||||
};
|
};
|
||||||
mode.service.binding = {
|
mode.service.binding = {
|
||||||
esc = ["reload-config" "mode main"];
|
esc = [
|
||||||
r = ["flatten-workspace-tree" "mode main"]; # reset layout
|
"reload-config"
|
||||||
f = ["layout floating tiling" "mode main"]; # Toggle between floating and tiling layout
|
"mode main"
|
||||||
backspace = ["close-all-windows-but-current" "mode main"];
|
];
|
||||||
|
r = [
|
||||||
|
"flatten-workspace-tree"
|
||||||
|
"mode main"
|
||||||
|
]; # reset layout
|
||||||
|
f = [
|
||||||
|
"layout floating tiling"
|
||||||
|
"mode main"
|
||||||
|
]; # Toggle between floating and tiling layout
|
||||||
|
backspace = [
|
||||||
|
"close-all-windows-but-current"
|
||||||
|
"mode main"
|
||||||
|
];
|
||||||
|
|
||||||
# sticky is not yet supported https://github.com/nikitabobko/AeroSpace/issues/2
|
# sticky is not yet supported https://github.com/nikitabobko/AeroSpace/issues/2
|
||||||
#s = ["layout sticky tiling", "mode main"]
|
#s = ["layout sticky tiling", "mode main"]
|
||||||
|
|
||||||
alt-shift-h = ["join-with left" "mode main"];
|
alt-shift-h = [
|
||||||
alt-shift-j = ["join-with down" "mode main"];
|
"join-with left"
|
||||||
alt-shift-k = ["join-with up" "mode main"];
|
"mode main"
|
||||||
alt-shift-l = ["join-with right" "mode main"];
|
];
|
||||||
|
alt-shift-j = [
|
||||||
|
"join-with down"
|
||||||
|
"mode main"
|
||||||
|
];
|
||||||
|
alt-shift-k = [
|
||||||
|
"join-with up"
|
||||||
|
"mode main"
|
||||||
|
];
|
||||||
|
alt-shift-l = [
|
||||||
|
"join-with right"
|
||||||
|
"mode main"
|
||||||
|
];
|
||||||
|
|
||||||
down = "volume down";
|
down = "volume down";
|
||||||
up = "volume up";
|
up = "volume up";
|
||||||
shift-down = ["volume set 0" "mode main"];
|
shift-down = [
|
||||||
|
"volume set 0"
|
||||||
|
"mode main"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
after-startup-command = [
|
after-startup-command = [
|
||||||
"exec-and-forget sketchybar"
|
"exec-and-forget sketchybar"
|
||||||
|
@ -131,7 +159,7 @@
|
||||||
"if" = {
|
"if" = {
|
||||||
app-id = "com.mitchellh.ghostty";
|
app-id = "com.mitchellh.ghostty";
|
||||||
};
|
};
|
||||||
run = ["layout floating"];
|
run = [ "layout floating" ];
|
||||||
check-further-callbacks = true;
|
check-further-callbacks = true;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{lib, ...}: let
|
{ lib, ... }:
|
||||||
|
let
|
||||||
inherit (lib) types;
|
inherit (lib) types;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./sketchybar.nix
|
./sketchybar.nix
|
||||||
./aerospace.nix
|
./aerospace.nix
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
services.sketchybar = {
|
services.sketchybar = {
|
||||||
enable = config.shared.darwin.tiling.enable;
|
enable = config.shared.darwin.tiling.enable;
|
||||||
package = pkgs.sketchybar;
|
package = pkgs.sketchybar;
|
||||||
|
|
140
modules/neovim/default.nix
Normal file
140
modules/neovim/default.nix
Normal file
|
@ -0,0 +1,140 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
host,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
# based on default options from upstream:
|
||||||
|
# https://github.com/NotAShelf/nvf/blob/main/configuration.nix
|
||||||
|
#
|
||||||
|
# a full list of options is available too:
|
||||||
|
# https://notashelf.github.io/nvf/options.html
|
||||||
|
#
|
||||||
|
# override level 999 is used to not conflict with mkDefault as used by nvf.
|
||||||
|
# which allows user configurations to disable/override anything here.
|
||||||
|
vim = lib.mkOverride 999 {
|
||||||
|
theme = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
visuals = {
|
||||||
|
# notification system
|
||||||
|
# https://github.com/j-hui/fidget.nvim
|
||||||
|
fidget-nvim.enable = true;
|
||||||
|
# highlight undo / paste / autoformat / macros
|
||||||
|
# https://github.com/tzachar/highlight-undo.nvim
|
||||||
|
highlight-undo.enable = true;
|
||||||
|
# indentation guides
|
||||||
|
# https://github.com/lukas-reineke/indent-blankline.nvim
|
||||||
|
indent-blankline.enable = false;
|
||||||
|
# extra icons
|
||||||
|
nvim-web-devicons.enable = true;
|
||||||
|
# https://github.com/petertriho/nvim-scrollbar
|
||||||
|
nvim-scrollbar.enable = false;
|
||||||
|
};
|
||||||
|
lsp = {
|
||||||
|
# Must be enabled for language modules to hook into the LSP API.
|
||||||
|
enable = true;
|
||||||
|
formatOnSave = true;
|
||||||
|
# show errors inline
|
||||||
|
# https://github.com/folke/trouble.nvim
|
||||||
|
trouble.enable = true;
|
||||||
|
# show lightbulb icon in gutter to indicate code actions
|
||||||
|
# https://github.com/kosayoda/nvim-lightbulb
|
||||||
|
lightbulb.enable = true;
|
||||||
|
# show icons in auto-completion menu
|
||||||
|
# https://github.com/onsails/lspkind.nvim
|
||||||
|
lspkind.enable = config.vim.autocomplete.blink-cmp.enable;
|
||||||
|
};
|
||||||
|
debugger = {
|
||||||
|
nvim-dap = {
|
||||||
|
enable = true;
|
||||||
|
ui.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
languages = {
|
||||||
|
enableFormat = true;
|
||||||
|
enableTreesitter = true;
|
||||||
|
enableExtraDiagnostics = true;
|
||||||
|
|
||||||
|
# sort-lines: on
|
||||||
|
assembly.enable = true;
|
||||||
|
bash.enable = true;
|
||||||
|
clang.enable = true;
|
||||||
|
css.enable = true;
|
||||||
|
html.enable = true;
|
||||||
|
nix.enable = true;
|
||||||
|
rust.crates.enable = true;
|
||||||
|
rust.enable = true;
|
||||||
|
ts.enable = true;
|
||||||
|
zig.enable = true;
|
||||||
|
# sort-lines: off
|
||||||
|
|
||||||
|
nix.format.type = "nixfmt"; # looks so much nicer
|
||||||
|
};
|
||||||
|
filetree = {
|
||||||
|
neo-tree = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
tabline = {
|
||||||
|
nvimBufferline.enable = true;
|
||||||
|
};
|
||||||
|
autocomplete = {
|
||||||
|
blink-cmp.enable = true;
|
||||||
|
};
|
||||||
|
statusline = {
|
||||||
|
lualine = {
|
||||||
|
enable = true;
|
||||||
|
refresh = {
|
||||||
|
statusline = 100;
|
||||||
|
tabline = 100;
|
||||||
|
winbar = 100;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
binds = {
|
||||||
|
whichKey.enable = true;
|
||||||
|
cheatsheet.enable = true;
|
||||||
|
# discourages bad keyboard habit, e.g. disables arrow keys, explains better binds
|
||||||
|
# https://github.com/m4xshen/hardtime.nvim
|
||||||
|
hardtime-nvim.enable = true;
|
||||||
|
hardtime-nvim.setupOpts = {
|
||||||
|
disable_mouse = false;
|
||||||
|
restriction_mode = "hint"; # default behavior is lenient
|
||||||
|
};
|
||||||
|
};
|
||||||
|
ui = {
|
||||||
|
borders.enable = true;
|
||||||
|
# https://github.com/norcalli/nvim-colorizer.lua
|
||||||
|
colorizer.enable = true;
|
||||||
|
# https://github.com/RRethy/vim-illuminate
|
||||||
|
illuminate.enable = true;
|
||||||
|
breadcrumbs = {
|
||||||
|
enable = false;
|
||||||
|
navbuddy.enable = config.vim.ui.breadcrumbs.enable;
|
||||||
|
};
|
||||||
|
smartcolumn = {
|
||||||
|
enable = true;
|
||||||
|
setupOpts.custom_colorcolumn = {
|
||||||
|
# this is a freeform module, it's `buftype = int;` for configuring column position
|
||||||
|
nix = "110";
|
||||||
|
ruby = "120";
|
||||||
|
java = "130";
|
||||||
|
go = [
|
||||||
|
"90"
|
||||||
|
"130"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
notes = {
|
||||||
|
todo-comments.enable = true;
|
||||||
|
};
|
||||||
|
git = {
|
||||||
|
enable = true;
|
||||||
|
gitsigns.enable = true;
|
||||||
|
gitsigns.codeActions.enable = false; # throws an annoying debug message
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,4 +1,5 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
boot = {
|
boot = {
|
||||||
kernelPackages = pkgs.linuxPackages_latest; # _zen, _hardened, _rt, _rt_latest, etc.
|
kernelPackages = pkgs.linuxPackages_latest; # _zen, _hardened, _rt, _rt_latest, etc.
|
||||||
loader = {
|
loader = {
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
{ lib, pkgs, ... }: {
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./boot.nix
|
./boot.nix
|
||||||
./ld.nix
|
./ld.nix
|
||||||
|
@ -7,8 +12,8 @@
|
||||||
];
|
];
|
||||||
# make 'shared.darwin' not an error to define.
|
# make 'shared.darwin' not an error to define.
|
||||||
options.shared.darwin = lib.mkOption {
|
options.shared.darwin = lib.mkOption {
|
||||||
type = lib.types.anything;
|
type = lib.types.anything;
|
||||||
default = {};
|
default = { };
|
||||||
description = "no-op on linux";
|
description = "no-op on linux";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
programs.nix-ld.enable = true;
|
programs.nix-ld.enable = true;
|
||||||
|
|
||||||
# "minimum" amount of libraries needed for most games to run without steam-run
|
# "minimum" amount of libraries needed for most games to run without steam-run
|
||||||
|
|
|
@ -2,10 +2,12 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
nvidiaDriverChannel = config.boot.kernelPackages.nvidiaPackages.latest;
|
nvidiaDriverChannel = config.boot.kernelPackages.nvidiaPackages.latest;
|
||||||
in {
|
in
|
||||||
services.xserver.videoDrivers = ["nvidia"];
|
{
|
||||||
|
services.xserver.videoDrivers = [ "nvidia" ];
|
||||||
|
|
||||||
nixpkgs.config = {
|
nixpkgs.config = {
|
||||||
nvidia.acceptLicense = true;
|
nvidia.acceptLicense = true;
|
||||||
|
@ -18,7 +20,7 @@ in {
|
||||||
];
|
];
|
||||||
|
|
||||||
# Blacklist nouveau to avoid conflicts
|
# Blacklist nouveau to avoid conflicts
|
||||||
boot.blacklistedKernelModules = ["nouveau"];
|
boot.blacklistedKernelModules = [ "nouveau" ];
|
||||||
environment.variables = {
|
environment.variables = {
|
||||||
LIBVA_DRIVER_NAME = "nvidia"; # Hardware video acceleration
|
LIBVA_DRIVER_NAME = "nvidia"; # Hardware video acceleration
|
||||||
XDG_SESSION_TYPE = "wayland"; # Force Wayland
|
XDG_SESSION_TYPE = "wayland"; # Force Wayland
|
||||||
|
@ -80,7 +82,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
nix.settings = {
|
nix.settings = {
|
||||||
substituters = ["https://cuda-maintainers.cachix.org"];
|
substituters = [ "https://cuda-maintainers.cachix.org" ];
|
||||||
trusted-public-keys = [
|
trusted-public-keys = [
|
||||||
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
|
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
services = {
|
services = {
|
||||||
avahi = {
|
avahi = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -39,7 +40,7 @@
|
||||||
# Enable CUPS to print documents.
|
# Enable CUPS to print documents.
|
||||||
printing = {
|
printing = {
|
||||||
enable = true;
|
enable = true;
|
||||||
drivers = [pkgs.brlaser]; # Brother printer driver
|
drivers = [ pkgs.brlaser ]; # Brother printer driver
|
||||||
};
|
};
|
||||||
|
|
||||||
pipewire = {
|
pipewire = {
|
||||||
|
@ -54,7 +55,7 @@
|
||||||
|
|
||||||
openssh = {
|
openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
ports = [22];
|
ports = [ 22 ];
|
||||||
settings = {
|
settings = {
|
||||||
PasswordAuthentication = true;
|
PasswordAuthentication = true;
|
||||||
UseDns = true;
|
UseDns = true;
|
||||||
|
|
|
@ -1,96 +0,0 @@
|
||||||
{
|
|
||||||
pkgs,
|
|
||||||
inputs,
|
|
||||||
nixvim,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
imports = [
|
|
||||||
./opts.nix
|
|
||||||
./keymaps.nix
|
|
||||||
./plugins
|
|
||||||
];
|
|
||||||
programs.nixvim = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
globals = {
|
|
||||||
#Set leader to space, and localleader to \
|
|
||||||
mapleader = " ";
|
|
||||||
maplocalleader = "\\";
|
|
||||||
|
|
||||||
have_nerd_font = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
clipboard = {
|
|
||||||
providers = {
|
|
||||||
wl-copy.enable = true; # For Wayland
|
|
||||||
xsel.enable = true; # For X11
|
|
||||||
};
|
|
||||||
|
|
||||||
# Sync clipboard between OS and Neovim
|
|
||||||
# Remove this option if you want your OS clipboard to remain independent.
|
|
||||||
register = "unnamedplus";
|
|
||||||
};
|
|
||||||
|
|
||||||
opts = {
|
|
||||||
# Show line numbers
|
|
||||||
number = true;
|
|
||||||
# You can also add relative line numbers, to help with jumping.
|
|
||||||
# Experiment for yourself to see if you like it!
|
|
||||||
#relativenumber = true
|
|
||||||
|
|
||||||
# Enable mouse mode, can be useful for resizing splits for example!
|
|
||||||
mouse = "a";
|
|
||||||
|
|
||||||
# Don't show the mode, since it's already in the statusline
|
|
||||||
showmode = false;
|
|
||||||
|
|
||||||
# Enable break indent
|
|
||||||
breakindent = true;
|
|
||||||
|
|
||||||
# Save undo history
|
|
||||||
undofile = true;
|
|
||||||
|
|
||||||
# Case-insensitive searching UNLESS \C or one or more capital letters in the search term
|
|
||||||
ignorecase = true;
|
|
||||||
smartcase = true;
|
|
||||||
|
|
||||||
# Keep signcolumn on by default
|
|
||||||
signcolumn = "yes";
|
|
||||||
|
|
||||||
# Decrease update time
|
|
||||||
updatetime = 250;
|
|
||||||
|
|
||||||
# Decrease mapped sequence wait time
|
|
||||||
# Displays which-key popup sooner
|
|
||||||
timeoutlen = 300;
|
|
||||||
|
|
||||||
# Configure how new splits should be opened
|
|
||||||
splitright = true;
|
|
||||||
splitbelow = true;
|
|
||||||
|
|
||||||
# Sets how neovim will display certain whitespace characters in the editor
|
|
||||||
# See `:help 'list'`
|
|
||||||
# and `:help 'listchars'`
|
|
||||||
list = true;
|
|
||||||
# NOTE: .__raw here means that this field is raw lua code
|
|
||||||
listchars.__raw = "{ tab = '» ', trail = '·', nbsp = '␣' }";
|
|
||||||
|
|
||||||
# Preview substitutions live, as you type!
|
|
||||||
inccommand = "split";
|
|
||||||
|
|
||||||
# Show which line your cursor is on
|
|
||||||
cursorline = true;
|
|
||||||
|
|
||||||
# Minimal number of screen lines to keep above and below the cursor.
|
|
||||||
scrolloff = 10;
|
|
||||||
|
|
||||||
# if performing an operation that would fail due to unsaved changes in the buffer (like `:q`),
|
|
||||||
# instead raise a dialog asking if you wish to save the current file(s)
|
|
||||||
# See `:help 'confirm'`
|
|
||||||
confirm = true;
|
|
||||||
|
|
||||||
# See `:help hlsearch`
|
|
||||||
hlsearch = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,189 +0,0 @@
|
||||||
{lib, ...}: {
|
|
||||||
options.nvix.icons = lib.mkOption {
|
|
||||||
type = lib.types.attrs;
|
|
||||||
default = {};
|
|
||||||
};
|
|
||||||
config.nvix.icons = {
|
|
||||||
kind = {
|
|
||||||
Array = "";
|
|
||||||
Boolean = "";
|
|
||||||
Class = "";
|
|
||||||
Color = "";
|
|
||||||
Constant = "";
|
|
||||||
Constructor = "";
|
|
||||||
Enum = "";
|
|
||||||
EnumMember = "";
|
|
||||||
Event = "";
|
|
||||||
Field = "";
|
|
||||||
File = "";
|
|
||||||
Folder = "";
|
|
||||||
Function = "";
|
|
||||||
Interface = "";
|
|
||||||
Key = "";
|
|
||||||
Keyword = "";
|
|
||||||
Method = "";
|
|
||||||
Module = "";
|
|
||||||
Namespace = "";
|
|
||||||
Null = "ﳠ";
|
|
||||||
Number = "";
|
|
||||||
Object = "";
|
|
||||||
Operator = "";
|
|
||||||
Package = "";
|
|
||||||
Property = "";
|
|
||||||
Reference = "";
|
|
||||||
Snippet = "";
|
|
||||||
String = "";
|
|
||||||
Struct = "";
|
|
||||||
Text = "";
|
|
||||||
TypeParameter = "";
|
|
||||||
Unit = "";
|
|
||||||
Value = "";
|
|
||||||
Variable = "";
|
|
||||||
Copilot = "";
|
|
||||||
TabNine = "⌬";
|
|
||||||
};
|
|
||||||
git = {
|
|
||||||
LineAdded = "";
|
|
||||||
LineModified = "";
|
|
||||||
LineRemoved = "";
|
|
||||||
FileDeleted = "";
|
|
||||||
FileIgnored = "";
|
|
||||||
FileRenamed = "";
|
|
||||||
FileStaged = "✓";
|
|
||||||
FileUnmerged = "";
|
|
||||||
FileMerged = "";
|
|
||||||
FileUnstaged = "";
|
|
||||||
FileUntracked = "◌";
|
|
||||||
FileChanged = "";
|
|
||||||
Copied = "";
|
|
||||||
Ignored = "";
|
|
||||||
Diff = "";
|
|
||||||
Repo = "";
|
|
||||||
Octoface = "";
|
|
||||||
Branch = "";
|
|
||||||
};
|
|
||||||
ui = {
|
|
||||||
lazy = {
|
|
||||||
ft = "";
|
|
||||||
lazy = " ";
|
|
||||||
loaded = "";
|
|
||||||
not_loaded = "";
|
|
||||||
};
|
|
||||||
ArrowCircleDown = "";
|
|
||||||
ArrowCircleLeft = "";
|
|
||||||
ArrowCircleRight = "";
|
|
||||||
ArrowCircleUp = "";
|
|
||||||
BoldArrowDown = "";
|
|
||||||
BoldArrowLeft = "";
|
|
||||||
BoldArrowRight = "";
|
|
||||||
BoldArrowUp = "";
|
|
||||||
BoldClose = "";
|
|
||||||
BoldDividerLeft = "";
|
|
||||||
BoldDividerRight = "";
|
|
||||||
BoldLineLeft = "▎";
|
|
||||||
BookMark = "";
|
|
||||||
BoxChecked = "";
|
|
||||||
Bug = "";
|
|
||||||
Stacks = "";
|
|
||||||
Scopes = "";
|
|
||||||
Watches = "";
|
|
||||||
DebugConsole = "";
|
|
||||||
Calendar = "";
|
|
||||||
Check = "";
|
|
||||||
ChevronRight = ">";
|
|
||||||
ChevronShortDown = "";
|
|
||||||
ChevronShortLeft = "";
|
|
||||||
ChevronShortRight = "";
|
|
||||||
ChevronShortUp = "";
|
|
||||||
Circle = "";
|
|
||||||
Close = "";
|
|
||||||
CloudDownload = "";
|
|
||||||
Code = "";
|
|
||||||
Comment = "";
|
|
||||||
Dashboard = "";
|
|
||||||
DividerLeft = "";
|
|
||||||
DividerRight = "";
|
|
||||||
DoubleChevronRight = "»";
|
|
||||||
Ellipsis = "";
|
|
||||||
EmptyFolder = "";
|
|
||||||
EmptyFolderOpen = "";
|
|
||||||
ExitCircle = "";
|
|
||||||
File = "";
|
|
||||||
FileSymlink = "";
|
|
||||||
Files = "";
|
|
||||||
FileRename = "";
|
|
||||||
FindFile = "";
|
|
||||||
FindText = "";
|
|
||||||
Fire = "";
|
|
||||||
Folder = "";
|
|
||||||
FolderOpen = "";
|
|
||||||
FolderSymlink = "";
|
|
||||||
Forward = "";
|
|
||||||
Gear = "";
|
|
||||||
History = "";
|
|
||||||
Lightbulb = "";
|
|
||||||
LineLeft = "▏";
|
|
||||||
LineMiddle = "│";
|
|
||||||
List = "";
|
|
||||||
Lock = "";
|
|
||||||
NewFile = "";
|
|
||||||
Note = "";
|
|
||||||
Package = "";
|
|
||||||
Pencil = "";
|
|
||||||
Plus = "";
|
|
||||||
Project = "";
|
|
||||||
Search = "";
|
|
||||||
SignIn = "";
|
|
||||||
SignOut = "";
|
|
||||||
Tab = "";
|
|
||||||
Table = "";
|
|
||||||
Target = "";
|
|
||||||
Telescope = "";
|
|
||||||
Text = "";
|
|
||||||
Tree = "";
|
|
||||||
Triangle = "";
|
|
||||||
TriangleShortArrowDown = "";
|
|
||||||
TriangleShortArrowLeft = "";
|
|
||||||
TriangleShortArrowRight = "";
|
|
||||||
TriangleShortArrowUp = "";
|
|
||||||
};
|
|
||||||
diagnostics = {
|
|
||||||
BoldError = "";
|
|
||||||
Error = "";
|
|
||||||
BoldWarning = "";
|
|
||||||
Warning = "";
|
|
||||||
BoldInformation = "";
|
|
||||||
Information = "";
|
|
||||||
BoldQuestion = "";
|
|
||||||
Question = "";
|
|
||||||
BoldHint = "";
|
|
||||||
Hint = "";
|
|
||||||
Debug = "";
|
|
||||||
Trace = "✎";
|
|
||||||
};
|
|
||||||
misc = {
|
|
||||||
Robot = "ﮧ";
|
|
||||||
Squirrel = "";
|
|
||||||
Tag = "";
|
|
||||||
Watch = "";
|
|
||||||
Smiley = "";
|
|
||||||
Package = "";
|
|
||||||
CircuitBoard = "";
|
|
||||||
LualineFmt = "";
|
|
||||||
};
|
|
||||||
nvtree_chad = {
|
|
||||||
default = "";
|
|
||||||
symlink = "";
|
|
||||||
folder = {
|
|
||||||
default = "";
|
|
||||||
empty = "";
|
|
||||||
empty_open = "";
|
|
||||||
open = "";
|
|
||||||
symlink = "";
|
|
||||||
symlink_open = "";
|
|
||||||
arrow_open = "";
|
|
||||||
arrow_closed = "";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,42 +0,0 @@
|
||||||
{pkgs, ...}: {
|
|
||||||
programs.nixvim = {
|
|
||||||
keymaps = [
|
|
||||||
# Keybinds to make split navigation easier.
|
|
||||||
# Use CTRL+<hjkl> to switch between windows
|
|
||||||
#
|
|
||||||
# See `:help wincmd` for a list of all window commands
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<C-h>";
|
|
||||||
action = "<C-w><C-h>";
|
|
||||||
options = {
|
|
||||||
desc = "Move focus to the left window";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<C-l>";
|
|
||||||
action = "<C-w><C-l>";
|
|
||||||
options = {
|
|
||||||
desc = "Move focus to the right window";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<C-j>";
|
|
||||||
action = "<C-w><C-j>";
|
|
||||||
options = {
|
|
||||||
desc = "Move focus to the lower window";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<C-k>";
|
|
||||||
action = "<C-w><C-k>";
|
|
||||||
options = {
|
|
||||||
desc = "Move focus to the upper window";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,65 +0,0 @@
|
||||||
{pkgs, ...}: {
|
|
||||||
programs.nixvim = {
|
|
||||||
opts = {
|
|
||||||
# Show line numbers
|
|
||||||
number = true;
|
|
||||||
relativenumber = true;
|
|
||||||
|
|
||||||
shiftwidth = 2;
|
|
||||||
|
|
||||||
# Enable mouse mode, can be useful for resizing splits for example!
|
|
||||||
mouse = "a";
|
|
||||||
|
|
||||||
# Don't show the mode, since it's already in the statusline
|
|
||||||
showmode = false;
|
|
||||||
|
|
||||||
# Enable break indent
|
|
||||||
breakindent = true;
|
|
||||||
|
|
||||||
# Save undo history
|
|
||||||
undofile = true;
|
|
||||||
|
|
||||||
# Case-insensitive searching UNLESS \C or one or more capital letters in the search term
|
|
||||||
ignorecase = true;
|
|
||||||
smartcase = true;
|
|
||||||
|
|
||||||
# Keep signcolumn on by default
|
|
||||||
signcolumn = "yes";
|
|
||||||
|
|
||||||
# Decrease update time
|
|
||||||
updatetime = 250;
|
|
||||||
|
|
||||||
# Decrease mapped sequence wait time
|
|
||||||
# Displays which-key popup sooner
|
|
||||||
timeoutlen = 300;
|
|
||||||
|
|
||||||
# Configure how new splits should be opened
|
|
||||||
splitright = true;
|
|
||||||
splitbelow = true;
|
|
||||||
|
|
||||||
# Sets how neovim will display certain whitespace characters in the editor
|
|
||||||
# See `:help 'list'`
|
|
||||||
# and `:help 'listchars'`
|
|
||||||
list = true;
|
|
||||||
# NOTE: .__raw here means that this field is raw lua code
|
|
||||||
listchars.__raw = "{ tab = '» ', trail = '·', nbsp = '␣' }";
|
|
||||||
|
|
||||||
# Preview substitutions live, as you type!
|
|
||||||
inccommand = "split";
|
|
||||||
|
|
||||||
# Show which line your cursor is on
|
|
||||||
cursorline = true;
|
|
||||||
|
|
||||||
# Minimal number of screen lines to keep above and below the cursor.
|
|
||||||
scrolloff = 10;
|
|
||||||
|
|
||||||
# if performing an operation that would fail due to unsaved changes in the buffer (like `:q`),
|
|
||||||
# instead raise a dialog asking if you wish to save the current file(s)
|
|
||||||
# See `:help 'confirm'`
|
|
||||||
confirm = true;
|
|
||||||
|
|
||||||
# See `:help hlsearch`
|
|
||||||
hlsearch = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,69 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
programs.nixvim = {
|
|
||||||
extraPackages = with pkgs; [
|
|
||||||
gh
|
|
||||||
wordnet
|
|
||||||
glab
|
|
||||||
];
|
|
||||||
|
|
||||||
extraPlugins = [
|
|
||||||
];
|
|
||||||
|
|
||||||
plugins = {
|
|
||||||
blink-cmp = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
lazyLoad.settings.event = [
|
|
||||||
"InsertEnter"
|
|
||||||
"CmdlineEnter"
|
|
||||||
];
|
|
||||||
|
|
||||||
settings = {
|
|
||||||
keymap.preset = "super-tab";
|
|
||||||
completion = {
|
|
||||||
accept.auto_brackets.enabled = false;
|
|
||||||
ghost_test.enabled = false;
|
|
||||||
|
|
||||||
list.selection = {
|
|
||||||
preselect = true;
|
|
||||||
auto_insert = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
documentation = {
|
|
||||||
auto_show = true;
|
|
||||||
|
|
||||||
window.border = "rounded";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
menu.draw.components = {
|
|
||||||
kind_icon.text.__raw = ''
|
|
||||||
function(ctx)
|
|
||||||
local kind_icon, _, _ = require('mini.icons').get('lsp', ctx.kind)
|
|
||||||
-- Check for both nil and the default fallback icon
|
|
||||||
if not kind_icon or kind_icon == '' then
|
|
||||||
-- Use our configured kind_icons
|
|
||||||
return require('blink.cmp.config').appearance.kind_icons[ctx.kind] or ""
|
|
||||||
end
|
|
||||||
return kind_icon
|
|
||||||
end,
|
|
||||||
-- Optionally, you may also use the highlights from mini.icons
|
|
||||||
highlight = function(ctx)
|
|
||||||
local _, hl, _ = require('mini.icons').get('lsp', ctx.kind)
|
|
||||||
return hl
|
|
||||||
end
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
fuzzy = {
|
|
||||||
implementation = "prefer_rust_with_warning";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
{pkgs, ...}: {
|
|
||||||
imports = [
|
|
||||||
./blink.nix
|
|
||||||
./lz-n.nix
|
|
||||||
];
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
{pkgs, ...}: {
|
|
||||||
programs.nixvim.plugins = {
|
|
||||||
lz-n = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,9 +1,15 @@
|
||||||
# shared is used by nixos-rebuild and darwin-rebuild
|
# shared is used by nixos-rebuild and darwin-rebuild
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
# sort-lines:start
|
# sort-lines:start
|
||||||
./user-system-settings.nix
|
./user-system-settings.nix
|
||||||
./nix.nix
|
./nix.nix
|
||||||
# sort-lines:end
|
# sort-lines:end
|
||||||
];
|
];
|
||||||
|
# install neovim globally, but let home-manager install
|
||||||
|
# the per-user configured one.
|
||||||
|
environment.systemPackages = [
|
||||||
|
pkgs.neovim
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
{inputs, ...}: {
|
{ inputs, ... }:
|
||||||
|
{
|
||||||
nixpkgs.config = {
|
nixpkgs.config = {
|
||||||
allowUnfree = true;
|
allowUnfree = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
nixPath = ["nixpkgs = ${inputs.nixpkgs}"];
|
nixPath = [ "nixpkgs = ${inputs.nixpkgs}" ];
|
||||||
extraOptions = ''
|
extraOptions = ''
|
||||||
warn-dirty = false
|
warn-dirty = false
|
||||||
'';
|
'';
|
||||||
|
@ -14,7 +15,10 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
experimental-features = ["nix-command" "flakes"];
|
experimental-features = [
|
||||||
|
"nix-command"
|
||||||
|
"flakes"
|
||||||
|
];
|
||||||
substituters = [
|
substituters = [
|
||||||
"https://cache.nixos.org/?priority=10"
|
"https://cache.nixos.org/?priority=10"
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
# applies user settings for the system
|
# applies user settings for the system
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
user,
|
user,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
# Set your time zone.
|
# Set your time zone.
|
||||||
time.timeZone = user.timeZone;
|
time.timeZone = user.timeZone;
|
||||||
|
|
||||||
|
@ -17,8 +19,8 @@
|
||||||
BROWSER = user.browser;
|
BROWSER = user.browser;
|
||||||
};
|
};
|
||||||
|
|
||||||
stylix = {
|
stylix = lib.mkIf (user ? "theme" && user.theme != null) {
|
||||||
enable = user ? "theme";
|
enable = false;
|
||||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/${user.theme}.yaml";
|
base16Scheme = "${pkgs.base16-schemes}/share/themes/${user.theme}.yaml";
|
||||||
|
|
||||||
fonts = lib.optionalAttrs (user ? "font") {
|
fonts = lib.optionalAttrs (user ? "font") {
|
||||||
|
|
13
nvim
Executable file
13
nvim
Executable file
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/sh
|
||||||
|
username="$(id -u -n)"
|
||||||
|
if [ "$username" = "clo" ]; then
|
||||||
|
name="chloe";
|
||||||
|
elif [ "$username" = "nmarks" ]; then
|
||||||
|
name="natalie";
|
||||||
|
fi
|
||||||
|
if [ -z "$name" ]; then
|
||||||
|
echo "Configure this wrapper script with your name." >2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
exec nix run ".#nvim-$name" -- "$@"
|
||||||
|
|
20
readme.md
20
readme.md
|
@ -1,13 +1,14 @@
|
||||||
# nix config
|
# nix config
|
||||||
|
|
||||||
this setup allows natalie and chloe to share common configuration between their machines, but also share useful modules between each other.
|
this setup allows natalie and chloe to share common configuration between their
|
||||||
|
machines, but also share useful modules between each other.
|
||||||
|
|
||||||
```
|
```
|
||||||
lib/ # reusable functions
|
lib/ # reusable functions
|
||||||
modules/ # reusable modules
|
modules/ # reusable modules
|
||||||
+-- macos/ # nix-darwin configurations
|
+-- macos/ # nix-darwin configurations
|
||||||
+-- nixos/ # linux configurations
|
+-- nixos/ # linux configurations
|
||||||
+-- nixvim/ # neovim configurations
|
+-- neovim/ # nvf configurations
|
||||||
+-- shared/ # shared between nixos-rebuild & darwin-rebuild
|
+-- shared/ # shared between nixos-rebuild & darwin-rebuild
|
||||||
+-- home-manager.nix # home program presets
|
+-- home-manager.nix # home program presets
|
||||||
users/
|
users/
|
||||||
|
@ -15,6 +16,7 @@ users/
|
||||||
| +-- user.nix # info about her
|
| +-- user.nix # info about her
|
||||||
| +-- configuration.nix # for all hosts
|
| +-- configuration.nix # for all hosts
|
||||||
| +-- home.nix # for all hosts
|
| +-- home.nix # for all hosts
|
||||||
|
| +-- vim.nix # for neovim
|
||||||
| +-- sandwich/
|
| +-- sandwich/
|
||||||
| | +-- configuration.nix # per host
|
| | +-- configuration.nix # per host
|
||||||
| | +-- home.nix
|
| | +-- home.nix
|
||||||
|
@ -25,7 +27,8 @@ users/
|
||||||
...
|
...
|
||||||
```
|
```
|
||||||
|
|
||||||
A new machine can be added by adding a new definition in `flake.nix`. Note that the user and host `configuration.nix` and `home.nix` files are
|
A new machine can be added by adding a new definition in `flake.nix`. Note that
|
||||||
|
the user and host `configuration.nix` and `home.nix` files are
|
||||||
|
|
||||||
## macOS installation instructions
|
## macOS installation instructions
|
||||||
|
|
||||||
|
@ -40,11 +43,12 @@ While this installs, now is a good time to perform manual setup steps:
|
||||||
|
|
||||||
- Setup your SSH keys in `~/.ssh`
|
- Setup your SSH keys in `~/.ssh`
|
||||||
- Configure the device hostname in System Settings in
|
- Configure the device hostname in System Settings in
|
||||||
- About -> Name
|
- About -> Name
|
||||||
- General -> Sharing -> Local Hostname
|
- General -> Sharing -> Local Hostname
|
||||||
- Make sure you're logged into iCloud / Mac App Store
|
- Make sure you're logged into iCloud / Mac App Store
|
||||||
- `xcode-select --install` to make sure Git and other utilities are available.
|
- `xcode-select --install` to make sure Git and other utilities are available.
|
||||||
- Optional: Disable app verification with `sudo spctl --master-disable`, then, go to System Settings -> Privacy to allow unsigned apps.
|
- Optional: Disable app verification with `sudo spctl --master-disable`, then,
|
||||||
|
go to System Settings -> Privacy to allow unsigned apps.
|
||||||
|
|
||||||
Once Nix is installed, open a new shell and clone the repository:
|
Once Nix is installed, open a new shell and clone the repository:
|
||||||
|
|
||||||
|
@ -55,11 +59,11 @@ git clone https://git.paperclover.net/clo/config.git
|
||||||
git clone git@git.paperclover.net:clo/config
|
git clone git@git.paperclover.net:clo/config
|
||||||
```
|
```
|
||||||
|
|
||||||
The location of the cloned repository must match what is in your `user.nix` file.
|
The location of the cloned repository must match what is in your `user.nix`
|
||||||
|
file.
|
||||||
|
|
||||||
Setup `nix-darwin` using the `switch` helper:
|
Setup `nix-darwin` using the `switch` helper:
|
||||||
|
|
||||||
```
|
```
|
||||||
./switch
|
./switch
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
9
sample.keys
Normal file
9
sample.keys
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
global {
|
||||||
|
cmd + opt + backtick -> app "Keyboard Maestro"
|
||||||
|
}
|
||||||
|
|
||||||
|
device WorkLouder {
|
||||||
|
a -> {
|
||||||
|
if app "REAPER" -> key cmd + shift
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,9 +1,12 @@
|
||||||
# Configuration applied to all of chloe's machines
|
# Configuration applied to all of chloe's machines
|
||||||
{ pkgs, ... }: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
# packages for all machines
|
# packages for all machines
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
neovim
|
|
||||||
];
|
];
|
||||||
|
# services for all machines
|
||||||
|
services.karabiner-elements.enable = true;
|
||||||
|
|
||||||
# configuration for shared modules.
|
# configuration for shared modules.
|
||||||
# all custom options in 'shared' for clarity.
|
# all custom options in 'shared' for clarity.
|
||||||
shared.darwin = {
|
shared.darwin = {
|
||||||
|
@ -12,16 +15,28 @@
|
||||||
"magnet"
|
"magnet"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# system preferences
|
# system preferences
|
||||||
system.defaults = {
|
system.defaults = {
|
||||||
NSGlobalDomain = {
|
NSGlobalDomain = {
|
||||||
KeyRepeat = 1;
|
KeyRepeat = 1;
|
||||||
InitialKeyRepeat = 10;
|
InitialKeyRepeat = 10;
|
||||||
};
|
};
|
||||||
|
dock = {
|
||||||
|
show-recents = false;
|
||||||
|
};
|
||||||
CustomUserPreferences = {
|
CustomUserPreferences = {
|
||||||
NSGlobalDomain = {
|
NSGlobalDomain = {
|
||||||
# TODO: how to change system accent color
|
# TODO: how to change system accent color
|
||||||
AppleHighlightColor = "1.000000 0.874510 0.701961 Orange";
|
AppleHighlightColor = "1.000000 0.874510 0.701961 Orange";
|
||||||
|
|
||||||
|
# control how the fn keys operate
|
||||||
|
# 0 = default to media keys, 1 = default to FN1-12
|
||||||
|
"com.apple.keyboard.fnState" = 1;
|
||||||
|
|
||||||
|
NSUserKeyEquivalents = {
|
||||||
|
Minimize = "@~^\\Uf70f"; # set minimize to a stupidly hard key to press
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,24 +1,86 @@
|
||||||
|
{ pkgs, host, ... }:
|
||||||
|
let
|
||||||
|
hostServer = false;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
inputs,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
home = {
|
home = {
|
||||||
stateVersion = "23.05"; # Please read the comment before changing.
|
stateVersion = "23.05"; # Please read the comment before changing.
|
||||||
packages = [
|
packages =
|
||||||
pkgs.neovim
|
with pkgs;
|
||||||
pkgs.nh
|
let
|
||||||
pkgs.ffmpeg
|
# packages to always install
|
||||||
];
|
all = [
|
||||||
|
ffmpeg
|
||||||
|
ripgrep
|
||||||
|
uv
|
||||||
|
nh
|
||||||
|
];
|
||||||
|
# packages to install for desktop environments (non-server)
|
||||||
|
desktop = [
|
||||||
|
];
|
||||||
|
# packages to install on all servers
|
||||||
|
server = [ ];
|
||||||
|
# packages to install on macOS desktops
|
||||||
|
darwin = [
|
||||||
|
raycast
|
||||||
|
];
|
||||||
|
# packages to install on linux desktops
|
||||||
|
linux = [
|
||||||
|
reaper # TODO: why does this break on macOS
|
||||||
|
];
|
||||||
|
in
|
||||||
|
all ++ (if host.darwin then darwin else linux) ++ (if hostServer then server else desktop);
|
||||||
};
|
};
|
||||||
programs = {
|
programs = {
|
||||||
# sort-lines:start
|
# sort-lines:start
|
||||||
|
bat.enable = true;
|
||||||
|
btop.enable = true;
|
||||||
|
fd.enable = true;
|
||||||
hyfetch.enable = true;
|
hyfetch.enable = true;
|
||||||
zsh.enable = true;
|
|
||||||
# sort-lines:end
|
# sort-lines:end
|
||||||
|
|
||||||
|
# zsh is the shell i use
|
||||||
|
zsh = {
|
||||||
|
enable = true;
|
||||||
|
enableCompletion = true;
|
||||||
|
autosuggestion.enable = true;
|
||||||
|
syntaxHighlighting.enable = true;
|
||||||
|
|
||||||
|
history.size = 10000;
|
||||||
|
|
||||||
|
shellAliases = {
|
||||||
|
switch = "nh darwin switch ~/config";
|
||||||
|
};
|
||||||
|
profileExtra = ''
|
||||||
|
function python() {
|
||||||
|
dirname=$(dirname $1 2>/dev/null)
|
||||||
|
if [ -z "$dirname" ]; then
|
||||||
|
dirname=$(pwd)
|
||||||
|
fi
|
||||||
|
uv run --project "$dirname" "$@"
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
# use a git-specific email
|
# use a git-specific email
|
||||||
git.userEmail = "git@paperclover.net";
|
git.userEmail = "git@paperclover.net";
|
||||||
|
|
||||||
|
ssh = {
|
||||||
|
enable = true;
|
||||||
|
matchBlocks = rec {
|
||||||
|
zenith = {
|
||||||
|
user = "clo";
|
||||||
|
port = 222;
|
||||||
|
};
|
||||||
|
"nas.paperclover.net" = zenith;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
neovide = {
|
||||||
|
enable = !hostServer;
|
||||||
|
settings = {
|
||||||
|
font.normal = "AT Name Mono";
|
||||||
|
font.size = 13;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
{pkgs, ...}: {
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
reaper
|
|
||||||
];
|
|
||||||
}
|
|
17
users/chloe/paperback/home.nix
Normal file
17
users/chloe/paperback/home.nix
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
# these programs are not globally installed to reduce distractions.
|
||||||
|
# most of these are needed for my work environment.
|
||||||
|
programs.bun.enable = true;
|
||||||
|
programs.zed-editor.enable = true;
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
doppler
|
||||||
|
nodejs_22
|
||||||
|
rustup
|
||||||
|
typescript
|
||||||
|
pm2
|
||||||
|
pnpm
|
||||||
|
yt-dlp
|
||||||
|
spotdl
|
||||||
|
];
|
||||||
|
}
|
|
@ -1,9 +1,5 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
environment.systemPackages = with pkgs; [
|
{
|
||||||
ffmpeg
|
|
||||||
ripgrep
|
|
||||||
reaper
|
|
||||||
];
|
|
||||||
shared.darwin = {
|
shared.darwin = {
|
||||||
macAppStoreApps = [
|
macAppStoreApps = [
|
||||||
"final-cut-pro"
|
"final-cut-pro"
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
dotfilesDir = "~/config"; # absolute path of the local repo
|
dotfilesDir = "~/config"; # absolute path of the local repo
|
||||||
|
|
||||||
# Stylix/Theming
|
# Stylix/Theming
|
||||||
theme = "catppuccin-mocha";
|
theme = null;
|
||||||
#font
|
#font
|
||||||
sexuality = "lesbian"; # hyfetch
|
sexuality = "lesbian"; # hyfetch
|
||||||
|
|
||||||
|
|
20
users/chloe/vim.nix
Normal file
20
users/chloe/vim.nix
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
vim.theme.extraConfig = ''
|
||||||
|
if vim.g.neovide then
|
||||||
|
vim.g.neovide_cursor_trail_size = 0.3
|
||||||
|
vim.g.neovide_scroll_animation_length = 0.1;
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<D-s>', ':w<CR>') -- Save
|
||||||
|
vim.keymap.set('v', '<D-c>', '"+y') -- Copy
|
||||||
|
vim.keymap.set('n', '<D-v>', '"+P') -- Paste normal mode
|
||||||
|
vim.keymap.set('v', '<D-v>', '"+P') -- Paste visual mode
|
||||||
|
vim.keymap.set('c', '<D-v>', '<C-R>+') -- Paste command mode
|
||||||
|
vim.keymap.set('i', '<D-v>', '<ESC>l"+Pli') -- Paste insert mode
|
||||||
|
end
|
||||||
|
vim.api.nvim_set_keymap("", '<D-v>', '+p<CR>', { noremap = true, silent = true})
|
||||||
|
vim.api.nvim_set_keymap('!', '<D-v>', '<C-R>+', { noremap = true, silent = true})
|
||||||
|
vim.api.nvim_set_keymap('t', '<D-v>', '<C-R>+', { noremap = true, silent = true})
|
||||||
|
vim.api.nvim_set_keymap('v', '<D-v>', '<C-R>+', { noremap = true, silent = true})
|
||||||
|
'';
|
||||||
|
}
|
|
@ -4,7 +4,8 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
host,
|
host,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
services.tailscale.enable = true;
|
services.tailscale.enable = true;
|
||||||
fonts.packages = with pkgs; [
|
fonts.packages = with pkgs; [
|
||||||
nerd-fonts.fira-code
|
nerd-fonts.fira-code
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
user,
|
user,
|
||||||
host,
|
host,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
# Include the results of the hardware scan.
|
# Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
@ -16,7 +17,7 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
# Certain features, including CLI integration and system authentication support,
|
# Certain features, including CLI integration and system authentication support,
|
||||||
# require enabling PolKit integration on some desktop environments (e.g. Plasma).
|
# require enabling PolKit integration on some desktop environments (e.g. Plasma).
|
||||||
polkitPolicyOwners = [user.username];
|
polkitPolicyOwners = [ user.username ];
|
||||||
};
|
};
|
||||||
|
|
||||||
noisetorch.enable = true;
|
noisetorch.enable = true;
|
||||||
|
@ -31,14 +32,9 @@
|
||||||
flake = "/home/nmarks/.dotfiles#nixosConfigurations.nixos";
|
flake = "/home/nmarks/.dotfiles#nixosConfigurations.nixos";
|
||||||
};
|
};
|
||||||
|
|
||||||
neovim = {
|
|
||||||
enable = true;
|
|
||||||
defaultEditor = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
steam = {
|
steam = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = with pkgs; steam.override {extraPkgs = pkgs: [attr];};
|
package = with pkgs; steam.override { extraPkgs = pkgs: [ attr ]; };
|
||||||
};
|
};
|
||||||
|
|
||||||
git = {
|
git = {
|
||||||
|
@ -62,7 +58,7 @@
|
||||||
|
|
||||||
xdg.portal = {
|
xdg.portal = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraPortals = with pkgs; [xdg-desktop-portal-gtk];
|
extraPortals = with pkgs; [ xdg-desktop-portal-gtk ];
|
||||||
};
|
};
|
||||||
virtualisation = {
|
virtualisation = {
|
||||||
containers.enable = true;
|
containers.enable = true;
|
||||||
|
@ -75,7 +71,10 @@
|
||||||
libvirtd.enable = true;
|
libvirtd.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
nix.settings.trusted-users = ["root" user.username];
|
nix.settings.trusted-users = [
|
||||||
|
"root"
|
||||||
|
user.username
|
||||||
|
];
|
||||||
systemd = {
|
systemd = {
|
||||||
targets = {
|
targets = {
|
||||||
sleep.enable = false;
|
sleep.enable = false;
|
||||||
|
@ -84,16 +83,16 @@
|
||||||
hybrid-sleep.enable = false;
|
hybrid-sleep.enable = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
packages = [pkgs.observatory];
|
packages = [ pkgs.observatory ];
|
||||||
|
|
||||||
services.monitord.wantedBy = ["multi-user.target"];
|
services.monitord.wantedBy = [ "multi-user.target" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
i18n = {
|
i18n = {
|
||||||
# Select internationalisation properties.
|
# Select internationalisation properties.
|
||||||
defaultLocale = "en_US.UTF-8";
|
defaultLocale = "en_US.UTF-8";
|
||||||
|
|
||||||
supportedLocales = ["all"];
|
supportedLocales = [ "all" ];
|
||||||
|
|
||||||
extraLocaleSettings = {
|
extraLocaleSettings = {
|
||||||
LC_ADDRESS = "en_US.UTF-8";
|
LC_ADDRESS = "en_US.UTF-8";
|
||||||
|
@ -133,7 +132,11 @@
|
||||||
shell = pkgs.fish;
|
shell = pkgs.fish;
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = user.name;
|
description = user.name;
|
||||||
extraGroups = ["networkmanager" "wheel" "docker"];
|
extraGroups = [
|
||||||
|
"networkmanager"
|
||||||
|
"wheel"
|
||||||
|
"docker"
|
||||||
|
];
|
||||||
# openssh.authorizedKeys.keyFiles = ["~/.ssh/id_ed25519.pub"];
|
# openssh.authorizedKeys.keyFiles = ["~/.ssh/id_ed25519.pub"];
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
firefox
|
firefox
|
||||||
|
@ -157,12 +160,16 @@
|
||||||
# wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
# wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||||
networkmanager.enable = true;
|
networkmanager.enable = true;
|
||||||
firewall = {
|
firewall = {
|
||||||
allowedTCPPorts = [22 80 443];
|
allowedTCPPorts = [
|
||||||
|
22
|
||||||
|
80
|
||||||
|
443
|
||||||
|
];
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
interfaces.enp11s0.wakeOnLan = {
|
interfaces.enp11s0.wakeOnLan = {
|
||||||
enable = true;
|
enable = true;
|
||||||
policy = ["magic"];
|
policy = [ "magic" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -7,15 +7,22 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
modulesPath,
|
modulesPath,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = ["nvme" "ahci" "xhci_pci" "usbhid" "sd_mod"];
|
boot.initrd.availableKernelModules = [
|
||||||
boot.initrd.kernelModules = [];
|
"nvme"
|
||||||
boot.kernelModules = ["kvm-amd"];
|
"ahci"
|
||||||
boot.extraModulePackages = [];
|
"xhci_pci"
|
||||||
|
"usbhid"
|
||||||
|
"sd_mod"
|
||||||
|
];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" = {
|
fileSystems."/" = {
|
||||||
device = "/dev/disk/by-uuid/5838d50d-e6e8-4ad2-a25e-524f4c46da35";
|
device = "/dev/disk/by-uuid/5838d50d-e6e8-4ad2-a25e-524f4c46da35";
|
||||||
|
@ -25,7 +32,10 @@
|
||||||
fileSystems."/boot/efi" = {
|
fileSystems."/boot/efi" = {
|
||||||
device = "/dev/disk/by-uuid/2319-EE79";
|
device = "/dev/disk/by-uuid/2319-EE79";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
options = ["fmask=0022" "dmask=0022"];
|
options = [
|
||||||
|
"fmask=0022"
|
||||||
|
"dmask=0022"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/home/nmarks/Games/steam" = {
|
fileSystems."/home/nmarks/Games/steam" = {
|
||||||
|
@ -34,7 +44,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [
|
swapDevices = [
|
||||||
{device = "/dev/disk/by-uuid/a4128bb9-239c-4aa9-9777-5067feb77b28";}
|
{ device = "/dev/disk/by-uuid/a4128bb9-239c-4aa9-9777-5067feb77b28"; }
|
||||||
];
|
];
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
|
|
|
@ -6,12 +6,8 @@
|
||||||
userSettings,
|
userSettings,
|
||||||
systemSettings,
|
systemSettings,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
imports = [
|
{
|
||||||
inputs.nixvim.homeManagerModules.nixvim
|
|
||||||
#set up nixvim
|
|
||||||
# ../../modules/nixvim
|
|
||||||
];
|
|
||||||
home = {
|
home = {
|
||||||
stateVersion = "23.05"; # Please read the comment before changing.
|
stateVersion = "23.05"; # Please read the comment before changing.
|
||||||
|
|
||||||
|
@ -32,7 +28,7 @@
|
||||||
path-of-building
|
path-of-building
|
||||||
wineWowPackages.stable
|
wineWowPackages.stable
|
||||||
winetricks
|
winetricks
|
||||||
(prismlauncher.override {gamemodeSupport = true;})
|
(prismlauncher.override { gamemodeSupport = true; })
|
||||||
|
|
||||||
#window manager stuff
|
#window manager stuff
|
||||||
wofi
|
wofi
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
} @ args: {
|
}@args:
|
||||||
|
{
|
||||||
programs = {
|
programs = {
|
||||||
# sort-lines:start
|
# sort-lines:start
|
||||||
atuin.enable = true;
|
atuin.enable = true;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
neovim
|
|
||||||
pinentry_mac
|
pinentry_mac
|
||||||
signal-desktop-bin
|
signal-desktop-bin
|
||||||
];
|
];
|
||||||
|
@ -8,7 +8,7 @@
|
||||||
# Custom configuration modules in "modules" are shared between users,
|
# Custom configuration modules in "modules" are shared between users,
|
||||||
# and can be configured in this "shared" namespace
|
# and can be configured in this "shared" namespace
|
||||||
shared.darwin = {
|
shared.darwin = {
|
||||||
macAppStoreApps = ["wireguard"];
|
macAppStoreApps = [ "wireguard" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Create /etc/zshrc that loads the nix-darwin environment.
|
# Create /etc/zshrc that loads the nix-darwin environment.
|
||||||
|
|
|
@ -6,12 +6,8 @@
|
||||||
user,
|
user,
|
||||||
host,
|
host,
|
||||||
...
|
...
|
||||||
} @ args: {
|
}@args:
|
||||||
imports = [
|
{
|
||||||
inputs.nixvim.homeManagerModules.nixvim
|
|
||||||
#set up nixvim
|
|
||||||
# ../../modules/nixvim
|
|
||||||
];
|
|
||||||
home = {
|
home = {
|
||||||
stateVersion = "23.05"; # Please read the comment before changing.
|
stateVersion = "23.05"; # Please read the comment before changing.
|
||||||
# shell = pkgs.fish;
|
# shell = pkgs.fish;
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
# Packages installed with home-manager
|
# Packages installed with home-manager
|
||||||
{pkgs, ...}:
|
{ pkgs, ... }:
|
||||||
with pkgs; [
|
with pkgs;
|
||||||
|
[
|
||||||
#general development
|
#general development
|
||||||
just
|
just
|
||||||
pkg-config
|
pkg-config
|
||||||
|
@ -35,7 +36,7 @@ with pkgs; [
|
||||||
nh
|
nh
|
||||||
|
|
||||||
#terminal stuff
|
#terminal stuff
|
||||||
(btop.override {cudaSupport = true;})
|
(btop.override { cudaSupport = true; })
|
||||||
tmux
|
tmux
|
||||||
zellij
|
zellij
|
||||||
lazygit
|
lazygit
|
||||||
|
@ -78,6 +79,7 @@ with pkgs; [
|
||||||
statix
|
statix
|
||||||
|
|
||||||
#neovim deps
|
#neovim deps
|
||||||
|
# TODO: from clo, maybe u can remove all of these? i don't wanna break tho
|
||||||
lua51Packages.lua
|
lua51Packages.lua
|
||||||
lua51Packages.luarocks-nix
|
lua51Packages.luarocks-nix
|
||||||
codespell
|
codespell
|
||||||
|
|
|
@ -3,7 +3,7 @@ rec {
|
||||||
name = "Natalie"; # name/identifier
|
name = "Natalie"; # name/identifier
|
||||||
email = "nmarks413@gmail.com"; # email (used for certain configurations)
|
email = "nmarks413@gmail.com"; # email (used for certain configurations)
|
||||||
dotfilesDir = "~/.dotfiles"; # absolute path of the local repo
|
dotfilesDir = "~/.dotfiles"; # absolute path of the local repo
|
||||||
theme = "catppuccin-mocha"; #name of theme that stylix will use
|
theme = "catppuccin-mocha"; # name of theme that stylix will use
|
||||||
browser = "firefox"; # Default browser; must select one from ./user/app/browser/
|
browser = "firefox"; # Default browser; must select one from ./user/app/browser/
|
||||||
term = "ghostty"; # Default terminal command;
|
term = "ghostty"; # Default terminal command;
|
||||||
font = "iosevka"; # Selected font
|
font = "iosevka"; # Selected font
|
||||||
|
|
9
users/natalie/vim.nix
Normal file
9
users/natalie/vim.nix
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
vim = {
|
||||||
|
theme = {
|
||||||
|
name = "catppuccin";
|
||||||
|
style = "mocha";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue