This commit is contained in:
sadan 2024-12-18 18:54:34 -05:00
parent 7dd6913f08
commit 0a7223bd6b
No known key found for this signature in database
6 changed files with 176 additions and 101 deletions

View file

@ -21,7 +21,7 @@ in
../../../../customPackages ../../../../customPackages
]; ];
home = { home = {
packages = with pkgs; [ packages = [
# env for clipboard command will be required by their respective environemnts # env for clipboard command will be required by their respective environemnts
(mkScript { (mkScript {
name = "paste"; name = "paste";
@ -34,12 +34,12 @@ in
(mkScript { (mkScript {
name = "http2ssh"; name = "http2ssh";
file = ./http2ssh.sh; file = ./http2ssh.sh;
env = [git]; env = [pkgs.git];
}) })
(mkScript { (mkScript {
name = "git_fetchAll"; name = "git_fetchAll";
file = ./git_fetchAll.sh; file = ./git_fetchAll.sh;
env = [git]; env = [pkgs.git];
}) })
(mkScript { (mkScript {
name = "install_eslint"; name = "install_eslint";
@ -48,12 +48,17 @@ in
(mkScript { (mkScript {
name = "math"; name = "math";
file = ./math.sh; file = ./math.sh;
env = [python3]; env = [pkgs.python3];
}) })
(mkScript { (mkScript {
name = "hashi18n"; name = "hashi18n";
file = ./hashi18n.sh; file = ./hashi18n.sh;
}) })
(mkScript {
name = "flakeify";
file = ./flakeify.sh;
deps = [pkgs.direnv];
})
]; ];
file = { file = {
scripts = { scripts = {

View file

@ -0,0 +1,7 @@
if [ ! -e flake.nix ]; then
nix flake new -t github:nix-community/nix-direnv .
elif [ ! -e .envrc ]; then
echo "use flake" > .envrc
direnv allow
fi
${EDITOR:-vim} flake.nix

View file

@ -27,6 +27,13 @@ in
}; };
}; };
programs = { programs = {
direnv = {
enable = true;
enableZshIntegration = true;
nix-direnv = {
enable = true;
};
};
zoxide = { zoxide = {
enable = true; enable = true;
enableZshIntegration = true; enableZshIntegration = true;

View file

@ -1,9 +1,7 @@
{ {
config,
pkgs,
inputs,
... ...
}: { }:
{
nixpkgs.config.allowInsecurePredicate = (pkg: true); nixpkgs.config.allowInsecurePredicate = (pkg: true);
nixpkgs.config.allowUnfreePredicate = (pkg: true); nixpkgs.config.allowUnfreePredicate = (pkg: true);

31
flake.lock generated
View file

@ -244,6 +244,24 @@
"type": "github" "type": "github"
} }
}, },
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1733312601,
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": { "flake-utils": {
"inputs": { "inputs": {
"systems": "systems" "systems": "systems"
@ -506,6 +524,18 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-lib": {
"locked": {
"lastModified": 1733096140,
"narHash": "sha256-1qRH7uAUsyQI7R1Uwl4T+XvdNv778H0Nb5njNrqvylY=",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz"
}
},
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1730200266, "lastModified": 1730200266,
@ -541,6 +571,7 @@
"root": { "root": {
"inputs": { "inputs": {
"chrome-pak": "chrome-pak", "chrome-pak": "chrome-pak",
"flake-parts": "flake-parts",
"home-manager": "home-manager", "home-manager": "home-manager",
"home-manager-stable": "home-manager-stable", "home-manager-stable": "home-manager-stable",
"nix-index-database": "nix-index-database", "nix-index-database": "nix-index-database",

View file

@ -37,30 +37,56 @@
url = "git+file:./customPackages/chrome-pak-customizer"; url = "git+file:./customPackages/chrome-pak-customizer";
flake = false; flake = false;
}; };
flake-parts.url = "github:hercules-ci/flake-parts";
}; };
outputs = outputs =
{ self
, nixpkgs
, nixos-wsl
, nix-stable
, ...
}@inputs:
# let
# boxes = [
# "default"
# ];
# forAllSystems = nixpkgs.lib.genAttrs boxes;
# in
{ {
self,
nixpkgs,
nixos-wsl,
nix-stable,
flake-parts,
...
}@inputs:
flake-parts.lib.mkFlake { inherit inputs; } {
debug = true;
systems = [ "x86_64-linux" ];
perSystem = { config, ... }: { };
flake = {
homeConfigurations = {
nixd = inputs.home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
modules = [
{
home = {
stateVersion = "24.05";
username = "nixd";
homeDirectory = "/dev/null";
};
}
(
{ pkgs, ... }:
{
wayland.windowManager.hyprland.enable = true;
home = {
packages = with pkgs; [ nixd ];
};
}
)
];
};
};
nixosConfigurations = { nixosConfigurations = {
nixd = nixpkgs.lib.nixosSystem { };
desktopIso = nixpkgs.lib.nixosSystem { desktopIso = nixpkgs.lib.nixosSystem {
system = "aarch64-linux"; system = "aarch64-linux";
modules = [ modules = [
( (
{ pkgs {
, modulesPath pkgs,
, lib modulesPath,
, ... lib,
...
}: }:
{ {
imports = [ (modulesPath + "/installer/cd-dvd/installation-cd-minimal.nix") ]; imports = [ (modulesPath + "/installer/cd-dvd/installation-cd-minimal.nix") ];
@ -144,5 +170,6 @@
# }; # };
# cpkg = forAllSystems(system: import ./customPackages); # cpkg = forAllSystems(system: import ./customPackages);
}; };
};
} }