summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flake.nix5
-rw-r--r--nixos/configuration.nix33
-rw-r--r--overlays/default.nix21
3 files changed, 25 insertions, 34 deletions
diff --git a/flake.nix b/flake.nix
index 5381a8f..6930228 100644
--- a/flake.nix
+++ b/flake.nix
@@ -40,7 +40,10 @@
in import ./pkgs { inherit pkgs; });
# Your custom packages and modifications, exported as overlays
- overlays = import ./overlays {inherit inputs;};
+ overlays = (
+ let pkgs = nixpkgs.legacyPackages.${system};
+ in import ./overlays {inherit inputs username pkgs;}
+ );
# NixOS configuration entrypoint
# Available through 'nixos-rebuild --flake .#your-hostname'
diff --git a/nixos/configuration.nix b/nixos/configuration.nix
index 509d6fb..911d0e4 100644
--- a/nixos/configuration.nix
+++ b/nixos/configuration.nix
@@ -1,16 +1,4 @@
-# Edit this configuration file to define what should be installed on
-# your system. Help is available in the configuration.nix(5) man page
-# and in the NixOS manual (accessible by running `nixos-help`).
-{ inputs, outputs, hostname, username, config, pkgs, ... }:
-
-let
- dmenu-src = builtins.fetchTarball "https://git.jptrzy.xyz/dmenu/snapshot/master.tar.gz";
- #dwm-src = builtins.fetchTarball "https://git.jptrzy.xyz/dwm/snapshot/master.tar.gz";
- dwmblocks-src = builtins.fetchTarball "https://git.jptrzy.xyz/dwmblocks/snapshot/master.tar.gz";
- sent-src = builtins.fetchTarball "https://git.jptrzy.xyz/sent/snapshot/master.tar.gz";
- slock-src = builtins.fetchTarball "https://git.jptrzy.xyz/slock/snapshot/master.tar.gz";
- dwm-src = /home/${username}/.local/src/dwm;
-in {
+{ inputs, outputs, hostname, username, config, pkgs, ... }: {
system.stateVersion = "23.05"; # Did you read the comment?
nixpkgs.config.allowUnfree = true;
@@ -239,21 +227,6 @@ in {
outputs.overlays.additions
outputs.overlays.modifications
outputs.overlays.unstable-packages
-
- (final: prev: {
- dmenu = prev.dmenu.overrideAttrs (old: { src = dmenu-src; });
- dwm = prev.dwm.overrideAttrs (old: { src = dwm-src; });
- dwmblocks = prev.dwmblocks.overrideAttrs (old: { src = dwmblocks-src; });
- sent = prev.dwm.overrideAttrs (old: { src = sent-src; });
- slock = prev.slock.overrideAttrs (old: {
- src = slock-src;
- buildInputs = with pkgs; [
- xorg.libXinerama
- xorg.libXft
- imlib2
- ] ++ old.buildInputs;
- });
- })
];
# List packages installed in system profile. To search, run:
@@ -261,10 +234,6 @@ in {
# $ nix search wget
environment.systemPackages = with pkgs; [
- #(import /home/.../.local/src/slock/default.nix {
- # inherit fetchurl lib stdenv writeText;
- # inherit libxcrypt;
- # inherit (xorg) xorgproto libX11 libXext libXrandr;
#})
neovim
git
diff --git a/overlays/default.nix b/overlays/default.nix
index a13ea3c..3037a94 100644
--- a/overlays/default.nix
+++ b/overlays/default.nix
@@ -1,5 +1,12 @@
# This file defines overlays
-{inputs, ...}: {
+{ pkgs, username, inputs, ... }: let
+ dmenu-src = builtins.fetchTarball "https://git.jptrzy.xyz/dmenu/snapshot/master.tar.gz";
+ #dwm-src = builtins.fetchTarball "https://git.jptrzy.xyz/dwm/snapshot/master.tar.gz";
+ dwmblocks-src = builtins.fetchTarball "https://git.jptrzy.xyz/dwmblocks/snapshot/master.tar.gz";
+ sent-src = builtins.fetchTarball "https://git.jptrzy.xyz/sent/snapshot/master.tar.gz";
+ slock-src = builtins.fetchTarball "https://git.jptrzy.xyz/slock/snapshot/master.tar.gz";
+ dwm-src = /home/${username}/.local/src/dwm;
+in {
# This one brings our custom packages from the 'pkgs' directory
additions = final: _prev: import ../pkgs {pkgs = final;};
@@ -10,6 +17,18 @@
# example = prev.example.overrideAttrs (oldAttrs: rec {
# ...
# });
+ dmenu = prev.dmenu.overrideAttrs (old: { src = dmenu-src; });
+ dwm = prev.dwm.overrideAttrs (old: { src = dwm-src; });
+ dwmblocks = prev.dwmblocks.overrideAttrs (old: { src = dwmblocks-src; });
+ sent = prev.dwm.overrideAttrs (old: { src = sent-src; });
+ slock = prev.slock.overrideAttrs (old: {
+ src = slock-src;
+ buildInputs = with pkgs; [
+ xorg.libXinerama
+ xorg.libXft
+ imlib2
+ ] ++ old.buildInputs;
+ });
};
# When applied, the unstable nixpkgs set (declared in the flake inputs) will
Software created with 💖