NIX_System_Configurations/flake.nix

77 lines
2.1 KiB
Nix
Raw Normal View History

2023-10-21 08:52:00 +00:00
{
description = "A very basic flake";
inputs = {
# import nixos packages
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
2023-11-26 21:32:14 +00:00
customnixpkgs.url = "github:lukas-heiligenbrunner/nixpkgs/resources-init";
2023-10-21 08:52:00 +00:00
# import homemanager
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
2023-11-08 22:18:10 +00:00
2023-11-16 14:18:26 +00:00
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
2023-10-21 08:52:00 +00:00
};
2023-11-26 21:32:14 +00:00
outputs = { self, nixpkgs, home-manager, nixos-hardware, customnixpkgs }:
2023-10-21 08:52:00 +00:00
let
system="x86_64-linux";
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
2023-11-26 21:32:14 +00:00
custompkgs = import customnixpkgs {
inherit system;
config.allowUnfree = true;
};
2023-10-21 08:52:00 +00:00
lib = nixpkgs.lib;
in {
nixosConfigurations = {
2023-11-08 22:18:10 +00:00
laptop = lib.nixosSystem {
2023-10-21 08:52:00 +00:00
inherit system;
2023-11-26 21:32:14 +00:00
specialArgs = { inherit custompkgs; };
2023-10-21 08:52:00 +00:00
modules = [
2023-11-08 22:18:10 +00:00
nixos-hardware.nixosModules.framework-13-7040-amd
./common/configuration.nix
2023-11-08 22:35:23 +00:00
./laptop/configuration.nix
2023-10-21 08:52:00 +00:00
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.lukas = {
2023-11-08 22:18:10 +00:00
imports = [ ./common/home.nix ];
2023-10-21 08:52:00 +00:00
};
home-manager.users.root = {
2023-11-08 22:18:10 +00:00
imports = [ ./common/home-root.nix ];
};
2023-10-21 08:52:00 +00:00
}
];
};
2023-12-21 20:48:41 +00:00
exampleIso = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit custompkgs; };
modules = [
"${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares.nix"
./common/configuration.nix
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.lukas = {
imports = [ ./common/home.nix ];
};
home-manager.users.root = {
imports = [ ./common/home-root.nix ];
};
}
];
};
2023-10-21 08:52:00 +00:00
};
};
}