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";
|
2024-03-05 15:27:47 +00:00
|
|
|
nixos-hardware.url = "github:nixos/nixos-hardware/master";
|
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 = {
|
2024-02-01 22:25:20 +00:00
|
|
|
url = "git+https://git.jolheiser.com/nur.git";
|
2023-09-05 21:23:08 +00:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2023-09-22 00:57:36 +00:00
|
|
|
helix = {
|
2024-02-01 22:25:20 +00:00
|
|
|
url = "git+https://git.jolheiser.com/helix.drv.git";
|
2023-09-22 00:57:36 +00:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2023-09-24 06:24:10 +00:00
|
|
|
website = {
|
2024-02-01 22:25:20 +00:00
|
|
|
url = "git+https://git.jolheiser.com/jolheiser.com.git";
|
2023-09-24 06:24:10 +00:00
|
|
|
inputs = {
|
|
|
|
nixpkgs.follows = "nixpkgs";
|
|
|
|
flake-utils.follows = "flake-utils";
|
2024-03-10 02:33:51 +00:00
|
|
|
templ.follows = "templ";
|
2023-09-24 06:24:10 +00:00
|
|
|
};
|
|
|
|
};
|
2023-10-15 20:07:13 +00:00
|
|
|
resume = {
|
2024-02-01 22:25:20 +00:00
|
|
|
url = "git+https://git.jolheiser.com/resume.git";
|
2023-10-15 20:07:13 +00:00
|
|
|
inputs = {
|
|
|
|
nixpkgs.follows = "nixpkgs";
|
|
|
|
flake-utils.follows = "flake-utils";
|
|
|
|
};
|
|
|
|
};
|
2023-11-14 01:38:36 +00:00
|
|
|
git-age = {
|
2024-02-01 22:25:20 +00:00
|
|
|
url = "git+https://git.jolheiser.com/git-age.git";
|
2023-11-14 01:38:36 +00:00
|
|
|
inputs = {
|
|
|
|
nixpkgs.follows = "nixpkgs";
|
|
|
|
flake-utils.follows = "flake-utils";
|
|
|
|
};
|
|
|
|
};
|
2023-11-28 04:59:26 +00:00
|
|
|
gist = {
|
2024-02-01 22:25:20 +00:00
|
|
|
url = "git+https://git.jolheiser.com/gist.git";
|
2023-11-28 04:59:26 +00:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2023-12-22 01:12:09 +00:00
|
|
|
tmpl = {
|
2024-02-01 22:25:20 +00:00
|
|
|
url = "git+https://git.jolheiser.com/tmpl.git";
|
2023-12-22 01:12:09 +00:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
gomodinit = {
|
2024-02-01 22:25:20 +00:00
|
|
|
url = "git+https://git.jolheiser.com/gomodinit.git";
|
2023-12-22 01:12:09 +00:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2024-01-15 23:26:44 +00:00
|
|
|
ugit = {
|
|
|
|
url = "git+https://git.jolheiser.com/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,
|
2024-03-05 15:27:47 +00:00
|
|
|
nixos-hardware,
|
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;
|
|
|
|
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;
|
2024-02-05 19:44:41 +00:00
|
|
|
# TODO Remove when apps are updated
|
|
|
|
nixpkgs.config.permittedInsecurePackages = [
|
|
|
|
"electron-25.9.0"
|
|
|
|
];
|
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;
|
2024-03-08 23:32:36 +00:00
|
|
|
cachix = {
|
|
|
|
file = ./secrets/shared/cachix.age;
|
|
|
|
owner = username;
|
|
|
|
path = "/home/${username}/.config/cachix/cachix.dhall";
|
|
|
|
};
|
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
|
|
|
|
];
|
|
|
|
};
|
2024-03-18 19:23:44 +00:00
|
|
|
"earlgrey" = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
modules =
|
|
|
|
workModules
|
|
|
|
++ [
|
|
|
|
./machines/earlgrey
|
|
|
|
];
|
|
|
|
};
|
2023-12-26 21:13:51 +00:00
|
|
|
"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
|
|
|
];
|
|
|
|
};
|
2024-03-05 01:30:38 +00:00
|
|
|
"genmaicha" = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = [
|
|
|
|
home-manager.nixosModules.home-manager
|
2024-03-05 15:27:47 +00:00
|
|
|
nixos-hardware.nixosModules.framework-13-7040-amd
|
2024-03-05 01:30:38 +00:00
|
|
|
agenix.nixosModules.default
|
|
|
|
./machines/genmaicha
|
|
|
|
(commonConfig {})
|
|
|
|
];
|
2024-03-05 15:27:47 +00:00
|
|
|
};
|
|
|
|
"sencha" = nixpkgs.lib.nixosSystem {
|
2024-01-30 00:37:39 +00:00
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = [
|
|
|
|
home-manager.nixosModules.home-manager
|
|
|
|
agenix.nixosModules.default
|
|
|
|
./machines/sencha
|
|
|
|
(commonConfig {})
|
|
|
|
];
|
|
|
|
};
|
2023-10-18 04:54:24 +00:00
|
|
|
};
|
|
|
|
colmena = {
|
|
|
|
meta = {
|
|
|
|
nixpkgs = import nixpkgs {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
overlays = overlays;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
dragonwell = {
|
|
|
|
imports = [
|
2024-02-27 02:35:55 +00:00
|
|
|
inputs.agenix.nixosModules.default
|
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
|
|
|
}
|