125 lines
3.2 KiB
Nix
125 lines
3.2 KiB
Nix
{
|
|
description = "fwastrings Nix-baserade konfigurationsfiler";
|
|
|
|
inputs = {
|
|
# Nixpkgs
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
|
|
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
fw-pkgs.url = "github:fwastring/fwpkgs/main";
|
|
|
|
# Neovim
|
|
neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
|
|
|
|
# Home manager
|
|
home-manager.url = "github:nix-community/home-manager/release-25.05";
|
|
hyprland.url = "github:hyprwm/Hyprland";
|
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
|
nvim-config = {
|
|
url = "github:fwastring/nvim?exportIgnore=1";
|
|
flake = false;
|
|
};
|
|
k9s-config = {
|
|
url = "github:fwastring/k9s?exportIgnore=1";
|
|
flake = false;
|
|
};
|
|
};
|
|
|
|
outputs =
|
|
{
|
|
self,
|
|
nixpkgs,
|
|
home-manager,
|
|
nixpkgs-unstable,
|
|
fw-pkgs,
|
|
...
|
|
}@inputs:
|
|
let
|
|
inherit (self) outputs;
|
|
system = "x86_64-linux";
|
|
overlay-unstable = final: prev: {
|
|
unstable = import nixpkgs-unstable {
|
|
inherit system;
|
|
config.allowUnfree = true;
|
|
};
|
|
};
|
|
overlay-fw-pkgs = final: prev: {
|
|
fw-pkgs = import fw-pkgs {
|
|
inherit system;
|
|
config.allowUnfree = false;
|
|
};
|
|
};
|
|
in
|
|
{
|
|
# NixOS configuration entrypoint
|
|
# Available through 'nixos-rebuild --flake .#your-hostname'
|
|
nixosConfigurations = {
|
|
laptop = nixpkgs.lib.nixosSystem {
|
|
specialArgs = {
|
|
inherit inputs outputs;
|
|
myhostname = "laptop";
|
|
};
|
|
modules = [
|
|
(
|
|
{ nixpkgs, ... }:
|
|
{
|
|
nixpkgs.overlays = [ overlay-unstable overlay-fw-pkgs ];
|
|
}
|
|
)
|
|
./maskiner/laptop/configuration.nix
|
|
];
|
|
};
|
|
desktop = nixpkgs.lib.nixosSystem {
|
|
specialArgs = {
|
|
inherit inputs outputs;
|
|
myhostname = "desktop";
|
|
};
|
|
modules = [
|
|
(
|
|
{ nixpkgs, ... }:
|
|
{
|
|
nixpkgs.overlays = [ overlay-unstable ];
|
|
}
|
|
)
|
|
./maskiner/desktop/configuration.nix
|
|
];
|
|
};
|
|
jobb = nixpkgs.lib.nixosSystem {
|
|
specialArgs = {
|
|
inherit inputs outputs;
|
|
myhostname = "jobb";
|
|
};
|
|
modules = [
|
|
(
|
|
{ nixpkgs, ... }:
|
|
{
|
|
nixpkgs.overlays = [ overlay-unstable overlay-fw-pkgs ];
|
|
}
|
|
)
|
|
./maskiner/jobb/configuration.nix
|
|
];
|
|
};
|
|
work-desktop = nixpkgs.lib.nixosSystem {
|
|
specialArgs = {
|
|
inherit inputs outputs;
|
|
myhostname = "work-desktop";
|
|
};
|
|
modules = [
|
|
(
|
|
{ nixpkgs, ... }:
|
|
{
|
|
nixpkgs.overlays = [ overlay-unstable ];
|
|
}
|
|
)
|
|
./maskiner/work-desktop/configuration.nix
|
|
];
|
|
};
|
|
macmini = nixpkgs.lib.nixosSystem {
|
|
specialArgs = {
|
|
inherit inputs outputs;
|
|
myhostname = "macmini";
|
|
};
|
|
modules = [ ./maskiner/macmini/configuration.nix ];
|
|
};
|
|
};
|
|
};
|
|
}
|