This commit is contained in:
Michael Thomson
2026-02-17 10:01:22 -05:00
parent e7d0282ec8
commit 8cbc0e30a8
11 changed files with 110 additions and 157 deletions

26
flake.lock generated
View File

@@ -61,9 +61,7 @@
"inputs": { "inputs": {
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"neovim-src": "neovim-src", "neovim-src": "neovim-src",
"nixpkgs": [ "nixpkgs": "nixpkgs"
"nixpkgs"
]
}, },
"locked": { "locked": {
"lastModified": 1770249911, "lastModified": 1770249911,
@@ -134,7 +132,7 @@
"nixos-wsl": { "nixos-wsl": {
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs_2"
}, },
"locked": { "locked": {
"lastModified": 1769217863, "lastModified": 1769217863,
@@ -152,6 +150,22 @@
} }
}, },
"nixpkgs": { "nixpkgs": {
"locked": {
"lastModified": 1770843696,
"narHash": "sha256-LovWTGDwXhkfCOmbgLVA10bvsi/P8eDDpRudgk68HA8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "2343bbb58f99267223bc2aac4fc9ea301a155a16",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1768564909, "lastModified": 1768564909,
"narHash": "sha256-Kell/SpJYVkHWMvnhqJz/8DqQg2b6PguxVWOuadbHCc=", "narHash": "sha256-Kell/SpJYVkHWMvnhqJz/8DqQg2b6PguxVWOuadbHCc=",
@@ -167,7 +181,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_2": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1770115704, "lastModified": 1770115704,
"narHash": "sha256-KHFT9UWOF2yRPlAnSXQJh6uVcgNcWlFqqiAZ7OVlHNc=", "narHash": "sha256-KHFT9UWOF2yRPlAnSXQJh6uVcgNcWlFqqiAZ7OVlHNc=",
@@ -190,7 +204,7 @@
"nix-darwin": "nix-darwin", "nix-darwin": "nix-darwin",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixos-wsl": "nixos-wsl", "nixos-wsl": "nixos-wsl",
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_3"
} }
} }
}, },

View File

@@ -13,48 +13,68 @@
}; };
nixos-hardware.url = "github:NixOS/nixos-hardware/master"; nixos-hardware.url = "github:NixOS/nixos-hardware/master";
nixos-wsl.url = "github:nix-community/NixOS-WSL/main"; nixos-wsl.url = "github:nix-community/NixOS-WSL/main";
neovim-nightly-overlay = { neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
url = "github:nix-community/neovim-nightly-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = inputs @ { outputs = { nixpkgs, home-manager, nix-darwin, nixos-wsl, neovim-nightly-overlay, ... }@inputs:
nixpkgs, let
nix-darwin, user = "mthomson";
nixos-wsl, specialArgs = { inherit inputs user; };
... overlays = [
}: { neovim-nightly-overlay.overlays.default
];
mkHome = host: {
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = specialArgs;
users.${user} = import ./hosts/${host}/home.nix;
};
};
in
{
nixosConfigurations = { nixosConfigurations = {
desktop = nixpkgs.lib.nixosSystem { desktop = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = {inherit inputs;}; specialArgs = specialArgs;
modules = [ modules = [
./hosts/desktop/configuration.nix ./hosts/desktop/configuration.nix
{ nixpkgs.overlays = overlays; }
home-manager.nixosModules.home-manager
(mkHome "desktop")
]; ];
}; };
thinkpad = nixpkgs.lib.nixosSystem { thinkpad = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = {inherit inputs;}; specialArgs = specialArgs;
modules = [ modules = [
./hosts/thinkpad/configuration.nix ./hosts/thinkpad/configuration.nix
{ nixpkgs.overlays = overlays; }
home-manager.nixosModules.home-manager
(mkHome "thinkpad")
]; ];
}; };
wsl = nixpkgs.lib.nixosSystem { wsl = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = {inherit inputs;}; specialArgs = specialArgs;
modules = [ modules = [
nixos-wsl.nixosModules.default nixos-wsl.nixosModules.default
./hosts/wsl/configuration.nix ./hosts/wsl/configuration.nix
{ nixpkgs.overlays = overlays; }
home-manager.nixosModules.home-manager
(mkHome "wsl")
]; ];
}; };
}; };
darwinConfigurations = { darwinConfigurations = {
macbook = nix-darwin.lib.darwinSystem { macbook = nix-darwin.lib.darwinSystem {
specialArgs = {inherit inputs;}; specialArgs = specialArgs;
modules = [ modules = [
./hosts/macbook/configuration.nix ./hosts/macbook/configuration.nix
{ nixpkgs.overlays = overlays; }
home-manager.darwinModules.home-manager
(mkHome "macbook")
]; ];
}; };
}; };

