2023-10-08 14:57:57 +00:00
|
|
|
{
|
|
|
|
description = "My NixOS configuration";
|
|
|
|
|
|
|
|
inputs = {
|
2023-12-03 12:35:17 +00:00
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
|
2023-11-30 15:59:49 +00:00
|
|
|
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
2023-10-09 09:25:17 +00:00
|
|
|
nur.url = "github:nix-community/NUR";
|
2024-02-18 21:05:23 +00:00
|
|
|
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
|
|
|
|
2023-10-08 16:03:14 +00:00
|
|
|
home-manager = {
|
2023-12-25 18:32:04 +00:00
|
|
|
url = "github:nix-community/home-manager?ref=release-23.11";
|
2023-10-08 16:03:14 +00:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2024-02-18 21:05:23 +00:00
|
|
|
|
2023-10-09 18:56:41 +00:00
|
|
|
homeage = {
|
|
|
|
url = "github:jordanisaacs/homeage";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2024-02-18 21:05:23 +00:00
|
|
|
|
2023-10-14 17:08:02 +00:00
|
|
|
agenix = {
|
|
|
|
url = "github:ryantm/agenix";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
inputs.home-manager.follows = "home-manager";
|
|
|
|
};
|
2024-02-18 21:05:23 +00:00
|
|
|
|
2024-01-29 20:05:48 +00:00
|
|
|
lanzaboote = {
|
|
|
|
url = "github:nix-community/lanzaboote/v0.3.0";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2023-10-08 14:57:57 +00:00
|
|
|
};
|
2023-11-05 17:49:51 +00:00
|
|
|
|
2023-12-25 18:32:04 +00:00
|
|
|
outputs =
|
|
|
|
{ nixpkgs
|
|
|
|
, nixpkgs-unstable
|
|
|
|
, home-manager
|
|
|
|
, homeage
|
|
|
|
, agenix
|
|
|
|
, nur
|
|
|
|
, nixos-hardware
|
2024-01-29 20:05:48 +00:00
|
|
|
, lanzaboote
|
2023-12-25 18:32:04 +00:00
|
|
|
, ...
|
2024-05-16 16:48:46 +00:00
|
|
|
}:
|
|
|
|
let
|
|
|
|
mkNixosSystem = extraModule: nixpkgs.lib.nixosSystem rec {
|
2023-11-10 10:33:41 +00:00
|
|
|
system = "x86_64-linux";
|
2024-04-20 08:57:13 +00:00
|
|
|
|
2023-11-10 10:33:41 +00:00
|
|
|
modules = [
|
2023-11-30 15:59:49 +00:00
|
|
|
{
|
|
|
|
nixpkgs.overlays = [
|
|
|
|
nur.overlay
|
|
|
|
(final: _prev: {
|
|
|
|
unstable = import nixpkgs-unstable {
|
|
|
|
inherit system;
|
|
|
|
config.allowUnfree = true;
|
|
|
|
};
|
|
|
|
})
|
|
|
|
];
|
|
|
|
}
|
2023-11-10 10:33:41 +00:00
|
|
|
./nixos
|
|
|
|
agenix.nixosModules.default
|
|
|
|
home-manager.nixosModules.home-manager
|
|
|
|
{
|
|
|
|
home-manager.useGlobalPkgs = true;
|
|
|
|
home-manager.useUserPackages = true;
|
|
|
|
home-manager.users.pim = {
|
|
|
|
imports = [ ./home-manager homeage.homeManagerModules.homeage ];
|
|
|
|
};
|
|
|
|
}
|
2024-01-29 20:05:48 +00:00
|
|
|
lanzaboote.nixosModules.lanzaboote
|
2024-05-16 16:48:46 +00:00
|
|
|
extraModule
|
2023-11-10 10:33:41 +00:00
|
|
|
];
|
|
|
|
};
|
2024-05-16 16:48:46 +00:00
|
|
|
in
|
|
|
|
{
|
|
|
|
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt;
|
|
|
|
|
|
|
|
nixosConfigurations = {
|
|
|
|
personal = mkNixosSystem ({ pkgs, lib, ... }: {
|
|
|
|
imports = [ nixos-hardware.nixosModules.lenovo-thinkpad-x260 ];
|
|
|
|
|
|
|
|
config = {
|
|
|
|
fprintd = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
tod = {
|
|
|
|
enable = true;
|
|
|
|
driver = pkgs.libfprint-2-tod1-vfs0090;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
swapDevices = [{ device = "/dev/disk/by-uuid/6028bf52-404d-4143-9cb0-9b06cd60a373"; }];
|
|
|
|
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
|
|
|
boot.initrd.availableKernelModules = [ "ahci" "rtsx_pci_sdmmc" ];
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
|
|
|
sue = mkNixosSystem ({ ... }: {
|
|
|
|
imports = [ nixos-hardware.nixosModules.dell-xps-13-9310 ];
|
|
|
|
|
|
|
|
config = {
|
|
|
|
swapDevices = [{ device = "/dev/disk/by-uuid/96a43c35-0174-4e92-81f0-168a5f601f0b"; }];
|
|
|
|
fileSystems = {
|
|
|
|
"/" =
|
|
|
|
{
|
|
|
|
device = "/dev/disk/by-uuid/31638735-5cc4-4013-8037-17e30edcbb0a";
|
|
|
|
fsType = "ext4";
|
|
|
|
};
|
|
|
|
|
|
|
|
"boot" =
|
|
|
|
{
|
|
|
|
device = "/dev/disk/by-uuid/560E-F8A2";
|
|
|
|
fsType = "vfat";
|
|
|
|
options = [ "fmask = 0022 " " dmask=0022" ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
boot.initrd.luks.devices."luks-8ffd3129-4908-4209-98c4-4eb68a35c494".device = "/dev/disk/by-uuid/8ffd3129-4908-4209-98c4-4eb68a35c494";
|
|
|
|
boot.initrd.availableKernelModules = [ "thunderbolt" "vmd" "nvme" "usb_storage" ];
|
|
|
|
};
|
|
|
|
});
|
|
|
|
};
|
2023-10-08 14:57:57 +00:00
|
|
|
};
|
|
|
|
}
|