The Blue Update #1

Merged
Jimbo merged 101 commits from Refactor into main 2024-10-25 21:26:22 -04:00
20 changed files with 152 additions and 150 deletions
Showing only changes of commit cd92b28dc6 - Show all commits

152
flake.nix
View file

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

View file

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

View file

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

View file

@ -1,8 +1,10 @@
{ ... }: { ... }:
{ {
imports = [ imports = [
./gnome-keyring
./mpd ./mpd
./networkfs ./networkfs
./polkit
./school ./school
./sunshine ./sunshine
./virtualization/qemu ./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;
};
})