220 lines
6.6 KiB
Nix
220 lines
6.6 KiB
Nix
{
|
|
description = "Nixos config flake";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
|
|
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager/release-24.11";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
sops-nix = {
|
|
url = "github:Mic92/sops-nix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
plasma-manager = {
|
|
url = "github:pjones/plasma-manager";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
inputs.home-manager.follows = "home-manager";
|
|
};
|
|
firefox-addons = {
|
|
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
hyprland = {
|
|
url = "github:hyprwm/Hyprland";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
hyprland-plugins = {
|
|
url = "github:hyprwm/hyprland-plugins";
|
|
inputs.hyprland.follows = "hyprland";
|
|
};
|
|
nixos-cosmic = {
|
|
url = "github:lilyinstarlight/nixos-cosmic";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs = {
|
|
nixpkgs,
|
|
nixpkgs-unstable,
|
|
nixos-hardware,
|
|
home-manager,
|
|
nixos-cosmic,
|
|
...
|
|
} @ inputs: let
|
|
system = "x86_64-linux";
|
|
overlay-unstable = final: prev: {
|
|
unstable = import nixpkgs-unstable {
|
|
system = prev.system;
|
|
config.allowUnfree = true;
|
|
};
|
|
};
|
|
in {
|
|
nixosConfigurations = {
|
|
comfy-station = nixpkgs.lib.nixosSystem {
|
|
inherit system;
|
|
specialArgs = {
|
|
inherit inputs;
|
|
isHM = false;
|
|
};
|
|
modules = [
|
|
({...}: {nixpkgs.overlays = [overlay-unstable];})
|
|
({...}: {nixpkgs.config.allowUnfree = true;})
|
|
nixos-hardware.nixosModules.msi-b550-a-pro
|
|
inputs.sops-nix.nixosModules.sops
|
|
./modules
|
|
./hosts/comfy-station/configuration.nix
|
|
];
|
|
};
|
|
monolith = nixpkgs.lib.nixosSystem {
|
|
inherit system;
|
|
specialArgs = {
|
|
inherit inputs;
|
|
isHM = false;
|
|
};
|
|
modules = [
|
|
({...}: {nixpkgs.overlays = [overlay-unstable];})
|
|
({...}: {
|
|
nixpkgs.config.allowUnfree = true;
|
|
nixpkgs.config.nvidia.acceptLicense = true;
|
|
})
|
|
{
|
|
nix.settings = {
|
|
substituters = ["https://cosmic.cachix.org/"];
|
|
trusted-public-keys = ["cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE="];
|
|
};
|
|
}
|
|
nixos-hardware.nixosModules.lenovo-thinkpad-t14-amd-gen1
|
|
nixos-hardware.nixosModules.common-gpu-nvidia
|
|
inputs.sops-nix.nixosModules.sops
|
|
nixos-cosmic.nixosModules.default
|
|
./modules
|
|
./hosts/monolith/configuration.nix
|
|
];
|
|
};
|
|
harbor = nixpkgs.lib.nixosSystem {
|
|
inherit system;
|
|
specialArgs = {
|
|
inherit inputs;
|
|
isHM = false;
|
|
};
|
|
modules = [
|
|
({...}: {nixpkgs.overlays = [overlay-unstable];})
|
|
({...}: {nixpkgs.config.allowUnfree = true;})
|
|
inputs.sops-nix.nixosModules.sops
|
|
./modules
|
|
./hosts/harbor/configuration.nix
|
|
];
|
|
};
|
|
vm = nixpkgs.lib.nixosSystem {
|
|
inherit system;
|
|
specialArgs = {
|
|
inherit inputs;
|
|
};
|
|
modules = [
|
|
./hosts/vm/configuration.nix
|
|
];
|
|
};
|
|
};
|
|
homeConfigurations."jonas@comfy-station" = home-manager.lib.homeManagerConfiguration {
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
|
|
# Specify your home configuration modules here, for example,
|
|
# the path to your home.nix.
|
|
modules = [
|
|
({...}: {nixpkgs.overlays = [overlay-unstable];})
|
|
({...}: {nixpkgs.config.allowUnfree = true;})
|
|
inputs.plasma-manager.homeManagerModules.plasma-manager
|
|
inputs.sops-nix.homeManagerModules.sops
|
|
./modules
|
|
(./home + "/jonas@comfy-station.nix")
|
|
];
|
|
|
|
# Optionally use extraSpecialArgs
|
|
# to pass through arguments to home.nix
|
|
extraSpecialArgs = {
|
|
inherit inputs;
|
|
isHM = true;
|
|
};
|
|
};
|
|
homeConfigurations."jonas@harbor" = home-manager.lib.homeManagerConfiguration {
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
|
|
# Specify your home configuration modules here, for example,
|
|
# the path to your home.nix.
|
|
modules = [
|
|
({...}: {nixpkgs.overlays = [overlay-unstable];})
|
|
({...}: {nixpkgs.config.allowUnfree = true;})
|
|
inputs.plasma-manager.homeManagerModules.plasma-manager
|
|
inputs.sops-nix.homeManagerModules.sops
|
|
./modules
|
|
(./home + "/jonas@harbor.nix")
|
|
];
|
|
|
|
# Optionally use extraSpecialArgs
|
|
# to pass through arguments to home.nix
|
|
extraSpecialArgs = {
|
|
inherit inputs;
|
|
isHM = true;
|
|
};
|
|
};
|
|
homeConfigurations."jonas@monolith" = home-manager.lib.homeManagerConfiguration {
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
|
|
# Specify your home configuration modules here, for example,
|
|
# the path to your home.nix.
|
|
modules = [
|
|
({...}: {nixpkgs.overlays = [overlay-unstable];})
|
|
({...}: {nixpkgs.config.allowUnfree = true;})
|
|
inputs.plasma-manager.homeManagerModules.plasma-manager
|
|
inputs.sops-nix.homeManagerModules.sops
|
|
./modules
|
|
(./home + "/jonas@monolith.nix")
|
|
];
|
|
|
|
# Optionally use extraSpecialArgs
|
|
# to pass through arguments to home.nix
|
|
extraSpecialArgs = {
|
|
inherit inputs;
|
|
isHM = true;
|
|
};
|
|
};
|
|
homeConfigurations."jroeger" = home-manager.lib.homeManagerConfiguration {
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
|
|
# Specify your home configuration modules here, for example,
|
|
# the path to your home.nix.
|
|
modules = [
|
|
({...}: {nixpkgs.overlays = [overlay-unstable];})
|
|
({...}: {nixpkgs.config.allowUnfree = true;})
|
|
inputs.plasma-manager.homeManagerModules.plasma-manager
|
|
inputs.sops-nix.homeManagerModules.sops
|
|
./modules
|
|
./home/jroeger.nix
|
|
];
|
|
|
|
# Optionally use extraSpecialArgs
|
|
# to pass through arguments to home.nix
|
|
extraSpecialArgs = {
|
|
inherit inputs;
|
|
isHM = true;
|
|
};
|
|
};
|
|
templates = {
|
|
rust = {
|
|
path = ./templates/rust;
|
|
description = "A simple rust binary template";
|
|
welcomeText = ''
|
|
# Rust template
|
|
This is a simple rust binary template.
|
|
To build the project run `cargo build`.
|
|
To run the project run `cargo run`.
|
|
Before running nix build, make sure to run `cargo generate-lockfile` first.
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
}
|