1
0
Fork 0
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:
Ryan Cao 2024-11-12 13:56:54 +08:00
parent d6238e12af
commit eb6b664802
Signed by: ryanccn
GPG key ID: 48C96B2057D71CB1
23 changed files with 240 additions and 308 deletions

165
flake.lock generated
View file

@ -10,11 +10,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1726126496, "lastModified": 1731138670,
"narHash": "sha256-HJiUol162f37QXVVRLdkleT79K0UXKzXjZdc/WRKJHs=", "narHash": "sha256-jZ+ZkjdCCQv9t31q31ZYx3X7VxynYUPltF9gmMigaB4=",
"owner": "ryanccn", "owner": "ryanccn",
"repo": "am", "repo": "am",
"rev": "9ae1b880aa0a67503bc34aebbd908e718acd1ca3", "rev": "1d086d84e8dc0e133e275fe4b5dd84a8001fb66b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -25,11 +25,11 @@
}, },
"catppuccin": { "catppuccin": {
"locked": { "locked": {
"lastModified": 1725509983, "lastModified": 1731232837,
"narHash": "sha256-NHCgHVqumPraFJnLrkanoLDuhOoUHUvRhvp/RIHJR+A=", "narHash": "sha256-0aIwr/RC/oe7rYkfJb47xjdEQDSNcqpFGsEa+EPlDEs=",
"owner": "catppuccin", "owner": "catppuccin",
"repo": "nix", "repo": "nix",
"rev": "45745fe5960acaefef2b60f3455bcac6a0ca6bc9", "rev": "32359bf226fe874d3b7a0a5753d291a4da9616fe",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -53,39 +53,6 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flakey-profile": {
"locked": {
"lastModified": 1712898590,
"narHash": "sha256-FhGIEU93VHAChKEXx905TSiPZKga69bWl1VB37FK//I=",
"owner": "lf-",
"repo": "flakey-profile",
"rev": "243c903fd8eadc0f63d205665a92d4df91d42d9d",
"type": "github"
},
"original": {
"owner": "lf-",
"repo": "flakey-profile",
"type": "github"
}
},
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -93,11 +60,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1726785354, "lastModified": 1731235328,
"narHash": "sha256-SLorVhoorZwjM1aS04bBX4fufEXIfkMdAGkj9bu2QAQ=", "narHash": "sha256-NjavpgE9/bMe/ABvZpyHIUeYF1mqR5lhaep3wB79ucs=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "1786e2afdbc48e9038f7cff585069736e1d0ed44", "rev": "60bb110917844d354f3c18e05450606a435d2d10",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -106,41 +73,6 @@
"type": "github" "type": "github"
} }
}, },
"lix": {
"flake": false,
"locked": {
"lastModified": 1723503926,
"narHash": "sha256-Rosl9iA9MybF5Bud4BTAQ9adbY81aGmPfV8dDBGl34s=",
"rev": "bcaeb6388b8916ac6d1736e3aa2b13313e6a6bd2",
"type": "tarball",
"url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/bcaeb6388b8916ac6d1736e3aa2b13313e6a6bd2.tar.gz?rev=bcaeb6388b8916ac6d1736e3aa2b13313e6a6bd2"
},
"original": {
"type": "tarball",
"url": "https://git.lix.systems/lix-project/lix/archive/2.91.0.tar.gz"
}
},
"lix-module": {
"inputs": {
"flake-utils": "flake-utils",
"flakey-profile": "flakey-profile",
"lix": "lix",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1723510904,
"narHash": "sha256-zNW/rqNJwhq2lYmQf19wJerRuNimjhxHKmzrWWFJYts=",
"rev": "622a2253a071a1fb97a4d3c8103a91114acc1140",
"type": "tarball",
"url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/622a2253a071a1fb97a4d3c8103a91114acc1140.tar.gz?rev=622a2253a071a1fb97a4d3c8103a91114acc1140"
},
"original": {
"type": "tarball",
"url": "https://git.lix.systems/lix-project/nixos-module/archive/2.91.0.tar.gz"
}
},
"morlana": { "morlana": {
"inputs": { "inputs": {
"nix-filter": [ "nix-filter": [
@ -151,11 +83,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1726541181, "lastModified": 1731144068,
"narHash": "sha256-JnEtDtMj3hajOfmWbcXyiKbkorFIFRMsYvWnPNj3y58=", "narHash": "sha256-3unl0edCutqvxQ5Wf00oiI/DgX/qJily5hBIgPnNWoY=",
"owner": "ryanccn", "owner": "ryanccn",
"repo": "morlana", "repo": "morlana",
"rev": "6b508d33b4b72a0fb0d2ec09af4cf3094e20d070", "rev": "c3370463b96850d28db6103f756f1e242d796cc8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -171,11 +103,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1726742753, "lastModified": 1731153869,
"narHash": "sha256-QclpWrIFIg/yvWRiOUaMp1WR+TGUE9tb7RE31xHlxWc=", "narHash": "sha256-3Ftf9oqOypcEyyrWJ0baVkRpvQqroK/SVBFLvU3nPuc=",
"owner": "LnL7", "owner": "LnL7",
"repo": "nix-darwin", "repo": "nix-darwin",
"rev": "c03f85fa42d68d1056ca1740f3113b04f3addff2", "rev": "5c74ab862c8070cbf6400128a1b56abb213656da",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -186,11 +118,11 @@
}, },
"nix-filter": { "nix-filter": {
"locked": { "locked": {
"lastModified": 1710156097, "lastModified": 1730207686,
"narHash": "sha256-1Wvk8UP7PXdf8bCCaEoMnOT1qe5/Duqgj+rL8sRQsSM=", "narHash": "sha256-SCHiL+1f7q9TAnxpasriP6fMarWE5H43t25F5/9e28I=",
"owner": "numtide", "owner": "numtide",
"repo": "nix-filter", "repo": "nix-filter",
"rev": "3342559a24e85fc164b295c3444e8a139924675b", "rev": "776e68c1d014c3adde193a18db9d738458cd2ba4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -206,11 +138,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1726449931, "lastModified": 1731209121,
"narHash": "sha256-1AX7MyYzP7sNgZiGF8jwehCCI75y2kBGwACeryJs+yE=", "narHash": "sha256-BF7FBh1hIYPDihdUlImHGsQzaJZVLLfYqfDx41wjuF0=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nix-index-database", "repo": "nix-index-database",
"rev": "c1b0fa0bec5478185eae2fd3f39b9e906fc83995", "rev": "896019f04b22ce5db4c0ee4f89978694f44345c3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -221,11 +153,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1726583932, "lastModified": 1730958623,
"narHash": "sha256-zACxiQx8knB3F8+Ze+1BpiYrI+CbhxyWpcSID9kVhkQ=", "narHash": "sha256-JwQZIGSYnRNOgDDoIgqKITrPVil+RMWHsZH1eE1VGN0=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "658e7223191d2598641d50ee4e898126768fe847", "rev": "85f7e662eda4fa3a995556527c87b2524b691933",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -245,11 +177,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1726542944, "lastModified": 1731251221,
"narHash": "sha256-nciuxw8aWKEJV/bI6FE0sfWBcrzrqDKKjXUrYcvBPOA=", "narHash": "sha256-eGPJzmVALvAUi73l7n+oZXEJl8eOK4Xnp3RK4LTZvk8=",
"owner": "ryanccn", "owner": "ryanccn",
"repo": "nrr", "repo": "nrr",
"rev": "a30318ebcd6cd74ee1e87edc3c92772db83dd1d4", "rev": "6858072eb9bef36ebd558883b102d1e9252bb299",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -260,16 +192,19 @@
}, },
"nyoom": { "nyoom": {
"inputs": { "inputs": {
"nix-filter": [
"nix-filter"
],
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
] ]
}, },
"locked": { "locked": {
"lastModified": 1725406938, "lastModified": 1731123626,
"narHash": "sha256-jOUqvLEO0SxUhBiGNq0J1lrLdkqfrngIpsiXZUM8R/c=", "narHash": "sha256-AoNxSBEEP/JsApHr91HhO8fUczNbbSDsSzvyeAdYQak=",
"owner": "ryanccn", "owner": "ryanccn",
"repo": "nyoom", "repo": "nyoom",
"rev": "63e9c00ebc4d838303d6398970c3dc1407c1fc28", "rev": "c902d9c2a3a8bc343f068bd914fee716a3ccb5b9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -281,11 +216,11 @@
"ohmyzsh": { "ohmyzsh": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1726739091, "lastModified": 1730644558,
"narHash": "sha256-F/SvOTDxfNI4ekdjXCmMlwiJyy8lzQH6Q27oApfHQe4=", "narHash": "sha256-rduWnGus/kiRk4qDnR9ifwZb+PnPPCs+aWHhT+M55WQ=",
"owner": "ohmyzsh", "owner": "ohmyzsh",
"repo": "ohmyzsh", "repo": "ohmyzsh",
"rev": "1514145a09140425b914e9cd98fc1d638a8c4003", "rev": "7ed475cb589c9e82211f71b3a5d7083b69cea93c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -300,7 +235,6 @@
"catppuccin": "catppuccin", "catppuccin": "catppuccin",
"darwin-custom-icons": "darwin-custom-icons", "darwin-custom-icons": "darwin-custom-icons",
"home-manager": "home-manager", "home-manager": "home-manager",
"lix-module": "lix-module",
"morlana": "morlana", "morlana": "morlana",
"nix-darwin": "nix-darwin", "nix-darwin": "nix-darwin",
"nix-filter": "nix-filter", "nix-filter": "nix-filter",
@ -321,11 +255,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1726799228, "lastModified": 1731378398,
"narHash": "sha256-wn1leQyMAc/TrLRKcPc0GX6YtoziKQpc/MtZjPNiJ2Q=", "narHash": "sha256-a0QWaiX8+AJ9/XBLGMDy6c90GD7HzpxKVdlFwCke5Pw=",
"owner": "oxalica", "owner": "oxalica",
"repo": "rust-overlay", "repo": "rust-overlay",
"rev": "ab150c7412db7bea5879ce2776718f53fba37aa2", "rev": "0ae9fc2f2fe5361837d59c0bdebbda176427111e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -344,11 +278,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1726313584, "lastModified": 1730974437,
"narHash": "sha256-R0DjdtepVaXVnEudrfGADjUzugxGeqxorF1LFjBb98U=", "narHash": "sha256-qRE1YPO1vmvEnt8Re+9Fhj/wLzum27dqnuYDRKnUErc=",
"owner": "ryanccn", "owner": "ryanccn",
"repo": "spdx-gen", "repo": "spdx-gen",
"rev": "c890f777c211a8fbe30777f8f4ab6434b6106cac", "rev": "85245f610b7c7341dde620db2608e5b21f9438b7",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -357,21 +291,6 @@
"type": "github" "type": "github"
} }
}, },
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"vivid-zsh": { "vivid-zsh": {
"flake": false, "flake": false,
"locked": { "locked": {

View file

@ -16,11 +16,6 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
lix-module = {
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.91.0.tar.gz";
inputs.nixpkgs.follows = "nixpkgs";
};
catppuccin = { catppuccin = {
url = "github:catppuccin/nix"; url = "github:catppuccin/nix";
}; };
@ -45,6 +40,7 @@
nyoom = { nyoom = {
url = "github:ryanccn/nyoom"; url = "github:ryanccn/nyoom";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
inputs.nix-filter.follows = "nix-filter";
}; };
morlana = { morlana = {
@ -86,28 +82,43 @@
outputs = outputs =
{ {
self, self,
nixpkgs,
nix-darwin, nix-darwin,
lix-module,
home-manager, home-manager,
nix-index-database, nix-index-database,
darwin-custom-icons, darwin-custom-icons,
... ...
}@inputs: }@inputs:
{ let
darwinConfigurations.Ryans-MacBook-Pro = nix-darwin.lib.darwinSystem { inherit (nixpkgs) lib;
modules = [ systems = [
lix-module.nixosModules.default "x86_64-linux"
home-manager.darwinModules.home-manager "aarch64-linux"
nix-index-database.darwinModules.nix-index "x86_64-darwin"
darwin-custom-icons.darwinModules.default "aarch64-darwin"
./system.nix ];
];
specialArgs = { forAllSystems = lib.genAttrs systems;
inherit self inputs; in
{
darwinConfigurations = {
Ryans-MacBook-Pro = nix-darwin.lib.darwinSystem {
modules = [
./modules/_module.nix
home-manager.darwinModules.home-manager
nix-index-database.darwinModules.nix-index
darwin-custom-icons.darwinModules.default
./system.nix
];
specialArgs = {
inherit self inputs;
};
}; };
}; };
overlays = import ./overlays; packages = forAllSystems (system: (import ./packages) nixpkgs.legacyPackages.${system});
}; };
} }

View file

@ -2,16 +2,17 @@ theme = catppuccin-frappe
window-colorspace = display-p3 window-colorspace = display-p3
font-family = "Ryan Term" font-family = "Ryan Term"
font-size = 13 font-size = 14
font-feature = -calt font-feature = -calt
font-feature = -dlig font-feature = -dlig
adjust-cell-height = 50% adjust-cell-height = 25%
adjust-underline-position = 5 adjust-underline-position = 5
command = /run/current-system/sw/bin/fish -l command = /run/current-system/sw/bin/fish -l
macos-option-as-alt = true macos-option-as-alt = true
macos-secure-input-indication = false
window-step-resize = true window-step-resize = true
window-padding-x = 15 window-padding-x = 15

View file

@ -1,14 +1,12 @@
{ {
pkgs, pkgs,
lib, lib,
self, # self,
config, config,
... ...
}: }:
let let
extensions = [ extensions = [
# "antfu.icons-carbon"
"antfu.unocss"
"astro-build.astro-vscode" "astro-build.astro-vscode"
"bierner.lit-html" "bierner.lit-html"
"bmalehorn.vscode-fish" "bmalehorn.vscode-fish"
@ -29,20 +27,17 @@ let
"graphql.vscode-graphql-syntax" "graphql.vscode-graphql-syntax"
"golang.go" "golang.go"
"griimick.vhs" "griimick.vhs"
"leonardssh.vscord" # "leonardssh.vscord"
# "jdinhlife.gruvbox" # "jdinhlife.gruvbox"
"jnoortheen.nix-ide" "jnoortheen.nix-ide"
# "miguelsolorio.symbols"
"ms-python.isort" "ms-python.isort"
"ms-python.vscode-pylance" "ms-python.vscode-pylance"
"ms-python.python" "ms-python.python"
# "mvllow.rose-pine" "myriad-dreamin.tinymist"
"naumovs.color-highlight" "naumovs.color-highlight"
"nvarner.typst-lsp"
"prisma.prisma" "prisma.prisma"
"ronnidc.nunjucks" "ronnidc.nunjucks"
"rust-lang.rust-analyzer" "rust-lang.rust-analyzer"
"sastan.twind-intellisense"
"skellock.just" "skellock.just"
"svelte.svelte-vscode" "svelte.svelte-vscode"
"tamasfe.even-better-toml" "tamasfe.even-better-toml"
@ -51,7 +46,6 @@ let
"usernamehw.errorlens" "usernamehw.errorlens"
"vue.volar" "vue.volar"
"waderyan.gitblame" "waderyan.gitblame"
# "xaver.clang-format"
"yoavbls.pretty-ts-errors" "yoavbls.pretty-ts-errors"
]; ];
in in
@ -80,7 +74,7 @@ in
"catppuccin.accentColor" = config.catppuccin.accent; "catppuccin.accentColor" = config.catppuccin.accent;
"catppuccin.boldKeywords" = false; "catppuccin.boldKeywords" = false;
"catppuccin.italicKeywords" = true; "catppuccin.italicKeywords" = false;
"catppuccin.workbenchMode" = "flat"; "catppuccin.workbenchMode" = "flat";
"catppuccin.customUIColors" = { "catppuccin.customUIColors" = {
"all" = { "all" = {
@ -99,14 +93,13 @@ in
"git.suggestSmartCommit" = false; "git.suggestSmartCommit" = false;
"diffEditor.renderSideBySide" = false; "diffEditor.renderSideBySide" = false;
"diffEditor.ignoreTrimWhitespace" = false; "diffEditor.ignoreTrimWhitespace" = false;
"gitlens.showWelcomeOnInstall" = false; # "gitlens.showWelcomeOnInstall" = false;
"gitblame.inlineMessageEnabled" = true; "gitblame.inlineMessageEnabled" = true;
"gitblame.inlineMessageFormat" = "\${author.name} · \${time.ago} · \${commit.summary,120}"; "gitblame.inlineMessageFormat" = "\${author.name} · \${time.ago} · \${commit.summary,120}";
"editor.fontFamily" = "\"RyanMono Nerd Font\", \"Apple Color Emoji\", monospace"; "editor.fontFamily" = ''"Ryan Mono", "Symbols Nerd Font", monospace'';
# "editor.fontLigatures" = true; "editor.fontLigatures" = true;
"editor.fontLigatures" = "'calt', 'ss01'";
"editor.fontSize" = 16; "editor.fontSize" = 16;
"editor.lineHeight" = 1.5; "editor.lineHeight" = 1.5;
"editor.cursorSmoothCaretAnimation" = "on"; "editor.cursorSmoothCaretAnimation" = "on";
@ -114,13 +107,14 @@ in
"editor.cursorBlinking" = "phase"; "editor.cursorBlinking" = "phase";
"workbench.editor.highlightModifiedTabs" = true; "workbench.editor.highlightModifiedTabs" = true;
"workbench.editor.empty.hint" = "hidden"; "workbench.editor.empty.hint" = "hidden";
"chat.commandCenter.enabled" = false;
"editor.inlineSuggest.enabled" = true; "editor.inlineSuggest.enabled" = true;
"editor.tabSize" = 2; "editor.tabSize" = 2;
"editor.insertSpaces" = true; "editor.insertSpaces" = true;
"editor.formatOnSave" = true; "editor.formatOnSave" = true;
"terminal.integrated.fontFamily" = "\"RyanTerm Nerd Font\", \"Apple Color Emoji\", monospace"; "terminal.integrated.fontFamily" = ''"Ryan Term", "Symbols Nerd Font Mono", monospace'';
"terminal.integrated.fontSize" = 14; "terminal.integrated.fontSize" = 14;
"terminal.integrated.lineHeight" = 1.5; "terminal.integrated.lineHeight" = 1.5;
"terminal.integrated.cursorBlinking" = true; "terminal.integrated.cursorBlinking" = true;
@ -149,11 +143,11 @@ in
"extensions.ignoreRecommendations" = true; "extensions.ignoreRecommendations" = true;
"editor.accessibilitySupport" = "off"; "editor.accessibilitySupport" = "off";
"vscord.status.details.text.editing" = "In {workspace}"; # "vscord.status.details.text.editing" = "In {workspace}";
"vscord.status.details.text.viewing" = "In {workspace}"; # "vscord.status.details.text.viewing" = "In {workspace}";
"vscord.status.problems.enabled" = false; # "vscord.status.problems.enabled" = false;
"vscord.status.state.text.editing" = "Working on {file_name}{file_extension}"; # "vscord.status.state.text.editing" = "Working on {file_name}{file_extension}";
"vscord.status.buttons.button1.enabled" = false; # "vscord.status.buttons.button1.enabled" = false;
# "gitlens.defaultTimeFormat" = "HH=mm"; # "gitlens.defaultTimeFormat" = "HH=mm";
# "gitlens.defaultDateShortFormat" = "YYYY/MM/DD"; # "gitlens.defaultDateShortFormat" = "YYYY/MM/DD";
@ -198,17 +192,15 @@ in
"[nix]"."editor.defaultFormatter" = "jnoortheen.nix-ide"; "[nix]"."editor.defaultFormatter" = "jnoortheen.nix-ide";
"nix.enableLanguageServer" = true; "nix.enableLanguageServer" = true;
"nix.serverPath" = lib.getExe pkgs.nixd; "nix.serverPath" = lib.getExe pkgs.nil;
"nix.serverSettings" = { "nix.serverSettings" = {
nixd = { nil = {
formatting.command = [ (lib.getExe pkgs.nixfmt-rfc-style) ]; formatting.command = [ (lib.getExe pkgs.nixfmt-rfc-style) ];
nixpkgs.expr = "(builtins.getFlake \"${self}\").pkgs"; # nixpkgs.expr = "(builtins.getFlake \"${self}\").pkgs";
}; };
}; };
"typst-lsp.exportPdf" = "never"; "[typst]"."editor.defaultFormatter" = "myriad-dreamin.tinymist";
"typst-lsp.experimentalFormatterMode" = "on";
"[typst]"."editor.defaultFormatter" = "nvarner.typst-lsp";
}; };
}; };

View file

@ -38,5 +38,5 @@
catppuccin.flavor = "frappe"; catppuccin.flavor = "frappe";
catppuccin.accent = "sapphire"; catppuccin.accent = "sapphire";
home.stateVersion = "23.05"; home.stateVersion = "24.11";
} }

View file

@ -1,11 +1,11 @@
{ pkgs, ... }: { pkgs, flake', ... }:
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
inter inter
public-sans public-sans
ibm-plex
ryan-mono-bin flake'.packages.ibm-plex-compat
flake'.packages.ryan-mono-bin
# Install the variable fonts for Cascadia Code (which # Install the variable fonts for Cascadia Code (which
# are recommended) instead of the static fonts # are recommended) instead of the static fonts
@ -17,6 +17,8 @@
''; '';
}) })
(nerdfonts.override { fonts = [ "NerdFontsSymbolsOnly" ]; }) (nerdfonts.override {
fonts = [ "NerdFontsSymbolsOnly" ];
})
]; ];
} }

