flake for emacs vm

This commit is contained in:
Danilo Reyes 2025-09-28 02:08:03 -06:00
parent 7b1c061c9d
commit 8053fc7843
2 changed files with 117 additions and 110 deletions

162
flake.lock generated
View File

@ -103,17 +103,17 @@
"cpu-microcodes": { "cpu-microcodes": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1757762790, "lastModified": 1758484353,
"narHash": "sha256-/d9HoPNjYgXse2y3dKIVms5oeGBj5Gf3NbRJAdoYxcg=", "narHash": "sha256-zpbmZqUIhmTW01PunE5eXkYzQsMDqOOshr/KjNXeL7A=",
"owner": "platomav", "owner": "platomav",
"repo": "CPUMicrocodes", "repo": "CPUMicrocodes",
"rev": "940dd3dacd577144172372f8c8f2e176db0c9de4", "rev": "518e82e753bbd7df44264cac38dc98e6a4ede8c6",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "platomav", "owner": "platomav",
"repo": "CPUMicrocodes", "repo": "CPUMicrocodes",
"rev": "940dd3dacd577144172372f8c8f2e176db0c9de4", "rev": "518e82e753bbd7df44264cac38dc98e6a4ede8c6",
"type": "github" "type": "github"
} }
}, },
@ -125,11 +125,11 @@
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1758459839, "lastModified": 1758962141,
"narHash": "sha256-cuGhpqhsLE4LugMBRxto2y76HYa0mYGcRMb4Vm2r1wI=", "narHash": "sha256-DFiPYYf1zo5QWnPs6AoWfSH3/oU6ZrCLGy0/V1j6thw=",
"owner": "marienz", "owner": "marienz",
"repo": "nix-doom-emacs-unstraightened", "repo": "nix-doom-emacs-unstraightened",
"rev": "208eca48a42ac10a1c4e34fa0fc0b875152a840f", "rev": "5266ed8f5ca477d1734285d236036ab541fc881a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -141,11 +141,11 @@
"doomemacs": { "doomemacs": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1758398712, "lastModified": 1758860516,
"narHash": "sha256-Zl5dxGxaUeHV2hnfauGYvH1H5/HNBwSsDwebfZrQumo=", "narHash": "sha256-ulQq9+RHIQELZVQuXsLQInqeAhOCDqRltUDRVBjQ1c0=",
"owner": "doomemacs", "owner": "doomemacs",
"repo": "doomemacs", "repo": "doomemacs",
"rev": "c27621a777c11354a4913c7eb455db3766984709", "rev": "1d1d17e9c910146731cb7b19d5bcbf6c4b283a74",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -164,11 +164,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1758420825, "lastModified": 1758938530,
"narHash": "sha256-ADGgTjVUgJfsIxD99WVF05oBrcfyHd6aIkae0JWWS4A=", "narHash": "sha256-9mKIivvljlh3WhYPjhJxoKpoJ1+bAh773BeZt1KGYIY=",
"owner": "nix-community", "owner": "nix-community",
"repo": "emacs-overlay", "repo": "emacs-overlay",
"rev": "ecdeee43fa4e1047496367bfcafff020e1d69d33", "rev": "0b082e40b028bff0ab5f587105ace1c990fb2129",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -380,27 +380,6 @@
"type": "github" "type": "github"
} }
}, },
"home-manager_2": {
"inputs": {
"nixpkgs": [
"zen-browser",
"nixpkgs"
]
},
"locked": {
"lastModified": 1752603129,
"narHash": "sha256-S+wmHhwNQ5Ru689L2Gu8n1OD6s9eU9n9mD827JNR+kw=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "e8c19a3cec2814c754f031ab3ae7316b64da085b",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"hyprcursor": { "hyprcursor": {
"inputs": { "inputs": {
"hyprlang": [ "hyprlang": [
@ -477,11 +456,11 @@
"xdph": "xdph" "xdph": "xdph"
}, },
"locked": { "locked": {
"lastModified": 1758475676, "lastModified": 1759010730,
"narHash": "sha256-CsScoiBSIVhMFqvhhx9bru4MDAeg1BgOxCby12FqwRA=", "narHash": "sha256-Bmdr3SADuZQWfUTyAe3vJK2N3IKMR1kjJqgpza8JAN4=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "Hyprland", "repo": "Hyprland",
"rev": "26cbc67385d95ba621fe0a125a5b121ffdd09335", "rev": "766acadcf1e6bfc94fa41ea0d47906c9afca8e24",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -691,11 +670,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1758420014, "lastModified": 1759024631,
"narHash": "sha256-a7IGWXPRppgXMRpBosBl2Afr5DICt21ogeZL45uVkX0=", "narHash": "sha256-Nubbsc/wql6FOqJXCUmwa7+YPMbUtQjt2YFqqXWMqIU=",
"owner": "fufexan", "owner": "fufexan",
"repo": "nix-gaming", "repo": "nix-gaming",
"rev": "cd931e08409954b2e3595b1532039f8052dd8198", "rev": "9027055aa1fe6717a3d6e1ce6d46aafa097d803b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -704,6 +683,42 @@
"type": "github" "type": "github"
} }
}, },
"nixlib": {
"locked": {
"lastModified": 1736643958,
"narHash": "sha256-tmpqTSWVRJVhpvfSN9KXBvKEXplrwKnSZNAoNPf/S/s=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "1418bc28a52126761c02dd3d89b2d8ca0f521181",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"nixos-generators": {
"inputs": {
"nixlib": "nixlib",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1751903740,
"narHash": "sha256-PeSkNMvkpEvts+9DjFiop1iT2JuBpyknmBUs0Un0a4I=",
"owner": "nix-community",
"repo": "nixos-generators",
"rev": "032decf9db65efed428afd2fa39d80f7089085eb",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixos-generators",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1743576891, "lastModified": 1743576891,
@ -755,11 +770,11 @@
}, },
"nixpkgs-small": { "nixpkgs-small": {
"locked": { "locked": {
"lastModified": 1758446528, "lastModified": 1758952591,
"narHash": "sha256-3qYryKrEogFRvVhHGx7uLJUJyp/mSlqnB9m0MqMNCCQ=", "narHash": "sha256-LBewTiqEEIslXle4BrkAUlEG7uGvN9mS6G7hY0l04w4=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "0bfa9141f6fa795b49476562e9991f8034d5c8dc", "rev": "bd1e762364c6d657a67a05b44a6c04646947e739",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -771,11 +786,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1758277210, "lastModified": 1758690382,
"narHash": "sha256-iCGWf/LTy+aY0zFu8q12lK8KuZp7yvdhStehhyX1v8w=", "narHash": "sha256-NY3kSorgqE5LMm1LqNwGne3ZLMF2/ILgLpFr1fS4X3o=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "8eaee110344796db060382e15d3af0a9fc396e0e", "rev": "e643668fd71b949c53f8626614b21ff71a07379d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -787,11 +802,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1758346548, "lastModified": 1758791193,
"narHash": "sha256-afXE7AJ7MY6wY1pg/Y6UPHNYPy5GtUKeBkrZZ/gC71E=", "narHash": "sha256-F8WmEwFoHsnix7rt290R0rFXNJiMbClMZyIC/e+HYf0=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "b2a3852bd078e68dd2b3dfa8c00c67af1f0a7d20", "rev": "25e53aa156d47bad5082ff7618f5feb1f5e02d01",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -830,11 +845,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1758492170, "lastModified": 1759037763,
"narHash": "sha256-w0oHCg7d6W46ZQ/QgvbkR6cJ3Lm02B7sk19vzywC5DU=", "narHash": "sha256-03rBswReBYcridphYSw4XyVauK1/+3gqFMng3NEq4CA=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nur", "repo": "nur",
"rev": "c25e04748de8ea4c9c3f09b63df404c1c0aa463b", "rev": "df3fb235a1e0cd5e6d0907290802a22dde333337",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -899,6 +914,7 @@
"hyprland": "hyprland", "hyprland": "hyprland",
"jawz-scripts": "jawz-scripts", "jawz-scripts": "jawz-scripts",
"nix-gaming": "nix-gaming", "nix-gaming": "nix-gaming",
"nixos-generators": "nixos-generators",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_2",
"nixpkgs-small": "nixpkgs-small", "nixpkgs-small": "nixpkgs-small",
"nixpkgs-unstable": "nixpkgs-unstable", "nixpkgs-unstable": "nixpkgs-unstable",
@ -906,8 +922,7 @@
"nur": "nur", "nur": "nur",
"sops-nix": "sops-nix", "sops-nix": "sops-nix",
"stylix": "stylix", "stylix": "stylix",
"ucodenix": "ucodenix", "ucodenix": "ucodenix"
"zen-browser": "zen-browser"
} }
}, },
"sops-nix": { "sops-nix": {
@ -917,11 +932,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1758425756, "lastModified": 1759030640,
"narHash": "sha256-L3N8zV6wsViXiD8i3WFyrvjDdz76g3tXKEdZ4FkgQ+Y=", "narHash": "sha256-53VP3BqMXJqD1He1WADTFyUnpta3mie56H7nC59tSic=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "e0fdaea3c31646e252a60b42d0ed8eafdb289762", "rev": "9ac51832c70f2ff34fcc97b05fa74b4a78317f9e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -951,11 +966,11 @@
"tinted-zed": "tinted-zed" "tinted-zed": "tinted-zed"
}, },
"locked": { "locked": {
"lastModified": 1757957798, "lastModified": 1758752640,
"narHash": "sha256-FT4O5imFJ+FUIGhYj/aFwEEgyvLhuyJ2my8f6mCLtTY=", "narHash": "sha256-UYkixkkd3VgoO7NeSlKcaE3Glt1r1FHmBlziwYijgMQ=",
"owner": "danth", "owner": "danth",
"repo": "stylix", "repo": "stylix",
"rev": "e6fc25cd12e8f461e402cf34649cc73ad93c7bdd", "rev": "fdfa65624eed1e28960c24a27ba27fffc92e9a32",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1150,11 +1165,11 @@
"cpu-microcodes": "cpu-microcodes" "cpu-microcodes": "cpu-microcodes"
}, },
"locked": { "locked": {
"lastModified": 1757940213, "lastModified": 1758553579,
"narHash": "sha256-mrijoMdIC8m/6dg+jlTeNr0IKgrLgxckrPhf5ibIDSM=", "narHash": "sha256-/p9ID64/5G988NDPvfRSjgbV8GdfvJ2el9kz71nrRnU=",
"owner": "e-tho", "owner": "e-tho",
"repo": "ucodenix", "repo": "ucodenix",
"rev": "6348f12d9ea82e5d8e685fdfd6fd4fc9d8130151", "rev": "ba7f0a366460e0fbea9622fc770cb982be0e4720",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1203,27 +1218,6 @@
"repo": "xdg-desktop-portal-hyprland", "repo": "xdg-desktop-portal-hyprland",
"type": "github" "type": "github"
} }
},
"zen-browser": {
"inputs": {
"home-manager": "home-manager_2",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1758482054,
"narHash": "sha256-17OZTXDwwDdH6mxg6IJTivUpuLZCZA7sQbwI6nWsXTQ=",
"owner": "0xc000022070",
"repo": "zen-browser-flake",
"rev": "6a29f6936d26a24f05f6db069ea489b63f7390b2",
"type": "github"
},
"original": {
"owner": "0xc000022070",
"repo": "zen-browser-flake",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View File

@ -41,8 +41,8 @@
url = "github:nyawox/nixtendo-switch"; url = "github:nyawox/nixtendo-switch";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
zen-browser = { nixos-generators = {
url = "github:0xc000022070/zen-browser-flake"; url = "github:nix-community/nixos-generators";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
}; };
@ -58,22 +58,13 @@
inherit system; inherit system;
config.allowUnfree = true; config.allowUnfree = true;
}; };
langList = builtins.filter (name: name != "emacs.nix") ( langList = builtins.filter (name: name != "emacs") (
builtins.map (file: builtins.replaceStrings [ ".nix" ] [ "" ] (baseNameOf file)) ( builtins.map (file: builtins.replaceStrings [ ".nix" ] [ "" ] (baseNameOf file)) (
builtins.attrNames (builtins.readDir ./modules/dev) builtins.attrNames (builtins.readDir ./modules/dev)
) )
); );
createConfig =
name: local-nixpkgs: commonModules = name: [
let
lib = local-nixpkgs.lib // inputs.home-manager.lib;
in
lib.nixosSystem {
inherit system;
specialArgs = {
inherit inputs outputs;
};
modules = [
{ {
nixpkgs.overlays = [ nixpkgs.overlays = [
(import ./config/overlay.nix { inherit mkpkgs inputs; }) (import ./config/overlay.nix { inherit mkpkgs inputs; })
@ -92,6 +83,18 @@
inputs.stylix.nixosModules.stylix inputs.stylix.nixosModules.stylix
inputs.nixtendo-switch.nixosModules.nixtendo-switch inputs.nixtendo-switch.nixosModules.nixtendo-switch
]; ];
createConfig =
name: local-nixpkgs:
let
lib = local-nixpkgs.lib // inputs.home-manager.lib;
in
lib.nixosSystem {
inherit system;
specialArgs = {
inherit inputs outputs;
};
modules = commonModules name;
}; };
in in
{ {
@ -100,12 +103,22 @@
miniserver = createConfig "miniserver" inputs.nixpkgs-small; miniserver = createConfig "miniserver" inputs.nixpkgs-small;
server = createConfig "server" inputs.nixpkgs-small; server = createConfig "server" inputs.nixpkgs-small;
galaxy = createConfig "galaxy" inputs.nixpkgs-small; galaxy = createConfig "galaxy" inputs.nixpkgs-small;
emacs = createConfig "emacs" inputs.nixpkgs;
};
packages.${system} = (jawz-scripts.packages.${system} or { }) // {
emacs-vm = inputs.nixos-generators.nixosGenerate {
inherit system;
specialArgs = {
inherit inputs outputs;
};
modules = commonModules "emacs";
format = "vm";
};
}; };
packages.${system} = (jawz-scripts.packages.${system} or { });
devShells.${system} = builtins.listToAttrs ( devShells.${system} = builtins.listToAttrs (
map (lang: { map (name: {
name = lang; inherit name;
value = self.nixosConfigurations.shell.config.devShells.${lang}; value = self.nixosConfigurations.emacs.config.devShells.${name};
}) langList }) langList
); );
}; };