2021-12-20 13:37:26 -05:00
|
|
|
{
|
|
|
|
description = "Nathan's system configurations";
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-21.11";
|
|
|
|
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
|
|
fenix = {
|
|
|
|
url = "github:nix-community/fenix";
|
|
|
|
};
|
|
|
|
emacs = {
|
|
|
|
url = "github:nix-community/emacs-overlay";
|
2022-04-21 15:18:47 -04:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
2022-01-26 16:53:39 -05:00
|
|
|
};
|
|
|
|
mozilla = {
|
|
|
|
url = "github:mozilla/nixpkgs-mozilla";
|
|
|
|
flake = false;
|
2021-12-20 13:37:26 -05:00
|
|
|
};
|
2022-02-03 06:29:22 -05:00
|
|
|
sops-nix.url = "github:Mic92/sops-nix";
|
2022-02-03 14:00:50 -05:00
|
|
|
home-manager.url = "github:nix-community/home-manager";
|
2022-03-31 01:21:37 -04:00
|
|
|
darwin = {
|
|
|
|
url = "github:lnl7/nix-darwin/master";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2022-04-19 19:39:39 -04:00
|
|
|
polymc = {
|
|
|
|
url = "github:PolyMC/PolyMC";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
|
|
|
};
|
2022-04-21 15:18:47 -04:00
|
|
|
nix-doom-emacs = {
|
|
|
|
url = "github:nix-community/nix-doom-emacs";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
inputs.emacs-overlay.follows = "emacs";
|
|
|
|
};
|
2022-05-16 19:54:35 -04:00
|
|
|
nix-on-droid = {
|
|
|
|
url = "github:t184256/nix-on-droid";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2021-12-20 13:37:26 -05:00
|
|
|
};
|
|
|
|
|
2022-05-16 19:54:35 -04:00
|
|
|
outputs = { self, nixpkgs, nixpkgs-unstable, fenix, emacs, mozilla, sops-nix, home-manager, darwin, polymc, nix-doom-emacs, nix-on-droid }:
|
2021-12-23 00:45:21 -05:00
|
|
|
let
|
2022-03-31 01:21:37 -04:00
|
|
|
baseModules = [
|
2021-12-23 00:45:21 -05:00
|
|
|
./applications/utils-core.nix
|
2022-03-31 01:21:37 -04:00
|
|
|
## Setup binary caches and other common nix config
|
2022-01-26 17:29:11 -05:00
|
|
|
({ pkgs, ... }: {
|
2022-03-31 01:21:37 -04:00
|
|
|
# Allow unfree packages
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
2022-01-26 17:29:11 -05:00
|
|
|
# First install cachix, so we can discover new ones
|
|
|
|
environment.systemPackages = [ pkgs.cachix ];
|
|
|
|
# Then configure up the nix community cache
|
|
|
|
nix = {
|
|
|
|
binaryCaches = [
|
|
|
|
"https://nix-community.cachix.org"
|
|
|
|
];
|
|
|
|
binaryCachePublicKeys = [
|
|
|
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
|
|
|
];
|
2022-03-31 01:21:37 -04:00
|
|
|
# Turn on flakes support (from within a flake, lamo)
|
|
|
|
package = pkgs.nixFlakes;
|
|
|
|
extraOptions = ''
|
|
|
|
experimental-features = nix-command flakes
|
|
|
|
'';
|
2022-01-26 17:29:11 -05:00
|
|
|
};
|
|
|
|
})
|
2022-03-31 01:21:37 -04:00
|
|
|
];
|
|
|
|
coreModules = baseModules ++ [
|
|
|
|
./modules/common.nix
|
|
|
|
./modules/ssh.nix
|
|
|
|
sops-nix.nixosModules.sops
|
2022-02-03 06:29:22 -05:00
|
|
|
## Setup sops
|
|
|
|
({ pkgs, config, ... }: {
|
2022-02-03 14:00:50 -05:00
|
|
|
# Add default secrets
|
2022-02-03 06:29:22 -05:00
|
|
|
sops.defaultSopsFile = ./secrets/nathan.yaml;
|
2022-02-03 14:00:50 -05:00
|
|
|
# Use system ssh key as an age key
|
2022-02-03 06:29:22 -05:00
|
|
|
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
2022-02-03 14:00:50 -05:00
|
|
|
# Load up lastfm scrobbling secret
|
2022-02-03 07:02:26 -05:00
|
|
|
sops.secrets.lastfm-conf = {
|
|
|
|
owner = "nathan";
|
|
|
|
format = "binary";
|
|
|
|
sopsFile = ./secrets/lastfm.conf;
|
|
|
|
};
|
2022-02-03 06:29:22 -05:00
|
|
|
})
|
2022-05-16 19:54:35 -04:00
|
|
|
];
|
|
|
|
baseHomeModules = [
|
|
|
|
home-manager.nixosModules.home-manager
|
|
|
|
{
|
|
|
|
home-manager = {
|
|
|
|
useGlobalPkgs = true;
|
|
|
|
useUserPackages = true;
|
|
|
|
users.nathan = import ./home-manager/common.nix;
|
|
|
|
};
|
|
|
|
}
|
2022-02-12 23:24:30 -05:00
|
|
|
./home.nix
|
2021-12-23 00:45:21 -05:00
|
|
|
];
|
2022-05-16 19:54:35 -04:00
|
|
|
desktopModules = baseHomeModules ++ coreModules ++ [
|
2021-12-23 00:45:21 -05:00
|
|
|
./modules/audio.nix
|
|
|
|
./modules/sway.nix
|
|
|
|
./modules/fonts.nix
|
|
|
|
./modules/gpg.nix
|
|
|
|
./modules/logitech.nix
|
|
|
|
./modules/qemu.nix
|
|
|
|
./modules/docker.nix
|
2022-02-22 04:54:51 -05:00
|
|
|
./modules/printing.nix
|
2022-04-24 17:27:19 -04:00
|
|
|
./modules/zt.nix
|
2021-12-23 00:45:21 -05:00
|
|
|
./applications/communications.nix
|
|
|
|
./applications/devel-core.nix
|
2022-03-31 01:21:37 -04:00
|
|
|
./applications/devel-core-linux.nix
|
2021-12-23 00:45:21 -05:00
|
|
|
./applications/devel-rust.nix
|
2022-04-22 23:46:22 -04:00
|
|
|
./applications/devel-raku.nix
|
2022-05-15 21:52:46 -04:00
|
|
|
./applications/devel-kotlin.nix
|
2021-12-23 00:45:21 -05:00
|
|
|
./applications/emacs.nix
|
|
|
|
./applications/image-editing.nix
|
|
|
|
./applications/media.nix
|
|
|
|
./applications/syncthing.nix
|
|
|
|
./desktop.nix
|
|
|
|
];
|
2022-05-16 19:54:35 -04:00
|
|
|
serverModules = baseHomeModules ++ coreModules ++ [
|
2022-05-14 00:09:50 -04:00
|
|
|
./home-linux.nix
|
2022-05-13 20:28:07 -04:00
|
|
|
./modules/zt.nix
|
|
|
|
./modules/autoupdate.nix
|
|
|
|
./applications/devel-core.nix
|
|
|
|
./applications/devel-core-linux.nix
|
|
|
|
];
|
2022-01-26 16:53:39 -05:00
|
|
|
mozillaOverlay = import "${mozilla}";
|
2021-12-23 00:45:21 -05:00
|
|
|
in
|
2021-12-20 13:37:26 -05:00
|
|
|
{
|
2022-03-31 01:21:37 -04:00
|
|
|
nixosConfigurations = {
|
|
|
|
levitation = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
specialArgs = {
|
|
|
|
unstable = import nixpkgs-unstable {
|
|
|
|
config = { allowUnfree = true; };
|
2022-04-19 19:39:39 -04:00
|
|
|
overlays = [ emacs.overlay mozillaOverlay polymc.overlay ];
|
2022-03-31 01:21:37 -04:00
|
|
|
system = "x86_64-linux";
|
|
|
|
};
|
|
|
|
fenix = fenix.packages.x86_64-linux;
|
2022-04-21 15:18:47 -04:00
|
|
|
doomEmacs = nix-doom-emacs.hmModule;
|
2021-12-20 13:37:26 -05:00
|
|
|
};
|
2022-03-31 01:21:37 -04:00
|
|
|
modules = [
|
|
|
|
./hardware/levitation.nix
|
2022-04-19 01:12:27 -04:00
|
|
|
./machines/levitation.nix
|
2022-03-31 01:21:37 -04:00
|
|
|
./modules/games.nix
|
|
|
|
./home-linux.nix
|
|
|
|
] ++ desktopModules;
|
2021-12-20 13:37:26 -05:00
|
|
|
};
|
2021-12-23 00:47:40 -05:00
|
|
|
|
2022-05-13 20:28:07 -04:00
|
|
|
oracles = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
specialArgs = {
|
|
|
|
unstable = import nixpkgs-unstable {
|
|
|
|
config = { allowUnfree = true; };
|
|
|
|
overlays = [ ];
|
|
|
|
system = "x86_64-linux";
|
|
|
|
};
|
|
|
|
fenix = fenix.packages.x86_64-linux;
|
|
|
|
};
|
|
|
|
modules = [
|
|
|
|
./hardware/oracles.nix
|
|
|
|
./machines/oracles.nix
|
|
|
|
./applications/devel-rust.nix
|
|
|
|
./modules/docker.nix
|
|
|
|
./system-specific/oracles/matrix.nix
|
2022-05-13 22:11:39 -04:00
|
|
|
# ./system-specific/oracles/gitlab-runner.nix
|
2022-05-13 20:28:07 -04:00
|
|
|
./system-specific/oracles/gitea.nix
|
|
|
|
] ++ serverModules;
|
|
|
|
};
|
|
|
|
|
2022-05-13 22:11:39 -04:00
|
|
|
perception = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
specialArgs = {
|
|
|
|
unstable = import nixpkgs-unstable {
|
|
|
|
config = { allowUnfree = true; };
|
|
|
|
overlays = [ ];
|
|
|
|
system = "x86_64-linux";
|
|
|
|
};
|
|
|
|
fenix = fenix.packages.x86_64-linux;
|
|
|
|
};
|
|
|
|
modules = [
|
|
|
|
./hardware/perception.nix
|
|
|
|
./machines/perception.nix
|
|
|
|
./applications/devel-rust.nix
|
|
|
|
./modules/docker.nix
|
|
|
|
./system-specific/perception/plex.nix
|
|
|
|
] ++ serverModules;
|
|
|
|
};
|
|
|
|
|
2022-05-13 22:36:53 -04:00
|
|
|
shadowchild = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
specialArgs = {
|
|
|
|
unstable = import nixpkgs-unstable {
|
|
|
|
config = { allowUnfree = true; };
|
|
|
|
overlays = [ ];
|
|
|
|
system = "x86_64-linux";
|
|
|
|
};
|
|
|
|
fenix = fenix.packages.x86_64-linux;
|
|
|
|
};
|
|
|
|
modules = [
|
|
|
|
./hardware/shadowchild.nix
|
|
|
|
./machines/shadowchild.nix
|
|
|
|
./modules/docker.nix
|
|
|
|
] ++ serverModules;
|
|
|
|
};
|
|
|
|
|
2022-05-14 01:09:02 -04:00
|
|
|
matrix = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
specialArgs = {
|
|
|
|
unstable = import nixpkgs-unstable {
|
|
|
|
config = { allowUnfree = true; };
|
|
|
|
overlays = [ ];
|
|
|
|
system = "x86_64-linux";
|
|
|
|
};
|
|
|
|
fenix = fenix.packages.x86_64-linux;
|
|
|
|
};
|
|
|
|
modules = [
|
|
|
|
./hardware/matrix.nix
|
|
|
|
./machines/matrix.nix
|
|
|
|
./modules/docker.nix
|
|
|
|
./system-specific/matrix/matrix.nix
|
|
|
|
./system-specific/matrix/gitea.nix
|
|
|
|
] ++ serverModules;
|
|
|
|
};
|
|
|
|
|
2022-03-31 01:21:37 -04:00
|
|
|
x86vm = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
specialArgs = {
|
|
|
|
unstable = import nixpkgs-unstable {
|
|
|
|
config = { allowUnfree = true; };
|
|
|
|
overlays = [ emacs.overlay ];
|
|
|
|
system = "x86_64-linux";
|
|
|
|
};
|
|
|
|
fenix = fenix.packages.x86_64-linux;
|
|
|
|
};
|
|
|
|
modules = [ ./home-linux.nix ] ++ desktopModules;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
darwinConfigurations = {
|
|
|
|
"Nathans-MacBook-Pro" = darwin.lib.darwinSystem {
|
|
|
|
system = "x86_64-darwin";
|
|
|
|
specialArgs = {
|
|
|
|
unstable = import nixpkgs-unstable {
|
|
|
|
config = { allowUnfree = true; };
|
|
|
|
overlays = [ emacs.overlay ];
|
|
|
|
system = "x86_64-darwin";
|
|
|
|
};
|
|
|
|
fenix = fenix.packages.x86_64-darwin;
|
2022-04-22 14:59:06 -04:00
|
|
|
doomEmacs = nix-doom-emacs.hmModule;
|
2021-12-23 00:47:40 -05:00
|
|
|
};
|
2022-03-31 01:21:37 -04:00
|
|
|
modules = baseModules ++ [
|
|
|
|
./darwin-modules/base.nix
|
|
|
|
home-manager.darwinModules.home-manager
|
2022-05-02 17:02:36 -04:00
|
|
|
./modules/fonts.nix
|
2022-03-31 01:21:37 -04:00
|
|
|
./home.nix
|
|
|
|
./darwin-modules/gpg.nix
|
|
|
|
./applications/devel-core.nix
|
|
|
|
./applications/devel-rust.nix
|
2022-04-22 14:59:06 -04:00
|
|
|
./applications/emacs.nix
|
2022-03-31 01:21:37 -04:00
|
|
|
];
|
2021-12-23 00:47:40 -05:00
|
|
|
};
|
|
|
|
};
|
2022-05-16 19:54:35 -04:00
|
|
|
homeConfigurations.linux =
|
|
|
|
let
|
|
|
|
system = "x86_64-linux";
|
|
|
|
in
|
|
|
|
home-manager.lib.homeManagerConfiguration {
|
|
|
|
configuration = import ./home-manager/linux.nix;
|
|
|
|
inherit system;
|
|
|
|
username = "nathan";
|
|
|
|
homeDirectory = "/home/nathan";
|
|
|
|
stateVersion = "21.11";
|
|
|
|
};
|
2022-05-16 20:14:28 -04:00
|
|
|
|
|
|
|
nixOnDroidConfigurations = {
|
|
|
|
# Galaxy Tab S7+
|
|
|
|
tablet = nix-on-droid.lib.nixOnDroidConfiguration {
|
|
|
|
system = "aarch64-linux";
|
2022-05-16 20:24:16 -04:00
|
|
|
config = ./droid.nix;
|
2022-05-16 20:14:28 -04:00
|
|
|
extraSpecialArgs = {
|
|
|
|
unstable = import nixpkgs-unstable {
|
|
|
|
config = { allowUnfree = true; };
|
|
|
|
overlays = [ emacs.overlay ];
|
|
|
|
system = "aarch64-linux";
|
|
|
|
};
|
2022-05-16 20:32:02 -04:00
|
|
|
fenix = fenix.packages.aarch64-linux;
|
2022-05-16 20:14:28 -04:00
|
|
|
doomEmacs = nix-doom-emacs.hmModule;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2021-12-20 13:37:26 -05:00
|
|
|
};
|
|
|
|
}
|