''infinite recursion encountered.''

This commit is contained in:
Jimbo 2024-10-12 20:44:05 -04:00
parent 4ad26636a7
commit cd92b28dc6
20 changed files with 152 additions and 150 deletions

152
flake.nix
View file

@ -28,105 +28,85 @@
nur,
mailserver,
blender-bin,
minecraft,
hardware,
lanzaboote,
home-manager,
...
} @inputs:
let
channels = {
stable = import nixpkgs {
inherit (flake) system overlays;
config.allowUnfree = true;
};
unstable = import unstable { inherit (flake) system; };
nur = import nur { nurpkgs = import nixpkgs { inherit (flake) system; }; };
};
} @inputs: let
inherit (self) outputs;
forAllSystems = nixpkgs.lib.genAttrs [
"aarch64-linux"
"x86_64-linux"
];
in rec {
packages = forAllSystems (system: import ./packages nixpkgs.legacyPackages.${system});
flake = {
overlays = [
nur.overlay
minecraft.overlay
(import ./overlays/mpv { inherit (self) inputs channels; })
];
packages = import ./packages/default.nix { inherit (nix) pkgs; };
};
nix = rec {
pkgs = channels.stable // flake.packages;
inherit (pkgs) lib;
inherit (flake) channels-config;
};
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;
};
in {
# 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;
# Variables defined so they can be accessed globally
secrets = import ./variables/secrets;
cmd = import ./variables/cmd;
displays = import ./variables/displays;
ips = import ./variables/ips;
look = import ./variables/look;
ws = import ./variables/workspaces;
# NixOS config entrypoint, use 'nixos-rebuild --flake .#your-hostname'
nixosConfigurations = {
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
];
firefly = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs;};
modules = [
./hosts/firefly/system
lanzaboote.nixosModules.lanzaboote
];
};
cyberspark = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs;};
modules = [
./system/hosts/JimServer/configuration.nix
mailserver.nixosModule
];
};
shuttleworth = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs;};
modules = [
./system/hosts/JimPine/configuration.nix
hardware.nixosModules.pine64-pinebook-pro
];
};
};
# Home-manager configuration, use 'home-manager --flake .#your-username@your-hostname'
homeConfigurations = {
"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
];
"jimbo@firefly" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = {inherit inputs outputs;};
modules = [
./home/hosts/JimDesktop/home.nix
nur.nixosModules.nur
];
};
"jimbo@cyberspark" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = {inherit inputs outputs;};
modules = [
./home/hosts/JimServer/home.nix
];
};
"jimbo@shuttleworth" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.aarch64-linux;
extraSpecialArgs = {inherit inputs outputs;};
modules = [
./home/hosts/JimPine/home.nix
nur.nixosModules.nur
];
};
# Derivation for ssh envrionments on other people's servers
"jimbo@JimTerminal" = mkHome [
./home/hosts/JimTerminal/home.nix
];
"jimbo@JimTerminal" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = {inherit inputs outputs;};
modules = [
./home/hosts/JimTerminal/home.nix
];
};
};
};
}

View file

@ -0,0 +1,14 @@
{ ... }:
{
imports = [
../../../modules/home
../../../modules/home/users
../../../modules/home/programs/fastfetch
../../../modules/home/programs/git
../../../modules/home/programs/ncmpcpp
../../../modules/home/programs/neovim
../../../modules/home/programs/ranger
../../../modules/home/programs/tmux
../../../modules/home/utils/zsh
];
}

View file

@ -0,0 +1,18 @@
{ ... }:
{
imports = [
./hardware
../../../modules/system
../../../modules/system/accounts
../../../modules/system/devices/filesystems
../../../modules/system/devices/networking
../../../modules/system/devices/networking/firewall/server
../../../modules/system/devices/networking/wireguard/server
../../../modules/system/programs/git
../../../modules/system/programs/security
../../../modules/system/services/common
../../../modules/system/services/server
];
networking.hostName = "cyberspark";
}

View file

@ -0,0 +1,13 @@
{ ... }:
{
imports = [
../../../overlays
../../../modules/home
../../../modules/home/users
../../../modules/home/files
../../../modules/home/settings
../../../modules/home/programs
../../../modules/home/sway
../../../modules/home/utils
];
}

View file

@ -0,0 +1,24 @@
{ ... }:
{
imports = [
# Apps and programs
../../../overlays
../../../modules/system
../../../modules/system/accounts
../../../modules/system/desktop
../../../modules/system/programs
../../../modules/system/services
# Devices and hardware
./hardware
../../../modules/system/devices
../../../modules/system/devices/boot/lanzaboote
../../../modules/system/devices/video/nvidia
../../../modules/system/devices/networking/firewall/server
];
networking.hostName = "firefly";
# Force Electron to use Wayland
environment.sessionVariables.NIXOS_OZONE_WL = "1";
}

View file

@ -1,12 +0,0 @@
{ ... }:
{
imports = [
../../../home
../../../home/users
../../../home/files
../../../home/settings
../../../home/programs
../../../home/sway
../../../home/utils
];
}

View file

@ -1,17 +0,0 @@
{ ... }:
{
imports = [
../../../system
../../../system/accounts
../../../system/desktop
../../../system/devices
../../../system/devices/networking/firewall/server
../../../system/programs
../../../system/services
];
networking.hostName = "firefly";
# Force Electron to use Wayland
environment.sessionVariables.NIXOS_OZONE_WL = "1";
}

View file

@ -1,14 +0,0 @@
{ ... }:
{
imports = [
../../../home
../../../home/users
../../../home/programs/fastfetch
../../../home/programs/git
../../../home/programs/ncmpcpp
../../../home/programs/neovim
../../../home/programs/ranger
../../../home/programs/tmux
../../../home/utils/zsh
];
}

View file

@ -1,17 +0,0 @@
{ ... }:
{
imports = [
../../../system
../../../system/accounts
../../../system/devices/filesystems
../../../system/devices/networking
../../../system/devices/networking/firewall/server
../../../system/devices/networking/wireguard/server
../../../system/programs/git
../../../system/programs/security
../../../system/services/common
../../../system/services/server
];
networking.hostName = "cyberspark";
}

View file

@ -4,6 +4,5 @@
./qt
./wayland
./sway
./fonts
];
}

View file

@ -6,7 +6,6 @@
./networking
./pipewire
./printing
./security
./udev
./video
];

View file

@ -3,7 +3,5 @@
imports = [
./apparmor
./doas
./gnome-keyring
./polkit
];
}

View file

@ -1,8 +1,10 @@
{ ... }:
{
imports = [
./gnome-keyring
./mpd
./networkfs
./polkit
./school
./sunshine
./virtualization/qemu

8
overlays/default.nix Normal file
View file

@ -0,0 +1,8 @@
{ outputs, inputs, ... }:
{
nixpkgs.overlays = [
inputs.blender-bin.overlays.default
(import ./mpv)
(import ./unstable)
];
}

View file

@ -0,0 +1,7 @@
{ config, inputs, ... }:
(final: prev: {
unstable = import inputs.nixpkgs-unstable {
system = final.system;
config.allowUnfree = true;
};
})