home/flake.nix

175 lines
5.1 KiB
Nix
Raw Normal View History

2023-10-12 22:51:18 +02:00
{
description = "Home Manager configuration of xenia";
inputs = {
# Specify the source of Home Manager and Nixpkgs.
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-darwin = {
url = "github:LnL7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs";
};
2023-10-12 22:51:18 +02:00
kak = {
url = "git+https://githug.xyz/xenia/kakoune.git";
inputs.nixpkgs.follows = "nixpkgs";
};
2023-11-12 12:43:00 +01:00
kak-tree = {
url = "git+https://githug.xyz/xenia/kak-tree.git";
inputs.nixpkgs.follows = "nixpkgs";
};
2023-10-12 22:51:18 +02:00
unispect = {
url = "git+https://git@githug.xyz/xenia/unispect";
inputs.nixpkgs.follows = "nixpkgs";
};
ansi-utils = {
url = "git+https://git@githug.xyz/xenia/ansi-utils";
inputs.nixpkgs.follows = "nixpkgs";
};
unambig-path = {
url = "git+https://git@githug.xyz/xenia/unambig-path";
inputs.nixpkgs.follows = "nixpkgs";
};
2023-10-27 23:40:45 +02:00
rachel = {
url = "git+https://git@githug.xyz/rachel/nixos-config";
inputs.nixpkgs.follows = "nixpkgs";
};
2023-10-12 22:51:18 +02:00
};
2023-11-12 12:43:00 +01:00
outputs = { self, nixpkgs, home-manager, nix-darwin, kak, kak-tree, unispect, ansi-utils, unambig-path, rachel }:
2023-10-12 22:51:18 +02:00
let
xdg-runtime-dir = "/tmp/xdg-rt";
2023-10-18 23:56:44 +02:00
mkPkgs = system: import nixpkgs { system = system; config.allowUnfree = true; };
mkHome = {username, home-dir, prompt-color, system, pkgs} : import ./home/common.nix {
2023-10-19 00:21:53 +02:00
inherit username home-dir prompt-color pkgs xdg-runtime-dir;
2023-10-19 00:18:10 +02:00
2023-10-12 22:51:18 +02:00
kak-pkg = kak.packages.${system}.kak;
unispect = unispect.packages.${system}.unispect;
ansi-utils = ansi-utils.packages.${system};
unambig-path = unambig-path.packages.${system}.unambig-path;
2023-11-12 12:43:00 +01:00
kak-tree = kak-tree.packages.${system}.kak-tree;
2023-10-12 22:51:18 +02:00
};
mkPC = {system, pkgs} : import ./home/graphical.nix {
inherit pkgs xdg-runtime-dir;
};
mkLaptop = {system, pkgs} : import ./home/apps.nix {
2023-10-19 00:10:11 +02:00
inherit pkgs xdg-runtime-dir;
};
mkMac = {system, pkgs, laptop} : import ./home/mac.nix {
2023-10-19 00:10:11 +02:00
emacs = laptop.programs.emacs.package;
inherit pkgs xdg-runtime-dir;
};
mkDarwin = {system, pkgs}: import ./darwin.nix {
inherit system pkgs;
};
2023-10-21 12:56:02 +02:00
mkNixOsBase = opts: import ./nixos/base.nix opts;
2023-10-27 23:40:45 +02:00
mkNixOsGraphical = opts: import ./nixos/graphical.nix (opts // { fox-layout = rachel.keyboardLayouts.fox; });
2023-10-21 12:56:02 +02:00
mkNixOsNetworking = opts: import ./nixos/networking.nix opts;
2023-10-12 22:51:18 +02:00
in {
homeConfigurations."xenia@Joe-Bidens-MacBook-Pro.local" =
2023-10-18 23:56:44 +02:00
let
system = "aarch64-darwin";
pkgs = mkPkgs system;
2023-10-19 00:18:10 +02:00
home = mkHome {
username = "xenia";
home-dir = "/Users/xenia";
2023-10-19 00:21:53 +02:00
prompt-color = 172;
2023-10-19 00:18:10 +02:00
inherit system pkgs;
};
pc = mkPC { inherit system pkgs; };
2023-10-19 00:10:11 +02:00
laptop = mkLaptop { inherit system pkgs; };
mac = mkMac { inherit system pkgs laptop; };
2023-10-18 23:56:44 +02:00
in home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
home
pc
2023-10-19 00:10:11 +02:00
laptop
mac
2023-10-18 23:56:44 +02:00
];
};
2023-10-18 23:56:44 +02:00
2023-10-18 23:57:01 +02:00
homeConfigurations."coral" =
let
system = "x86_64-linux";
pkgs = mkPkgs system;
2023-10-19 00:18:10 +02:00
home = mkHome {
username = "coral";
home-dir = "/home/coral";
2023-10-19 00:24:03 +02:00
prompt-color = 243;
2023-10-19 00:18:10 +02:00
inherit system pkgs;
};
2023-10-18 23:57:01 +02:00
in home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
home
];
};
2023-10-27 23:57:55 +02:00
homeConfigurations."xenia" =
let
system = "x86_64-linux";
pkgs = mkPkgs system;
home = mkHome {
username = "xenia";
home-dir = "/home/xenia";
prompt-color = 205;
inherit system pkgs;
};
pc = mkPC { inherit system pkgs; };
2023-10-27 23:57:55 +02:00
in home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
home
pc
2023-10-27 23:57:55 +02:00
];
};
darwinConfigurations."Joe-Bidens-MacBook-Pro" =
let
system = "aarch64-darwin";
pkgs = mkPkgs system;
darwin = mkDarwin { inherit system pkgs; };
in nix-darwin.lib.darwinSystem {
modules = [ darwin ];
};
2023-10-21 12:56:02 +02:00
nixosConfigurations."catboy-cafe" =
let
system = "x86_64-linux";
pkgs = mkPkgs system;
base = mkNixOsBase {
inherit system pkgs;
hostname = "catboy-cafe";
use-efi = true;
};
graphical = mkNixOsGraphical {
inherit pkgs;
background = "pan-wire-3.png";
};
networking = mkNixOsNetworking {
eth-interface = "enp0s31f6";
static-ip = "192.168.0.199";
};
in
nixpkgs.lib.nixosSystem {
inherit system;
modules = [
./nixos/hardware/catboy-cafe.nix
base
graphical
networking
];
};
2023-10-12 22:51:18 +02:00
};
}