nixos/flake.nix

82 lines
2.6 KiB
Nix
Raw Normal View History

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";
inputs.nixos-hardware.url = "github:NixOS/nixos-hardware";
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-05-19 23:08:18 +02:00
in rec {
nixosModules.lenovo-thinkpad-p1 = { pkgs, config, lib, ... }: {
imports = [
nixos-hardware.nixosModules.common-cpu-intel
nixos-hardware.nixosModules.common-gpu-nvidia
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 = [
(import ./overlays/logisim.nix)
2021-05-26 21:13:02 +02:00
#(import ./overlays/tdesktop.nix)
#(import ./overlays/sway.nix)
];
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
./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-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-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
};
};
}