reorganize

This commit is contained in:
Michael Thomson 2024-02-27 10:52:11 -05:00
parent ccecea715c
commit 30cba6caf1
No known key found for this signature in database
13 changed files with 120 additions and 40 deletions

3
.gitmodules vendored
View File

@ -1,3 +0,0 @@
[submodule "home/nvim"]
path = home/nvim
url = https://github.com/michaelthomson0797/nvim.git

21
flake.lock generated
View File

@ -20,6 +20,26 @@
"type": "github"
}
},
"nix-darwin": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1709001452,
"narHash": "sha256-FnZ54wkil54hKvr1irdKic1TE27lHQI9dKQmOJRrtlU=",
"owner": "LnL7",
"repo": "nix-darwin",
"rev": "6c06334f0843c7300d1678726bb607ce526f6b36",
"type": "github"
},
"original": {
"owner": "LnL7",
"repo": "nix-darwin",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1708296515,
@ -39,6 +59,7 @@
"root": {
"inputs": {
"home-manager": "home-manager",
"nix-darwin": "nix-darwin",
"nixpkgs": "nixpkgs"
}
}

View File

@ -3,23 +3,33 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-darwin = {
url = "github:LnL7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs@{ self, nixpkgs, home-manager, ... }: {
outputs = inputs@{ self, nixpkgs, home-manager, nix-darwin, ... }: {
nixosConfigurations = {
nixos = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
./system
./hosts/nixos/configuration.nix
];
};
};
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.mthomson = import ./home;
}
darwinConfigurations = {
macbook = nix-darwin.lib.darwinSystem {
system = "aarch64-darwin";
specialArgs = { inherit inputs; };
modules = [
./hosts/macbook/configuration.nix
];
};
};

@ -1 +0,0 @@
Subproject commit ccd3d56eb3097febe89dccbfa39be088386e85b3

View File

@ -0,0 +1,25 @@
{ config, pkgs, inputs, ... }:
{
imports =
[ # Include the results of the hardware scan.
inputs.home-manager.nixosModules.default
];
environment.systemPackages = with pkgs; [
hello
];
home-manager = {
extraSpecialArgs = { inherit inputs; };
useGlobalPkgs = true;
useUserPackages = true;
users = {
"mthomson" = import ./home.nix;
};
};
# Auto upgrade nix package and the daemon service.
services.nix-daemon.enable = true;
nix.package = pkgs.nix;
}

18
hosts/macbook/home.nix Normal file
View File

@ -0,0 +1,18 @@
{ config, pkgs, ... }:
{
imports = [
../../modules/home-manager/wezterm
];
home.username = "mthomson";
home.homeDirectory = "/Users/mthomson";
home.stateVersion = "23.11";
home.packages = with pkgs; [
hello
cowsay
];
programs.home-manager.enable = true;
programs.git.enable = true;
}

View File

@ -8,25 +8,26 @@
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
inputs.home-manager.nixosModules.default
];
# Bootloader.
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "nixos"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Enable networking
networking.networkmanager.enable = true;
# Enable networking
networking.networkmanager.enable = true;
# Set your time zone.
# Set your time zone.
time.timeZone = "America/Toronto";
# Select internationalisation properties.
# Select internationalisation properties.
i18n.defaultLocale = "en_CA.UTF-8";
# i3 relates stuff
# i3 relates stuff
environment.pathsToLink = [ "/libexec" ];
services.xserver = {
enable = true;
@ -47,11 +48,11 @@
package = pkgs.i3-gaps;
extraPackages = with pkgs; [
dmenu
i3status
i3lock
i3blocks
feh
arandr
i3status
i3lock
i3blocks
feh
arandr
];
};
@ -59,7 +60,7 @@
xkbVariant = "";
};
# pipewire
# pipewire
security.rtkit.enable = true;
services.pipewire = {
enable = true;
@ -68,7 +69,7 @@
pulse.enable = true;
};
# Define a user account. Don't forget to set a password with passwd.
# Define a user account. Don't forget to set a password with passwd.
users.users.mthomson = {
isNormalUser = true;
description = "Michael Thomson";
@ -76,32 +77,41 @@
packages = with pkgs; [];
};
# Allow unfree packages
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
environment.systemPackages = with pkgs; [
neovim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
wget
git
curl
wget
git
curl
];
environment.variables.EDITOR = "nvim";
home-manager = {
extraSpecialArgs = { inherit inputs; };
useGlobalPkgs = true;
useUserPackages = true;
users = {
"mthomson" = import ./home.nix;
};
};
programs.nix-ld.enable = true;
programs.nix-ld.libraries = with pkgs; [
# Add any missing dynamic libraries for unpackaged programs
# here, NOT in environment.systemPackages
# Add any missing dynamic libraries for unpackaged programs
# here, NOT in environment.systemPackages
];
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.11"; # Did you read the comment?
}

View File

@ -6,7 +6,7 @@
extraConfig = ''
return {
color_scheme = 'catppuccin-frappe',
-- font = wezterm.font('PragmataPro Liga'),
font = wezterm.font('PragmataPro Liga'),
font_size = 16,
use_fancy_tab_bar = false,
native_macos_fullscreen_mode = false,