Add godot template, pin nixpkgs separately for iosevka-based font
This commit is contained in:
parent
b0e1def9dc
commit
f09bd37695
10 changed files with 121 additions and 24 deletions
39
flake.lock
39
flake.lock
|
@ -158,11 +158,11 @@
|
||||||
"rust-overlay": "rust-overlay"
|
"rust-overlay": "rust-overlay"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1709171350,
|
"lastModified": 1709201369,
|
||||||
"narHash": "sha256-k4oKXdZHPVgGeH4cu3mfzYw7FUDjpkrcKCSS4oRfI9w=",
|
"narHash": "sha256-L1n9nSYMvkHFctaMkIuCfBMxJ6qGhgsta0SBi0Gcld0=",
|
||||||
"owner": "helix-editor",
|
"owner": "helix-editor",
|
||||||
"repo": "helix",
|
"repo": "helix",
|
||||||
"rev": "e51a1e4e2ae99b8e1ad751e7dfa024a7d0e4ba8f",
|
"rev": "d0bb77447138f5f70f96b174a8f29045a956c8c4",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -179,11 +179,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1708988456,
|
"lastModified": 1709204054,
|
||||||
"narHash": "sha256-RCz7Xe64tN2zgWk+MVHkzg224znwqknJ1RnB7rVqUWw=",
|
"narHash": "sha256-U1idK0JHs1XOfSI1APYuXi4AEADf+B+ZU4Wifc0pBHk=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "1d085ea4444d26aa52297758b333b449b2aa6fca",
|
"rev": "2f3367769a93b226c467551315e9e270c3f78b15",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -225,18 +225,34 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgsForIosevka": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1709169684,
|
"lastModified": 1708118438,
|
||||||
"narHash": "sha256-YV5OIxSYU+PcQMmqvAVQNCDEKka7tPwLmSCqOUOqnPA=",
|
"narHash": "sha256-kk9/0nuVgA220FcqH/D2xaN6uGyHp/zoxPNUmPCMmEE=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "c6caed479a521fd96b847d287c3fbdc611ffdca3",
|
"rev": "5863c27340ba4de8f83e7e3c023b9599c3cb3c80",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nixos",
|
"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",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
@ -273,6 +289,7 @@
|
||||||
"helix": "helix",
|
"helix": "helix",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs_2",
|
||||||
|
"nixpkgsForIosevka": "nixpkgsForIosevka",
|
||||||
"pre-commit-hooks": "pre-commit-hooks",
|
"pre-commit-hooks": "pre-commit-hooks",
|
||||||
"sops-nix": "sops-nix",
|
"sops-nix": "sops-nix",
|
||||||
"ssbm": "ssbm"
|
"ssbm": "ssbm"
|
||||||
|
|
18
flake.nix
18
flake.nix
|
@ -1,6 +1,10 @@
|
||||||
{
|
{
|
||||||
inputs = {
|
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.url = "github:cachix/pre-commit-hooks.nix";
|
||||||
pre-commit-hooks.inputs.nixpkgs.follows = "nixpkgs";
|
pre-commit-hooks.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
@ -40,12 +44,14 @@
|
||||||
outputs = {
|
outputs = {
|
||||||
self,
|
self,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
|
nixpkgsForIosevka,
|
||||||
home-manager,
|
home-manager,
|
||||||
hardware,
|
hardware,
|
||||||
pre-commit-hooks,
|
pre-commit-hooks,
|
||||||
api-lyte-dev,
|
api-lyte-dev,
|
||||||
...
|
...
|
||||||
} @ inputs: let
|
} @ inputs: let
|
||||||
|
# TODO: make @ inputs unnecessary by making arguments explicit in all modules?
|
||||||
inherit (self) outputs;
|
inherit (self) outputs;
|
||||||
|
|
||||||
systems = [
|
systems = [
|
||||||
|
@ -57,7 +63,7 @@
|
||||||
|
|
||||||
forAllSystems = nixpkgs.lib.genAttrs systems;
|
forAllSystems = nixpkgs.lib.genAttrs systems;
|
||||||
in {
|
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;
|
# colors = (import ./lib/colors.nix inputs).color-schemes.donokai;
|
||||||
|
|
||||||
font = {
|
font = {
|
||||||
|
@ -67,7 +73,11 @@
|
||||||
|
|
||||||
# Your custom packages
|
# Your custom packages
|
||||||
# Acessible through 'nix build', 'nix shell', etc
|
# 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'
|
# Formatter for your nix files, available through 'nix fmt'
|
||||||
# Other options beside 'alejandra' include 'nixpkgs-fmt'
|
# Other options beside 'alejandra' include 'nixpkgs-fmt'
|
||||||
|
@ -88,7 +98,7 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
# Your custom packages and modifications, exported as overlays
|
# 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
|
# Reusable nixos modules you might want to export
|
||||||
# These are usually stuff you would upstream into nixpkgs
|
# These are usually stuff you would upstream into nixpkgs
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
./fonts.nix
|
./fonts.nix
|
||||||
./user-installed-applications.nix
|
./user-installed-applications.nix
|
||||||
./kde-connect.nix
|
./kde-connect.nix
|
||||||
|
./troubleshooting-tools.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
hardware = {
|
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
|
# 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
|
# This one contains whatever you want to overlay
|
||||||
# You can change versions, add patches, set compilation flags, anything really.
|
# 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
|
# When applied, the unstable nixpkgs set (declared in the flake inputs) will
|
||||||
# be accessible through 'pkgs.unstable'
|
# be accessible through 'pkgs.unstable'
|
||||||
unstable-packages = final: _prev: {
|
unstable-packages = final: _prev: {
|
||||||
unstable = import inputs.nixpkgs {
|
unstable = import nixpkgs {
|
||||||
system = final.system;
|
system = final.system;
|
||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,13 +1,17 @@
|
||||||
# Custom packages, that can be defined similarly to ones from nixpkgs
|
# Custom packages, that can be defined similarly to ones from nixpkgs
|
||||||
# You can build them using 'nix build .#example'
|
# You can build them using 'nix build .#example'
|
||||||
{pkgs, ...}: rec {
|
{
|
||||||
|
# pkgs,
|
||||||
|
pkgsForIosevka,
|
||||||
|
...
|
||||||
|
}: rec {
|
||||||
# example = pkgs.callPackage ./example { };
|
# example = pkgs.callPackage ./example { };
|
||||||
|
|
||||||
iosevka-lyteterm-raw = pkgs.callPackage ./iosevka-lyteterm-raw.nix {inherit (pkgs) iosevka;};
|
iosevka-lyteterm-raw = pkgsForIosevka.callPackage ./iosevka-lyteterm-raw.nix {inherit (pkgsForIosevka) iosevka;};
|
||||||
iosevka-lyteterm = pkgs.callPackage ./iosevka-lyteterm.nix {inherit iosevka-lyteterm-raw;};
|
iosevka-lyteterm = pkgsForIosevka.callPackage ./iosevka-lyteterm.nix {inherit iosevka-lyteterm-raw;};
|
||||||
iosevka-lyteterm-webmin = pkgs.callPackage ./iosevka-lyteterm-webmin.nix {
|
iosevka-lyteterm-webmin = pkgsForIosevka.callPackage ./iosevka-lyteterm-webmin.nix {
|
||||||
inherit pkgs;
|
pkgs = pkgsForIosevka;
|
||||||
inherit (pkgs) python311Packages parallel;
|
inherit (pkgsForIosevka) python311Packages parallel;
|
||||||
inherit iosevka-lyteterm-raw;
|
inherit iosevka-lyteterm-raw;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,4 +15,8 @@
|
||||||
path = ./elixir;
|
path = ./elixir;
|
||||||
description = "A template for working on an Elixir project";
|
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