adhere to nixos systems
This commit is contained in:
parent
fac5e52f36
commit
9350ff271f
56
flake.nix
56
flake.nix
@ -1,11 +1,11 @@
|
|||||||
{
|
{
|
||||||
description = "Wyatt's nix configuration";
|
description = "Wyatt's nix configuration suite";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs-darwin.url = "github:nixos/nixpkgs/nixpkgs-24.05-darwin";
|
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-24.05";
|
||||||
|
# nixpkgs-darwin.url = "github:nixos/nixpkgs/nixpkgs-24.05-darwin";
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager/release-24.05";
|
url = "github:nix-community/home-manager/release-24.05";
|
||||||
inputs.nixpkgs.follows = "nixpkgs-darwin";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
darwin = {
|
darwin = {
|
||||||
url = "github:lnl7/nix-darwin";
|
url = "github:lnl7/nix-darwin";
|
||||||
@ -13,11 +13,6 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# The `outputs` function will return all the build results of the flake.
|
|
||||||
# A flake can have many use cases and different types of outputs,
|
|
||||||
# parameters in `outputs` are defined in `inputs` and can be referenced by their names.
|
|
||||||
# However, `self` is an exception, this special parameter points to the `outputs` itself (self-reference)
|
|
||||||
# The `@` syntax here is used to alias the attribute set of the inputs's parameter, making it convenient to use inside the function.
|
|
||||||
outputs = inputs @ {
|
outputs = inputs @ {
|
||||||
self,
|
self,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
@ -25,37 +20,56 @@
|
|||||||
home-manager,
|
home-manager,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
username = "wyatt";
|
userName = "wyatt";
|
||||||
useremail = "wyatt@wyattjmiller.com";
|
userEmail = "wyatt@wyattjmiller.com";
|
||||||
system = "aarch64-darwin"; # aarch64-darwin or x86_64-darwin
|
# supportedSystems = ["x86_64-linux" "aarch64-darwin"];
|
||||||
hostname = "sephiroth";
|
# system = "aarch64-darwin"; # aarch64-darwin or x86_64-darwin
|
||||||
|
# hostname = "sephiroth";
|
||||||
|
# forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
||||||
|
|
||||||
specialArgs =
|
specialArgs =
|
||||||
inputs
|
inputs
|
||||||
// {
|
// {
|
||||||
inherit username useremail hostname;
|
inherit userName userEmail;
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
darwinConfigurations."${hostname}" = darwin.lib.darwinSystem {
|
# Primary laptop - MacBook Pro (2023, M3)
|
||||||
inherit system specialArgs;
|
darwinConfigurations."sephiroth" = darwin.lib.darwinSystem {
|
||||||
|
inherit specialArgs;
|
||||||
|
system = "aarch64-darwin";
|
||||||
modules = [
|
modules = [
|
||||||
./modules/nix-core.nix
|
./modules/nix-core.nix
|
||||||
./modules/system.nix
|
./modules/darwinSystem.nix
|
||||||
./modules/apps.nix
|
./modules/apps.nix
|
||||||
./modules/host-users.nix
|
./modules/host-users.nix
|
||||||
|
|
||||||
# home manager
|
|
||||||
home-manager.darwinModules.home-manager
|
home-manager.darwinModules.home-manager
|
||||||
{
|
{
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
home-manager.useUserPackages = true;
|
home-manager.useUserPackages = true;
|
||||||
home-manager.extraSpecialArgs = specialArgs;
|
home-manager.extraSpecialArgs = specialArgs;
|
||||||
home-manager.users.${username} = import ./home;
|
home-manager.users.${userName} = import ./home;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# nix code formatter
|
# Primary desktop computer
|
||||||
formatter.${system} = nixpkgs.legacyPackages.${system}.alejandra;
|
nixosConfiguration."cloud" = nixpkgs.lib.nixosSystem {
|
||||||
|
inherit specialArgs;
|
||||||
|
system = "x86_64-linux";
|
||||||
|
modules = [
|
||||||
|
/etc/nixos/configuration.nix
|
||||||
|
./modules/nix-core.nix
|
||||||
|
# ./modules/linuxSystem.nix
|
||||||
|
./modules/host-users.nix
|
||||||
|
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
{
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
home-manager.users.${userName} = import ./home;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,6 @@
|
|||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
programs.atuin = {
|
programs.atuin = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
enableFishIntegration = true;
|
enableFishIntegration = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -9,15 +9,15 @@
|
|||||||
p7zip
|
p7zip
|
||||||
|
|
||||||
# utils
|
# utils
|
||||||
bat # a batter cat
|
bat
|
||||||
lazygit # a git tui that's easy to use
|
lazygit
|
||||||
bottom # a better top
|
bottom
|
||||||
ripgrep # recursively searches directories for a regex pattern
|
ripgrep
|
||||||
jq # A lightweight and flexible command-line JSON processor
|
jq
|
||||||
yq-go # yaml processer https://github.com/mikefarah/yq
|
yq-go
|
||||||
fzf # A command-line fuzzy finder
|
fzf
|
||||||
fh # flake hub command line interface
|
fh
|
||||||
aria2 # A lightweight multi-protocol & multi-source command-line download utility
|
aria2
|
||||||
yt-dlp
|
yt-dlp
|
||||||
|
|
||||||
# misc
|
# misc
|
||||||
@ -41,6 +41,7 @@
|
|||||||
nixd
|
nixd
|
||||||
deadnix
|
deadnix
|
||||||
alejandra
|
alejandra
|
||||||
|
statix
|
||||||
|
|
||||||
# productivity
|
# productivity
|
||||||
iterm2
|
iterm2
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
{ username, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
userName,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
username = userName;
|
||||||
|
in {
|
||||||
# import sub modules
|
# import sub modules
|
||||||
imports = [
|
imports = [
|
||||||
./atuin.nix
|
./atuin.nix
|
||||||
@ -15,20 +20,24 @@
|
|||||||
|
|
||||||
# Home Manager needs a bit of information about you and the
|
# Home Manager needs a bit of information about you and the
|
||||||
# paths it should manage.
|
# paths it should manage.
|
||||||
home = {
|
home = lib.mkMerge [
|
||||||
username = username;
|
(lib.mkIf pkgs.stdenv.isDarwin {
|
||||||
homeDirectory = "/Users/${username}";
|
homeDirectory = "/Users/${username}";
|
||||||
|
})
|
||||||
|
(lib.mkIf pkgs.stdenv.isLinux {
|
||||||
|
homeDirectory = "/home/${username}";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
# This value determines the Home Manager release that your
|
# This value determines the Home Manager release that your
|
||||||
# configuration is compatible with. This helps avoid breakage
|
# configuration is compatible with. This helps avoid breakage
|
||||||
# when a new Home Manager release introduces backwards
|
# when a new Home Manager release introduces backwards
|
||||||
# incompatible changes.
|
# incompatible changes.
|
||||||
#
|
#
|
||||||
# You can update Home Manager without changing this value. See
|
# You can update Home Manager without changing this value. See
|
||||||
# the Home Manager release notes for a list of state version
|
# the Home Manager release notes for a list of state version
|
||||||
# changes in each release.
|
# changes in each release.
|
||||||
stateVersion = "24.05";
|
stateVersion = "24.05";
|
||||||
};
|
|
||||||
|
|
||||||
# Let Home Manager install and manage itself.
|
# Let Home Manager install and manage itself.
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
{ lib, config, ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
programs.direnv = {
|
programs.direnv = {
|
||||||
enable = true;
|
enable = true;
|
||||||
nix-direnv.enable = true;
|
nix-direnv.enable = true;
|
||||||
@ -11,4 +9,4 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
{ lib, config, ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
programs.eza = {
|
programs.eza = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableFishIntegration = true;
|
enableFishIntegration = true;
|
||||||
extraOptions = [
|
extraOptions = [
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
programs.lazygit = {
|
programs.lazygit = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
{ lib, config, ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
programs.neovim = {
|
programs.neovim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
defaultEditor = true;
|
defaultEditor = true;
|
||||||
vimAlias = true;
|
vimAlias = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ pkgs, ... }: {
|
{pkgs, ...}: {
|
||||||
programs.fish = {
|
programs.fish = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# initExtra = ''
|
# initExtra = ''
|
||||||
@ -7,18 +7,18 @@
|
|||||||
|
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
# ls aliases
|
# ls aliases
|
||||||
ls = "eza --color $argv";
|
ls = "eza --color";
|
||||||
la = "eza -l -all --color $argv";
|
la = "eza -l -all --color";
|
||||||
ll = "eza -l --color $argv";
|
ll = "eza -l --color";
|
||||||
lt = "eza -l --color --git $argv";
|
lt = "eza -l --color --git";
|
||||||
|
|
||||||
# lazygit alias
|
# lazygit alias
|
||||||
lg = "lazygit";
|
lg = "lazygit";
|
||||||
|
|
||||||
# cat, less, more alias
|
# cat, less, more alias
|
||||||
cat = "bat $argv";
|
cat = "bat";
|
||||||
less = "bat $argv";
|
less = "bat";
|
||||||
more = "bat $argv";
|
more = "bat";
|
||||||
|
|
||||||
# top alias
|
# top alias
|
||||||
top = "btm";
|
top = "btm";
|
||||||
@ -28,28 +28,28 @@
|
|||||||
functions = {
|
functions = {
|
||||||
fish_greeting = {
|
fish_greeting = {
|
||||||
body = ''
|
body = ''
|
||||||
set memes \
|
set memes \
|
||||||
"Crazy? I was crazy once. They locked me in a room. A rubber room. A rubber room with rats. And rats make me crazy." \
|
"Crazy? I was crazy once. They locked me in a room. A rubber room. A rubber room with rats. And rats make me crazy." \
|
||||||
"Daddy, chill!" \
|
"Daddy, chill!" \
|
||||||
"What the hell is even that?!" \
|
"What the hell is even that?!" \
|
||||||
"Road work ahead? Yeah, I sure hope it does!" \
|
"Road work ahead? Yeah, I sure hope it does!" \
|
||||||
"Look at all those chickens!" \
|
"Look at all those chickens!" \
|
||||||
"I smell like beef" \
|
"I smell like beef" \
|
||||||
"Say, Coloardo - I'M A GIRAFFE" \
|
"Say, Coloardo - I'M A GIRAFFE" \
|
||||||
"I didn't get no sleep cause of y'all, y'all not gone get any sleep cause of me!" \
|
"I didn't get no sleep cause of y'all, y'all not gone get any sleep cause of me!" \
|
||||||
"This is the dollar store, how good can it be?" \
|
"This is the dollar store, how good can it be?" \
|
||||||
"That was legitness" \
|
"That was legitness" \
|
||||||
"Deez nuts" \
|
"Deez nuts" \
|
||||||
"I wanna be a cowboy baby" \
|
"I wanna be a cowboy baby" \
|
||||||
"Can I get a waffle? Can I please get a waffle?" \
|
"Can I get a waffle? Can I please get a waffle?" \
|
||||||
"I'm lesbian. I thought you were American." \
|
"I'm lesbian. I thought you were American." \
|
||||||
"You gotta give 'em that 'hawk tuah' and spit on that thang!" \
|
"You gotta give 'em that 'hawk tuah' and spit on that thang!" \
|
||||||
"We don't do that here..."
|
"We don't do that here..."
|
||||||
|
|
||||||
set choose_meme (random)"%"(count $memes)
|
set choose_meme (random)"%"(count $memes)
|
||||||
set choose_meme $memes[(math $choose_meme"+1")]
|
set choose_meme $memes[(math $choose_meme"+1")]
|
||||||
|
|
||||||
printf (set_color F90)"%s\n" $choose_meme
|
printf (set_color F90)"%s\n" $choose_meme
|
||||||
'';
|
'';
|
||||||
onEvent = "fish_greeting";
|
onEvent = "fish_greeting";
|
||||||
};
|
};
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
{ lib, config, ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
programs.starship = {
|
programs.starship = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableFishIntegration = true;
|
enableFishIntegration = true;
|
||||||
settings = { };
|
settings = {};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
0
modules/linuxSystem.nix
Normal file
0
modules/linuxSystem.nix
Normal file
Loading…
Reference in New Issue
Block a user