undoing child flake

This commit is contained in:
ari committed 2024-05-19 00:17:01 -04:00
1 parent 024ac197ba
commit 00d9e18d41
5 files changed
+69 -144

No files matched your search

Generated
+4 -21
View File
@@ -3,7 +3,6 @@
"home-manager": {
"inputs": {
"nixpkgs": [
"modules",
"nixpkgs"
]
},
@@ -21,27 +20,9 @@
"type": "github"
}
},
"modules": {
"inputs": {
"home-manager": "home-manager",
"nix-darwin": "nix-darwin",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1,
"narHash": "sha256-FhENMA/zHvdxdkq1OQ27RoZ/AAIFKLMEFMSgA+/L4pA=",
"path": "modules/",
"type": "path"
},
"original": {
"path": "modules/",
"type": "path"
}
},
"nix-darwin": {
"inputs": {
"nixpkgs": [
"modules",
"nixpkgs"
]
},
@@ -93,8 +74,10 @@
},
"root": {
"inputs": {
"modules": "modules",
"nixos-hardware": "nixos-hardware"
"home-manager": "home-manager",
"nix-darwin": "nix-darwin",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs"
}
}
},
+31 -6
View File
@@ -1,14 +1,28 @@
{
inputs = {
modules = {
url = "path:modules/";
};
nixos-hardware = {
url = "github:NixOS/nixos-hardware/master";
};
nixpkgs = {
url = "github:NixOS/nixpkgs/nixpkgs-unstable";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-darwin = {
url = "github:LnL7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, modules, nixos-hardware }:
outputs =
{ self
, nixos-hardware
, nixpkgs
, home-manager
, nix-darwin
}:
let
user = {
name = "ari";
@@ -16,9 +30,15 @@
email = "ariel@sosnovsky.ca";
};
homeMangerVersion = "24.05";
lib = (import modules/lib.nix {
nixpkgs = nixpkgs;
home-manager = home-manager;
nix-darwin = nix-darwin;
});
in
{
nixosConfigurations."fwbook" = modules.lib.makeNixOsModule {
lib = lib;
nixosConfigurations."fwbook" = lib.makeNixOsModule {
system = "x86_64-linux";
user = user;
systemStateVersion = "23.11";
@@ -45,7 +65,12 @@
hardware = { enable = true; };
};
configuration = { ... }: {
imports = [ nixos-hardware.nixosModules.framework-13-7040-amd ];
imports = [
nixos-hardware.nixosModules.framework-13-7040-amd
(import ./hosts/fwbook.nix {
user = user;
})
];
};
};
};
-69
View File
@@ -1,69 +0,0 @@
{
"nodes": {
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1715930644,
"narHash": "sha256-W9pyM3/vePxrffHtzlJI6lDS3seANQ+Nqp+i58O46LI=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "e3ad5108f54177e6520535768ddbf1e6af54b59d",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"nix-darwin": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1715901937,
"narHash": "sha256-eMyvWP56ZOdraC2IOvZo0/RTDcrrsqJ0oJWDC76JTak=",
"owner": "LnL7",
"repo": "nix-darwin",
"rev": "ffc01182f90118119930bdfc528c1ee9a39ecef8",
"type": "github"
},
"original": {
"owner": "LnL7",
"repo": "nix-darwin",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1716062047,
"narHash": "sha256-OhysviwHQz4p2HZL4g7XGMLoUbWMjkMr/ogaR3VUYNA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "02923630b89aa1ab36ef8e422501a6f4fd4b2016",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nix-darwin": "nix-darwin",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}
-48
View File
@@ -1,48 +0,0 @@
{
description = "Main Flake";
inputs = {
nixpkgs = {
url = "github:NixOS/nixpkgs/nixpkgs-unstable";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-darwin = {
url = "github:LnL7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, home-manager, nix-darwin, nixpkgs }: {
lib = {
makeImports = { ... }@attrs: [ (import ./main.nix attrs) ];
makeNixOsModule = { system, configuration ? null, ... }@attrs:
nixpkgs.lib.nixosSystem {
system = system;
modules = (self.lib.makeImports attrs)
++ (if attrs.home-manager.enable then
[ home-manager.nixosModules.default ]
else
[ ])
++ (if (isNull configuration) then [ configuration ] else [ ]);
};
makeDarwinModule =
{ system ? "x86_64-darwin", user, configuration ? null, ... }@attrs:
nix-darwin.lib.darwinSystem {
modules = (self.lib.makeImports attrs)
++ (if attrs.home-manager.enable then [
home-manager.darwinModules.home-manager
(import ./macos-home-manager.nix { user = user; })
] else
[ ])
++ (if (isNull configuration) then [ configuration ] else [ ]) ++ [
(import ./macos.nix {
user = user;
system = system;
})
];
darwinPackages = self.darwinConfigurations."default".pkgs;
};
};
};
}
+34
View File
@@ -0,0 +1,34 @@
{ nixpkgs
, home-manager
, nix-darwin
}:
{
makeImports = { ... }@attrs: [ (import ./main.nix attrs) ];
makeNixOsModule = { system, configuration ? null, ... }@attrs:
nixpkgs.lib.nixosSystem {
system = system;
modules = (self.lib.makeImports attrs)
++ (if attrs.home-manager.enable then
[ home-manager.nixosModules.default ]
else
[ ])
++ (if (isNull configuration) then [ configuration ] else [ ]);
};
makeDarwinModule =
{ system ? "x86_64-darwin", user, configuration ? null, ... }@attrs:
nix-darwin.lib.darwinSystem {
modules = (self.lib.makeImports attrs)
++ (if attrs.home-manager.enable then [
home-manager.darwinModules.home-manager
(import ./macos-home-manager.nix { user = user; })
] else
[ ])
++ (if (isNull configuration) then [ configuration ] else [ ]) ++ [
(import ./macos.nix {
user = user;
system = system;
})
];
darwinPackages = self.darwinConfigurations."default".pkgs;
};
}