mirror of
https://github.com/ryanccn/flake.git
synced 2026-01-26 19:56:29 +01:00
treewide: refactor, nix, overlays -> packages
This commit is contained in:
parent
d6238e12af
commit
eb6b664802
23 changed files with 240 additions and 308 deletions
16
modules/_module.nix
Normal file
16
modules/_module.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
inputs',
|
||||
...
|
||||
}:
|
||||
{
|
||||
_module.args = {
|
||||
inputs' = lib.mapAttrs (lib.const (
|
||||
lib.mapAttrs (lib.const (value: value.${pkgs.system} or value))
|
||||
)) inputs;
|
||||
|
||||
flake' = inputs'.self;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
# https://github.com/LnL7/nix-darwin/issues/122#issuecomment-2272570087
|
||||
programs.fish.loginShellInit =
|
||||
let
|
||||
dquote = str: "\"" + str + "\"";
|
||||
|
||||
profiles = [
|
||||
"/etc/profiles/per-user/$USER" # home-manager profile
|
||||
"$HOME/.nix-profile" # non-XDG home profile
|
||||
"$(set -q XDG_STATE_HOME; and echo \"$XDG_STATE_HOME\"; or echo \"$HOME/.local/state\")/nix/profile" # XDG home profile
|
||||
"/run/current-system/sw" # nix-darwin system profile
|
||||
"/nix/var/nix/profiles/default" # system profile
|
||||
];
|
||||
|
||||
makeBinSearchPath = lib.concatMapStringsSep " " (path: (dquote "${path}/bin"));
|
||||
in
|
||||
''
|
||||
fish_add_path --move --prepend --path ${makeBinSearchPath profiles}
|
||||
set fish_user_paths $fish_user_paths
|
||||
'';
|
||||
}
|
||||
|
|
@ -7,7 +7,11 @@ _: {
|
|||
|
||||
homebrew = {
|
||||
enable = true;
|
||||
caskArgs.require_sha = true;
|
||||
|
||||
caskArgs = {
|
||||
require_sha = true;
|
||||
};
|
||||
|
||||
onActivation = {
|
||||
autoUpdate = true;
|
||||
cleanup = "uninstall";
|
||||
|
|
|
|||
|
|
@ -1,19 +1,20 @@
|
|||
{
|
||||
self,
|
||||
pkgs,
|
||||
inputs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
nix.package = pkgs.nixVersions.latest;
|
||||
services.nix-daemon.enable = true;
|
||||
# nix.package = pkgs.nixVersions.latest;
|
||||
|
||||
nix.registry = {
|
||||
n.flake = inputs.nixpkgs;
|
||||
};
|
||||
|
||||
nix.nixPath = [ "nixpkgs=${inputs.nixpkgs.outPath}" ];
|
||||
nix.nixPath = [
|
||||
"nixpkgs=${inputs.nixpkgs.outPath}"
|
||||
];
|
||||
|
||||
nix.settings = {
|
||||
experimental-features = [
|
||||
|
|
@ -40,20 +41,12 @@
|
|||
nix-path = config.nix.nixPath;
|
||||
};
|
||||
|
||||
environment.profiles = [
|
||||
"\${XDG_STATE_HOME}/nix/profile"
|
||||
"$HOME/.local/state/nix/profile"
|
||||
];
|
||||
|
||||
nixpkgs = {
|
||||
overlays = [
|
||||
inputs.rust-overlay.overlays.default
|
||||
|
||||
inputs.nrr.overlays.default
|
||||
inputs.am.overlays.default
|
||||
inputs.nyoom.overlays.default
|
||||
inputs.morlana.overlays.default
|
||||
inputs.spdx-gen.overlays.default
|
||||
|
||||
self.overlays.ryan-mono-bin
|
||||
self.overlays.ibm-plex
|
||||
];
|
||||
|
||||
config.allowUnfree = true;
|
||||
hostPlatform = "aarch64-darwin";
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
{ pkgs, inputs', ... }:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
nixfmt-rfc-style
|
||||
|
|
@ -40,6 +40,7 @@
|
|||
jq
|
||||
just
|
||||
nerdfix
|
||||
reuse
|
||||
ripgrep
|
||||
tokei
|
||||
vhs
|
||||
|
|
@ -52,10 +53,10 @@
|
|||
# spicetify-cli
|
||||
exiftool
|
||||
|
||||
nrr
|
||||
am
|
||||
nyoom
|
||||
morlana
|
||||
spdx-gen
|
||||
inputs'.nrr.packages.default
|
||||
inputs'.am.packages.default
|
||||
inputs'.nyoom.packages.default
|
||||
inputs'.morlana.packages.default
|
||||
inputs'.spdx-gen.packages.default
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue