2024-08-24 22:16:51 -04:00
|
|
|
{
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
|
2024-10-09 03:36:08 -04:00
|
|
|
unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
2024-08-24 22:16:51 -04:00
|
|
|
nur.url = "github:nix-community/NUR";
|
2024-09-23 11:41:28 -04:00
|
|
|
mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-24.05";
|
2024-08-26 19:43:59 -04:00
|
|
|
blender-bin.url = "https://flakehub.com/f/edolstra/blender-bin/1.0.8.tar.gz";
|
2024-09-23 11:41:28 -04:00
|
|
|
minecraft.url = "github:Infinidoge/nix-minecraft";
|
|
|
|
hardware.url = "github:nixos/nixos-hardware/master";
|
2024-08-24 22:16:51 -04:00
|
|
|
|
2024-10-09 03:36:08 -04:00
|
|
|
# Secure boot
|
|
|
|
lanzaboote = {
|
|
|
|
url = "github:nix-community/lanzaboote/v0.4.1";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
|
2024-08-24 22:16:51 -04:00
|
|
|
# Home manager
|
|
|
|
home-manager = {
|
|
|
|
url = "github:nix-community/home-manager/release-24.05";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
outputs = {
|
2024-08-26 19:43:59 -04:00
|
|
|
self,
|
|
|
|
nixpkgs,
|
2024-10-09 03:36:08 -04:00
|
|
|
unstable,
|
2024-08-24 22:16:51 -04:00
|
|
|
nur,
|
2024-09-23 11:41:28 -04:00
|
|
|
mailserver,
|
2024-08-27 05:14:19 -04:00
|
|
|
blender-bin,
|
2024-10-12 17:35:52 -04:00
|
|
|
minecraft,
|
2024-09-23 11:41:28 -04:00
|
|
|
hardware,
|
2024-10-09 03:36:08 -04:00
|
|
|
lanzaboote,
|
2024-08-26 19:43:59 -04:00
|
|
|
home-manager,
|
2024-08-24 22:16:51 -04:00
|
|
|
...
|
2024-10-09 23:52:50 -04:00
|
|
|
} @inputs:
|
|
|
|
let
|
2024-10-09 03:36:08 -04:00
|
|
|
channels = {
|
2024-10-12 17:35:52 -04:00
|
|
|
stable = import nixpkgs {
|
2024-10-09 03:36:08 -04:00
|
|
|
inherit (flake) system overlays;
|
|
|
|
config.allowUnfree = true;
|
|
|
|
};
|
|
|
|
unstable = import unstable { inherit (flake) system; };
|
|
|
|
nur = import nur { nurpkgs = import nixpkgs { inherit (flake) system; }; };
|
|
|
|
};
|
2024-08-24 22:16:51 -04:00
|
|
|
|
2024-10-09 23:52:50 -04:00
|
|
|
flake = {
|
|
|
|
overlays = [
|
|
|
|
nur.overlay
|
|
|
|
minecraft.overlay
|
|
|
|
(import ./overlays/mpv { inherit (self) inputs channels; })
|
|
|
|
];
|
|
|
|
packages = import ./packages/default.nix { inherit (nix) pkgs; };
|
|
|
|
};
|
2024-08-30 01:17:50 -04:00
|
|
|
|
2024-10-09 23:52:50 -04:00
|
|
|
nix = rec {
|
2024-10-12 17:35:52 -04:00
|
|
|
pkgs = channels.stable // flake.packages;
|
2024-10-09 23:52:50 -04:00
|
|
|
inherit (pkgs) lib;
|
|
|
|
inherit (flake) channels-config;
|
|
|
|
};
|
2024-10-12 17:35:52 -04:00
|
|
|
|
|
|
|
mkNixos = modules: nixpkgs.lib.nixosSystem {
|
|
|
|
inherit (nix) pkgs;
|
|
|
|
system = "x86_64-linux";
|
|
|
|
specialArgs = {
|
|
|
|
inherit
|
|
|
|
inputs
|
|
|
|
;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
mkHome = modules: pkgs: home-manager.lib.homeManagerConfiguration {
|
|
|
|
inherit (nix) pkgs;
|
|
|
|
};
|
2024-10-09 23:52:50 -04:00
|
|
|
in {
|
2024-10-12 17:35:52 -04:00
|
|
|
# Variables defined globally
|
|
|
|
secrets = import ./extras/secrets.nix;
|
|
|
|
cmd = import ./extras/cmd.nix;
|
|
|
|
displays = import ./extras/displays.nix;
|
|
|
|
ips = import ./extras/ips.nix;
|
|
|
|
look = import ./extras/look.nix;
|
|
|
|
ws = import ./extras/workspaces.nix;
|
|
|
|
|
2024-10-02 21:35:29 -04:00
|
|
|
# NixOS config entrypoint, use 'nixos-rebuild --flake .#your-hostname'
|
2024-08-24 22:16:51 -04:00
|
|
|
nixosConfigurations = {
|
2024-10-12 17:35:52 -04:00
|
|
|
firefly = mkNixos [
|
|
|
|
./modules/system/hardware/firefly
|
|
|
|
./modules/system
|
|
|
|
./modules/system/desktop
|
|
|
|
./modules/system/devices
|
|
|
|
./modules/system/programs
|
|
|
|
./modules/system/services/ssh
|
|
|
|
./modules/system/services/sunshine
|
|
|
|
./modules/system/services/networkfs
|
|
|
|
./modules/system/services/virtualization
|
|
|
|
lanzaboote.nixosModules.lanzaboote
|
|
|
|
];
|
|
|
|
JimServer = mkNixos [
|
|
|
|
./system/hosts/JimServer/configuration.nix
|
|
|
|
mailserver.nixosModule
|
|
|
|
];
|
|
|
|
JimPine = mkNixos [
|
|
|
|
./system/hosts/JimPine/configuration.nix
|
|
|
|
hardware.nixosModules.pine64-pinebook-pro
|
|
|
|
];
|
2024-08-24 22:16:51 -04:00
|
|
|
};
|
|
|
|
|
2024-10-02 21:35:29 -04:00
|
|
|
# Home-manager configuration, use 'home-manager --flake .#your-username@your-hostname'
|
2024-08-24 22:16:51 -04:00
|
|
|
homeConfigurations = {
|
2024-10-12 17:35:52 -04:00
|
|
|
"jimbo@JimDesktop" = mkHome [
|
|
|
|
./modules/home
|
|
|
|
./modules/home/files
|
|
|
|
./modules/home/programs
|
|
|
|
./modules/home/settings
|
|
|
|
./modules/home/sway
|
|
|
|
./modules/home/utils
|
|
|
|
nur.nixosModules.nur
|
|
|
|
];
|
|
|
|
"jimbo@JimServer" = mkHome [
|
|
|
|
./home/hosts/JimServer/home.nix
|
|
|
|
];
|
|
|
|
"jimbo@JimPine" = mkHome [
|
|
|
|
./home/hosts/JimPine/home.nix
|
|
|
|
nur.nixosModules.nur
|
|
|
|
];
|
2024-08-27 15:17:32 -04:00
|
|
|
# Derivation for ssh envrionments on other people's servers
|
2024-10-12 17:35:52 -04:00
|
|
|
"jimbo@JimTerminal" = mkHome [
|
|
|
|
./home/hosts/JimTerminal/home.nix
|
|
|
|
];
|
2024-08-24 22:16:51 -04:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|