flake: add nixcasks

This commit is contained in:
Guanran Wang 2024-02-27 02:03:00 +08:00
parent 61b9bc5e37
commit a8661a3af4
Signed by: nyancat
SSH key fingerprint: SHA256:8oWGKciPALWut/6WA27oFKofX+6Wtc0gQnsefXLQx/8
5 changed files with 44 additions and 25 deletions

View file

@ -1,7 +1,7 @@
{...}: { {...}: {
imports = [ imports = [
./fonts.nix ./fonts.nix
./homebrew.nix # ./homebrew.nix
./window-manager.nix ./window-manager.nix
]; ];
} }

View file

@ -277,6 +277,26 @@
"type": "github" "type": "github"
} }
}, },
"nixcasks": {
"inputs": {
"nixpkgs": [
"nixpkgs-stable"
]
},
"locked": {
"lastModified": 1708897147,
"narHash": "sha256-IZthUAu/4qH8EtUbpREVue2E83x4ofHcBjxXSRfdj3s=",
"owner": "jacekszymanski",
"repo": "nixcasks",
"rev": "9351c986bb5cfb940485f57e2595186d1ab68e4a",
"type": "github"
},
"original": {
"owner": "jacekszymanski",
"repo": "nixcasks",
"type": "github"
}
},
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1708594753, "lastModified": 1708594753,
@ -397,6 +417,7 @@
"neovim": "neovim", "neovim": "neovim",
"nix-darwin": "nix-darwin", "nix-darwin": "nix-darwin",
"nix-gaming": "nix-gaming", "nix-gaming": "nix-gaming",
"nixcasks": "nixcasks",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"nixpkgs-stable": "nixpkgs-stable", "nixpkgs-stable": "nixpkgs-stable",
@ -405,8 +426,7 @@
"rust-overlay": "rust-overlay", "rust-overlay": "rust-overlay",
"sops-nix": "sops-nix", "sops-nix": "sops-nix",
"spicetify-nix": "spicetify-nix", "spicetify-nix": "spicetify-nix",
"systems": "systems", "systems": "systems"
"systems-linux": "systems-linux"
} }
}, },
"rust-overlay": { "rust-overlay": {
@ -492,21 +512,6 @@
"repo": "default", "repo": "default",
"type": "github" "type": "github"
} }
},
"systems-linux": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View file

@ -38,6 +38,11 @@
inputs.pre-commit-hooks-nix.follows = "pre-commit-hooks-nix"; inputs.pre-commit-hooks-nix.follows = "pre-commit-hooks-nix";
inputs.rust-overlay.follows = "rust-overlay"; inputs.rust-overlay.follows = "rust-overlay";
}; };
neovim = {
url = "github:Guanran928/nvim";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};
nix-darwin = { nix-darwin = {
url = "github:LnL7/nix-darwin"; url = "github:LnL7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@ -50,10 +55,10 @@
nixos-hardware = { nixos-hardware = {
url = "github:NixOS/nixos-hardware"; url = "github:NixOS/nixos-hardware";
}; };
neovim = { nixcasks = {
url = "github:Guanran928/nvim"; # contains unfree
inputs.nixpkgs.follows = "nixpkgs"; url = "github:jacekszymanski/nixcasks";
inputs.flake-utils.follows = "flake-utils"; inputs.nixpkgs.follows = "nixpkgs-stable";
}; };
sops-nix = { sops-nix = {
url = "github:Mic92/sops-nix"; url = "github:Mic92/sops-nix";
@ -66,7 +71,6 @@
inputs.flake-utils.follows = "flake-utils"; inputs.flake-utils.follows = "flake-utils";
}; };
systems.url = "github:nix-systems/default"; systems.url = "github:nix-systems/default";
systems-linux.url = "github:nix-systems/default-linux";
### De-dupe ### De-dupe
crane = { crane = {

View file

@ -1,3 +1,13 @@
{pkgs, ...}: { {
home.packages = [pkgs.telegram-desktop]; inputs,
pkgs,
...
}: {
home.packages = [
(
if pkgs.stdenv.hostPlatform.isDarwin
then inputs.nixcasks.legacyPackages.${pkgs.stdenv.hostPlatform.system}.telegram
else pkgs.telegram-desktop
)
];
} }