add overlay

This commit is contained in:
Aditya 2024-04-22 11:28:04 +05:30
parent b82de571b3
commit 5d018f3407
Signed by: aditya
SSH key fingerprint: SHA256:jL1IvWsjjlPtw6HvDIHfXfhO9IkIokNEyIfuFhSdoyU
6 changed files with 61 additions and 23 deletions

View file

@ -118,11 +118,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1713479280, "lastModified": 1713566308,
"narHash": "sha256-e8+ZgayVccw6h8ay15jM9hXh+sjZDc1XdBGLn3pdYdc=", "narHash": "sha256-7Y91t8pheIzjJveUMAPyeh5NOq5F49Nq4Hl2532QpJs=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "ff1c3646541316258b1ca64e9b25d4c9cca8e587", "rev": "057117a401a34259c9615ce62218aea7afdee4d3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -154,6 +154,22 @@
"type": "github" "type": "github"
} }
}, },
"master": {
"locked": {
"lastModified": 1713590758,
"narHash": "sha256-gMZU7ZWEDiiM8/a1UcR79+C46qVoZiVZ+V9XjZFrJzA=",
"owner": "akr2002",
"repo": "nixpkgs",
"rev": "3e5b4b5183a1d8b4bb648d7581aba76b50c31846",
"type": "github"
},
"original": {
"owner": "akr2002",
"ref": "master",
"repo": "nixpkgs",
"type": "github"
}
},
"nix-darwin": { "nix-darwin": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -178,11 +194,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1713297878, "lastModified": 1713537308,
"narHash": "sha256-hOkzkhLT59wR8VaMbh1ESjtZLbGi+XNaBN6h49SPqEc=", "narHash": "sha256-XtTSSIB2DA6tOv+l0FhvfDMiyCmhoRbNB+0SeInZkbk=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "66adc1e47f8784803f2deb6cacd5e07264ec2d5c", "rev": "5c24cf2f0a12ad855f444c30b2421d044120c66f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -306,6 +322,7 @@
"root": { "root": {
"inputs": { "inputs": {
"home-manager": "home-manager", "home-manager": "home-manager",
"master": "master",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"nv": "nv", "nv": "nv",
"nyaa": "nyaa" "nyaa": "nyaa"

View file

@ -1,14 +1,11 @@
{ {
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
master.url = "github:akr2002/nixpkgs/master";
home-manager = { home-manager = {
url = "github:nix-community/home-manager/master"; url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
#nixvim = {
# url = "github:nix-community/nixvim";
# inputs.nixpkgs.follows = "nixpkgs";
#};
nv = { nv = {
url = "github:akr2002/nv"; url = "github:akr2002/nv";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@ -24,11 +21,20 @@
nixpkgs, nixpkgs,
... ...
} @ inputs: let } @ inputs: let
system = "x86_64-linux"; inherit (self) outputs;
pkgs = nixpkgs.legacyPackages.${system}; systems = [
"aarch64-linux"
"i686-linux"
"x86_64-linux"
"aarch64-darwin"
"x86_64-darwin"
];
forAllSystems = nixpkgs.lib.genAttrs systems;
in { in {
overlays = import ./overlays {inherit inputs;};
nixosConfigurations.bridge = nixpkgs.lib.nixosSystem { nixosConfigurations.bridge = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs;}; specialArgs = {inherit inputs outputs;};
modules = [ modules = [
./hosts/default/configuration.nix ./hosts/default/configuration.nix
inputs.home-manager.nixosModules.default inputs.home-manager.nixosModules.default

View file

@ -3,6 +3,7 @@
pkgs, pkgs,
lib, lib,
inputs, inputs,
outputs,
... ...
}: { }: {
imports = [ imports = [
@ -11,6 +12,10 @@
../../modules/nixos/default.nix ../../modules/nixos/default.nix
inputs.home-manager.nixosModules.default inputs.home-manager.nixosModules.default
]; ];
nixpkgs.overlays = [
outputs.overlays.master-packages
];
# Set your time zone. # Set your time zone.
time.timeZone = "Asia/Kolkata"; time.timeZone = "Asia/Kolkata";

View file

@ -30,8 +30,6 @@
}; };
}; };
nixpkgs.config.allowUnfree = true;
services = { services = {
gvfs.enable = true; gvfs.enable = true;
printing.enable = true; printing.enable = true;

View file

@ -1,10 +1,14 @@
{pkgs, ...}: { {pkgs, ...}: {
environment.systemPackages = with pkgs; [ environment.systemPackages =
vim (with pkgs; [
wget vim
git wget
nh git
nix-output-monitor nh
nvd nix-output-monitor
]; nvd
])
++ (with pkgs.masterPkgs; [
ollama
]);
} }

8
overlays/default.nix Normal file
View file

@ -0,0 +1,8 @@
{inputs, ...}: {
master-packages = final: _prev: {
masterPkgs = import inputs.master {
system = final.system;
config.allowUnfree = true;
};
};
}