mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-07-11 15:12:40 +02:00
feat: simplify flake.nix
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
|
||||
{pkgs, ...}: {
|
||||
##########################################################################
|
||||
#
|
||||
#
|
||||
# MacOS specific home configuration
|
||||
#
|
||||
##########################################################################
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
{ username, ... }: {
|
||||
imports = [
|
||||
../base/desktop
|
||||
|
||||
|
||||
./core.nix
|
||||
./nushell.nix
|
||||
./rime-squirrel.nix
|
||||
@@ -12,9 +10,9 @@
|
||||
# Home Manager needs a bit of information about you and the
|
||||
# paths it should manage.
|
||||
home = {
|
||||
username = "ryan";
|
||||
username = username;
|
||||
# set homeDirectory make build fail
|
||||
homeDirectory = "/Users/ryan";
|
||||
homeDirectory = "/Users/${username}";
|
||||
|
||||
# This value determines the Home Manager release that your
|
||||
# configuration is compatible with. This helps avoid breakage
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ config, ... }: {
|
||||
{config, ...}: {
|
||||
# nix-darwin do not set PATH for nushell! so we need to do it manually
|
||||
# this is a workaround to add nix's PATH to nushell
|
||||
programs.nushell.extraConfig = ''
|
||||
@@ -15,4 +15,4 @@
|
||||
($env.PATH | split row (char esep))
|
||||
] | flatten)
|
||||
'';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
# remove existing rime data (squirrel)
|
||||
home.activation.removeExistingRimeData = lib.hm.dag.entryBefore [ "checkLinkTargets" ] ''
|
||||
home.activation.removeExistingRimeData = lib.hm.dag.entryBefore ["checkLinkTargets"] ''
|
||||
rm -rf "~/Library/Rime/build/flypy.prism.bin"
|
||||
'';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user