2020-08-04 01:46:48 +04:00
|
|
|
{
|
|
|
|
description = "System configuration";
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = github:nixos/nixpkgs/nixos-unstable;
|
2021-04-02 21:50:33 +03:00
|
|
|
nixpkgs-master.url = github:nixos/nixpkgs/master;
|
2021-08-17 23:36:33 +03:00
|
|
|
nixpkgs-stable.url = github:nixos/nixpkgs/nixos-21.05;
|
2021-09-07 09:49:08 +03:00
|
|
|
home-manager.url = github:nix-community/home-manager;
|
2021-09-15 15:32:36 +03:00
|
|
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
2021-06-16 05:30:04 +03:00
|
|
|
# base16.url = "/shared/nixos/base16-nix";
|
2020-08-15 19:36:16 +04:00
|
|
|
base16.url = github:alukardbf/base16-nix;
|
2020-08-04 01:46:48 +04:00
|
|
|
base16-horizon-scheme = {
|
2020-08-11 02:38:02 +04:00
|
|
|
url = github:michael-ball/base16-horizon-scheme;
|
2020-08-04 01:46:48 +04:00
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
materia-theme = {
|
2021-06-16 05:30:04 +03:00
|
|
|
url = github:nana-4/materia-theme;
|
2020-08-04 01:46:48 +04:00
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
zsh-autosuggestions = {
|
|
|
|
url = github:zsh-users/zsh-autosuggestions;
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
zsh-nix-shell = {
|
|
|
|
url = github:chisui/zsh-nix-shell;
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
zsh-you-should-use = {
|
|
|
|
url = github:MichaelAquilina/zsh-you-should-use;
|
|
|
|
flake = false;
|
|
|
|
};
|
2020-11-28 05:07:18 +04:00
|
|
|
zsh-cod = {
|
|
|
|
url = github:dim-an/cod;
|
|
|
|
flake = false;
|
|
|
|
};
|
2020-08-04 01:46:48 +04:00
|
|
|
i3lock-fancy-rapid = {
|
|
|
|
url = github:yvbbrjdr/i3lock-fancy-rapid;
|
|
|
|
flake = false;
|
|
|
|
};
|
2020-08-07 23:27:49 +04:00
|
|
|
nixpkgs-mozilla = {
|
|
|
|
url = github:mozilla/nixpkgs-mozilla;
|
|
|
|
flake = false;
|
|
|
|
};
|
2021-06-16 05:30:04 +03:00
|
|
|
rycee = {
|
|
|
|
url = gitlab:rycee/nur-expressions;
|
|
|
|
flake = false;
|
|
|
|
};
|
2021-09-15 15:33:45 +03:00
|
|
|
multimc-cracked = {
|
|
|
|
url = "https://github.com/AfoninZ/MultiMC5-Cracked.git";
|
|
|
|
ref = "develop";
|
|
|
|
rev = "9069e9c9d0b7951c310fdcc8bdc70ebc422a7634";
|
|
|
|
flake = false;
|
|
|
|
submodules = true;
|
|
|
|
type = "git";
|
|
|
|
};
|
2021-08-17 23:36:33 +03:00
|
|
|
qbittorrent-ee = {
|
|
|
|
url = github:c0re100/qBittorrent-Enhanced-Edition;
|
2021-06-29 22:27:50 +03:00
|
|
|
flake = false;
|
|
|
|
};
|
2020-08-04 01:46:48 +04:00
|
|
|
};
|
|
|
|
|
2021-02-07 02:38:11 +03:00
|
|
|
outputs = { nixpkgs, nix, self, ... }@inputs: {
|
|
|
|
nixosModules = import ./modules;
|
|
|
|
|
|
|
|
nixosProfiles = import ./profiles;
|
2020-09-26 03:33:55 +04:00
|
|
|
# Generate system config for each of hardware configuration
|
2020-08-04 01:46:48 +04:00
|
|
|
nixosConfigurations = with nixpkgs.lib;
|
|
|
|
let
|
2021-02-07 02:38:11 +03:00
|
|
|
hosts = builtins.attrNames (builtins.readDir ./machines);
|
2020-09-26 03:33:55 +04:00
|
|
|
mkHost = name: let
|
2021-02-07 02:38:11 +03:00
|
|
|
system = builtins.readFile (./machines + "/${name}/system");
|
|
|
|
modules = [ (import (./machines + "/${name}")) { device = name; } ];
|
|
|
|
specialArgs = { inherit inputs; };
|
2020-09-26 03:33:55 +04:00
|
|
|
in nixosSystem { inherit system modules specialArgs; };
|
2020-08-04 01:46:48 +04:00
|
|
|
in genAttrs hosts mkHost;
|
|
|
|
|
2020-08-05 04:52:30 +04:00
|
|
|
legacyPackages.x86_64-linux =
|
|
|
|
(builtins.head (builtins.attrValues self.nixosConfigurations)).pkgs;
|
2020-08-15 19:36:16 +04:00
|
|
|
|
|
|
|
devShell.x86_64-linux = let
|
2020-09-26 03:33:55 +04:00
|
|
|
pkgs = self.legacyPackages.x86_64-linux;
|
2020-08-15 19:36:16 +04:00
|
|
|
rebuild = pkgs.writeShellScriptBin "rebuild" ''
|
|
|
|
if [[ -z $1 ]]; then
|
|
|
|
echo "Usage: $(basename $0) {switch|boot|test}"
|
2021-09-15 18:37:57 +03:00
|
|
|
elif [[ $1 = "iso" ]]; then
|
|
|
|
nix build .#nixosConfigurations.Flakes-ISO.config.system.build.isoImage
|
2020-08-15 19:36:16 +04:00
|
|
|
else
|
|
|
|
sudo nixos-rebuild $1 --flake .
|
|
|
|
fi
|
|
|
|
'';
|
|
|
|
in pkgs.mkShell {
|
|
|
|
nativeBuildInputs = [ rebuild ];
|
|
|
|
};
|
2020-08-04 01:46:48 +04:00
|
|
|
};
|
|
|
|
}
|