2020-12-26 23:36:50 +01:00
|
|
|
{
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-20.09";
|
|
|
|
nixpkgs-unstable.url = "github:NixOS/nixpkgs?ref=nixos-unstable";
|
2021-01-18 20:24:07 +01:00
|
|
|
nixpkgs-master.url = "github:NixOS/nixpkgs?ref=master";
|
|
|
|
|
|
|
|
ra-systems = {
|
|
|
|
url = "git+https://gitea.redalder.org/RedAlder/systems";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
|
|
|
|
home-manager = {
|
|
|
|
url = "github:nix-community/home-manager?ref=release-20.09";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2021-01-18 11:23:15 +01:00
|
|
|
|
2021-01-18 20:24:07 +01:00
|
|
|
# PACKAGES
|
2021-01-25 20:40:55 +01:00
|
|
|
## Rust Things
|
|
|
|
rust-overlay = {
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
url = "github:oxalica/rust-overlay";
|
|
|
|
};
|
|
|
|
|
2021-01-18 20:24:07 +01:00
|
|
|
## sss-cli
|
2021-01-18 11:23:15 +01:00
|
|
|
sss-cli = {
|
|
|
|
flake = false;
|
|
|
|
url = "github:dsprenkels/sss-cli";
|
|
|
|
};
|
2021-01-18 20:24:07 +01:00
|
|
|
|
|
|
|
## Emacs
|
|
|
|
emacs-overlay = {
|
|
|
|
url = "git+https://github.com/nix-community/emacs-overlay";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
emacs = {
|
|
|
|
type = "git";
|
|
|
|
url = "https://git.savannah.gnu.org/git/emacs.git";
|
|
|
|
ref = "feature/native-comp";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
vtermModule = {
|
|
|
|
url = "git+https://github.com/akermu/emacs-libvterm";
|
|
|
|
flake = false;
|
|
|
|
};
|
2020-12-26 23:36:50 +01:00
|
|
|
};
|
|
|
|
|
2020-12-29 17:58:07 +01:00
|
|
|
outputs = { self, nixpkgs, ... }@inputs:
|
2021-01-18 20:24:07 +01:00
|
|
|
with inputs; let
|
|
|
|
customModules = [
|
|
|
|
ra-systems.flakes.klippy.nixosModules.klippy
|
|
|
|
ra-systems.flakes.moonraker.nixosModules.moonraker
|
|
|
|
ra-systems.flakes.mainsail.nixosModules.mainsail
|
|
|
|
inputs.home-manager.nixosModules.home-manager
|
|
|
|
];
|
2021-01-25 19:44:11 +01:00
|
|
|
prelude = system: rec {
|
|
|
|
rlib = (import ./lib.nix inputs { lib = nixpkgs.lib; inherit system; });
|
|
|
|
rpkgs = (rlib.getLegacyPkgs
|
|
|
|
{
|
|
|
|
allowUnfree = true;
|
|
|
|
}
|
|
|
|
{
|
|
|
|
inherit (inputs) nixpkgs nixpkgs-unstable nixpkgs-master;
|
|
|
|
}) // {
|
|
|
|
custom = {
|
|
|
|
sss-cli = rlib.halfCallFlakePackage ./packages/sss-cli;
|
|
|
|
atom-shell = rlib.halfCallFlakePackage ./packages/atom-shell;
|
|
|
|
emacs = rlib.halfCallFlakePackage ./packages/emacs;
|
|
|
|
emacsclient-remote = rlib.halfCallFlakePackage ./packages/emacsclient-remote;
|
|
|
|
enter-env = rlib.halfCallFlakePackage ./packages/enter-env;
|
|
|
|
screenshot = rlib.halfCallFlakePackage ./packages/screenshot;
|
2021-01-25 20:40:55 +01:00
|
|
|
rust = let
|
|
|
|
rustyPkgs = import inputs.nixpkgs {
|
|
|
|
overlays = [ inputs.rust-overlay.overlay ];
|
|
|
|
inherit system;
|
|
|
|
};
|
|
|
|
in
|
|
|
|
rustyPkgs.rust-bin;
|
2021-01-25 19:44:11 +01:00
|
|
|
};
|
|
|
|
inherit rlib;
|
2021-01-18 20:24:07 +01:00
|
|
|
};
|
2021-01-25 19:44:11 +01:00
|
|
|
};
|
2020-12-29 17:58:07 +01:00
|
|
|
in {
|
2021-01-25 19:44:11 +01:00
|
|
|
nixosConfigurations.omen = let
|
2020-12-29 17:58:07 +01:00
|
|
|
system = "x86_64-linux";
|
2021-01-25 19:44:11 +01:00
|
|
|
inherit (prelude system) rlib rpkgs;
|
|
|
|
in nixpkgs.lib.nixosSystem {
|
|
|
|
inherit system;
|
2020-12-29 17:58:07 +01:00
|
|
|
|
2021-01-18 20:24:07 +01:00
|
|
|
modules = rlib.callModules rpkgs [
|
|
|
|
./hardware/omen.nix
|
|
|
|
./modules/pin-nixpkgs.nix
|
|
|
|
./users/main.nix
|
|
|
|
] ++ [
|
2021-01-25 19:44:11 +01:00
|
|
|
((rlib.callModule rpkgs ./modules/home-manager.nix) ./hm-profiles/common.nix)
|
2021-01-18 11:23:15 +01:00
|
|
|
({ pkgs, ... }: {
|
2020-12-29 17:58:07 +01:00
|
|
|
networking = {
|
|
|
|
hostName = "omen";
|
|
|
|
useDHCP = false;
|
|
|
|
interfaces.eno1.useDHCP = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
time.timeZone = "Europe/Bratislava";
|
|
|
|
system.stateVersion = "20.09";
|
|
|
|
})
|
2020-12-27 02:15:29 +01:00
|
|
|
|
2020-12-29 17:58:07 +01:00
|
|
|
(import ./profiles/laptop.nix {
|
|
|
|
intelBusId = "PCI:0:2:0";
|
|
|
|
nvidiaBusId = "PCI:1:0:0";
|
2021-01-18 20:24:07 +01:00
|
|
|
} inputs rpkgs)
|
|
|
|
] ++ customModules;
|
2020-12-29 17:58:07 +01:00
|
|
|
};
|
2020-12-27 02:15:29 +01:00
|
|
|
|
2021-01-25 19:44:11 +01:00
|
|
|
nixosConfigurations.heater = let
|
2020-12-29 17:58:07 +01:00
|
|
|
system = "x86_64-linux";
|
2021-01-25 19:44:11 +01:00
|
|
|
inherit (prelude system) rlib rpkgs;
|
|
|
|
in nixpkgs.lib.nixosSystem {
|
|
|
|
inherit system;
|
2020-12-27 02:15:29 +01:00
|
|
|
|
2021-01-18 20:24:07 +01:00
|
|
|
modules = rlib.callModules rpkgs [
|
|
|
|
./hardware/heater.nix
|
|
|
|
./profiles/workstation.nix
|
|
|
|
./modules/pin-nixpkgs.nix
|
|
|
|
./users/main.nix
|
|
|
|
] ++ [
|
2021-01-25 19:44:11 +01:00
|
|
|
((rlib.callModule rpkgs ./modules/home-manager.nix) ./hm-profiles/common.nix)
|
2021-01-18 11:23:15 +01:00
|
|
|
({ pkgs, ... }: {
|
2020-12-29 17:58:07 +01:00
|
|
|
networking = {
|
|
|
|
hostName = "heater";
|
|
|
|
useDHCP = false;
|
|
|
|
interfaces.enp3s0.useDHCP = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
time.timeZone = "Europe/Bratislava";
|
|
|
|
system.stateVersion = "20.09";
|
2021-01-10 20:05:04 +01:00
|
|
|
|
|
|
|
virtualisation.docker.enable = true;
|
2021-01-18 20:24:07 +01:00
|
|
|
})
|
|
|
|
] ++ customModules;
|
2020-12-29 17:58:07 +01:00
|
|
|
};
|
2021-01-18 11:23:42 +01:00
|
|
|
|
2021-01-25 19:44:11 +01:00
|
|
|
nixosConfigurations.mark = let
|
2021-01-18 11:23:42 +01:00
|
|
|
system = "x86_64-linux";
|
2021-01-25 19:44:11 +01:00
|
|
|
inherit (prelude system) rlib rpkgs;
|
|
|
|
in nixpkgs.lib.nixosSystem {
|
|
|
|
inherit system;
|
2021-01-18 11:23:42 +01:00
|
|
|
|
2021-01-18 20:24:07 +01:00
|
|
|
modules = rlib.callModules rpkgs [
|
|
|
|
./hardware/mark.nix
|
2021-01-24 17:43:50 +01:00
|
|
|
./users/main.nix
|
2021-01-18 20:24:07 +01:00
|
|
|
] ++ [
|
2021-01-25 19:44:11 +01:00
|
|
|
((rlib.callModule rpkgs ./modules/home-manager.nix) ./hm-profiles/mark.nix)
|
2021-01-18 11:23:42 +01:00
|
|
|
({ pkgs, ... }: {
|
|
|
|
time.timeZone = "Europe/Bratislava";
|
2021-01-24 17:43:50 +01:00
|
|
|
system.stateVersion = "20.09";
|
|
|
|
|
2021-01-18 11:23:42 +01:00
|
|
|
environment.systemPackages = [
|
|
|
|
pkgs.gnupg
|
2021-01-24 17:43:50 +01:00
|
|
|
rpkgs.sss-cli
|
2021-01-18 11:23:42 +01:00
|
|
|
];
|
|
|
|
})
|
|
|
|
];
|
|
|
|
};
|
2021-01-25 19:44:11 +01:00
|
|
|
|
|
|
|
|
|
|
|
homeConfigurations.edge = let
|
|
|
|
system = "aarch64-linux";
|
|
|
|
inherit (prelude system) rlib rpkgs;
|
|
|
|
in inputs.home-manager.lib.homeManagerConfiguration {
|
|
|
|
configuration = { pkgs, ... }: {
|
|
|
|
home.packages = [ rpkgs.nixpkgs.file rpkgs.nixpkgs.emacs ];
|
|
|
|
home.stateVersion = "20.09";
|
|
|
|
};
|
|
|
|
username = "u0_a269";
|
|
|
|
inherit system;
|
|
|
|
homeDirectory = "/data/data/com.termux/files/home";
|
|
|
|
};
|
|
|
|
edge = self.homeConfigurations.edge.activationPackage;
|
2020-12-27 02:15:29 +01:00
|
|
|
};
|
2020-12-26 23:36:50 +01:00
|
|
|
}
|