From 334a74dbb84aa2fd2497e8afd585b8bf781e0458 Mon Sep 17 00:00:00 2001 From: pegasust Date: Sun, 6 Nov 2022 12:56:42 +0000 Subject: [PATCH] bad config, let's redo from star --- devel/flake.lock | 93 ++++++++++++++++++++++++++++++++++++++++++++++++ devel/flake.nix | 35 ++++++++---------- devel/shell.nix | 23 ++++++++++++ 3 files changed, 130 insertions(+), 21 deletions(-) create mode 100644 devel/flake.lock create mode 100644 devel/shell.nix diff --git a/devel/flake.lock b/devel/flake.lock new file mode 100644 index 0000000..76447ec --- /dev/null +++ b/devel/flake.lock @@ -0,0 +1,93 @@ +{ + "nodes": { + "flake-utils": { + "locked": { + "lastModified": 1667395993, + "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "home-manager": { + "inputs": { + "nixpkgs": "nixpkgs", + "utils": "utils" + }, + "locked": { + "lastModified": 1667708081, + "narHash": "sha256-FChEy05x4ed/pttjfTeKxjPCnHknMYrUtDyBiYbreT4=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "1ef0da321217c6c19b7a30509631c080a19321e5", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1667629849, + "narHash": "sha256-P+v+nDOFWicM4wziFK9S/ajF2lc0N2Rg9p6Y35uMoZI=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "3bacde6273b09a21a8ccfba15586fb165078fb62", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1667629849, + "narHash": "sha256-P+v+nDOFWicM4wziFK9S/ajF2lc0N2Rg9p6Y35uMoZI=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "3bacde6273b09a21a8ccfba15586fb165078fb62", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-unstable", + "type": "indirect" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "home-manager": "home-manager", + "nixpkgs": "nixpkgs_2" + } + }, + "utils": { + "locked": { + "lastModified": 1667395993, + "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/devel/flake.nix b/devel/flake.nix index c199a94..0c517a4 100644 --- a/devel/flake.nix +++ b/devel/flake.nix @@ -6,25 +6,18 @@ flake-utils.url = "github:numtide/flake-utils"; }; - outputs = { self, nixpkgs, flake-utils, ... }: { - programs.neovim = { - enable = true; - defaultEditor = true; - }; - programs.git = { - enable = true; - }; - programs.zsh = { - enable = true; - shellAliases = { - # list lists - ll = "ls -l"; - update = "sudo nixos-rebuild switch"; - }; - history = { - size = 10000; - path = "${config.xdg.dataHome}/zsh/history"; - }; - }; - }; + outputs = { + self, # instance of self + nixpkgs, # nixpkgs flake + flake-utils, + home-manager, + ... + }: flake-utils.lib.eachDefaultSystem (system: + let pkgs = nixpkgs.legacyPackages.${system}; in { + devShells.default = import ./shell.nix { + inherit pkgs; + inherit home-manager; + }; + } + ); } diff --git a/devel/shell.nix b/devel/shell.nix new file mode 100644 index 0000000..0990c0b --- /dev/null +++ b/devel/shell.nix @@ -0,0 +1,23 @@ +{ pkgs? import {}, home-manager, ...}: +with pkgs; +mkShell { + programs.neovim = { + enable = true; + defaultEditor = true; + }; + programs.git = { + enable = true; + }; + programs.zsh = { + enable = true; + shellAliases = { + # list lists + ll = "ls -l"; + update = "sudo nixos-rebuild switch"; + }; + history = { + size = 10000; + path = "${home-manager.cfg.dataHome}/zsh/history"; + }; + }; +}