working system on lilith-pad
This commit is contained in:
parent
d0cfc40985
commit
56ea69ea23
8 changed files with 655 additions and 129 deletions
115
flake.nix
115
flake.nix
|
|
@ -28,13 +28,14 @@
|
|||
};
|
||||
};
|
||||
|
||||
ags = {
|
||||
url = "github:aylur/ags";
|
||||
hyprland = {
|
||||
url = "git+https://github.com/hyprwm/Hyprland";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.astal = {
|
||||
url = "github:aylur/astal";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
hyprgrass = {
|
||||
url = "github:horriblename/hyprgrass";
|
||||
inputs.hyprland.follows = "hyprland";
|
||||
};
|
||||
|
||||
hyprpanel = {
|
||||
|
|
@ -42,56 +43,74 @@
|
|||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
rose-pine-hyprcursor = {
|
||||
url = "github:ndom91/rose-pine-hyprcursor";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.utils.follows = "flake-utils";
|
||||
inputs.hyprlang.follows = "hyprland/hyprlang";
|
||||
};
|
||||
|
||||
zen-browser = {
|
||||
url = "github:LunaCOLON3/zen-browser-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
...
|
||||
} @ inputs: let
|
||||
inherit (nixpkgs) lib;
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
...
|
||||
}@inputs:
|
||||
let
|
||||
inherit (nixpkgs) lib;
|
||||
|
||||
systemFromHardwareConf = hostname: let
|
||||
hardware = import ./hosts/${hostname}/hardware-configuration.nix;
|
||||
args = builtins.functionArgs hardware // {lib.mkDefault = lib.id;};
|
||||
systemFromHardwareConf =
|
||||
hostname:
|
||||
let
|
||||
hardware = import ./hosts/${hostname}/hardware-configuration.nix;
|
||||
args = builtins.functionArgs hardware // {
|
||||
lib.mkDefault = lib.id;
|
||||
};
|
||||
in
|
||||
(hardware args).nixpkgs.hostPlatform;
|
||||
|
||||
importNixpkgs =
|
||||
system: nixpkgs:
|
||||
let
|
||||
config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) (import ./unfree.nix).allowed;
|
||||
in
|
||||
import nixpkgs { inherit system config; };
|
||||
|
||||
makeHost =
|
||||
host: system:
|
||||
lib.nixosSystem {
|
||||
system = system;
|
||||
pkgs = importNixpkgs system nixpkgs;
|
||||
specialArgs = inputs // {
|
||||
inherit system;
|
||||
};
|
||||
modules = [
|
||||
./hosts/${host}/default.nix
|
||||
./hosts/${host}/hardware-configuration.nix
|
||||
./system
|
||||
{ networking.hostName = host; }
|
||||
|
||||
./home
|
||||
];
|
||||
};
|
||||
in
|
||||
(hardware args).nixpkgs.hostPlatform;
|
||||
|
||||
importNixpkgs = system: nixpkgs: let
|
||||
config.allowUnfreePredicate = pkg:
|
||||
builtins.elem (lib.getName pkg) (import ./unfree.nix).allowed;
|
||||
in
|
||||
import nixpkgs {inherit system config;};
|
||||
|
||||
makeHost = host: system:
|
||||
lib.nixosSystem {
|
||||
system = system;
|
||||
pkgs = importNixpkgs system nixpkgs;
|
||||
specialArgs = inputs // {inherit system;};
|
||||
modules = [
|
||||
./hosts/${host}/default.nix
|
||||
./hosts/${host}/hardware-configuration.nix
|
||||
./system
|
||||
{networking.hostName = host;}
|
||||
|
||||
./home
|
||||
];
|
||||
};
|
||||
in {
|
||||
nixosConfigurations = lib.pipe ./hosts [
|
||||
builtins.readDir
|
||||
(lib.filterAttrs (_: type: type == "directory"))
|
||||
(lib.filterAttrs (
|
||||
name: _:
|
||||
{
|
||||
nixosConfigurations = lib.pipe ./hosts [
|
||||
builtins.readDir
|
||||
(lib.filterAttrs (_: type: type == "directory"))
|
||||
(lib.filterAttrs (
|
||||
name: _:
|
||||
builtins.pathExists ./hosts/${name}/default.nix
|
||||
&& builtins.pathExists ./hosts/${name}/hardware-configuration.nix
|
||||
))
|
||||
(builtins.mapAttrs (name: _: makeHost name (systemFromHardwareConf name)))
|
||||
];
|
||||
};
|
||||
))
|
||||
(builtins.mapAttrs (name: _: makeHost name (systemFromHardwareConf name)))
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue