Compare commits

...

5 Commits

Author SHA1 Message Date
Zynh Ludwig 8ffa090603 builders: new home in root 2024-08-22 00:18:10 -07:00
Zynh Ludwig a705681094 flake: formatting 2024-08-22 00:12:30 -07:00
Zynh Ludwig b0572534d9 builders: default system 2024-08-22 00:03:54 -07:00
Zynh Ludwig 19423844ad flake: reorder inputs 2024-08-21 23:58:57 -07:00
Zynh Ludwig 7dc7823cff home: remove unused import 2024-08-21 23:52:09 -07:00
3 changed files with 26 additions and 65 deletions

View File

@ -8,7 +8,7 @@ let
overlays = [ self.overlays.default ]; overlays = [ self.overlays.default ];
}); });
lib = nixpkgs.lib.extend (import ../lib); lib = nixpkgs.lib.extend (import ./lib);
inherit (inputs.home-manager.lib) homeManagerConfiguration; inherit (inputs.home-manager.lib) homeManagerConfiguration;
inherit (lib) nixosSystem; inherit (lib) nixosSystem;
@ -17,7 +17,7 @@ let
in in
rec { rec {
toPartialNixosConfig = toPartialNixosConfig =
{ hostname, system }: { hostname, system ? "x86_64-linux" }:
nameValuePair nameValuePair
hostname hostname
(nixosSystem rec { (nixosSystem rec {
@ -25,8 +25,8 @@ rec {
specialArgs = { inherit inputs self; }; specialArgs = { inherit inputs self; };
modules = [ modules = [
../hosts/${hostname}/hardware-configuration.nix ./hosts/${hostname}/hardware-configuration.nix
../hosts/${hostname}/configuration.nix ./hosts/${hostname}/configuration.nix
inputs.home-manager.nixosModules.default inputs.home-manager.nixosModules.default
{ {
home-manager.extraSpecialArgs = { home-manager.extraSpecialArgs = {
@ -44,7 +44,7 @@ rec {
systems; systems;
toPartialHomeManagerConfig = toPartialHomeManagerConfig =
{ user, system, hostname ? "", configHostname ? "" }: { user, system ? "x86_64-linux", hostname ? "", configHostname ? "" }:
let let
configHost = if builtins.stringLength configHostname > 0 then configHostname else hostname; configHost = if builtins.stringLength configHostname > 0 then configHostname else hostname;
hostStr = optionalString (builtins.stringLength hostname > 0) "@${hostname}"; hostStr = optionalString (builtins.stringLength hostname > 0) "@${hostname}";
@ -57,7 +57,7 @@ rec {
extraSpecialArgs = { inherit inputs self; }; extraSpecialArgs = { inherit inputs self; };
modules = [ modules = [
../hosts/${configHost}/home.nix ./hosts/${configHost}/home.nix
]; ];
}); });
compileHomes = compileHomes =

View File

@ -3,74 +3,35 @@
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
neovim-overlay = { url = "github:nix-community/neovim-nightly-overlay"; inputs.nixpkgs.follows = "nixpkgs"; };
neovim-overlay = { home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; };
url = "github:nix-community/neovim-nightly-overlay"; sops-nix = { url = "github:mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; };
inputs.nixpkgs.follows = "nixpkgs"; dunst-theme = { url = "github:d2718nis/rose-pine-dunst"; flake = false; };
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix = {
url = "github:mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
fish_theme = {
url = "git+https://git.zynh.me/Zynh0722/omf-theme";
flake = false;
};
backgrounds = {
url = "git+https://git.zynh.me/Zynh0722/backgrounds";
inputs.nixpkgs.follows = "nixpkgs";
};
dunst-theme = {
url = "github:d2718nis/rose-pine-dunst";
flake = false;
};
repo-clone.url = "git+https://git.zynh.me/Zynh0722/repo-clone"; repo-clone.url = "git+https://git.zynh.me/Zynh0722/repo-clone";
fish_theme = { url = "git+https://git.zynh.me/Zynh0722/omf-theme"; flake = false; };
backgrounds = { url = "git+https://git.zynh.me/Zynh0722/backgrounds"; inputs.nixpkgs.follows = "nixpkgs"; };
}; };
outputs = outputs =
{ self, nixpkgs, ... }@inputs: { self, nixpkgs, ... }@inputs:
let let
builders = import ./lib/builders.nix inputs; builders = import ./builders.nix inputs;
in in
{ {
nixosConfigurations = nixosConfigurations = builders.compileSystems [
builders.compileSystems { hostname = "snowhawk"; }
[ ];
{
hostname = "snowhawk";
system = "x86_64-linux";
}
];
homeConfigurations = homeConfigurations = builders.compileHomes [
builders.compileHomes { user = "zynh"; hostname = "msiserver"; }
[ { user = "val"; hostname = "caveserver"; }
{ {
user = "zynh"; user = "zynh";
hostname = "msiserver"; hostname = "little-lightning";
system = "x86_64-linux"; system = "aarch64-darwin";
} }
{ ];
user = "val";
hostname = "caveserver";
system = "x86_64-linux";
}
{
user = "zynh";
hostname = "little-lightning";
system = "aarch64-darwin";
}
];
overlays.default = import ./pkgs; overlays.default = import ./pkgs;
}; };

View File

@ -1,4 +1,4 @@
{ lib, self, ... }: { lib, ... }:
let let
getModules = path: getModules = path: