The Blue Update #1
116
flake.nix
116
flake.nix
|
@ -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;
|
|
||||||
};
|
|
||||||
unstable = import unstable { inherit (flake) system; };
|
|
||||||
nur = import nur { nurpkgs = import nixpkgs { inherit (flake) system; }; };
|
|
||||||
};
|
|
||||||
|
|
||||||
flake = {
|
|
||||||
overlays = [
|
|
||||||
nur.overlay
|
|
||||||
minecraft.overlay
|
|
||||||
(import ./overlays/mpv { inherit (self) inputs channels; })
|
|
||||||
];
|
];
|
||||||
packages = import ./packages/default.nix { inherit (nix) pkgs; };
|
in rec {
|
||||||
};
|
packages = forAllSystems (system: import ./packages nixpkgs.legacyPackages.${system});
|
||||||
|
|
||||||
nix = rec {
|
# Variables defined so they can be accessed globally
|
||||||
pkgs = channels.stable // flake.packages;
|
secrets = import ./variables/secrets;
|
||||||
inherit (pkgs) lib;
|
cmd = import ./variables/cmd;
|
||||||
inherit (flake) channels-config;
|
displays = import ./variables/displays;
|
||||||
};
|
ips = import ./variables/ips;
|
||||||
|
look = import ./variables/look;
|
||||||
mkNixos = modules: nixpkgs.lib.nixosSystem {
|
ws = import ./variables/workspaces;
|
||||||
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
|
|
||||||
./modules/system/programs
|
|
||||||
./modules/system/services/ssh
|
|
||||||
./modules/system/services/sunshine
|
|
||||||
./modules/system/services/networkfs
|
|
||||||
./modules/system/services/virtualization
|
|
||||||
lanzaboote.nixosModules.lanzaboote
|
lanzaboote.nixosModules.lanzaboote
|
||||||
];
|
];
|
||||||
JimServer = mkNixos [
|
};
|
||||||
|
cyberspark = nixpkgs.lib.nixosSystem {
|
||||||
|
specialArgs = {inherit inputs outputs;};
|
||||||
|
modules = [
|
||||||
./system/hosts/JimServer/configuration.nix
|
./system/hosts/JimServer/configuration.nix
|
||||||
mailserver.nixosModule
|
mailserver.nixosModule
|
||||||
];
|
];
|
||||||
JimPine = mkNixos [
|
};
|
||||||
|
shuttleworth = nixpkgs.lib.nixosSystem {
|
||||||
|
specialArgs = {inherit inputs outputs;};
|
||||||
|
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
|
|
||||||
./modules/home/utils
|
|
||||||
nur.nixosModules.nur
|
nur.nixosModules.nur
|
||||||
];
|
];
|
||||||
"jimbo@JimServer" = mkHome [
|
};
|
||||||
|
"jimbo@cyberspark" = home-manager.lib.homeManagerConfiguration {
|
||||||
|
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||||
|
extraSpecialArgs = {inherit inputs outputs;};
|
||||||
|
modules = [
|
||||||
./home/hosts/JimServer/home.nix
|
./home/hosts/JimServer/home.nix
|
||||||
];
|
];
|
||||||
"jimbo@JimPine" = mkHome [
|
};
|
||||||
|
"jimbo@shuttleworth" = home-manager.lib.homeManagerConfiguration {
|
||||||
|
pkgs = nixpkgs.legacyPackages.aarch64-linux;
|
||||||
|
extraSpecialArgs = {inherit inputs outputs;};
|
||||||
|
modules = [
|
||||||
./home/hosts/JimPine/home.nix
|
./home/hosts/JimPine/home.nix
|
||||||
nur.nixosModules.nur
|
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 {
|
||||||
|
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||||
|
extraSpecialArgs = {inherit inputs outputs;};
|
||||||
|
modules = [
|
||||||
./home/hosts/JimTerminal/home.nix
|
./home/hosts/JimTerminal/home.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
14
hosts/cyberspark/home/default.nix
Normal file
14
hosts/cyberspark/home/default.nix
Normal 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
|
||||||
|
];
|
||||||
|
}
|
18
hosts/cyberspark/system/default.nix
Normal file
18
hosts/cyberspark/system/default.nix
Normal 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";
|
||||||
|
}
|
13
hosts/firefly/home/default.nix
Normal file
13
hosts/firefly/home/default.nix
Normal 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
|
||||||
|
];
|
||||||
|
}
|
24
hosts/firefly/system/default.nix
Normal file
24
hosts/firefly/system/default.nix
Normal 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";
|
||||||
|
}
|
|
@ -1,12 +0,0 @@
|
||||||
{ ... }:
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
../../../home
|
|
||||||
../../../home/users
|
|
||||||
../../../home/files
|
|
||||||
../../../home/settings
|
|
||||||
../../../home/programs
|
|
||||||
../../../home/sway
|
|
||||||
../../../home/utils
|
|
||||||
];
|
|
||||||
}
|
|
|
@ -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";
|
|
||||||
}
|
|
|
@ -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
|
|
||||||
];
|
|
||||||
}
|
|
|
@ -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";
|
|
||||||
}
|
|
|
@ -4,6 +4,5 @@
|
||||||
./qt
|
./qt
|
||||||
./wayland
|
./wayland
|
||||||
./sway
|
./sway
|
||||||
./fonts
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
./networking
|
./networking
|
||||||
./pipewire
|
./pipewire
|
||||||
./printing
|
./printing
|
||||||
./security
|
|
||||||
./udev
|
./udev
|
||||||
./video
|
./video
|
||||||
];
|
];
|
||||||
|
|
|
@ -3,7 +3,5 @@
|
||||||
imports = [
|
imports = [
|
||||||
./apparmor
|
./apparmor
|
||||||
./doas
|
./doas
|
||||||
./gnome-keyring
|
|
||||||
./polkit
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
8
overlays/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{ outputs, inputs, ... }:
|
||||||
|
{
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
inputs.blender-bin.overlays.default
|
||||||
|
(import ./mpv)
|
||||||
|
(import ./unstable)
|
||||||
|
];
|
||||||
|
}
|
7
overlays/unstable/default.nix
Normal file
7
overlays/unstable/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{ config, inputs, ... }:
|
||||||
|
(final: prev: {
|
||||||
|
unstable = import inputs.nixpkgs-unstable {
|
||||||
|
system = final.system;
|
||||||
|
config.allowUnfree = true;
|
||||||
|
};
|
||||||
|
})
|
Loading…
Reference in a new issue