feat: initial commit
This commit is contained in:
commit
fad8bd63ef
15 changed files with 367 additions and 0 deletions
34
.editorconfig
Normal file
34
.editorconfig
Normal file
|
@ -0,0 +1,34 @@
|
|||
# EditorConfig helps developers define and maintain consistent
|
||||
# coding styles between different editors and IDEs
|
||||
# EditorConfig is awesome: https://EditorConfig.org
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
# go
|
||||
[*.go]
|
||||
indent_style = tab
|
||||
indent_size = 4
|
||||
|
||||
# python
|
||||
[*.{ini,py,py.tpl,rst}]
|
||||
indent_size = 4
|
||||
|
||||
# rust
|
||||
[*.rs]
|
||||
indent_size = 4
|
||||
|
||||
# documentation, utils
|
||||
[*.{md,mdx,diff}]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
# windows shell scripts
|
||||
[*.{cmd,bat,ps1}]
|
||||
end_of_line = crlf
|
6
.github/dependabot.yml
vendored
Normal file
6
.github/dependabot.yml
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: github-actions
|
||||
directory: /
|
||||
schedule:
|
||||
interval: weekly
|
75
.github/workflows/build.yml
vendored
Normal file
75
.github/workflows/build.yml
vendored
Normal file
|
@ -0,0 +1,75 @@
|
|||
name: "Build and populate cache"
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
schedule:
|
||||
# rebuild everyday at 2:51
|
||||
# TIP: Choose a random time here so not all repositories are build at once:
|
||||
# https://www.random.org/clock-times/?num=1&earliest=01%3A00&latest=08%3A00&interval=5&format=html&rnd=new
|
||||
- cron: '51 2 * * *'
|
||||
jobs:
|
||||
tests:
|
||||
strategy:
|
||||
matrix:
|
||||
# Set this to notify the global nur package registry that changes are
|
||||
# available.
|
||||
#
|
||||
# The repo name as used in
|
||||
# https://github.com/nix-community/NUR/blob/master/repos.json
|
||||
nurRepo:
|
||||
- <YOUR_REPO_NAME>
|
||||
# Set this to cache your build results in cachix for faster builds
|
||||
# in CI and for everyone who uses your cache.
|
||||
#
|
||||
# Format: Your cachix cache host name without the ".cachix.org" suffix.
|
||||
# Example: mycache (for mycache.cachix.org)
|
||||
#
|
||||
# For this to work, you also need to set the CACHIX_SIGNING_KEY or
|
||||
# CACHIX_AUTH_TOKEN secret in your repository secrets settings in
|
||||
# Github found at
|
||||
# https://github.com/<your_githubname>/nur-packages/settings/secrets
|
||||
cachixName:
|
||||
- <YOUR_CACHIX_NAME>
|
||||
nixPath:
|
||||
- nixpkgs=channel:nixos-unstable
|
||||
- nixpkgs=channel:nixpkgs-unstable
|
||||
- nixpkgs=channel:nixos-22.11
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
- name: Install nix
|
||||
uses: cachix/install-nix-action@v20
|
||||
with:
|
||||
nix_path: "${{ matrix.nixPath }}"
|
||||
extra_nix_config: |
|
||||
experimental-features = nix-command flakes
|
||||
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Show nixpkgs version
|
||||
run: nix-instantiate --eval -E '(import <nixpkgs> {}).lib.version'
|
||||
- name: Setup cachix
|
||||
uses: cachix/cachix-action@v12
|
||||
# Don't replace <YOUR_CACHIX_NAME> here!
|
||||
if: ${{ matrix.cachixName != '<YOUR_CACHIX_NAME>' }}
|
||||
with:
|
||||
name: ${{ matrix.cachixName }}
|
||||
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
|
||||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
||||
- name: Check evaluation
|
||||
run: |
|
||||
nix-env -f . -qa \* --meta --xml \
|
||||
--allowed-uris https://static.rust-lang.org \
|
||||
--option restrict-eval true \
|
||||
--option allow-import-from-derivation true \
|
||||
--drv-path --show-trace \
|
||||
-I nixpkgs=$(nix-instantiate --find-file nixpkgs) \
|
||||
-I $PWD
|
||||
- name: Build nix packages
|
||||
run: nix shell -f '<nixpkgs>' nix-build-uncached -c nix-build-uncached ci.nix -A cacheOutputs
|
||||
- name: Trigger NUR update
|
||||
# Don't replace <YOUR_REPO_NAME> here!
|
||||
if: ${{ matrix.nurRepo != '<YOUR_REPO_NAME>' }}
|
||||
run: curl -XPOST "https://nur-update.nix-community.org/update?repo=${{ matrix.nurRepo }}"
|
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
result
|
||||
result-*
|
||||
|
21
LICENSE
Normal file
21
LICENSE
Normal file
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2023 Catppuccin
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
66
README.md
Normal file
66
README.md
Normal file
|
@ -0,0 +1,66 @@
|
|||
<h3 align="center">
|
||||
<img src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/logos/exports/1544x1544_circle.png" width="100" alt="Logo"/><br/>
|
||||
<img src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/misc/transparent.png" height="30" width="0px"/>
|
||||
Catppuccin for <a href="https://github.com/catppuccin/template">App</a>
|
||||
<img src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/misc/transparent.png" height="30" width="0px"/>
|
||||
</h3>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/catppuccin/template/stargazers"><img src="https://img.shields.io/github/stars/catppuccin/template?colorA=363a4f&colorB=b7bdf8&style=for-the-badge"></a>
|
||||
<a href="https://github.com/catppuccin/template/issues"><img src="https://img.shields.io/github/issues/catppuccin/template?colorA=363a4f&colorB=f5a97f&style=for-the-badge"></a>
|
||||
<a href="https://github.com/catppuccin/template/contributors"><img src="https://img.shields.io/github/contributors/catppuccin/template?colorA=363a4f&colorB=a6da95&style=for-the-badge"></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<img src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/previews/preview.webp"/>
|
||||
</p>
|
||||
|
||||
## Previews
|
||||
|
||||
<details>
|
||||
<summary>🌻 Latte</summary>
|
||||
<img src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/previews/latte.webp"/>
|
||||
</details>
|
||||
<details>
|
||||
<summary>🪴 Frappé</summary>
|
||||
<img src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/previews/frappe.webp"/>
|
||||
</details>
|
||||
<details>
|
||||
<summary>🌺 Macchiato</summary>
|
||||
<img src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/previews/macchiato.webp"/>
|
||||
</details>
|
||||
<details>
|
||||
<summary>🌿 Mocha</summary>
|
||||
<img src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/previews/mocha.webp"/>
|
||||
</details>
|
||||
|
||||
## Usage
|
||||
|
||||
1. Clone this repository locally
|
||||
2. Open the app's settings
|
||||
3. Select `import theme` and browse to where you cloned Catppuccin
|
||||
4. Select it
|
||||
|
||||
<!-- this section is optional -->
|
||||
## 🙋 FAQ
|
||||
|
||||
- Q: **_"Where can I find the doc?"_**\
|
||||
A: Run `:help theme`
|
||||
|
||||
## 💝 Thanks to
|
||||
|
||||
- [Stonks3141](https://github.com/Stonks3141)
|
||||
|
||||
|
||||
|
||||
<p align="center">
|
||||
<img src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/footers/gray0_ctp_on_line.svg?sanitize=true" />
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
Copyright © 2021-present <a href="https://github.com/catppuccin" target="_blank">Catppuccin Org</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/catppuccin/catppuccin/blob/main/LICENSE"><img src="https://img.shields.io/static/v1.svg?style=for-the-badge&label=License&message=MIT&logoColor=d9e0ee&colorA=363a4f&colorB=b7bdf8"/></a>
|
||||
</p>
|
53
ci.nix
Normal file
53
ci.nix
Normal file
|
@ -0,0 +1,53 @@
|
|||
# This file provides all the buildable and cacheable packages and
|
||||
# package outputs in your package set. These are what gets built by CI,
|
||||
# so if you correctly mark packages as
|
||||
#
|
||||
# - broken (using `meta.broken`),
|
||||
# - unfree (using `meta.license.free`), and
|
||||
# - locally built (using `preferLocalBuild`)
|
||||
#
|
||||
# then your CI will be able to build and cache only those packages for
|
||||
# which this is possible.
|
||||
|
||||
{ pkgs ? import <nixpkgs> { } }:
|
||||
|
||||
with builtins;
|
||||
let
|
||||
isReserved = n: n == "lib" || n == "overlays" || n == "modules";
|
||||
isDerivation = p: isAttrs p && p ? type && p.type == "derivation";
|
||||
isBuildable = p: !(p.meta.broken or false) && p.meta.license.free or true;
|
||||
isCacheable = p: !(p.preferLocalBuild or false);
|
||||
shouldRecurseForDerivations = p: isAttrs p && p.recurseForDerivations or false;
|
||||
|
||||
nameValuePair = n: v: { name = n; value = v; };
|
||||
|
||||
concatMap = builtins.concatMap or (f: xs: concatLists (map f xs));
|
||||
|
||||
flattenPkgs = s:
|
||||
let
|
||||
f = p:
|
||||
if shouldRecurseForDerivations p then flattenPkgs p
|
||||
else if isDerivation p then [ p ]
|
||||
else [ ];
|
||||
in
|
||||
concatMap f (attrValues s);
|
||||
|
||||
outputsOf = p: map (o: p.${o}) p.outputs;
|
||||
|
||||
nurAttrs = import ./default.nix { inherit pkgs; };
|
||||
|
||||
nurPkgs =
|
||||
flattenPkgs
|
||||
(listToAttrs
|
||||
(map (n: nameValuePair n nurAttrs.${n})
|
||||
(filter (n: !isReserved n)
|
||||
(attrNames nurAttrs))));
|
||||
|
||||
in
|
||||
rec {
|
||||
buildPkgs = filter isBuildable nurPkgs;
|
||||
cachePkgs = filter isCacheable buildPkgs;
|
||||
|
||||
buildOutputs = concatMap outputsOf buildPkgs;
|
||||
cacheOutputs = concatMap outputsOf cachePkgs;
|
||||
}
|
20
default.nix
Normal file
20
default.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
# This file describes your repository contents.
|
||||
# It should return a set of nix derivations
|
||||
# and optionally the special attributes `lib`, `modules` and `overlays`.
|
||||
# It should NOT import <nixpkgs>. Instead, you should take pkgs as an argument.
|
||||
# Having pkgs default to <nixpkgs> is fine though, and it lets you use short
|
||||
# commands such as:
|
||||
# nix-build -A mypackage
|
||||
|
||||
{ pkgs ? import <nixpkgs> { } }:
|
||||
|
||||
{
|
||||
# The `lib`, `modules`, and `overlay` names are special
|
||||
lib = import ./lib { inherit pkgs; }; # functions
|
||||
modules = import ./modules; # NixOS modules
|
||||
overlays = import ./overlays; # nixpkgs overlays
|
||||
|
||||
example-package = pkgs.callPackage ./pkgs/example-package { };
|
||||
# some-qt5-package = pkgs.libsForQt5.callPackage ./pkgs/some-qt5-package { };
|
||||
# ...
|
||||
}
|
27
flake.lock
Normal file
27
flake.lock
Normal file
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1624561540,
|
||||
"narHash": "sha256-izJ2PYZMGMsSkg+e7c9A1x3t/yOLT+qzUM6WQsc2tqo=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c6a049a3d32293b24c0f894a840872cf67fd7c11",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
21
flake.nix
Normal file
21
flake.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
description = "My personal NUR repository";
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
outputs = { self, nixpkgs }:
|
||||
let
|
||||
systems = [
|
||||
"x86_64-linux"
|
||||
"i686-linux"
|
||||
"x86_64-darwin"
|
||||
"aarch64-linux"
|
||||
"armv6l-linux"
|
||||
"armv7l-linux"
|
||||
];
|
||||
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system);
|
||||
in
|
||||
{
|
||||
packages = forAllSystems (system: import ./default.nix {
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
});
|
||||
};
|
||||
}
|
7
lib/default.nix
Normal file
7
lib/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ pkgs }:
|
||||
|
||||
with pkgs.lib; {
|
||||
# Add your library functions here
|
||||
#
|
||||
# hexint = x: hexvals.${toLower x};
|
||||
}
|
5
modules/default.nix
Normal file
5
modules/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
# Add your NixOS modules here
|
||||
#
|
||||
# my-module = ./my-module;
|
||||
}
|
15
overlay.nix
Normal file
15
overlay.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
# You can use this file as a nixpkgs overlay. This is useful in the
|
||||
# case where you don't want to add the whole NUR namespace to your
|
||||
# configuration.
|
||||
|
||||
self: super:
|
||||
let
|
||||
isReserved = n: n == "lib" || n == "overlays" || n == "modules";
|
||||
nameValuePair = n: v: { name = n; value = v; };
|
||||
nurAttrs = import ./default.nix { pkgs = super; };
|
||||
|
||||
in
|
||||
builtins.listToAttrs
|
||||
(map (n: nameValuePair n nurAttrs.${n})
|
||||
(builtins.filter (n: !isReserved n)
|
||||
(builtins.attrNames nurAttrs)))
|
5
overlays/default.nix
Normal file
5
overlays/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
# Add your overlays here
|
||||
#
|
||||
# my-overlay = import ./my-overlay;
|
||||
}
|
9
pkgs/example-package/default.nix
Normal file
9
pkgs/example-package/default.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ stdenv }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "example-package-${version}";
|
||||
version = "1.0";
|
||||
src = ./.;
|
||||
buildPhase = "echo echo Hello World > example";
|
||||
installPhase = "install -Dm755 example $out";
|
||||
}
|
Loading…
Reference in a new issue