-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
changed workflow added test config Create main.yml
- Loading branch information
1 parent
478500b
commit 096ecd6
Showing
5 changed files
with
226 additions
and
18 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,63 @@ | ||
name: NixOS | ||
concurrency: nixos | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
- testing | ||
paths-ignore: | ||
- "README.md" | ||
- ".gitignore" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "Create Dir for Mounting Disk Space" | ||
run: | | ||
sudo mkdir /nix | ||
- name: "Remove unneeded components" | ||
run: | | ||
sudo rm -rf $AGENT_TOOLSDIRECTORY | ||
sudo rm -rf /usr/local/.ghcup | ||
sudo rm -rf /usr/local/share/powershell | ||
sudo rm -rf /usr/local/share/chromium | ||
sudo rm -rf /usr/local/lib/node_modules | ||
sudo rm -rf /usr/local/lib/heroku | ||
sudo rm -rf /var/lib/docker/overlay2 | ||
sudo rm -rf /home/linuxbrew | ||
sudo rm -rf /home/runner/.rustup | ||
- name: "Maximize Disk Space" | ||
uses: easimon/maximize-build-space@v10 | ||
with: | ||
#root-reserve-mb: 8192 | ||
swap-size-mb: 1024 | ||
build-mount-path: /nix | ||
remove-dotnet: "true" | ||
remove-android: "true" | ||
remove-haskell: "true" | ||
remove-codeql: "true" | ||
remove-docker-images: "true" | ||
|
||
- uses: actions/checkout@v3 | ||
|
||
- name: "Install Nix ❄️" | ||
uses: cachix/install-nix-action@v26 | ||
with: | ||
extra_nix_config: | | ||
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | ||
- name: "Install Cachix ❄️" | ||
uses: cachix/cachix-action@v14 | ||
with: | ||
name: workflow-nixos-config | ||
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" | ||
|
||
- name: "Build NixOS config ❄️" | ||
run: | | ||
nix build .#nixosConfigurations.Test.config.system.build.toplevel |
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
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,104 @@ | ||
# Please Don't use this test config since it disables drivers. | ||
# And has a different hardware config. | ||
# It's not meant to be used for Personal use. | ||
# This is for automatic testing with github actions. | ||
|
||
{ | ||
pkgs, | ||
username, | ||
locale, | ||
timezone, | ||
... | ||
}: { | ||
imports = [ | ||
../common.nix | ||
../../modules/desktop/hyprland # Enable Hyprland window manager | ||
./hardware-configuration.nix | ||
]; | ||
|
||
# Home-manager config | ||
home-manager.users.${username} = { | ||
home.username = username; | ||
home.homeDirectory = "/home/${username}"; | ||
|
||
home.stateVersion = "23.11"; # Please read the comment before changing. | ||
|
||
home.packages = with pkgs; [ | ||
#vim | ||
#krita | ||
#steam | ||
(pkgs.writeShellScriptBin "hello" '' | ||
echo "Hello ''${username}!" | ||
'') | ||
]; | ||
|
||
home.sessionVariables = { | ||
# EDITOR = "emacs"; | ||
}; | ||
|
||
# Let Home Manager install and manage itself. | ||
programs.home-manager.enable = true; | ||
}; | ||
|
||
networking.hostName = "nixos"; # Define your hostname. | ||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. | ||
|
||
# Configure network proxy if necessary | ||
# networking.proxy.default = "http://user:password@proxy:port/"; | ||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; | ||
|
||
# Enable networking | ||
networking.networkmanager.enable = true; | ||
|
||
# Timezone and locale | ||
time.timeZone = timezone; | ||
i18n.defaultLocale = locale; | ||
i18n.extraLocaleSettings = { | ||
LC_ADDRESS = locale; | ||
LC_IDENTIFICATION = locale; | ||
LC_MEASUREMENT = locale; | ||
LC_MONETARY = locale; | ||
LC_NAME = locale; | ||
LC_NUMERIC = locale; | ||
LC_PAPER = locale; | ||
LC_TELEPHONE = locale; | ||
LC_TIME = locale; | ||
}; | ||
|
||
# Enable the X11 windowing system. | ||
services.xserver.enable = true; | ||
|
||
# Configure keymap in X11 | ||
services.xserver.xkb = { | ||
layout = "gb"; | ||
variant = ""; | ||
}; | ||
|
||
# Configure console keymap | ||
console.keyMap = "uk"; | ||
|
||
# Enable CUPS to print documents. | ||
services.printing.enable = true; | ||
|
||
# Define a user account. Don't forget to set a password with ‘passwd’. | ||
users.users.${username} = { | ||
isNormalUser = true; | ||
extraGroups = [ | ||
"networkmanager" | ||
"wheel" | ||
"video" | ||
"audio" | ||
]; | ||
}; | ||
|
||
environment.systemPackages = with pkgs; [ | ||
]; | ||
|
||
# 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. It‘s 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? | ||
} |
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" "usbhid" "uas" "usb_storage" "sd_mod" ]; | ||
boot.initrd.kernelModules = [ ]; | ||
boot.kernelModules = [ "kvm-intel" ]; | ||
boot.extraModulePackages = [ ]; | ||
|
||
fileSystems."/" = | ||
{ device = "/dev/disk/by-uuid/20549c3e-0dab-4acb-839d-3eac29f4e8a8"; | ||
fsType = "btrfs"; | ||
options = [ "subvol=@" ]; | ||
}; | ||
|
||
boot.initrd.luks.devices."luks-d3d509db-85bf-4a7b-ad47-1f67952cc6c1".device = "/dev/disk/by-uuid/d3d509db-85bf-4a7b-ad47-1f67952cc6c1"; | ||
|
||
fileSystems."/boot" = | ||
{ device = "/dev/disk/by-uuid/2556-369F"; | ||
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.enp0s31f6.useDHCP = lib.mkDefault true; | ||
|
||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; | ||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; | ||
} |
This file was deleted.
Oops, something went wrong.