Adding kube via flake

This commit is contained in:
Joe Frikker
2026-01-01 01:05:40 -05:00
parent 84a9960357
commit a82d11d07b
3 changed files with 64 additions and 24 deletions

53
flake.lock generated
View File

@@ -1,5 +1,23 @@
{
"nodes": {
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1765835352,
"narHash": "sha256-XswHlK/Qtjasvhd1nOa1e8MgZ8GS//jBoTqWtrS1Giw=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "a34fae9c08a15ad73f295041fec82323541400a9",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@@ -21,6 +39,25 @@
"type": "github"
}
},
"kube": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1767247330,
"narHash": "sha256-CxXwzmvAOO07719jzE0Zw14C9r3fQcXfPllLtt5cIzo=",
"rev": "4a4d79a290c92de630e503f395fc8fd709904c1b",
"type": "tarball",
"url": "https://gitea.home-frikker.dedyn.io/api/v1/repos/jfrikker/kube/archive/4a4d79a290c92de630e503f395fc8fd709904c1b.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://gitea.home-frikker.dedyn.io/jfrikker/kube/archive/1.0.1.tar.gz"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1766473571,
@@ -37,9 +74,25 @@
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1765674936,
"narHash": "sha256-k00uTP4JNfmejrCLJOwdObYC9jHRrr/5M/a/8L2EIdo=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "2075416fcb47225d9b68ac469a5c4801a9c4dd85",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"kube": "kube",
"nixpkgs": "nixpkgs"
}
}

View File

@@ -8,9 +8,13 @@
url = "github:nix-community/home-manager/release-25.11";
inputs.nixpkgs.follows = "nixpkgs";
};
kube = {
url = "https://gitea.home-frikker.dedyn.io/jfrikker/kube/archive/1.0.1.tar.gz";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { nixpkgs, home-manager, ... }:
outputs = { nixpkgs, home-manager, kube, ... }:
let modules-for-system = pkgs: pkgs.stdenv.mkDerivation {
name = "home-manager-modules";
src = pkgs.lib.fileset.toSource {
@@ -46,6 +50,8 @@
home.homeDirectory = "/Users/jfrikker";
}
];
extraSpecialArgs = { kube = kube.packages.aarch64-darwin.default; };
};
homeConfigurations.home =
let pkgs = nixpkgs.legacyPackages.x86_64-linux;
@@ -61,6 +67,8 @@
home.homeDirectory = "/home/jfrikker";
}
];
extraSpecialArgs = { kube = kube.packages.x86_64-linux.default; };
};
};
}

View File

@@ -5,7 +5,7 @@
This is the basic structure of the home.nix file. Individual sections are defined later.
#+BEGIN_SRC nix :noweb no-export :tangle target/home.nix
{ config, pkgs, ... }:
{ config, pkgs, kube, ... }:
{
home.packages = with pkgs; [
@@ -24,17 +24,6 @@ This is the basic structure of the home.nix file. Individual sections are define
};
}
#+END_SRC
* Personal Info
Home manager requires this stuff. Just my name and where my home directory is. At some point, I need to make this more dynamic (perhaps using chezmoi), but for now it's hard-coded.
#+NAME: personal
#+BEGIN_SRC nix
home.username = "jfrikker";
home.homeDirectory = "/Users/jfrikker";
#+END_SRC
* Packages
:PROPERTIES:
:header-args: :noweb-ref packages
@@ -118,6 +107,7 @@ Chezmoi is what I use to manage this file; it can pull it from GitHub, and handl
dust
fd
fend
kube
kubectl
ledger
magic-wormhole
@@ -1421,14 +1411,3 @@ I like Catppuccin Frappe as my theme. Let's use it in as many places as we can.
(set-face-attribute 'default nil :font "JetBrainsMono Nerd Font" :height 130)
(set-face-attribute 'fixed-pitch nil :font "JetBrainsMono Nerd Font" :height 130)
#+END_SRC
* Extra Paths
I use cargo install to add personal rust tools to the path, so we need this:
#+NAME: path
#+BEGIN_SRC nix
home.sessionPath = [
"$HOME/.cargo/bin"
];
#+END_SRC