testing
This commit is contained in:
parent
227dddf2f7
commit
9182e5e9bb
4 changed files with 88 additions and 6 deletions
24
builders.nix
24
builders.nix
|
@ -1,4 +1,4 @@
|
||||||
{ nixpkgs, self, ... }@inputs:
|
{ nixpkgs, nix-darwin, self, ... }@inputs:
|
||||||
|
|
||||||
let
|
let
|
||||||
makePkgs = system: (import nixpkgs {
|
makePkgs = system: (import nixpkgs {
|
||||||
|
@ -73,4 +73,26 @@ rec {
|
||||||
builtins.listToAttrs
|
builtins.listToAttrs
|
||||||
(map toPartialHomeManagerConfig)
|
(map toPartialHomeManagerConfig)
|
||||||
systems;
|
systems;
|
||||||
|
|
||||||
|
|
||||||
|
toPartialDarwinConfig =
|
||||||
|
{ hostname, system ? "aarch64-darwin", }:
|
||||||
|
nameValuePair
|
||||||
|
hostname
|
||||||
|
(nix-darwin.lib.darwinSystem {
|
||||||
|
pkgs = makePkgs system;
|
||||||
|
specialArgs = { inherit inputs self; };
|
||||||
|
|
||||||
|
modules = [
|
||||||
|
inputs.home-manager.darwinModules.home-manager
|
||||||
|
./hosts/${hostname}/configuration.nix
|
||||||
|
];
|
||||||
|
});
|
||||||
|
|
||||||
|
compileDarwinSystems =
|
||||||
|
systems:
|
||||||
|
lib.right
|
||||||
|
builtins.listToAttrs
|
||||||
|
(map toPartialDarwinConfig)
|
||||||
|
systems;
|
||||||
}
|
}
|
||||||
|
|
21
flake.lock
21
flake.lock
|
@ -482,6 +482,26 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nix-darwin": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1730765507,
|
||||||
|
"narHash": "sha256-u2KaQonCkHQbQvYrfZz7OJuyOrFelbfh5gS9L43c1WY=",
|
||||||
|
"owner": "LnL7",
|
||||||
|
"repo": "nix-darwin",
|
||||||
|
"rev": "5d891207854e792a33b5984e9bee56c8b57ef010",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "LnL7",
|
||||||
|
"repo": "nix-darwin",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nix-github-actions": {
|
"nix-github-actions": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
@ -606,6 +626,7 @@
|
||||||
"lix-module": "lix-module",
|
"lix-module": "lix-module",
|
||||||
"neovim-overlay": "neovim-overlay",
|
"neovim-overlay": "neovim-overlay",
|
||||||
"niri": "niri",
|
"niri": "niri",
|
||||||
|
"nix-darwin": "nix-darwin",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs_2",
|
||||||
"repo-clone": "repo-clone",
|
"repo-clone": "repo-clone",
|
||||||
"sops-nix": "sops-nix",
|
"sops-nix": "sops-nix",
|
||||||
|
|
11
flake.nix
11
flake.nix
|
@ -11,6 +11,8 @@
|
||||||
dunst-theme = { url = "github:d2718nis/rose-pine-dunst"; flake = false; };
|
dunst-theme = { url = "github:d2718nis/rose-pine-dunst"; flake = false; };
|
||||||
niri = { url = "github:sodiboo/niri-flake"; inputs.nixpkgs.follows = "nixpkgs"; };
|
niri = { url = "github:sodiboo/niri-flake"; inputs.nixpkgs.follows = "nixpkgs"; };
|
||||||
|
|
||||||
|
nix-darwin = { url = "github:LnL7/nix-darwin"; inputs.nixpkgs.follows = "nixpkgs"; };
|
||||||
|
|
||||||
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; };
|
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"; };
|
backgrounds = { url = "git+https://git.zynh.me/Zynh0722/backgrounds"; inputs.nixpkgs.follows = "nixpkgs"; };
|
||||||
|
@ -30,11 +32,10 @@
|
||||||
homeConfigurations = builders.compileHomes [
|
homeConfigurations = builders.compileHomes [
|
||||||
{ user = "zynh"; hostname = "msiserver"; }
|
{ user = "zynh"; hostname = "msiserver"; }
|
||||||
{ user = "val"; hostname = "caveserver"; }
|
{ user = "val"; hostname = "caveserver"; }
|
||||||
{
|
];
|
||||||
user = "zynh";
|
|
||||||
hostname = "little-lightning";
|
darwinConfigurations = builders.compileDarwinSystems [
|
||||||
system = "aarch64-darwin";
|
{ hostname = "little-lightning"; }
|
||||||
}
|
|
||||||
];
|
];
|
||||||
|
|
||||||
overlays.default = import ./pkgs;
|
overlays.default = import ./pkgs;
|
||||||
|
|
38
hosts/little-lightning/configuration.nix
Normal file
38
hosts/little-lightning/configuration.nix
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
{ pkgs, self, ... }: {
|
||||||
|
# List packages installed in system profile. To search by name, run:
|
||||||
|
# $ nix-env -qaP | grep wget
|
||||||
|
environment.systemPackages =
|
||||||
|
[
|
||||||
|
pkgs.vim
|
||||||
|
];
|
||||||
|
|
||||||
|
# Auto upgrade nix package and the daemon service.
|
||||||
|
services.nix-daemon.enable = true;
|
||||||
|
# nix.package = pkgs.nix;
|
||||||
|
|
||||||
|
# Necessary for using flakes on this system.
|
||||||
|
nix.settings.experimental-features = "nix-command flakes";
|
||||||
|
|
||||||
|
# Enable alternative shell support in nix-darwin.
|
||||||
|
# programs.fish.enable = true;
|
||||||
|
|
||||||
|
users.users.zynh = {
|
||||||
|
name = "zynh";
|
||||||
|
home = "/Users/zynh";
|
||||||
|
};
|
||||||
|
|
||||||
|
home-manager = {
|
||||||
|
users = { "zynh" = import ./home.nix; };
|
||||||
|
backupFileExtension = "backup";
|
||||||
|
useGlobalPkgs = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Set Git commit hash for darwin-version.
|
||||||
|
system.configurationRevision = self.rev or self.dirtyRev or null;
|
||||||
|
# $ darwin-rebuild changelog
|
||||||
|
system.stateVersion = 5;
|
||||||
|
|
||||||
|
|
||||||
|
# The platform the configuration will be used on.
|
||||||
|
# nixpkgs.hostPlatform = "x86_64-darwin";
|
||||||
|
}
|
Loading…
Reference in a new issue