Flakifying
This commit is contained in:
49
flake.lock
generated
Normal file
49
flake.lock
generated
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"nodes": {
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1766553861,
|
||||
"narHash": "sha256-ZbnG01yA3O8Yr1vUm3+NQ2qk9iRhS5bloAnuXHHy7+c=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "0999ed8f965bbbd991437ad9c5ed3434cecbc30e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-25.11",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1766473571,
|
||||
"narHash": "sha256-5G1NDO2PulBx1RoaA6U1YoUDX0qZslpPxv+n5GX6Qto=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "76701a179d3a98b07653e2b0409847499b2a07d3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-25.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
66
flake.nix
Normal file
66
flake.nix
Normal file
@@ -0,0 +1,66 @@
|
||||
{
|
||||
description = "Home Manager configuration of Joe Frikker";
|
||||
|
||||
inputs = {
|
||||
# Specify the source of Home Manager and Nixpkgs.
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-25.11";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { nixpkgs, home-manager, ... }:
|
||||
let modules-for-system = pkgs: pkgs.stdenv.mkDerivation {
|
||||
name = "home-manager-modules";
|
||||
src = pkgs.lib.fileset.toSource {
|
||||
root = ./.;
|
||||
fileset = pkgs.lib.fileset.unions [
|
||||
./home.org
|
||||
];
|
||||
};
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
${pkgs.emacs}/bin/emacs --batch --eval "(require 'org)" --eval '(org-babel-tangle-file "home.org")'
|
||||
runHook postBuild
|
||||
'';
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
cp -R target $out
|
||||
runHook postInstall
|
||||
'';
|
||||
};
|
||||
in {
|
||||
homeConfigurations.shibumi =
|
||||
let pkgs = nixpkgs.legacyPackages.aarch64-darwin;
|
||||
modules = modules-for-system pkgs;
|
||||
in home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
|
||||
modules = [
|
||||
"${modules}/home.nix"
|
||||
{
|
||||
home.stateVersion = "22.05";
|
||||
home.username = "jfrikker";
|
||||
home.homeDirectory = "/Users/jfrikker";
|
||||
}
|
||||
];
|
||||
};
|
||||
homeConfigurations.home =
|
||||
let pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||
modules = modules-for-system pkgs;
|
||||
in home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
|
||||
modules = [
|
||||
"${modules}/home.nix"
|
||||
{
|
||||
home.stateVersion = "22.05";
|
||||
home.username = "jfrikker";
|
||||
home.homeDirectory = "/home/jfrikker";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
8
home.org
8
home.org
@@ -1,15 +1,13 @@
|
||||
#+PROPERTY: header-args :mkdirp yes
|
||||
|
||||
* Overall Structure
|
||||
|
||||
This is the basic structure of the home.nix file. Individual sections are defined later.
|
||||
|
||||
#+BEGIN_SRC nix :noweb no-export :tangle ~/.config/home-manager/home.nix
|
||||
#+BEGIN_SRC nix :noweb no-export :tangle target/home.nix
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.stateVersion = "22.05";
|
||||
|
||||
<<personal>>
|
||||
|
||||
home.packages = with pkgs; [
|
||||
<<packages>>
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user