View file

@ -1,7 +1,7 @@
_: { _: {
programs.eza = { programs.eza = {
enable = true; enable = true;
icons = true; icons = "auto";
extraOptions = [ "--all" ]; extraOptions = [ "--all" ];
}; };
} }

View file

@ -1,11 +1,12 @@
{ lib, ... }: { lib, ... }:
let let
aliases = import ./aliases.nix; aliases = import ./aliases.nix;
shellAbbrs = builtins.mapAttrs (_: a: a.command) (
lib.filterAttrs (_: b: !(b.fishAlias or false)) aliases shellAbbrs = builtins.mapAttrs (lib.const (builtins.getAttr "command")) (
lib.filterAttrs (_: a: !(lib.maybeAttr "fishAlias" false a)) aliases
); );
shellAliases = builtins.mapAttrs (_: a: a.command) ( shellAliases = builtins.mapAttrs (lib.const (builtins.getAttr "command")) (
lib.filterAttrs (_: b: builtins.hasAttr "fishAlias" b && b.fishAlias) aliases lib.filterAttrs (_: a: lib.maybeAttr "fishAlias" false a) aliases
); );
in in
{ {

View file

@ -29,8 +29,6 @@ _: {
fetch.fsckObjects = true; fetch.fsckObjects = true;
receive.fsckObjects = true; receive.fsckObjects = true;
blame.ignoreRevsFile = ".git-blame-ignore-revs";
fetch.prune = true; fetch.prune = true;
fetch.pruneTags = true; fetch.pruneTags = true;

View file

@ -1,11 +1,13 @@
{ {
pkgs, pkgs,
inputs,
lib, lib,
config, config,
... ...
}: }:
let let
toml = pkgs.formats.toml { }; toml = pkgs.formats.toml { };
rust-bin = inputs.rust-overlay.lib.mkRustBin { } pkgs;
in in
{ {
home.file."${config.xdg.dataHome}/cargo/config.toml".source = toml.generate "config.toml" { home.file."${config.xdg.dataHome}/cargo/config.toml".source = toml.generate "config.toml" {

View file

@ -1,6 +1,11 @@
{ config, inputs, ... }: {
config,
inputs,
lib,
...
}:
let let
shellAliases = builtins.mapAttrs (_: alias: alias.command) (import ./aliases.nix); shellAliases = builtins.mapAttrs (lib.const (builtins.getAttr "command")) (import ./aliases.nix);
in in
{ {
programs.zsh = { programs.zsh = {

View file

@ -1,5 +1,8 @@
switch *args: switch:
morlana switch {{args}} morlana switch
build:
morlana build
wipe-history: wipe-history:
sudo -H nix profile wipe-history --profile "/nix/var/nix/profiles/default" sudo -H nix profile wipe-history --profile "/nix/var/nix/profiles/default"

16
modules/_module.nix Normal file
View 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;
};
}

View file

@ -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
'';
}

View file

@ -7,7 +7,11 @@ _: {
homebrew = { homebrew = {
enable = true; enable = true;
caskArgs.require_sha = true;
caskArgs = {
require_sha = true;
};
onActivation = { onActivation = {
autoUpdate = true; autoUpdate = true;
cleanup = "uninstall"; cleanup = "uninstall";

View file

@ -1,19 +1,20 @@
{ {
self,
pkgs, pkgs,
inputs, inputs,
config, config,
... ...
}: }:
{ {
nix.package = pkgs.nixVersions.latest;
services.nix-daemon.enable = true; services.nix-daemon.enable = true;
# nix.package = pkgs.nixVersions.latest;
nix.registry = { nix.registry = {
n.flake = inputs.nixpkgs; n.flake = inputs.nixpkgs;
}; };
nix.nixPath = [ "nixpkgs=${inputs.nixpkgs.outPath}" ]; nix.nixPath = [
"nixpkgs=${inputs.nixpkgs.outPath}"
];
nix.settings = { nix.settings = {
experimental-features = [ experimental-features = [
@ -40,20 +41,12 @@
nix-path = config.nix.nixPath; nix-path = config.nix.nixPath;
}; };
environment.profiles = [
"\${XDG_STATE_HOME}/nix/profile"
"$HOME/.local/state/nix/profile"
];
nixpkgs = { 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; config.allowUnfree = true;
hostPlatform = "aarch64-darwin"; hostPlatform = "aarch64-darwin";
}; };

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: { pkgs, inputs', ... }:
{ {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
nixfmt-rfc-style nixfmt-rfc-style
@ -40,6 +40,7 @@
jq jq
just just
nerdfix nerdfix
reuse
ripgrep ripgrep
tokei tokei
vhs vhs
@ -52,10 +53,10 @@
# spicetify-cli # spicetify-cli
exiftool exiftool
nrr inputs'.nrr.packages.default
am inputs'.am.packages.default
nyoom inputs'.nyoom.packages.default
morlana inputs'.morlana.packages.default
spdx-gen inputs'.spdx-gen.packages.default
]; ];
} }

View file

@ -1,4 +0,0 @@
{
ibm-plex = import ./ibm-plex.nix;
ryan-mono-bin = import ./ryan-mono-bin.nix;
}

View file

@ -1,43 +0,0 @@
(_: prev: {
ibm-plex = prev.ibm-plex.overrideAttrs (_: {
postInstall = ''
set -eo pipefail
PATH="${prev.fd}/bin:${prev.python311Packages.fonttools}/bin:$PATH"
cd "$out/share/fonts/opentype"
ansi_dim="\033[2m"
ansi_blue="\033[34m"
ansi_green="\033[32m"
ansi_reset="\033[0m"
medium_fonts=$(fd --extension=otf Medium)
for medium_font in $medium_fonts; do
echo -e "''${ansi_blue}Patching''${ansi_reset} $medium_font (Medm -> Medium)"
ttx_path="''${medium_font%.*}.ttx"
ttx "$medium_font"
sed -i 's/Medm/Medium/g' "$ttx_path"
ttx -f "$ttx_path"
rm "$ttx_path"
done
semibold_fonts=$(fd --extension=otf SemiBold)
for semibold_font in $semibold_fonts; do
echo -e "''${ansi_blue}Patching''${ansi_reset} $semibold_font (SmBld -> Semibold)"
ttx_path="''${semibold_font%.*}.ttx"
ttx "$semibold_font"
sed -i 's/SmBld/Semibold/g' "$ttx_path"
ttx -f "$ttx_path"
rm "$ttx_path"
done
echo -e "''${ansi_green}Done!''${ansi_reset}"
'';
});
})

4
packages/default.nix Normal file
View file

@ -0,0 +1,4 @@
pkgs: {
ibm-plex-compat = pkgs.callPackage ./ibm-plex-compat.nix { };
ryan-mono-bin = pkgs.callPackage ./ryan-mono-bin.nix { };
}

View file

@ -0,0 +1,46 @@
{
ibm-plex,
fd,
python312Packages,
}:
ibm-plex.overrideAttrs (_: {
pname = "ibm-plex-compat";
postInstall = ''
set -eo pipefail
PATH="${fd}/bin:${python312Packages.fonttools}/bin:$PATH"
cd "$out/share/fonts/opentype"
ansi_green="\033[32m"
ansi_reset="\033[0m"
medium_fonts=$(fd --extension=otf Medium)
for medium_font in $medium_fonts; do
echo -e "''${ansi_green}Patching''${ansi_reset} $medium_font (Medm -> Medium)"
ttx_path="''${medium_font%.*}.ttx"
ttx "$medium_font"
substituteInPlace "$ttx_path" --replace-fail 'Medm' 'Medium'
ttx -f "$ttx_path"
rm "$ttx_path"
done
semibold_fonts=$(fd --extension=otf SemiBold)
for semibold_font in $semibold_fonts; do
echo -e "''${ansi_green}Patching''${ansi_reset} $semibold_font (SmBld -> Semibold)"
ttx_path="''${semibold_font%.*}.ttx"
ttx "$semibold_font"
substituteInPlace "$ttx_path" --replace-fail 'SmBld' 'Semibold'
ttx -f "$ttx_path"
rm "$ttx_path"
done
echo -e "''${ansi_green}Done!''${ansi_reset}"
'';
})

View file

@ -1,10 +1,13 @@
_: prev: {
callPackage,
symlinkJoin,
}:
let let
version = "2024.05.26"; version = "2024.05.26";
mkFontVariant = mkFontVariant =
{ variant, hash }: { variant, hash }:
prev.callPackage ( callPackage (
{ {
lib, lib,
fetchzip, fetchzip,
@ -33,30 +36,28 @@ let
} }
) { }; ) { };
in in
{ symlinkJoin {
ryan-mono-bin = prev.symlinkJoin { name = "ryan-mono-bin-${version}";
name = "ryan-mono-bin-${version}";
paths = [ paths = [
(mkFontVariant { (mkFontVariant {
variant = "RyanMono"; variant = "RyanMono";
hash = "sha256-smlvBfpwVoD0qfmmHcJjsLdiblXjy5eevZfK4qDc9x8="; hash = "sha256-smlvBfpwVoD0qfmmHcJjsLdiblXjy5eevZfK4qDc9x8=";
}) })
(mkFontVariant { (mkFontVariant {
variant = "RyanTerm"; variant = "RyanTerm";
hash = "sha256-12xaJqgR5R6SZnZ7vJeD5zg2TZbWEiUrdyK+ljekMvc="; hash = "sha256-12xaJqgR5R6SZnZ7vJeD5zg2TZbWEiUrdyK+ljekMvc=";
}) })
(mkFontVariant { (mkFontVariant {
variant = "RyanMonoNerdFont"; variant = "RyanMonoNerdFont";
hash = "sha256-n2d9K1rJuWCF2NgkRLQQCNCAxYfiBVv/jpn+BzqBvAI="; hash = "sha256-n2d9K1rJuWCF2NgkRLQQCNCAxYfiBVv/jpn+BzqBvAI=";
}) })
(mkFontVariant { (mkFontVariant {
variant = "RyanTermNerdFont"; variant = "RyanTermNerdFont";
hash = "sha256-yrzgNRD560FhHLSK1neHVSnB+ZiHP2bmKzD1pGTu9Ro="; hash = "sha256-yrzgNRD560FhHLSK1neHVSnB+ZiHP2bmKzD1pGTu9Ro=";
}) })
]; ];
};
} }

View file

@ -1,5 +1,7 @@
{ {
inputs, inputs,
inputs',
flake',
self, self,
... ...
}: }:
@ -8,7 +10,6 @@
./modules/nix.nix ./modules/nix.nix
./modules/packages.nix ./modules/packages.nix
./modules/homebrew.nix ./modules/homebrew.nix
./modules/fish.nix
]; ];
security.pam.enableSudoTouchIdAuth = true; security.pam.enableSudoTouchIdAuth = true;
@ -20,10 +21,6 @@
path = "/Applications/Notion.app"; path = "/Applications/Notion.app";
icon = ./icons/notion.icns; icon = ./icons/notion.icns;
} }
{
path = "/Applications/Things.app";
icon = ./icons/things.icns;
}
{ {
path = "/Applications/Obsidian.app"; path = "/Applications/Obsidian.app";
icon = ./icons/obsidian.icns; icon = ./icons/obsidian.icns;
@ -40,7 +37,12 @@
useUserPackages = true; useUserPackages = true;
extraSpecialArgs = { extraSpecialArgs = {
inherit self inputs; inherit
self
flake'
inputs
inputs'
;
}; };
users.ryanccn = import ./home; users.ryanccn = import ./home;
@ -50,5 +52,5 @@
home = "/Users/ryanccn"; home = "/Users/ryanccn";
}; };
system.stateVersion = 4; system.stateVersion = 5;
} }