View File

@@ -6,7 +6,7 @@
}: { }: {
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
inputs.home-manager.nixosModules.default ../../modules/common/common.nix
../../modules/nixos/bootloader.nix ../../modules/nixos/bootloader.nix
../../modules/nixos/user.nix ../../modules/nixos/user.nix
../../modules/nixos/ssh.nix ../../modules/nixos/ssh.nix
@@ -19,18 +19,8 @@
../../modules/nixos/docker.nix ../../modules/nixos/docker.nix
]; ];
boot.kernelPackages = pkgs.linuxPackages_latest;
networking.hostName = "desktop"; networking.hostName = "desktop";
time.timeZone = "America/Toronto";
i18n.defaultLocale = "en_CA.UTF-8";
nixpkgs.config.allowUnfree = true;
nix.settings.experimental-features = ["nix-command" "flakes"];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
wget wget
git git
@@ -38,14 +28,5 @@
lsof lsof
]; ];
home-manager = {
extraSpecialArgs = {inherit inputs;};
useGlobalPkgs = true;
useUserPackages = true;
users = {
mthomson = import ./home.nix;
};
};
system.stateVersion = "23.11"; system.stateVersion = "23.11";
} }

View File

@@ -5,56 +5,26 @@
... ...
}: { }: {
imports = [ imports = [
inputs.home-manager.darwinModules.default ../../modules/common/common.nix
../../modules/nix-darwin/system.nix ../../modules/nix-darwin/system.nix
../../modules/nix-darwin/aerospace.nix ../../modules/nix-darwin/aerospace.nix
../../modules/nixos/neovim.nix
]; ];
nixpkgs.hostPlatform = "aarch64-darwin"; nixpkgs.hostPlatform = "aarch64-darwin";
nixpkgs.config.allowUnfree = true;
nixpkgs.config.allowBroken = true;
nix.nixPath = ["nixpkgs=${inputs.nixpkgs}"];
networking.hostName = "macbook"; networking.hostName = "macbook";
system.primaryUser = "mthomson"; system.primaryUser = "mthomson";
nix.settings = {
trusted-users = ["mthomson"];
substituters = [
"https://cache.nixos.org"
"https://nix-community.cachix.org"
];
trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
};
users.users.mthomson = { users.users.mthomson = {
home = "/Users/mthomson"; home = "/Users/mthomson";
}; };
nix.settings.experimental-features = ["nix-command" "flakes"];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
man-pages man-pages
man-pages-posix man-pages-posix
]; ];
home-manager = {
extraSpecialArgs = {inherit inputs;};
useGlobalPkgs = true;
useUserPackages = true;
backupFileExtension = "backup";
users = {
mthomson = import ./home.nix;
};
};
system.stateVersion = 5; system.stateVersion = 5;
# fix for this: https://github.com/LnL7/nix-darwin/issues/1346 # fix for this: https://github.com/LnL7/nix-darwin/issues/1346

View File

@@ -30,13 +30,6 @@
home.packages = with pkgs; [ home.packages = with pkgs; [
hidden-bar hidden-bar
presenterm
(azure-cli.withExtensions [
azure-cli.extensions.containerapp
])
nh
todo-txt-cli
age
]; ];
programs.home-manager.enable = true; programs.home-manager.enable = true;

