test
This commit is contained in:
@@ -1 +0,0 @@
|
|||||||
hosts/hakase/hardware-configuration.nix
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
description = "A rewrite of the original Sakamoto NixOS config.";
|
description = "A rewrite of the original Sakamoto NixOS config.";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
@@ -18,6 +19,7 @@
|
|||||||
url = "github:lnl7/nix-darwin";
|
url = "github:lnl7/nix-darwin";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
nixovim = {
|
nixovim = {
|
||||||
url = "git+https://git.sakamoto.dev/kenji/nixovim.git";
|
url = "git+https://git.sakamoto.dev/kenji/nixovim.git";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
@@ -32,47 +34,54 @@
|
|||||||
darwin,
|
darwin,
|
||||||
...
|
...
|
||||||
} @ inputs: let
|
} @ inputs: let
|
||||||
# Define common arguments or functions here if needed
|
|
||||||
config = import ./config.nix;
|
config = import ./config.nix;
|
||||||
# A helper function to create arguments for modules
|
|
||||||
mkArgs = system:
|
mkArgs = system:
|
||||||
{
|
{
|
||||||
inherit inputs system;
|
inherit inputs system;
|
||||||
}
|
}
|
||||||
// config;
|
// config;
|
||||||
|
|
||||||
|
systems = ["x86_64-linux" "aarch64-linux"];
|
||||||
in
|
in
|
||||||
flake-utils.lib.eachDefaultSystem (
|
flake-utils.lib.eachSystem systems (system: let
|
||||||
system: let
|
|
||||||
lib = nixpkgs.lib;
|
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
|
||||||
args = mkArgs system; # Use the helper for common args
|
|
||||||
in {
|
|
||||||
nixosConfigurations = {
|
|
||||||
hakase = lib.nixosSystem {
|
|
||||||
inherit system;
|
|
||||||
specialArgs = args;
|
|
||||||
modules = [./hosts/hakase/configuration.nix]; # Add your NixOS modules here
|
|
||||||
};
|
|
||||||
};
|
|
||||||
homeConfigurations = {
|
|
||||||
# Assuming you want home-manager configurations for all default systems
|
|
||||||
hakase = home-manager.lib.homeManagerConfiguration {
|
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
inherit system;
|
inherit system;
|
||||||
extraSpecialArgs = args;
|
config.allowUnfree = true;
|
||||||
|
};
|
||||||
|
args = mkArgs system;
|
||||||
|
in {
|
||||||
|
# This is optional if you want per-system packages or apps
|
||||||
|
packages.default = pkgs.hello;
|
||||||
|
})
|
||||||
|
// {
|
||||||
|
nixosConfigurations = {
|
||||||
|
hakase = nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
specialArgs = mkArgs "x86_64-linux";
|
||||||
|
modules = [
|
||||||
|
./hosts/hakase/configuration.nix
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
homeConfigurations = {
|
||||||
|
hakase = home-manager.lib.homeManagerConfiguration {
|
||||||
|
pkgs = import nixpkgs {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
config.allowUnfree = true;
|
||||||
|
extraSpecialArgs = mkArgs "x86_64-linux";
|
||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
./home/hakase.nix
|
./home/hakase.nix
|
||||||
]; # Add your Home Manager modules here
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
|
||||||
)
|
|
||||||
// {
|
|
||||||
darwinConfigurations = {
|
darwinConfigurations = {
|
||||||
macos = darwin.lib.darwinSystem {
|
macos = darwin.lib.darwinSystem {
|
||||||
system = "aarch64-darwin";
|
system = "aarch64-darwin";
|
||||||
specialArgs = (mkArgs "aarch64-darwin") // {inherit mkArgs;};
|
specialArgs = mkArgs "aarch64-darwin";
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/macos/darwin.nix
|
./hosts/macos/darwin.nix
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -0,0 +1,53 @@
|
|||||||
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
|
# and may be overwritten by future invocations. Please make changes
|
||||||
|
# to /etc/nixos/configuration.nix instead.
|
||||||
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/disk/by-uuid/532ac73e-1370-4e4d-9d5a-15033de0b96d";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=@" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/nix/store" =
|
||||||
|
{ device = "/@/nix/store";
|
||||||
|
fsType = "none";
|
||||||
|
options = [ "bind" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-uuid/1368-D3F3";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = [ "fmask=0077" "dmask=0077" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/home" =
|
||||||
|
{ device = "/dev/disk/by-uuid/780aa81f-c4d6-478b-9c51-2d60362fdb07";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices =
|
||||||
|
[ { device = "/dev/disk/by-uuid/b02ef55c-4caf-4a24-a6a2-fb8001eafe22"; }
|
||||||
|
];
|
||||||
|
|
||||||
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
# still possible to use this option, but it's recommended to use it in conjunction
|
||||||
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||||
|
networking.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.enp11s0.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.wlp10s0.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user