add diagnostics
This commit is contained in:
parent
0ea9675fc4
commit
b6f59a300d
6 changed files with 205 additions and 138 deletions
138
flake.lock
138
flake.lock
|
@ -239,11 +239,11 @@
|
||||||
"systems": "systems"
|
"systems": "systems"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1701680307,
|
"lastModified": 1731533236,
|
||||||
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
|
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
|
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -257,11 +257,11 @@
|
||||||
"systems": "systems_2"
|
"systems": "systems_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1731533236,
|
"lastModified": 1701680307,
|
||||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -290,7 +290,25 @@
|
||||||
},
|
},
|
||||||
"flake-utils_4": {
|
"flake-utils_4": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": "systems_6"
|
"systems": "systems_4"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1731533236,
|
||||||
|
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-utils_5": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems_7"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1705309234,
|
"lastModified": 1705309234,
|
||||||
|
@ -306,9 +324,9 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-utils_5": {
|
"flake-utils_6": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": "systems_7"
|
"systems": "systems_8"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1710146030,
|
"lastModified": 1710146030,
|
||||||
|
@ -324,9 +342,9 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-utils_6": {
|
"flake-utils_7": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": "systems_8"
|
"systems": "systems_9"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1705309234,
|
"lastModified": 1705309234,
|
||||||
|
@ -342,6 +360,21 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"flakey-profile": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1712898590,
|
||||||
|
"narHash": "sha256-FhGIEU93VHAChKEXx905TSiPZKga69bWl1VB37FK//I=",
|
||||||
|
"owner": "lf-",
|
||||||
|
"repo": "flakey-profile",
|
||||||
|
"rev": "243c903fd8eadc0f63d205665a92d4df91d42d9d",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "lf-",
|
||||||
|
"repo": "flakey-profile",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"fromYaml": {
|
"fromYaml": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
|
@ -514,6 +547,41 @@
|
||||||
"url": "https://raw.githubusercontent.com/ziglang/zig/0fb2015fd3422fc1df364995f9782dfe7255eccd/doc/langref.html.in"
|
"url": "https://raw.githubusercontent.com/ziglang/zig/0fb2015fd3422fc1df364995f9782dfe7255eccd/doc/langref.html.in"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"lix": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1746827285,
|
||||||
|
"narHash": "sha256-hsFe4Tsqqg4l+FfQWphDtjC79WzNCZbEFhHI8j2KJzw=",
|
||||||
|
"rev": "47aad376c87e2e65967f17099277428e4b3f8e5a",
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/47aad376c87e2e65967f17099277428e4b3f8e5a.tar.gz?rev=47aad376c87e2e65967f17099277428e4b3f8e5a"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://git.lix.systems/lix-project/lix/archive/2.93.0.tar.gz"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lix-module": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
|
"flakey-profile": "flakey-profile",
|
||||||
|
"lix": "lix",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1746838955,
|
||||||
|
"narHash": "sha256-11R4K3iAx4tLXjUs+hQ5K90JwDABD/XHhsM9nkeS5N8=",
|
||||||
|
"rev": "cd2a9c028df820a83ca2807dc6c6e7abc3dfa7fc",
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/cd2a9c028df820a83ca2807dc6c6e7abc3dfa7fc.tar.gz"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://git.lix.systems/lix-project/nixos-module/archive/2.93.0.tar.gz"
|
||||||
|
}
|
||||||
|
},
|
||||||
"mnw": {
|
"mnw": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1747499976,
|
"lastModified": 1747499976,
|
||||||
|
@ -531,7 +599,7 @@
|
||||||
},
|
},
|
||||||
"moonlight": {
|
"moonlight": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils_2",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
|
@ -618,7 +686,7 @@
|
||||||
},
|
},
|
||||||
"nix-options-search": {
|
"nix-options-search": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils_2",
|
"flake-utils": "flake-utils_3",
|
||||||
"gitignore": "gitignore",
|
"gitignore": "gitignore",
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
},
|
},
|
||||||
|
@ -706,21 +774,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-stable_2": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1720535198,
|
|
||||||
"narHash": "sha256-zwVvxrdIzralnSbcpghA92tWu2DV2lwv89xZc8MTrbg=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "205fd4226592cc83fd4c0885a3e4c9c400efabb5",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"id": "nixpkgs",
|
|
||||||
"ref": "nixos-23.11",
|
|
||||||
"type": "indirect"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1747744144,
|
"lastModified": 1747744144,
|
||||||
|
@ -797,13 +850,13 @@
|
||||||
"nvf": {
|
"nvf": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-parts": "flake-parts",
|
"flake-parts": "flake-parts",
|
||||||
"flake-utils": "flake-utils_3",
|
"flake-utils": "flake-utils_4",
|
||||||
"mnw": "mnw",
|
"mnw": "mnw",
|
||||||
"nil": "nil",
|
"nil": "nil",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
],
|
],
|
||||||
"systems": "systems_4"
|
"systems": "systems_5"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1747525582,
|
"lastModified": 1747525582,
|
||||||
|
@ -836,13 +889,13 @@
|
||||||
"apple-fonts": "apple-fonts",
|
"apple-fonts": "apple-fonts",
|
||||||
"darwin": "darwin",
|
"darwin": "darwin",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
|
"lix-module": "lix-module",
|
||||||
"moonlight": "moonlight",
|
"moonlight": "moonlight",
|
||||||
"nh": "nh",
|
"nh": "nh",
|
||||||
"nix-index-database": "nix-index-database",
|
"nix-index-database": "nix-index-database",
|
||||||
"nix-options-search": "nix-options-search",
|
"nix-options-search": "nix-options-search",
|
||||||
"nixos-cosmic": "nixos-cosmic",
|
"nixos-cosmic": "nixos-cosmic",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs_2",
|
||||||
"nixpkgs-stable": "nixpkgs-stable_2",
|
|
||||||
"nvf": "nvf",
|
"nvf": "nvf",
|
||||||
"rust-overlay": "rust-overlay_3",
|
"rust-overlay": "rust-overlay_3",
|
||||||
"stylix": "stylix",
|
"stylix": "stylix",
|
||||||
|
@ -1013,7 +1066,7 @@
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
],
|
],
|
||||||
"nur": "nur",
|
"nur": "nur",
|
||||||
"systems": "systems_5",
|
"systems": "systems_6",
|
||||||
"tinted-foot": "tinted-foot",
|
"tinted-foot": "tinted-foot",
|
||||||
"tinted-kitty": "tinted-kitty",
|
"tinted-kitty": "tinted-kitty",
|
||||||
"tinted-schemes": "tinted-schemes",
|
"tinted-schemes": "tinted-schemes",
|
||||||
|
@ -1154,6 +1207,21 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"systems_9": {
|
||||||
|
"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": {
|
||||||
|
@ -1260,7 +1328,7 @@
|
||||||
"zig": {
|
"zig": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat_3",
|
"flake-compat": "flake-compat_3",
|
||||||
"flake-utils": "flake-utils_4",
|
"flake-utils": "flake-utils_5",
|
||||||
"nixpkgs": "nixpkgs_3"
|
"nixpkgs": "nixpkgs_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
|
@ -1280,7 +1348,7 @@
|
||||||
"zig-overlay": {
|
"zig-overlay": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat_4",
|
"flake-compat": "flake-compat_4",
|
||||||
"flake-utils": "flake-utils_6",
|
"flake-utils": "flake-utils_7",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"zls",
|
"zls",
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
|
@ -1302,7 +1370,7 @@
|
||||||
},
|
},
|
||||||
"zls": {
|
"zls": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils_5",
|
"flake-utils": "flake-utils_6",
|
||||||
"gitignore": "gitignore_3",
|
"gitignore": "gitignore_3",
|
||||||
"langref": "langref",
|
"langref": "langref",
|
||||||
"nixpkgs": "nixpkgs_4",
|
"nixpkgs": "nixpkgs_4",
|
||||||
|
|
|
@ -2,7 +2,11 @@
|
||||||
description = "multi device configuration 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";
|
|
||||||
|
lix-module = {
|
||||||
|
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.93.0.tar.gz";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
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";
|
||||||
|
@ -43,6 +47,7 @@
|
||||||
{
|
{
|
||||||
self,
|
self,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
|
lix-module,
|
||||||
nixos-cosmic,
|
nixos-cosmic,
|
||||||
darwin,
|
darwin,
|
||||||
...
|
...
|
||||||
|
@ -92,6 +97,7 @@
|
||||||
inherit
|
inherit
|
||||||
overlays
|
overlays
|
||||||
nixpkgs
|
nixpkgs
|
||||||
|
lix-module
|
||||||
inputs
|
inputs
|
||||||
mkNeovim
|
mkNeovim
|
||||||
;
|
;
|
||||||
|
|
140
lib/mkSystem.nix
140
lib/mkSystem.nix
|
@ -2,32 +2,24 @@
|
||||||
# particular architecture.
|
# particular architecture.
|
||||||
{
|
{
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
|
lix-module,
|
||||||
overlays,
|
overlays,
|
||||||
inputs,
|
inputs,
|
||||||
mkNeovim,
|
mkNeovim,
|
||||||
}: name: {
|
}:
|
||||||
|
name:
|
||||||
|
{
|
||||||
user, # ./users/{name}
|
user, # ./users/{name}
|
||||||
host, # ./users/{name}/{host}
|
host, # ./users/{name}/{host}
|
||||||
system, # arch-os
|
system, # arch-os
|
||||||
extraModules ? [],
|
extraModules ? [ ],
|
||||||
}: let
|
}:
|
||||||
|
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 +30,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 builtins.pathExists a
|
|
||||||
then a
|
|
||||||
else null;
|
|
||||||
|
|
||||||
# Arguments passed to all module files
|
# Arguments passed to all module files
|
||||||
args = {
|
args = {
|
||||||
|
@ -68,18 +57,14 @@
|
||||||
term, # preferred $TERM
|
term, # preferred $TERM
|
||||||
editor, # preferred $EDITOR
|
editor, # preferred $EDITOR
|
||||||
browser ? null, # preferred $BROWSER
|
browser ? null, # preferred $BROWSER
|
||||||
} @ user:
|
}@user:
|
||||||
user
|
user
|
||||||
)
|
)
|
||||||
userConfig;
|
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) [
|
mainHomeImports = builtins.filter (f: f != null) [
|
||||||
|
@ -92,60 +77,59 @@
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
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
|
# Use lix (alternative nix implementation)
|
||||||
../modules/shared
|
# https://lix.systems/add-to-config/#flake-based-configurations
|
||||||
# Modules for the specific OS
|
lix-module.nixosModules.default
|
||||||
(
|
# (getInputModule "lix-module" "default")
|
||||||
if darwin
|
|
||||||
then ../modules/macos
|
|
||||||
else ../modules/nixos
|
|
||||||
)
|
|
||||||
|
|
||||||
# The user-wide configuration.nix
|
# Modules shared between nix-darwin and NixOS
|
||||||
(pathOrNull userConfigPath)
|
../modules/shared
|
||||||
# The host-wide configuration.nix
|
# Modules for the specific OS
|
||||||
(pathOrNull hostConfigPath)
|
(if darwin then ../modules/macos else ../modules/nixos)
|
||||||
|
|
||||||
# Set up nix-index and enable comma for easy one-shot command use
|
# The user-wide configuration.nix
|
||||||
# https://github.com/nix-community/comma
|
(pathOrNull userConfigPath)
|
||||||
(getInputModule "nix-index-database" "nix-index")
|
# The host-wide configuration.nix
|
||||||
{programs.nix-index-database.comma.enable = true;}
|
(pathOrNull hostConfigPath)
|
||||||
|
|
||||||
# Themes for all programs
|
# Set up nix-index and enable comma for easy one-shot command use
|
||||||
(getInputModule "stylix" "stylix")
|
# https://github.com/nix-community/comma
|
||||||
|
(getInputModule "nix-index-database" "nix-index")
|
||||||
|
{ programs.nix-index-database.comma.enable = true; }
|
||||||
|
|
||||||
# Home manager
|
# Themes for all programs
|
||||||
(getInputModule "home-manager" "home-manager")
|
(getInputModule "stylix" "stylix")
|
||||||
{
|
|
||||||
home-manager = {
|
# Home manager
|
||||||
useGlobalPkgs = true;
|
(getInputModule "home-manager" "home-manager")
|
||||||
useUserPackages = true;
|
{
|
||||||
backupFileExtension = "hm-backup";
|
home-manager = {
|
||||||
# Arguments passed to all module files
|
useGlobalPkgs = true;
|
||||||
extraSpecialArgs =
|
useUserPackages = true;
|
||||||
args
|
backupFileExtension = "hm-backup";
|
||||||
// {
|
# Arguments passed to all module files
|
||||||
inherit mainHomeImports;
|
extraSpecialArgs = args // {
|
||||||
};
|
inherit mainHomeImports;
|
||||||
# can't find how to make this an array without the param
|
|
||||||
users.${userConfig.username} = ../modules/home;
|
|
||||||
};
|
};
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,6 @@
|
||||||
./languages.nix
|
./languages.nix
|
||||||
./latex.nix
|
./latex.nix
|
||||||
./lean.nix
|
./lean.nix
|
||||||
./ui.nix
|
./visuals.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,24 +4,16 @@
|
||||||
host,
|
host,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
darwin =
|
let
|
||||||
if host.darwin
|
darwin = if host.darwin then "darwin" else "nixos";
|
||||||
then "darwin"
|
flakePath = "/${if host.darwin then "Users" else "home"}/${user.username}/.dotfiles";
|
||||||
else "nixos";
|
|
||||||
flakePath = "/${
|
|
||||||
if host.darwin
|
|
||||||
then "Users"
|
|
||||||
else "home"
|
|
||||||
}/${user.username}/.dotfiles";
|
|
||||||
|
|
||||||
# BIG HACK DO NOT DO PLS
|
# BIG HACK DO NOT DO PLS
|
||||||
|
|
||||||
hostname =
|
hostname = if host.darwin then "Natalies-MacBook-Air" else "nixos";
|
||||||
if host.darwin
|
in
|
||||||
then "Natalies-MacBook-Air"
|
{
|
||||||
else "nixos";
|
|
||||||
in {
|
|
||||||
vim = {
|
vim = {
|
||||||
extraPackages = with pkgs; [
|
extraPackages = with pkgs; [
|
||||||
python312Packages.pylatexenc
|
python312Packages.pylatexenc
|
||||||
|
@ -94,18 +86,30 @@ in {
|
||||||
enable = true;
|
enable = true;
|
||||||
setupOpts = {
|
setupOpts = {
|
||||||
formatters_by_ft = {
|
formatters_by_ft = {
|
||||||
fish = ["fish_indent"];
|
fish = [ "fish_indent" ];
|
||||||
tex = ["latexindent"];
|
tex = [ "latexindent" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
diagnostics.nvim-lint = {
|
diagnostics = {
|
||||||
enable = true;
|
enable = true;
|
||||||
linters_by_ft = {
|
config = {
|
||||||
nix = ["statix"];
|
virtual_text = {
|
||||||
tex = ["chktex"];
|
format = pkgs.lib.generators.mkLuaInline ''
|
||||||
haskell = ["hlint"];
|
function(diagnostic)
|
||||||
|
return string.format("%s (%s)", diagnostic.message, diagnostic.source)
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
nvim-lint = {
|
||||||
|
enable = true;
|
||||||
|
linters_by_ft = {
|
||||||
|
nix = [ "statix" ];
|
||||||
|
tex = [ "chktex" ];
|
||||||
|
haskell = [ "hlint" ];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
treesitter = {
|
treesitter = {
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
{pkgs, ...}: {
|
{pkgs, ...}: {
|
||||||
vim = {
|
vim = {
|
||||||
|
visuals = {
|
||||||
|
indent-blankline = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
ui = {
|
ui = {
|
||||||
borders = {
|
borders = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -7,7 +12,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
# Better help docs
|
# Better help docs
|
||||||
lazy.plugins."helpview-nvim" = {
|
lazy.plugins."helpview.nvim" = {
|
||||||
enabled = true;
|
enabled = true;
|
||||||
package = pkgs.vimPlugins.helpview-nvim;
|
package = pkgs.vimPlugins.helpview-nvim;
|
||||||
lazy = false;
|
lazy = false;
|
Loading…
Reference in a new issue