[feat] Remove useless overlay stuff

This commit is contained in:
Uttarayan Mondal
2024-02-15 07:17:21 +05:30
parent 0aa2ea2a7a
commit ea57c3c97f
4 changed files with 265 additions and 273 deletions

View File

@@ -1,21 +1,20 @@
{ config {
, pkgs config,
, lib pkgs,
, device lib,
, overlays device,
, ... # overlays,
...
}: }: let
let
start-tmux = (import ../scripts/start-tmux.nix) pkgs; start-tmux = (import ../scripts/start-tmux.nix) pkgs;
in in
# https://mipmip.github.io/home-manager-option-search/ # https://mipmip.github.io/home-manager-option-search/
{ {
nixpkgs.overlays = [ #nixpkgs.overlays = [
(self: super: { # (self: super: {
neovim-nightly = overlays.neovim-nightly; # neovim-nightly = overlays.neovim-nightly;
}) # })
]; #];
imports = [ imports = [
# Include the results of the hardware scan. # Include the results of the hardware scan.
./tmux.nix ./tmux.nix
@@ -139,20 +138,19 @@ in
# manage. # manage.
username = device.user; username = device.user;
homeDirectory = homeDirectory =
if device.system == "x86-64-linux" then if device.system == "x86-64-linux"
lib.mkForce "/home/${device.user}" then lib.mkForce "/home/${device.user}"
else else lib.mkForce "/Users/${device.user}";
lib.mkForce "/Users/${device.user}";
stateVersion = "23.11"; stateVersion = "23.11";
packages = [ packages = with pkgs; [
pkgs.macchina macchina
pkgs.ripgrep ripgrep
pkgs.alejandra fd
# pkgs.neovim-nightly alejandra
pkgs.cachix neovim-nightly
cachix
# # Adds the 'hello' command to your environment. It prints a friendly # # Adds the 'hello' command to your environment. It prints a friendly
# # "Hello, world!" when run. # # "Hello, world!" when run.
# pkgs.hello # pkgs.hello
@@ -191,4 +189,4 @@ in
"${config.home.homeDirectory}/.nix-profile/bin" "${config.home.homeDirectory}/.nix-profile/bin"
]; ];
}; };
} }

17
config/nix/flake.lock generated
View File

@@ -71,9 +71,8 @@
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "numtide", "id": "flake-utils",
"repo": "flake-utils", "type": "indirect"
"type": "github"
} }
}, },
"flake-utils_2": { "flake-utils_2": {
@@ -146,11 +145,11 @@
}, },
"locked": { "locked": {
"dir": "contrib", "dir": "contrib",
"lastModified": 1707868264, "lastModified": 1707941489,
"narHash": "sha256-Ewc5fxKb09XQeO6LeKmko0x7MxKmVCGUYwKq7w8sZD0=", "narHash": "sha256-S5KG+iYMFVHIEfeXSWYei2jcHs6kOfhM1pUoVQ9G/Lw=",
"owner": "neovim", "owner": "neovim",
"repo": "neovim", "repo": "neovim",
"rev": "a376d979bda103fa9998d05c3cc4ba56d3c3cece", "rev": "d09957e0a06f350443c750d9838b5f1016c0cccc",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -169,11 +168,11 @@
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1707935913, "lastModified": 1707955468,
"narHash": "sha256-uAkWeyJUNyZS9/u9huCoAJXyTiHw1F+5a91IDujPppk=", "narHash": "sha256-ZVka2bcB1AQTiVWqp2yH9Rnsd4Tvpcf5NXXzJIp7QNE=",
"owner": "nix-community", "owner": "nix-community",
"repo": "neovim-nightly-overlay", "repo": "neovim-nightly-overlay",
"rev": "b57bf64254630de4920177333f06b341653b1f28", "rev": "0b6b4afc71e14d7f17f4e4a367ce271b9d398432",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -13,17 +13,16 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay"; neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
flake-utils.url = "github:numtide/flake-utils"; # flake-utils.url = "github:numtide/flake-utils";
}; };
outputs = outputs = {
{ nixpkgs nixpkgs,
, home-manager home-manager,
, nix-darwin nix-darwin,
, flake-utils flake-utils,
, ... ...
} @ inputs: } @ inputs: let
let
devices = [ devices = [
{ {
name = "mirai"; name = "mirai";
@@ -48,20 +47,18 @@
]; ];
linux = builtins.filter (x: x.system == "x86_64-linux") devices; linux = builtins.filter (x: x.system == "x86_64-linux") devices;
darwin = builtins.filter (x: x.system == "aarch64-darwin") devices; darwin = builtins.filter (x: x.system == "aarch64-darwin") devices;
in in {
{
homeConfigurations = builtins.listToAttrs (builtins.map homeConfigurations = builtins.listToAttrs (builtins.map
(device: { (device: {
name = device.user; name = device.user;
value = value = let
let
pkgs = nixpkgs.legacyPackages.${device.system}; pkgs = nixpkgs.legacyPackages.${device.system};
overlays = [ inputs.neovim-nightly-overlay.overlay ]; overlays = [inputs.neovim-nightly-overlay.overlay];
in in
home-manager.lib.homeManagerConfiguration { home-manager.lib.homeManagerConfiguration {
inherit pkgs; inherit pkgs;
modules = [ modules = [
./home.nix ./common/home.nix
{ {
nixpkgs.overlays = overlays; nixpkgs.overlays = overlays;
} }
@@ -75,10 +72,9 @@
(builtins.map (builtins.map
(device: { (device: {
name = device.name; name = device.name;
value = value = let
let
pkgs = nixpkgs.legacyPackages.${device.system}; pkgs = nixpkgs.legacyPackages.${device.system};
overlays = [ inputs.neovim-nightly-overlay.overlay ]; overlays = [inputs.neovim-nightly-overlay.overlay];
in in
nix-darwin.lib.darwinSystem { nix-darwin.lib.darwinSystem {
inherit pkgs; inherit pkgs;
@@ -86,14 +82,14 @@
./darwin ./darwin
home-manager.darwinModules.home-manager home-manager.darwinModules.home-manager
{ {
nixpkgs.overlays = overlays;
home-manager = { home-manager = {
useGlobalPkgs = true; useGlobalPkgs = true;
useUserPackages = true; useUserPackages = true;
extraSpecialArgs = { extraSpecialArgs = {
inherit device; inherit device;
inherit overlays;
}; };
users.${device.user}.imports = [ ./common/home.nix ]; users.${device.user}.imports = [./common/home.nix];
}; };
} }
]; ];

View File

@@ -6,4 +6,3 @@ experimental-features = nix-command flakes repl-flake
bash-prompt-prefix = (nix:$name)\040 bash-prompt-prefix = (nix:$name)\040
max-jobs = auto max-jobs = auto
extra-nix-path = nixpkgs=flake:nixpkgs extra-nix-path = nixpkgs=flake:nixpkgs
upgrade-nix-store-path-url = https://install.determinate.systems/nix-upgrade/stable/universal