2024-06-12 09:54:11 +07:00
|
|
|
{
|
|
|
|
description = "Tigor's Nixos Configuration";
|
|
|
|
|
|
|
|
nixConfig = {
|
|
|
|
extra-substituters = [
|
|
|
|
"https://nix-community.cachix.org"
|
|
|
|
"https://hyprland.cachix.org"
|
|
|
|
"https://nixpkgs-wayland.cachix.org"
|
|
|
|
];
|
|
|
|
extra-trusted-public-keys = [
|
|
|
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
|
|
|
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
|
|
|
"nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA="
|
|
|
|
];
|
|
|
|
};
|
|
|
|
inputs = {
|
2024-11-18 21:32:31 +07:00
|
|
|
zen-browser.url = "github:MarceColl/zen-browser-flake";
|
2024-06-12 09:54:11 +07:00
|
|
|
nur.url = "github:nix-community/NUR";
|
|
|
|
neovim-nightly-overlay = {
|
|
|
|
url = "github:nix-community/neovim-nightly-overlay";
|
|
|
|
};
|
2024-09-02 09:38:57 +07:00
|
|
|
nix-flatpak.url = "github:gmodena/nix-flatpak";
|
2024-06-12 09:54:11 +07:00
|
|
|
hyprland-contrib = {
|
|
|
|
url = "github:hyprwm/contrib";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
nixpkgs.url = "nixpkgs/nixos-24.05";
|
|
|
|
nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
|
|
|
|
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
|
|
|
|
home-manager = {
|
|
|
|
url = "github:nix-community/home-manager/release-24.05";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
sops-nix = {
|
|
|
|
url = "github:Mic92/sops-nix";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2024-06-25 00:47:32 +07:00
|
|
|
nix-index-database = {
|
|
|
|
url = "github:nix-community/nix-index-database";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2024-07-10 08:53:11 +07:00
|
|
|
rust-overlay = {
|
|
|
|
url = "github:oxalica/rust-overlay";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2024-06-12 09:54:11 +07:00
|
|
|
};
|
2024-07-10 08:53:11 +07:00
|
|
|
outputs =
|
2024-10-21 12:31:30 +07:00
|
|
|
inputs@{
|
|
|
|
nur,
|
|
|
|
nixpkgs,
|
|
|
|
home-manager,
|
|
|
|
sops-nix,
|
|
|
|
neovim-nightly-overlay,
|
|
|
|
nix-index-database,
|
|
|
|
rust-overlay,
|
|
|
|
nix-flatpak,
|
|
|
|
...
|
2024-07-10 08:53:11 +07:00
|
|
|
}:
|
2024-06-12 09:54:11 +07:00
|
|
|
let
|
2024-11-18 21:32:31 +07:00
|
|
|
system = "x86_64-linux";
|
2024-06-12 09:54:11 +07:00
|
|
|
commonModules = [
|
|
|
|
nur.nixosModules.nur
|
2024-09-02 09:38:57 +07:00
|
|
|
nix-flatpak.nixosModules.nix-flatpak
|
2024-06-12 09:54:11 +07:00
|
|
|
home-manager.nixosModules.home-manager
|
2024-06-25 00:47:32 +07:00
|
|
|
nix-index-database.nixosModules.nix-index
|
|
|
|
{
|
|
|
|
programs.command-not-found.enable = false;
|
|
|
|
programs.nix-index-database.comma.enable = true;
|
|
|
|
}
|
2024-06-12 09:54:11 +07:00
|
|
|
{
|
|
|
|
nixpkgs.overlays = [
|
|
|
|
neovim-nightly-overlay.overlays.default
|
|
|
|
nur.overlay
|
2024-07-10 08:53:11 +07:00
|
|
|
rust-overlay.overlays.default
|
2024-11-18 21:32:31 +07:00
|
|
|
(final: prev: { zen-browser = inputs.zen-browser.packages."${system}".default; })
|
2024-06-12 09:54:11 +07:00
|
|
|
];
|
|
|
|
}
|
|
|
|
{
|
|
|
|
nix.settings = {
|
|
|
|
substituters = [
|
|
|
|
"https://cache.nixos.org/"
|
|
|
|
"https://nix-community.cachix.org"
|
|
|
|
];
|
2024-10-21 12:31:30 +07:00
|
|
|
trusted-public-keys = [ "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" ];
|
2024-06-12 09:54:11 +07:00
|
|
|
};
|
|
|
|
}
|
|
|
|
sops-nix.nixosModules.sops
|
|
|
|
{
|
|
|
|
home-manager.useGlobalPkgs = true;
|
|
|
|
home-manager.useUserPackages = true;
|
|
|
|
home-manager.sharedModules = [
|
2024-06-25 00:47:32 +07:00
|
|
|
nix-index-database.hmModules.nix-index
|
2024-06-12 09:54:11 +07:00
|
|
|
inputs.sops-nix.homeManagerModules.sops
|
|
|
|
];
|
|
|
|
}
|
|
|
|
];
|
|
|
|
unstable = import inputs.nixpkgs-unstable {
|
2024-11-18 21:32:31 +07:00
|
|
|
inherit system;
|
2024-06-12 09:54:11 +07:00
|
|
|
config.allowUnfree = true;
|
|
|
|
};
|
|
|
|
in
|
|
|
|
{
|
2024-10-21 12:31:30 +07:00
|
|
|
nixosConfigurations = {
|
|
|
|
castle =
|
|
|
|
let
|
|
|
|
profile-path = ./profiles/castle.nix;
|
|
|
|
hardware-configuration = ./hardware-configuration/castle.nix;
|
|
|
|
specialArgs = {
|
|
|
|
inherit
|
|
|
|
inputs
|
|
|
|
unstable
|
|
|
|
profile-path
|
|
|
|
hardware-configuration
|
|
|
|
;
|
|
|
|
};
|
|
|
|
in
|
|
|
|
nixpkgs.lib.nixosSystem {
|
2024-11-18 21:32:31 +07:00
|
|
|
inherit system;
|
2024-10-21 12:31:30 +07:00
|
|
|
modules = [
|
|
|
|
./system
|
2024-06-12 09:54:11 +07:00
|
|
|
{
|
2024-10-21 12:31:30 +07:00
|
|
|
home-manager.extraSpecialArgs = specialArgs;
|
|
|
|
home-manager.users.tigor = import ./home;
|
|
|
|
}
|
|
|
|
] ++ commonModules;
|
|
|
|
specialArgs = specialArgs;
|
|
|
|
};
|
|
|
|
fort =
|
|
|
|
let
|
|
|
|
profile-path = ./profiles/fort.nix;
|
|
|
|
hardware-configuration = ./hardware-configuration/fort.nix;
|
|
|
|
specialArgs = {
|
|
|
|
inherit
|
|
|
|
inputs
|
|
|
|
unstable
|
|
|
|
profile-path
|
|
|
|
hardware-configuration
|
|
|
|
;
|
2024-06-12 09:54:11 +07:00
|
|
|
};
|
2024-10-21 12:31:30 +07:00
|
|
|
in
|
|
|
|
nixpkgs.lib.nixosSystem {
|
2024-11-18 21:32:31 +07:00
|
|
|
inherit system;
|
2024-10-21 12:31:30 +07:00
|
|
|
modules = [
|
|
|
|
./system
|
|
|
|
{
|
|
|
|
home-manager.extraSpecialArgs = specialArgs;
|
|
|
|
home-manager.users.tigor = import ./home;
|
|
|
|
}
|
|
|
|
] ++ commonModules;
|
|
|
|
specialArgs = specialArgs;
|
|
|
|
};
|
|
|
|
homeserver =
|
|
|
|
let
|
|
|
|
profile-path = ./profiles/homeserver.nix;
|
|
|
|
hardware-configuration = ./hardware-configuration/homeserver.nix;
|
|
|
|
specialArgs = {
|
|
|
|
inherit
|
|
|
|
inputs
|
|
|
|
unstable
|
|
|
|
profile-path
|
|
|
|
hardware-configuration
|
|
|
|
;
|
2024-06-12 18:09:56 +07:00
|
|
|
};
|
2024-10-21 12:31:30 +07:00
|
|
|
in
|
|
|
|
nixpkgs.lib.nixosSystem {
|
2024-11-18 21:32:31 +07:00
|
|
|
inherit system;
|
2024-10-21 12:31:30 +07:00
|
|
|
modules = [
|
|
|
|
./system
|
|
|
|
{
|
|
|
|
home-manager.extraSpecialArgs = specialArgs;
|
|
|
|
home-manager.users.homeserver = import ./home;
|
|
|
|
}
|
|
|
|
] ++ commonModules;
|
|
|
|
specialArgs = specialArgs;
|
|
|
|
};
|
|
|
|
};
|
2024-06-12 09:54:11 +07:00
|
|
|
};
|
|
|
|
}
|