View File

@@ -1,6 +1,3 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ {
config, config,
pkgs, pkgs,
@@ -8,15 +5,13 @@
... ...
}: { }: {
imports = [ imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
inputs.home-manager.nixosModules.default
inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t480 inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t480
../../modules/common/common.nix
../../modules/nixos/bootloader.nix ../../modules/nixos/bootloader.nix
../../modules/nixos/user.nix ../../modules/nixos/user.nix
../../modules/nixos/ssh.nix ../../modules/nixos/ssh.nix
../../modules/nixos/bluetooth.nix ../../modules/nixos/bluetooth.nix
#../../modules/nixos/sway.nix
../../modules/nixos/i3.nix ../../modules/nixos/i3.nix
../../modules/nixos/nm.nix ../../modules/nixos/nm.nix
../../modules/nixos/sound.nix ../../modules/nixos/sound.nix
@@ -27,27 +22,8 @@
networking.hostName = "thinkpad"; networking.hostName = "thinkpad";
nix.settings = {
trusted-users = ["mthomson"];
substituters = [
"https://cache.nixos.org"
"https://nix-community.cachix.org"
];
trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
};
time.timeZone = "America/Toronto";
i18n.defaultLocale = "en_CA.UTF-8"; i18n.defaultLocale = "en_CA.UTF-8";
nixpkgs.config.allowUnfree = true;
nix.settings.experimental-features = ["nix-command" "flakes"];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
wget wget
git git
@@ -55,14 +31,5 @@
lsof lsof
]; ];
home-manager = {
extraSpecialArgs = {inherit inputs;};
useGlobalPkgs = true;
useUserPackages = true;
users = {
mthomson = import ./home.nix;
};
};
system.stateVersion = "23.11"; system.stateVersion = "23.11";
} }

View File

@@ -11,7 +11,7 @@
... ...
}: { }: {
imports = [ imports = [
inputs.home-manager.nixosModules.default ../../modules/common/common.nix
../../modules/nixos/user.nix ../../modules/nixos/user.nix
../../modules/nixos/postgres.nix ../../modules/nixos/postgres.nix
../../modules/nixos/podman.nix ../../modules/nixos/podman.nix
@@ -37,20 +37,7 @@
dconf dconf
]; ];
nixpkgs.config.allowUnfree = true;
nix.settings.experimental-features = ["nix-command" "flakes"];
programs.nix-ld.enable = true; programs.nix-ld.enable = true;
home-manager = {
extraSpecialArgs = {inherit inputs;};
useGlobalPkgs = true;
useUserPackages = true;
users = {
mthomson = import ./home.nix;
};
};
system.stateVersion = "24.11"; system.stateVersion = "24.11";
} }

24
modules/common/common.nix Normal file
View File

@@ -0,0 +1,24 @@
{
lib,
...
}: {
nixpkgs.config.allowUnfree = true;
time.timeZone = "America/Toronto";
nix.settings = {
trusted-users = ["mthomson"];
experimental-features = ["nix-command" "flakes"];
substituters = [
"https://cache.nixos.org"
"https://nix-community.cachix.org"
];
trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
};
}

View File

@@ -17,7 +17,7 @@
shellIntegration = { shellIntegration = {
enableZshIntegration = true; enableZshIntegration = true;
}; };
themeFile = "Modus_Operandi"; themeFile = "Modus_Vivendi";
# darwinLaunchOptions = [ # darwinLaunchOptions = [
# "--single-instance" # "--single-instance"
# ]; # ];

View File

@@ -8,6 +8,8 @@
]; ];
home.packages = with pkgs; [ home.packages = with pkgs; [
neovim
#utilities #utilities
ripgrep ripgrep
zk zk

View File

@@ -1,5 +0,0 @@
{pkgs, inputs, ...}: {
environment.systemPackages = [
inputs.neovim-nightly-overlay.packages.${pkgs.system}.default
];
}