2023-06-28 20:48:01 +00:00
|
|
|
{
|
|
|
|
description = "jolheiser's nixos config";
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
2024-01-04 15:25:28 +00:00
|
|
|
nixpkgs-py39.url = "github:nixos/nixpkgs/f294325aed382b66c7a188482101b0f336d1d7db";
|
2023-09-05 21:23:08 +00:00
|
|
|
|
2023-09-05 19:50:57 +00:00
|
|
|
home-manager = {
|
|
|
|
url = "github:nix-community/home-manager";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
agenix = {
|
|
|
|
url = "github:ryantm/agenix";
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.follows = "nixpkgs";
|
|
|
|
darwin.follows = "";
|
2023-09-05 21:23:08 +00:00
|
|
|
home-manager.follows = "";
|
2023-09-05 19:50:57 +00:00
|
|
|
};
|
2023-07-14 16:55:09 +00:00
|
|
|
};
|
2023-07-10 22:03:30 +00:00
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
2023-06-28 20:48:01 +00:00
|
|
|
|
2023-09-05 19:50:57 +00:00
|
|
|
nur.url = "github:nix-community/NUR";
|
2023-09-05 21:23:08 +00:00
|
|
|
jolheiser-nur = {
|
|
|
|
url = "git+https://git.jojodev.com/jolheiser/nur";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2023-09-22 00:57:36 +00:00
|
|
|
helix = {
|
|
|
|
url = "git+https://git.jojodev.com/jolheiser/helix.drv";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2023-09-24 06:24:10 +00:00
|
|
|
website = {
|
2024-01-20 03:23:59 +00:00
|
|
|
url = "git+https://git.jolheiser.com/jolheiserdotcom.git";
|
2023-09-24 06:24:10 +00:00
|
|
|
inputs = {
|
|
|
|
nixpkgs.follows = "nixpkgs";
|
|
|
|
flake-utils.follows = "flake-utils";
|
2023-09-29 15:20:55 +00:00
|
|
|
nur.follows = "jolheiser-nur";
|
2023-09-24 06:24:10 +00:00
|
|
|
};
|
|
|
|
};
|
2023-10-15 20:07:13 +00:00
|
|
|
resume = {
|
|
|
|
url = "git+https://git.jojodev.com/jolheiser/resume";
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.follows = "nixpkgs";
|
|
|
|
flake-utils.follows = "flake-utils";
|
|
|
|
};
|
|
|
|
};
|
2023-11-14 01:38:36 +00:00
|
|
|
git-age = {
|
|
|
|
url = "git+https://git.jojodev.com/jolheiser/git-age";
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.follows = "nixpkgs";
|
|
|
|
flake-utils.follows = "flake-utils";
|
|
|
|
};
|
|
|
|
};
|
2023-11-28 04:59:26 +00:00
|
|
|
gist = {
|
|
|
|
url = "git+https://git.jojodev.com/jolheiser/gist";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2023-12-22 01:12:09 +00:00
|
|
|
tmpl = {
|
|
|
|
url = "git+https://git.jojodev.com/jolheiser/tmpl";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
nixpl = {
|
|
|
|
url = "git+https://git.jojodev.com/jolheiser/nixpl";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
gomodinit = {
|
|
|
|
url = "git+https://git.jojodev.com/jolheiser/gomodinit";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2024-01-15 23:26:44 +00:00
|
|
|
ugit = {
|
|
|
|
url = "git+https://git.jolheiser.com/ugit.git";
|
|
|
|
#url = "git+https://git.jojodev.com/jolheiser/ugit.git";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2023-09-05 19:50:57 +00:00
|
|
|
# Other flakes
|
2023-09-05 21:23:08 +00:00
|
|
|
golink = {
|
|
|
|
url = "github:tailscale/golink";
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.follows = "nixpkgs";
|
|
|
|
flake-utils.follows = "flake-utils";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
tclip = {
|
|
|
|
url = "github:tailscale-dev/tclip";
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.follows = "nixpkgs";
|
|
|
|
utils.follows = "flake-utils";
|
|
|
|
};
|
|
|
|
};
|
2023-12-11 16:40:14 +00:00
|
|
|
templ = {
|
|
|
|
url = "github:a-h/templ";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2023-12-26 21:13:51 +00:00
|
|
|
# WSL
|
|
|
|
wsl = {
|
|
|
|
url = "github:nix-community/NixOS-WSL";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
inputs.flake-utils.follows = "flake-utils";
|
|
|
|
};
|
2023-06-28 20:48:01 +00:00
|
|
|
};
|
|
|
|
|
2023-07-06 19:32:19 +00:00
|
|
|
outputs = {
|
|
|
|
nixpkgs,
|
|
|
|
home-manager,
|
2023-07-14 16:55:09 +00:00
|
|
|
agenix,
|
2024-01-04 15:25:28 +00:00
|
|
|
nixpkgs-py39,
|
2023-12-26 21:13:51 +00:00
|
|
|
wsl,
|
2023-07-06 19:32:19 +00:00
|
|
|
...
|
|
|
|
} @ inputs: let
|
2023-09-05 19:50:57 +00:00
|
|
|
overlays = [
|
2023-10-19 20:48:44 +00:00
|
|
|
(_: prev: {
|
2023-09-05 19:50:57 +00:00
|
|
|
nur = import inputs.nur {
|
|
|
|
nurpkgs = prev;
|
|
|
|
pkgs = prev;
|
2023-06-28 20:48:01 +00:00
|
|
|
};
|
2023-09-24 06:28:57 +00:00
|
|
|
jolheiser = {
|
|
|
|
nur = inputs.jolheiser-nur.packages.${prev.system};
|
|
|
|
helix = inputs.helix.packages.${prev.system}.default;
|
|
|
|
website = inputs.website.packages.${prev.system}.default;
|
2023-10-15 20:07:13 +00:00
|
|
|
resume = inputs.resume.packages.${prev.system}.default;
|
2023-11-14 01:38:36 +00:00
|
|
|
git-age = inputs.git-age.packages.${prev.system}.default;
|
2023-11-28 04:59:26 +00:00
|
|
|
gist = inputs.gist.packages.${prev.system}.default;
|
2023-12-22 01:12:09 +00:00
|
|
|
tmpl = inputs.tmpl.packages.${prev.system}.default;
|
|
|
|
nixpl = inputs.nixpl.packages.${prev.system}.default;
|
|
|
|
gomodinit = inputs.gomodinit.packages.${prev.system}.default;
|
2023-09-24 06:28:57 +00:00
|
|
|
};
|
2023-09-05 21:23:08 +00:00
|
|
|
tclip = inputs.tclip.packages.${prev.system}.tclip;
|
2023-12-11 16:40:14 +00:00
|
|
|
templ = inputs.templ.packages.${prev.system}.templ;
|
2023-09-05 19:50:57 +00:00
|
|
|
})
|
2023-12-22 03:28:45 +00:00
|
|
|
inputs.golink.overlay
|
2023-09-05 19:50:57 +00:00
|
|
|
];
|
2023-11-13 20:45:38 +00:00
|
|
|
userSecret = path: {
|
|
|
|
file = path;
|
|
|
|
owner = username;
|
|
|
|
};
|
|
|
|
commonConfig = {gui ? true}: {config, ...}: {
|
2023-09-01 04:09:18 +00:00
|
|
|
config = {
|
2023-09-05 19:50:57 +00:00
|
|
|
nixpkgs.overlays = overlays;
|
2023-09-01 04:09:18 +00:00
|
|
|
home-manager = {
|
|
|
|
useGlobalPkgs = true;
|
|
|
|
useUserPackages = true;
|
|
|
|
users.${username}.imports =
|
|
|
|
if gui
|
|
|
|
then [./apps/gui]
|
|
|
|
else [./apps/nogui];
|
|
|
|
extraSpecialArgs = {
|
|
|
|
flakePath = "/home/${username}/.config/nixpkgs";
|
2023-07-06 19:32:19 +00:00
|
|
|
};
|
2023-09-01 04:09:18 +00:00
|
|
|
};
|
|
|
|
age.secrets = {
|
|
|
|
ssh-config = userSecret ./secrets/shared/ssh-config.age;
|
|
|
|
ssh-config-work = userSecret ./secrets/shared/ssh-config-work.age;
|
2023-12-19 17:14:54 +00:00
|
|
|
spotify = {
|
|
|
|
file = ./secrets/shared/spotify.age;
|
|
|
|
owner = username;
|
|
|
|
path = "/home/${username}/.cache/spotify-player/credentials.json";
|
|
|
|
};
|
2023-09-01 04:09:18 +00:00
|
|
|
irc-pw = userSecret ./secrets/shared/irc-pw.age;
|
2023-11-28 04:59:26 +00:00
|
|
|
gist-pw = userSecret ./secrets/shared/gist-pw.age;
|
2023-12-06 03:26:23 +00:00
|
|
|
git-send-email = userSecret ./secrets/shared/git-send-email.age;
|
2023-09-01 04:09:18 +00:00
|
|
|
};
|
|
|
|
};
|
2023-07-14 16:55:09 +00:00
|
|
|
};
|
2023-12-26 21:13:51 +00:00
|
|
|
workModules = [
|
|
|
|
home-manager.nixosModules.home-manager
|
|
|
|
agenix.nixosModules.default
|
|
|
|
(commonConfig {})
|
|
|
|
({pkgs, ...}: {
|
|
|
|
config = {
|
|
|
|
nixpkgs.overlays = [
|
|
|
|
(_: _: {
|
2024-01-04 15:25:28 +00:00
|
|
|
py39 = import nixpkgs-py39 {inherit (pkgs) system;};
|
2023-12-26 21:13:51 +00:00
|
|
|
})
|
|
|
|
];
|
|
|
|
home-manager.users.${username}.programs = {
|
|
|
|
git.package = pkgs.gitSVN;
|
|
|
|
firefox.profiles.default.bookmarks = [(import ./apps/gui/firefox/work.nix)];
|
|
|
|
};
|
|
|
|
age.secrets = {
|
|
|
|
netrc = {
|
|
|
|
file = ./secrets/work/netrc.age;
|
|
|
|
owner = username;
|
|
|
|
path = "/home/${username}/.netrc";
|
|
|
|
};
|
|
|
|
pipconf = {
|
|
|
|
file = ./secrets/work/pip.conf.age;
|
|
|
|
owner = username;
|
|
|
|
path = "/home/${username}/.config/pip/pip.conf";
|
|
|
|
};
|
|
|
|
pypirc = {
|
|
|
|
file = ./secrets/work/pypirc.age;
|
|
|
|
owner = username;
|
|
|
|
path = "/home/${username}/.pypirc";
|
|
|
|
};
|
|
|
|
cifs = userSecret ./secrets/work/cifs.age;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
})
|
|
|
|
];
|
2023-07-14 16:55:09 +00:00
|
|
|
username = "jolheiser";
|
2023-07-10 22:03:30 +00:00
|
|
|
in
|
|
|
|
{
|
|
|
|
nixosConfigurations = {
|
|
|
|
"chai" = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
2023-12-26 21:13:51 +00:00
|
|
|
modules =
|
|
|
|
workModules
|
|
|
|
++ [
|
|
|
|
./machines/chai
|
|
|
|
];
|
|
|
|
};
|
|
|
|
"masala" = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
modules =
|
|
|
|
workModules
|
|
|
|
++ [
|
|
|
|
wsl.nixosModules.wsl
|
|
|
|
./machines/masala
|
|
|
|
];
|
2023-07-10 22:03:30 +00:00
|
|
|
};
|
|
|
|
"matcha" = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = [
|
|
|
|
home-manager.nixosModules.home-manager
|
2023-07-14 16:55:09 +00:00
|
|
|
agenix.nixosModules.default
|
2023-07-10 22:03:30 +00:00
|
|
|
./machines/matcha
|
2023-09-01 04:09:18 +00:00
|
|
|
(commonConfig {})
|
2023-07-10 22:03:30 +00:00
|
|
|
];
|
|
|
|
};
|
2023-10-18 04:54:24 +00:00
|
|
|
};
|
|
|
|
colmena = {
|
|
|
|
meta = {
|
|
|
|
nixpkgs = import nixpkgs {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
overlays = overlays;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
dragonwell = {
|
|
|
|
imports = [
|
2023-12-22 03:28:45 +00:00
|
|
|
inputs.golink.nixosModules.default
|
2024-01-15 23:26:44 +00:00
|
|
|
inputs.ugit.nixosModules.default
|
2023-09-01 03:34:54 +00:00
|
|
|
./machines/dragonwell
|
|
|
|
];
|
|
|
|
};
|
2023-07-06 19:32:19 +00:00
|
|
|
};
|
2023-11-02 19:40:29 +00:00
|
|
|
nixConfig = {
|
|
|
|
extra-substitutors = ["https://jolheiser.cachix.org"];
|
|
|
|
extra-trusted-public-keys = ["jolheiser.cachix.org-1:fiKkfTuHFqDK5ZOVxcqb4InUkKsrTvtMLISid7XvuVg="];
|
|
|
|
};
|
2023-07-10 22:03:30 +00:00
|
|
|
}
|
|
|
|
// inputs.flake-utils.lib.eachDefaultSystem (system: let
|
|
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
|
|
in {
|
|
|
|
devShells.default = pkgs.mkShell {
|
2023-07-14 16:55:09 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
agenix.packages.${system}.agenix
|
2023-10-18 04:54:24 +00:00
|
|
|
pkgs.colmena
|
2023-07-06 19:32:19 +00:00
|
|
|
];
|
|
|
|
};
|
2023-07-10 22:03:30 +00:00
|
|
|
});
|
2023-06-28 20:48:01 +00:00
|
|
|
}
|