2021-05-19 23:08:18 +02:00
|
|
|
{
|
|
|
|
description = "Malte Tammena's system configuration";
|
|
|
|
|
2021-05-30 19:55:13 +02:00
|
|
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
2021-06-04 16:07:13 +02:00
|
|
|
inputs.nixpkgs-master.url = "github:NixOS/nixpkgs/master";
|
2021-05-30 19:55:13 +02:00
|
|
|
inputs.nixos-hardware.url = "github:NixOS/nixos-hardware";
|
2021-06-04 16:07:13 +02:00
|
|
|
inputs.nixpkgs-wayland.url = "github:colemickens/nixpkgs-wayland";
|
2021-05-30 19:55:13 +02:00
|
|
|
inputs.home-manager.url = "github:nix-community/home-manager";
|
|
|
|
inputs.emulator-2a.url = "github:MalteT/2a-emulator/develop";
|
2021-05-30 20:47:58 +02:00
|
|
|
inputs.gruvbox-material-gtk = {
|
|
|
|
url = "github:sainnhe/gruvbox-material-gtk";
|
|
|
|
flake = false;
|
|
|
|
};
|
2021-06-01 22:42:38 +02:00
|
|
|
inputs.rip = {
|
|
|
|
url = "github:nivekuil/rip";
|
|
|
|
flake = false;
|
|
|
|
};
|
2021-05-19 23:08:18 +02:00
|
|
|
|
2021-05-27 23:08:25 +02:00
|
|
|
outputs = { self, nixpkgs, nixos-hardware, home-manager, ... }@inputs:
|
2021-05-19 23:08:18 +02:00
|
|
|
let
|
|
|
|
system = "x86_64-linux";
|
|
|
|
username = "malte";
|
|
|
|
|
2021-05-30 19:55:13 +02:00
|
|
|
emulator-2a = inputs.emulator-2a.packages."${system}".emulator-2a;
|
|
|
|
|
2021-06-04 16:07:51 +02:00
|
|
|
bleeding-edge-overlay = self: super: {
|
|
|
|
bleeding = inputs.nixpkgs-master.legacyPackages.${system};
|
|
|
|
};
|
|
|
|
|
2021-05-19 23:08:18 +02:00
|
|
|
in rec {
|
|
|
|
|
|
|
|
nixosModules.lenovo-thinkpad-p1 = { pkgs, config, lib, ... }: {
|
|
|
|
imports = [
|
|
|
|
nixos-hardware.nixosModules.common-cpu-intel
|
2021-06-05 12:06:20 +02:00
|
|
|
nixos-hardware.nixosModules.common-gpu-nvidia-disable
|
2021-05-19 23:08:18 +02:00
|
|
|
nixos-hardware.nixosModules.common-pc-laptop
|
|
|
|
nixos-hardware.nixosModules.common-pc-laptop-ssd
|
|
|
|
nixos-hardware.nixosModules.common-pc-laptop-acpi_call
|
2021-05-28 00:15:51 +02:00
|
|
|
./system/lenovo-thinkpad-p1.nix
|
2021-05-19 23:08:18 +02:00
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2021-05-23 16:00:37 +02:00
|
|
|
homeManagerConfigurations."${username}" =
|
|
|
|
home-manager.lib.homeManagerConfiguration {
|
|
|
|
inherit system username;
|
|
|
|
configuration = ./malte/home.nix;
|
|
|
|
homeDirectory = "/home/${username}";
|
|
|
|
};
|
2021-05-19 23:08:18 +02:00
|
|
|
|
|
|
|
nixosModules.home-manager = { pkgs, ... }: {
|
|
|
|
home-manager.verbose = true;
|
|
|
|
home-manager.useGlobalPkgs = true;
|
|
|
|
home-manager.useUserPackages = true;
|
|
|
|
home-manager.users."${username}".imports = [ ./malte/home.nix ];
|
2021-05-28 00:15:51 +02:00
|
|
|
nixpkgs.overlays = [
|
2021-05-25 15:02:16 +02:00
|
|
|
(import ./overlays/logisim.nix)
|
2021-05-26 21:13:02 +02:00
|
|
|
#(import ./overlays/tdesktop.nix)
|
|
|
|
#(import ./overlays/sway.nix)
|
2021-05-25 15:02:16 +02:00
|
|
|
];
|
2021-05-19 23:08:18 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
nixosConfigurations.helix-texta = nixpkgs.lib.nixosSystem {
|
|
|
|
inherit system;
|
2021-05-23 16:00:37 +02:00
|
|
|
modules = [
|
2021-05-19 23:08:18 +02:00
|
|
|
./system/configuration.nix
|
2021-05-22 22:17:13 +02:00
|
|
|
./system/light-actkbd.nix
|
2021-05-19 23:08:18 +02:00
|
|
|
self.nixosModules.lenovo-thinkpad-p1
|
|
|
|
home-manager.nixosModules.home-manager
|
|
|
|
self.nixosModules.home-manager
|
2021-05-22 22:17:13 +02:00
|
|
|
|
2021-05-19 23:08:18 +02:00
|
|
|
({ pkgs, ... }: {
|
2021-05-23 16:00:37 +02:00
|
|
|
system.configurationRevision =
|
|
|
|
nixpkgs.lib.mkIf (self ? rev) self.rev;
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
2021-05-22 22:17:13 +02:00
|
|
|
|
2021-06-04 16:07:13 +02:00
|
|
|
nix = {
|
|
|
|
# add binary caches
|
|
|
|
binaryCachePublicKeys = [
|
|
|
|
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
|
|
|
"nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA="
|
|
|
|
# ...
|
|
|
|
];
|
|
|
|
binaryCaches = [
|
|
|
|
"https://cache.nixos.org"
|
|
|
|
"https://nixpkgs-wayland.cachix.org"
|
|
|
|
# ...
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2021-06-04 16:07:51 +02:00
|
|
|
nixpkgs.overlays = [
|
|
|
|
# Use packages from nixpkgs-wayland
|
|
|
|
inputs.nixpkgs-wayland.overlay
|
|
|
|
# Use some packages from master while unstable is lacking behind
|
|
|
|
bleeding-edge-overlay
|
|
|
|
];
|
2021-06-04 16:07:13 +02:00
|
|
|
|
2021-05-30 19:55:13 +02:00
|
|
|
environment.systemPackages = [ emulator-2a ];
|
|
|
|
|
|
|
|
nix.registry.nixpkgs.flake = nixpkgs;
|
2021-05-28 00:15:51 +02:00
|
|
|
nix.package = pkgs.nixUnstable;
|
|
|
|
nix.extraOptions = ''
|
|
|
|
experimental-features = nix-command flakes
|
|
|
|
'';
|
2021-05-23 16:00:37 +02:00
|
|
|
})
|
|
|
|
];
|
2021-05-19 23:08:18 +02:00
|
|
|
};
|
2021-06-09 22:24:06 +02:00
|
|
|
|
|
|
|
nixosConfigurations.achatina-fulica = nixpkgs.lib.nixosSystem {
|
2021-06-09 22:35:33 +02:00
|
|
|
inherit system; # <-- fix this
|
2021-06-09 22:24:06 +02:00
|
|
|
modules = [
|
|
|
|
./system/achatina-fulica.nix
|
|
|
|
./system/achatina-fulica-hardware.nix
|
2021-06-10 20:56:40 +02:00
|
|
|
./system/modules/nginx-reverse-proxy.nix
|
|
|
|
./system/modules/radicale.nix
|
2021-06-09 22:24:06 +02:00
|
|
|
];
|
2021-06-09 22:30:55 +02:00
|
|
|
};
|
2021-05-19 23:08:18 +02:00
|
|
|
};
|
|
|
|
}
|