Add godot template, pin nixpkgs separately for iosevka-based font
This commit is contained in:
parent
b0e1def9dc
commit
f09bd37695
39
flake.lock
39
flake.lock
|
@ -158,11 +158,11 @@
|
|||
"rust-overlay": "rust-overlay"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709171350,
|
||||
"narHash": "sha256-k4oKXdZHPVgGeH4cu3mfzYw7FUDjpkrcKCSS4oRfI9w=",
|
||||
"lastModified": 1709201369,
|
||||
"narHash": "sha256-L1n9nSYMvkHFctaMkIuCfBMxJ6qGhgsta0SBi0Gcld0=",
|
||||
"owner": "helix-editor",
|
||||
"repo": "helix",
|
||||
"rev": "e51a1e4e2ae99b8e1ad751e7dfa024a7d0e4ba8f",
|
||||
"rev": "d0bb77447138f5f70f96b174a8f29045a956c8c4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -179,11 +179,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1708988456,
|
||||
"narHash": "sha256-RCz7Xe64tN2zgWk+MVHkzg224znwqknJ1RnB7rVqUWw=",
|
||||
"lastModified": 1709204054,
|
||||
"narHash": "sha256-U1idK0JHs1XOfSI1APYuXi4AEADf+B+ZU4Wifc0pBHk=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "1d085ea4444d26aa52297758b333b449b2aa6fca",
|
||||
"rev": "2f3367769a93b226c467551315e9e270c3f78b15",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -225,18 +225,34 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"nixpkgsForIosevka": {
|
||||
"locked": {
|
||||
"lastModified": 1709169684,
|
||||
"narHash": "sha256-YV5OIxSYU+PcQMmqvAVQNCDEKka7tPwLmSCqOUOqnPA=",
|
||||
"lastModified": 1708118438,
|
||||
"narHash": "sha256-kk9/0nuVgA220FcqH/D2xaN6uGyHp/zoxPNUmPCMmEE=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c6caed479a521fd96b847d287c3fbdc611ffdca3",
|
||||
"rev": "5863c27340ba4de8f83e7e3c023b9599c3cb3c80",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "master",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "5863c27340ba4de8f83e7e3c023b9599c3cb3c80",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1709150264,
|
||||
"narHash": "sha256-HofykKuisObPUfj0E9CJVfaMhawXkYx3G8UIFR/XQ38=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9099616b93301d5cf84274b184a3a5ec69e94e08",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
|
@ -273,6 +289,7 @@
|
|||
"helix": "helix",
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"nixpkgsForIosevka": "nixpkgsForIosevka",
|
||||
"pre-commit-hooks": "pre-commit-hooks",
|
||||
"sops-nix": "sops-nix",
|
||||
"ssbm": "ssbm"
|
||||
|
|
18
flake.nix
18
flake.nix
|
@ -1,6 +1,10 @@
|
|||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/master";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
|
||||
# I have this as a separate input so I don't rebuild the font every time I
|
||||
# want to upgrade nixpkgs
|
||||
nixpkgsForIosevka.url = "github:nixos/nixpkgs?rev=5863c27340ba4de8f83e7e3c023b9599c3cb3c80";
|
||||
|
||||
pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
|
||||
pre-commit-hooks.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
@ -40,12 +44,14 @@
|
|||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
nixpkgsForIosevka,
|
||||
home-manager,
|
||||
hardware,
|
||||
pre-commit-hooks,
|
||||
api-lyte-dev,
|
||||
...
|
||||
} @ inputs: let
|
||||
# TODO: make @ inputs unnecessary by making arguments explicit in all modules?
|
||||
inherit (self) outputs;
|
||||
|
||||
systems = [
|
||||
|
@ -57,7 +63,7 @@
|
|||
|
||||
forAllSystems = nixpkgs.lib.genAttrs systems;
|
||||
in {
|
||||
colors = (import ./lib/colors.nix inputs).schemes.catppuccin-mocha-sapphire;
|
||||
colors = (import ./lib/colors.nix {inherit nixpkgs;}).schemes.catppuccin-mocha-sapphire;
|
||||
# colors = (import ./lib/colors.nix inputs).color-schemes.donokai;
|
||||
|
||||
font = {
|
||||
|
@ -67,7 +73,11 @@
|
|||
|
||||
# Your custom packages
|
||||
# Acessible through 'nix build', 'nix shell', etc
|
||||
packages = forAllSystems (system: import ./pkgs {pkgs = nixpkgs.legacyPackages.${system};});
|
||||
packages = forAllSystems (system:
|
||||
import ./pkgs {
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
pkgsForIosevka = nixpkgsForIosevka.legacyPackages.${system};
|
||||
});
|
||||
|
||||
# Formatter for your nix files, available through 'nix fmt'
|
||||
# Other options beside 'alejandra' include 'nixpkgs-fmt'
|
||||
|
@ -88,7 +98,7 @@
|
|||
});
|
||||
|
||||
# Your custom packages and modifications, exported as overlays
|
||||
overlays = import ./overlays {inherit inputs;};
|
||||
overlays = import ./overlays {inherit nixpkgs nixpkgsForIosevka;};
|
||||
|
||||
# Reusable nixos modules you might want to export
|
||||
# These are usually stuff you would upstream into nixpkgs
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
./fonts.nix
|
||||
./user-installed-applications.nix
|
||||
./kde-connect.nix
|
||||
./troubleshooting-tools.nix
|
||||
];
|
||||
|
||||
hardware = {
|
||||
|
|
7
modules/nixos/troubleshooting-tools.nix
Normal file
7
modules/nixos/troubleshooting-tools.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{pkgs, ...}: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
pciutils
|
||||
usbutils
|
||||
# ls-all-the-things
|
||||
];
|
||||
}
|
|
@ -1,6 +1,14 @@
|
|||
{inputs, ...}: {
|
||||
{
|
||||
nixpkgs,
|
||||
nixpkgsForIosevka,
|
||||
...
|
||||
}: {
|
||||
# This one brings our custom packages from the 'pkgs' directory
|
||||
additions = final: _prev: import ../pkgs {pkgs = final;};
|
||||
additions = final: _prev:
|
||||
import ../pkgs {
|
||||
pkgs = final;
|
||||
pkgsForIosevka = nixpkgsForIosevka.legacyPackages.${final.system};
|
||||
};
|
||||
|
||||
# This one contains whatever you want to overlay
|
||||
# You can change versions, add patches, set compilation flags, anything really.
|
||||
|
@ -11,7 +19,7 @@
|
|||
# When applied, the unstable nixpkgs set (declared in the flake inputs) will
|
||||
# be accessible through 'pkgs.unstable'
|
||||
unstable-packages = final: _prev: {
|
||||
unstable = import inputs.nixpkgs {
|
||||
unstable = import nixpkgs {
|
||||
system = final.system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
|
|
|
@ -1,13 +1,17 @@
|
|||
# Custom packages, that can be defined similarly to ones from nixpkgs
|
||||
# You can build them using 'nix build .#example'
|
||||
{pkgs, ...}: rec {
|
||||
{
|
||||
# pkgs,
|
||||
pkgsForIosevka,
|
||||
...
|
||||
}: rec {
|
||||
# example = pkgs.callPackage ./example { };
|
||||
|
||||
iosevka-lyteterm-raw = pkgs.callPackage ./iosevka-lyteterm-raw.nix {inherit (pkgs) iosevka;};
|
||||
iosevka-lyteterm = pkgs.callPackage ./iosevka-lyteterm.nix {inherit iosevka-lyteterm-raw;};
|
||||
iosevka-lyteterm-webmin = pkgs.callPackage ./iosevka-lyteterm-webmin.nix {
|
||||
inherit pkgs;
|
||||
inherit (pkgs) python311Packages parallel;
|
||||
iosevka-lyteterm-raw = pkgsForIosevka.callPackage ./iosevka-lyteterm-raw.nix {inherit (pkgsForIosevka) iosevka;};
|
||||
iosevka-lyteterm = pkgsForIosevka.callPackage ./iosevka-lyteterm.nix {inherit iosevka-lyteterm-raw;};
|
||||
iosevka-lyteterm-webmin = pkgsForIosevka.callPackage ./iosevka-lyteterm-webmin.nix {
|
||||
pkgs = pkgsForIosevka;
|
||||
inherit (pkgsForIosevka) python311Packages parallel;
|
||||
inherit iosevka-lyteterm-raw;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -15,4 +15,8 @@
|
|||
path = ./elixir;
|
||||
description = "A template for working on an Elixir project";
|
||||
};
|
||||
godot = {
|
||||
path = ./godot;
|
||||
description = "A template for working on a Godot game or project";
|
||||
};
|
||||
}
|
||||
|
|
1
templates/godot/.envrc
Normal file
1
templates/godot/.envrc
Normal file
|
@ -0,0 +1 @@
|
|||
use flake
|
17
templates/godot/.gitignore
vendored
Normal file
17
templates/godot/.gitignore
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
/.direnv
|
||||
/result
|
||||
|
||||
build/
|
||||
|
||||
# Godot-specific ignores
|
||||
/.godot/
|
||||
.import/
|
||||
export.cfg
|
||||
# export_presets.cfg
|
||||
|
||||
# Imported translations (automatically generated from CSV files)
|
||||
*.translation
|
||||
|
||||
# Mono-specific ignores
|
||||
.mono/
|
||||
data_*/
|
28
templates/godot/flake.nix
Normal file
28
templates/godot/flake.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (self) outputs;
|
||||
systems = [
|
||||
"x86_64-linux"
|
||||
];
|
||||
|
||||
forAllSystems = nixpkgs.lib.genAttrs systems;
|
||||
in {
|
||||
devShells = forAllSystems (system: let
|
||||
pkgs = import nixpkgs {inherit system;};
|
||||
in {
|
||||
default = outputs.devShells.${system}.godot;
|
||||
godot = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [godot_4 gdtoolkit];
|
||||
shellHook = ''
|
||||
echo -e "\e[0;30m\e[43m Use 'godot4 -e' to run the editor for this project. \e[0;30m\e[0m"
|
||||
'';
|
||||
};
|
||||
});
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue