inital support for macos

This commit is contained in:
Maddie H 2023-04-02 16:03:21 +01:00
parent 39a0b2e5d0
commit d0248123ab
Signed by: maddie
GPG Key ID: C296DE8C9053683F
109 changed files with 202 additions and 99 deletions

View File

@ -1,5 +1,25 @@
{
"nodes": {
"darwin": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1680266963,
"narHash": "sha256-IW/lzbUCOcldLHWHjNSg1YoViDnZOmz0ZJL7EH9OkV8=",
"owner": "LnL7",
"repo": "nix-darwin",
"rev": "99d4187d11be86b49baa3a1aec0530004072374f",
"type": "github"
},
"original": {
"owner": "LnL7",
"repo": "nix-darwin",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@ -37,6 +57,7 @@
},
"root": {
"inputs": {
"darwin": "darwin",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs"
}

View File

@ -5,42 +5,47 @@
# Home manager
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
darwin.url = "github:LnL7/nix-darwin";
darwin.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, home-manager }:
outputs = { self, nixpkgs, home-manager, darwin }:
let
username = "maddie";
pkgs = import nixpkgs { inherit system; config.allowUnfree = true; overlays = import ./overlays.nix; };
pkgs = import nixpkgs { system = "aarch64-darwin"; config.allowUnfree = true; config.allowUnsupportedSystem = false; config.allowBroken = false; overlays = import ./overlays.nix; };
utils = import ./utils pkgs;
specialArgs = { inherit username; inherit pkgs; };
in
{
nixosConfigurations.luna = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
inherit pkgs;
nixosConfigurations."luna" = nixpkgs.lib.nixosSystem {
inherit specialArgs;
inherit pkgs;
system = "x86_64-linux";
modules = [
home-manager.nixosModules.home-manager
{
home-manager.users.${username}.imports = utils.nixFilesIn ./maddie;
home-manager.users.${username}.imports = utils.nixFilesIn ./maddie/common ++ utils.nixFilesIn ./maddie/nixos;
home-manager.extraSpecialArgs = specialArgs;
}
] ++ utils.nixFilesIn ./systems/desktop;
};
darwinConfigurations."MMacBookPro" = inputs.darwin.lib.darwinSystem {
inherit pkgs;
darwinConfigurations."MMacBookPro" = darwin.lib.darwinSystem {
inherit specialArgs;
system = "aarch64-darwin",
inherit pkgs;
system = "aarch64-darwin";
modules = [
home-manager.darwinModules.home-manager
{
home-manager.users.${username}.imports = utils.nixFilesIn ./maddie;
home-manager.useUserPackages = true;
home-manager.users.${username}.imports = utils.nixFilesIn ./maddie/common ++ utils.nixFilesIn ./maddie/macos;
home-manager.extraSpecialArgs = specialArgs;
}
] ++ utils.nixFilesIn ./systems/macbookpro;
};
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixpkgs-fmt;
formatter.aarch64-darwin = nixpkgs.legacyPackages.aarch64-darwin.nixpkgs-fmt;
};
}

View File

@ -1,11 +0,0 @@
{ config, pkgs, ... }:
{
programs.browserpass = {
enable = true;
browsers = [
"chromium"
"firefox"
];
};
}

View File

@ -2,8 +2,7 @@
{
home.packages = with pkgs; [
tor-browser-bundle-bin
librewolf
# librewolf
amfora
lynx
];

View File

@ -2,6 +2,6 @@
{
home.packages = with pkgs; [
nodePackages.insect
# nodePackages.insect
];
}

15
maddie/common/exa.nix Normal file
View File

@ -0,0 +1,15 @@
{ config, ... }:
{
programs.exa = {
enable = true;
enableAliases = true;
extraOptions = [
"--group-directories-first"
"--time-style=long-iso"
"--git"
"-h"
];
icons = true;
};
}

View File

@ -37,5 +37,14 @@
init.defaultBranch = "development";
pull.rebase = "merges";
};
ignores = [
"**/.DS_Store"
"**/._.DS_Store"
".DS_Store"
"._.DS_Store"
"**/*.swp"
"*.swp"
];
};
}

View File

@ -3,8 +3,8 @@
{
home.packages = with pkgs; [
element-desktop # Matrix client
signal-desktop # Signal client
# signal-desktop # Signal client
discord-canary # Discord client
ripcord # Better discord client
#ripcord # Better discord client
];
}

View File

@ -52,9 +52,7 @@ return require('packer').startup(function(use)
use {
'xiyaowong/nvim-transparent',
config = function()
require('transparent').setup({
enable = false;
})
vim.g.transparent_enabled = false
end
}

View File

@ -11,9 +11,4 @@
home.sessionVariables = {
PASSWORD_STORE_DIR = "${config.xdg.dataHome}/password-store";
};
services.pass-secret-service = {
enable = true;
storePath = "${config.xdg.dataHome}/password-store";
};
}

View File

@ -4,6 +4,5 @@
home.packages = with pkgs; [
xorg.xkill # Kill X11 programs with mouse
killall # Kill programs
gotop # Process manager in go
];
}

View File

@ -5,8 +5,6 @@
# Aliases
shellAliases = {
# Core Programs
ls = "ls -lhN --color=auto --group-directories-first";
ll = "ls -av";
cp = "cp -iv";
mv = "mv -iv";
rm = "rm -vI";

View File

@ -1,11 +1,6 @@
{ config, pkgs, username, ... }:
{
# Drawterm
home.packages = with pkgs; [
drawterm
];
# SSH
programs.ssh = {
enable = true;

View File

@ -1,48 +0,0 @@
{ config, ... }:
{
programs.firefox = {
enable = true;
profiles = {
"maddie" = {
name = "Maddie";
bookmarks = [
{
name = "Home";
bookmarks = [
{
name = "BT Home Hub";
url = "http://192.168.1.254/";
}
{
name = "Home Assistant";
url = "http://192.168.1.105:8123/lovelace/0";
}
{
name = "Security Cameras";
url = "http://192.168.1.108/";
}
{
name = "Fast";
url = "https://fast.com/";
}
];
}
{
name = "Nix";
bookmarks = [
{
name = "NixOS Packages";
url = "https://search.nixos.org/packages";
}
{
name = "NixOS Options";
url = "https://search.nixos.org/options";
}
];
}
];
};
};
};
}

19
maddie/macos/home.nix Normal file
View File

@ -0,0 +1,19 @@
{ config, username, pkgs, lib, ... }:
{
programs.home-manager.enable = true;
home = {
inherit username;
homeDirectory = lib.mkForce "/Users/${username}";
stateVersion = "23.05";
};
# Install MacOS applications to the user environment if the targetPlatform is Darwin
home.file."Applications/home-manager-linked".source = let
apps = pkgs.buildEnv {
name = "home-manager-applications";
paths = config.home.packages;
pathsToLink = "/Applications";
};
in lib.mkIf pkgs.stdenv.targetPlatform.isDarwin "${apps}/Applications";
}

5
maddie/macos/testing.nix Normal file
View File

@ -0,0 +1,5 @@
{ config, ... }:
{
programs.kitty.enable = true;
}

13
maddie/macos/wezterm.nix Normal file
View File

@ -0,0 +1,13 @@
{ config, pkgs, ... }:
{
programs.wezterm = {
enable = true;
extraConfig = ''
return {
color_scheme = 'OneDark (base16)',
hide_tab_bar_if_only_one_tab = true
}
'';
};
}

View File

@ -1,5 +0,0 @@
{ config, ... }:
{
programs.obs-studio.enable = true;
}

Some files were not shown because too many files have changed in this diff Show More