-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
user
committed
Aug 18, 2023
1 parent
73a6274
commit 528e4c4
Showing
7 changed files
with
227 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
target-branch: "master" | ||
schedule: | ||
interval: "weekly" | ||
commit-message: | ||
prefix: "ci:" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
jobs: | ||
build-linux: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: easimon/maximize-build-space@v7 | ||
with: | ||
overprovision-lvm: true | ||
remove-android: true | ||
remove-codeql: true | ||
remove-docker-images: true | ||
remove-dotnet: true | ||
remove-haskell: true | ||
root-reserve-mb: 512 | ||
swap-size-mb: 1024 | ||
- uses: actions/checkout@v3 | ||
- uses: cachix/install-nix-action@v20 | ||
with: | ||
extra_nix_config: access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | ||
nix_path: nixpkgs=channel:nixos-unstable | ||
- uses: cachix/cachix-action@v12 | ||
with: | ||
authToken: ${{ secrets.CACHIX_TOKEN }} | ||
extraPullNames: nix-community | ||
name: thiagokokada-nix-configs | ||
- name: Set default git branch (to reduce log spam) | ||
run: git config --global init.defaultBranch master | ||
- name: Check if all `.nix` files are formatted correctly | ||
run: nix run '.#formatCheck' | ||
- name: Validate Flakes | ||
run: nix flake check | ||
- name: 'Build Home-Manager configs for: home-linux, steamdeck' | ||
run: |- | ||
nix build --print-build-logs '.#homeConfigurations.home-linux.activationPackage' | ||
nix build --print-build-logs '.#homeConfigurations.steamdeck.activationPackage' | ||
- name: 'Build NixOS configs for: hachune-nixos, miku-nixos, mirai-vps, sankyuu-nixos' | ||
run: |- | ||
nix build --print-build-logs '.#nixosConfigurations.hachune-nixos.config.system.build.toplevel' | ||
nix build --print-build-logs '.#nixosConfigurations.miku-nixos.config.system.build.toplevel' | ||
nix build --print-build-logs '.#nixosConfigurations.mirai-vps.config.system.build.toplevel' | ||
nix build --print-build-logs '.#nixosConfigurations.sankyuu-nixos.config.system.build.toplevel' | ||
build-macos: | ||
runs-on: macos-13 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: cachix/install-nix-action@v20 | ||
with: | ||
extra_nix_config: access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | ||
nix_path: nixpkgs=channel:nixos-unstable | ||
- uses: cachix/cachix-action@v12 | ||
with: | ||
authToken: ${{ secrets.CACHIX_TOKEN }} | ||
extraPullNames: nix-community | ||
name: thiagokokada-nix-configs | ||
- name: Set default git branch (to reduce log spam) | ||
run: git config --global init.defaultBranch master | ||
- name: 'Build Home-Manager configs for: home-macos' | ||
run: nix build --print-build-logs '.#homeConfigurations.home-macos.activationPackage' | ||
name: build-and-cache | ||
"on": | ||
- push | ||
- workflow_dispatch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
jobs: | ||
update-flakes-macos: | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
runs-on: macos-13 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: cachix/install-nix-action@v20 | ||
with: | ||
extra_nix_config: access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | ||
nix_path: nixpkgs=channel:nixos-unstable | ||
- uses: cachix/cachix-action@v12 | ||
with: | ||
authToken: ${{ secrets.CACHIX_TOKEN }} | ||
extraPullNames: nix-community | ||
name: thiagokokada-nix-configs | ||
- name: Set default git branch (to reduce log spam) | ||
run: git config --global init.defaultBranch master | ||
- name: 'Build Home-Manager configs for: home-macos' | ||
run: nix build --print-build-logs '.#homeConfigurations.home-macos.activationPackage' | ||
name: update-flakes-darwin | ||
"on": | ||
workflow_dispatch: null | ||
workflow_run: | ||
types: | ||
- completed | ||
workflows: | ||
- update-flakes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
jobs: | ||
update-flakes: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: easimon/maximize-build-space@v7 | ||
with: | ||
overprovision-lvm: true | ||
remove-android: true | ||
remove-codeql: true | ||
remove-docker-images: true | ||
remove-dotnet: true | ||
remove-haskell: true | ||
root-reserve-mb: 512 | ||
swap-size-mb: 1024 | ||
- uses: actions/checkout@v3 | ||
- uses: cachix/install-nix-action@v20 | ||
with: | ||
extra_nix_config: access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | ||
nix_path: nixpkgs=channel:nixos-unstable | ||
- name: Set default git branch (to reduce log spam) | ||
run: git config --global init.defaultBranch master | ||
- uses: cachix/cachix-action@v12 | ||
with: | ||
authToken: ${{ secrets.CACHIX_TOKEN }} | ||
extraPullNames: nix-community | ||
name: thiagokokada-nix-configs | ||
- name: Update flake.lock | ||
run: | | ||
git config user.name "${{ github.actor }}" | ||
git config user.email "${{ github.actor }}@users.noreply.github.com" | ||
nix flake update --commit-lock-file | ||
- name: 'Build Home-Manager configs for: home-linux, steamdeck' | ||
run: |- | ||
nix build --print-build-logs '.#homeConfigurations.home-linux.activationPackage' | ||
nix build --print-build-logs '.#homeConfigurations.steamdeck.activationPackage' | ||
- name: 'Build NixOS configs for: hachune-nixos, miku-nixos, mirai-vps, sankyuu-nixos' | ||
run: |- | ||
nix build --print-build-logs '.#nixosConfigurations.hachune-nixos.config.system.build.toplevel' | ||
nix build --print-build-logs '.#nixosConfigurations.miku-nixos.config.system.build.toplevel' | ||
nix build --print-build-logs '.#nixosConfigurations.mirai-vps.config.system.build.toplevel' | ||
nix build --print-build-logs '.#nixosConfigurations.sankyuu-nixos.config.system.build.toplevel' | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v5 | ||
with: | ||
body: | | ||
## Run report | ||
https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | ||
branch: flake-updates | ||
delete-branch: true | ||
title: Update flake.lock | ||
name: update-flakes | ||
"on": | ||
schedule: | ||
- cron: 40 4 * * 0,2,4,6 | ||
workflow_dispatch: null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
result | ||
result-* | ||
*.qcow2 | ||
.direnv/ | ||
# Looks like a temporary file, but not sure | ||
doom-emacs/flycheck_config.el |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# 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, pkgs, lib, flake, ... }: | ||
|
||
let | ||
inherit (flake) inputs; | ||
in | ||
{ | ||
imports = [ | ||
# Use `nixos-generate-config` to generate `hardware-configuration.nix` file | ||
./hardware-configuration.nix | ||
../../nixos | ||
# inputs.hardware.nixosModules.common-cpu-intel | ||
]; | ||
|
||
device = { | ||
type = "laptop"; | ||
netDevices = [ "enp3s0" "wlan0" ]; | ||
}; | ||
|
||
# Use the systemd-boot EFI boot loader. | ||
boot.loader.systemd-boot.enable = true; | ||
boot.loader.efi.canTouchEfiVariables = true; | ||
|
||
networking.hostName = "intel-nuc-nixos"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# 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 = [ "xhci_pci" "ahci" "nvme" "usbhid" "sd_mod" "rtsx_pci_sdmmc" ]; | ||
boot.initrd.kernelModules = [ ]; | ||
boot.kernelModules = [ "kvm-intel" ]; | ||
boot.extraModulePackages = [ ]; | ||
|
||
fileSystems."/" = | ||
{ device = "/dev/disk/by-uuid/c6ac6d09-62e6-426b-9ed7-301bdac559e3"; | ||
fsType = "ext4"; | ||
}; | ||
|
||
fileSystems."/boot" = | ||
{ device = "/dev/disk/by-uuid/3DCB-5EC1"; | ||
fsType = "vfat"; | ||
}; | ||
|
||
swapDevices = [ ]; | ||
|
||
# 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.docker0.useDHCP = lib.mkDefault true; | ||
# networking.interfaces.eno1.useDHCP = lib.mkDefault true; | ||
# networking.interfaces.wlp58s0.useDHCP = lib.mkDefault true; | ||
|
||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; | ||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; | ||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; | ||
} |