Compare commits
No commits in common. "92e04a0924e227cec831b034d0d1080caa3f7ab6" and "96e14ada2013e85aea6226b77770a9b7e4c987f7" have entirely different histories.
92e04a0924
...
96e14ada20
3 changed files with 10 additions and 85 deletions
|
@ -1,37 +0,0 @@
|
||||||
{ pkgs, system, ... }: {
|
|
||||||
# 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";
|
|
||||||
|
|
||||||
# Create /etc/zshrc that loads the nix-darwin environment.
|
|
||||||
programs.zsh.enable = true;
|
|
||||||
|
|
||||||
# Used for backwards compatibility, please read the changelog before changing.
|
|
||||||
# $ darwin-rebuild changelog
|
|
||||||
system.stateVersion = 4;
|
|
||||||
|
|
||||||
nixpkgs = {
|
|
||||||
# TODO(spotlightishere): Make this configurable beyond a singular device.
|
|
||||||
hostPlatform = "aarch64-darwin";
|
|
||||||
|
|
||||||
# Custom packages.
|
|
||||||
# TODO(spotlightishere): Why does this need to be specified in both home-manager and globally?
|
|
||||||
overlays = [ (import ../pkgs/default.nix) ];
|
|
||||||
};
|
|
||||||
|
|
||||||
# Our singular user!
|
|
||||||
users.users.spot = {
|
|
||||||
description = "Spotlight Deveaux";
|
|
||||||
home = "/Users/spot";
|
|
||||||
shell = pkgs.zsh;
|
|
||||||
};
|
|
||||||
}
|
|
21
flake.lock
generated
21
flake.lock
generated
|
@ -65,26 +65,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nix-darwin": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1711763326,
|
|
||||||
"narHash": "sha256-sXcesZWKXFlEQ8oyGHnfk4xc9f2Ip0X/+YZOq3sKviI=",
|
|
||||||
"owner": "LnL7",
|
|
||||||
"repo": "nix-darwin",
|
|
||||||
"rev": "36524adc31566655f2f4d55ad6b875fb5c1a4083",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "LnL7",
|
|
||||||
"repo": "nix-darwin",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1712608508,
|
"lastModified": 1712608508,
|
||||||
|
@ -107,7 +87,6 @@
|
||||||
"darwin-systems": "darwin-systems",
|
"darwin-systems": "darwin-systems",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"linux-systems": "linux-systems",
|
"linux-systems": "linux-systems",
|
||||||
"nix-darwin": "nix-darwin",
|
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
37
flake.nix
37
flake.nix
|
@ -12,21 +12,17 @@
|
||||||
url = "github:nix-community/home-manager";
|
url = "github:nix-community/home-manager";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
nix-darwin = {
|
|
||||||
url = "github:LnL7/nix-darwin";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs@{ nixpkgs, home-manager, nix-darwin, ... }:
|
outputs = { nixpkgs, home-manager, linux-systems, darwin-systems, all-systems, ... }:
|
||||||
let
|
let
|
||||||
# TODO(spotlightishere): Is there a better way to approach this that doesn't
|
# TODO(spotlightishere): Is there a better way to approach this that doesn't
|
||||||
# involve importing so many separate flakes?
|
# involve importing so many separate flakes?
|
||||||
#
|
#
|
||||||
# (We could manually merge Darwin and Linux themselves, but this is primarily for readability.)
|
# (We could manually merge Darwin and Linux themselves, but this is primarily for readability.)
|
||||||
allSystems = nixpkgs.lib.genAttrs (import inputs.all-systems);
|
allSystems = nixpkgs.lib.genAttrs (import all-systems);
|
||||||
darwinSystems = nixpkgs.lib.genAttrs (import inputs.darwin-systems);
|
darwinSystems = nixpkgs.lib.genAttrs (import darwin-systems);
|
||||||
linuxSystems = nixpkgs.lib.genAttrs (import inputs.linux-systems);
|
linuxSystems = nixpkgs.lib.genAttrs (import linux-systems);
|
||||||
|
|
||||||
homeManager = { system, specialArgs ? { } }:
|
homeManager = { system, specialArgs ? { } }:
|
||||||
home-manager.lib.homeManagerConfiguration {
|
home-manager.lib.homeManagerConfiguration {
|
||||||
|
@ -53,6 +49,10 @@
|
||||||
# For now, this is effectively true, sans a few specific configurations :)
|
# For now, this is effectively true, sans a few specific configurations :)
|
||||||
spotlight = homeManager {
|
spotlight = homeManager {
|
||||||
system = system;
|
system = system;
|
||||||
|
specialArgs = {
|
||||||
|
desktop = false;
|
||||||
|
gpg = false;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# For a special case: with the Steam Deck, we have to assume the user
|
# For a special case: with the Steam Deck, we have to assume the user
|
||||||
|
@ -88,29 +88,12 @@
|
||||||
# (Again, we assume a default name of `spotlight` under Linux.)
|
# (Again, we assume a default name of `spotlight` under Linux.)
|
||||||
nixosModules.default = {
|
nixosModules.default = {
|
||||||
imports = [
|
imports = [
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager {
|
||||||
{
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
users.spotlight = import ./home/home.nix;
|
users.spotlight = import ./home/home.nix;
|
||||||
};
|
extraSpecialArgs = { desktop = false; gpg = false; };
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# We define a default Darwin configuration via nix-darwin.
|
|
||||||
darwinConfigurations."spotlights-macbook-air" = nix-darwin.lib.darwinSystem {
|
|
||||||
modules = [
|
|
||||||
# System-wide configuration
|
|
||||||
./darwin/darwin.nix
|
|
||||||
# Our provided home-manager configuration
|
|
||||||
home-manager.darwinModules.home-manager {
|
|
||||||
home-manager = {
|
|
||||||
useGlobalPkgs = true;
|
|
||||||
useUserPackages = true;
|
|
||||||
users.spot = import ./home/home.nix;
|
|
||||||
extraSpecialArgs = { desktop = true; gpg = true; };
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue