nix flake for my x280
1{
2 description = "bobcat nix flake";
3
4 nixConfig = {
5 extra-substituters = [
6 "https://nix-community.cachix.org"
7 ];
8 extra-trusted-public-keys = [
9 "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
10 ];
11 };
12
13 inputs = {
14 disko = {
15 url = "github:nix-community/disko/latest";
16 inputs.nixpkgs.follows = "nixpkgs";
17 };
18 nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
19 nixos-hardware.url = "github:NixOS/nixos-hardware/master";
20 home-manager = {
21 url = "github:nix-community/home-manager/release-25.11";
22 inputs.nixpkgs.follows = "nixpkgs";
23 };
24 stylix = {
25 url = "github:nix-community/stylix";
26 inputs.nixpkgs.follows = "nixpkgs";
27 };
28 };
29
30 outputs =
31 {
32 self,
33 disko,
34 home-manager,
35 nixpkgs,
36 nixos-hardware,
37 stylix,
38 ...
39 }@inputs:
40 {
41 nixosConfigurations = {
42 pardinus =
43 let
44 username = "freyja";
45 specialArgs = { inherit username; };
46 hostname = "pardinus";
47 in
48 nixpkgs.lib.nixosSystem {
49 system = "x86_64-linux";
50 specialArgs = {
51 inherit inputs;
52 };
53 modules = [
54 disko.nixosModules.disko
55 ./hosts/${hostname}
56 ./modules/server.nix
57 home-manager.nixosModules.home-manager
58 {
59 home-manager.useGlobalPkgs = true;
60 home-manager.useUserPackages = true;
61 home-manager.extraSpecialArgs = inputs // specialArgs;
62 home-manager.users.${username} = ./home/server.nix;
63 nixpkgs = {
64 config.allowUnfree = true;
65 };
66 }
67 ];
68 };
69 bobcat =
70 let
71 username = "freyja";
72 specialArgs = { inherit username; };
73 hostname = "bobcat";
74 in
75 nixpkgs.lib.nixosSystem {
76 system = "x86_64-linux";
77 specialArgs = {
78 inherit inputs;
79 };
80 modules = [
81 disko.nixosModules.disko
82 stylix.nixosModules.stylix
83 nixos-hardware.nixosModules.lenovo-thinkpad-x280
84 ./hosts/${hostname}
85 ./modules
86 home-manager.nixosModules.home-manager
87 {
88 home-manager.useGlobalPkgs = true;
89 home-manager.useUserPackages = true;
90 home-manager.extraSpecialArgs = inputs // specialArgs;
91 home-manager.users.${username} = ./users/${username}/home.nix;
92 nixpkgs = {
93 config.allowUnfree = true;
94 };
95 }
96 ];
97 };
98 };
99 };
100}