This commit is contained in:
parent
e4b93499b9
commit
177c26e41d
28
.gitea/workflows/build.yml
Normal file
28
.gitea/workflows/build.yml
Normal file
@ -0,0 +1,28 @@
|
||||
name: Nix Build
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
workflow_run:
|
||||
workflows: []
|
||||
types: [completed]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build-nixos:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: "Install Nix ❄️"
|
||||
uses: cachix/install-nix-action@v26
|
||||
|
||||
- name: "Install Cachix ❄️"
|
||||
uses: cachix/cachix-action@v14
|
||||
with:
|
||||
name: helcel
|
||||
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
|
||||
|
||||
- name: "Build NixOS config ❄️"
|
||||
run: |
|
||||
nix build .#nixosConfigurations.ci.config.system.build.toplevel
|
@ -56,7 +56,11 @@
|
||||
system = "x86_64-linux";
|
||||
host = "avalon";
|
||||
};
|
||||
|
||||
ci = gen.generate {
|
||||
type = "nixos";
|
||||
system = "x86_64-linux";
|
||||
host = "ci";
|
||||
};
|
||||
};
|
||||
darwinConfigurations = {
|
||||
asgard = gen.generate {
|
||||
|
@ -15,9 +15,9 @@ in pkgs.stdenv.mkDerivation rec {
|
||||
sha256 = "sha256-m7xh/1uIDh2BM0hTPA5QymXQt6yV7mM7Ivg5VaF2PvM=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = with pkgs;[ gtk3 sassc ];
|
||||
buildInputs = with pkgs;[ gnome-themes-extra ];
|
||||
propagatedUserEnvPkgs = with pkgs;[ gtk-engine-murrine ];
|
||||
nativeBuildInputs = with pkgs; [ gtk3 sassc ];
|
||||
buildInputs = with pkgs; [ gnome-themes-extra ];
|
||||
propagatedUserEnvPkgs = with pkgs; [ gtk-engine-murrine ];
|
||||
|
||||
preInstall = ''
|
||||
mkdir -p $out/share/themes
|
||||
@ -94,5 +94,4 @@ in pkgs.stdenv.mkDerivation rec {
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
|
||||
}
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
(include "modules/sys.yuck")
|
||||
(include "modules/net.yuck")
|
||||
(include "modules/systray.yuck")
|
||||
(include "modules/clock.yuck")
|
||||
|
||||
(include "windows/calendar.yuck")
|
||||
@ -26,6 +27,7 @@
|
||||
:valign "end"
|
||||
(sys-mod)
|
||||
(net-mod)
|
||||
(systray-mod)
|
||||
(clock-mod)))
|
||||
|
||||
(defwidget center []
|
||||
|
15
modules/home/wayland/apps/eww/bar/modules/systray.yuck
Normal file
15
modules/home/wayland/apps/eww/bar/modules/systray.yuck
Normal file
@ -0,0 +1,15 @@
|
||||
|
||||
(defwidget systray-mod []
|
||||
(module
|
||||
(box
|
||||
:orientation "v"
|
||||
(systray
|
||||
:class "tray"
|
||||
:space-evenly "true"
|
||||
:orientation "v"
|
||||
:icon-size 32
|
||||
:prepend-new "false"
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
@ -25,13 +25,17 @@
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
builders-use-substitutes = true;
|
||||
substituters =
|
||||
[ "https://hyprland.cachix.org" "https://cache.nixos.org" ];
|
||||
substituters = [
|
||||
"https://hyprland.cachix.org"
|
||||
"https://cache.nixos.org"
|
||||
"https://helcel.cachix.org"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||
"helcel.cachix.org-1:95s8D+N2xIHwzmkuu7jMUp9t3rtN4EimafR73jO7GLg="
|
||||
];
|
||||
};
|
||||
};
|
||||
system.stateVersion = "23.11";
|
||||
system.stateVersion = "24.05";
|
||||
}
|
||||
|
@ -1,26 +1,30 @@
|
||||
{ config, pkgs, ... }:
|
||||
let keyFilePath = "/var/lib/sops-nix/age-key.txt";
|
||||
let
|
||||
keyFilePath = "/var/lib/sops-nix/age-key.txt";
|
||||
isCI = builtins.elem config.hostcfg.hostname [ "ci" ];
|
||||
sopsSettings = {
|
||||
sops.defaultSopsFile = ./common.yaml;
|
||||
sops.age.keyFile = keyFilePath;
|
||||
sops.age.generateKey = true;
|
||||
|
||||
sops.secrets.wifi = { };
|
||||
|
||||
sops.secrets."${config.hostcfg.hostname}_ssh_priv" = {
|
||||
mode = "0400";
|
||||
owner = config.users.users.sora.name;
|
||||
group = config.users.users.sora.group;
|
||||
};
|
||||
sops.secrets."${config.hostcfg.hostname}_ssh_pub" = {
|
||||
mode = "0400";
|
||||
owner = config.users.users.sora.name;
|
||||
group = config.users.users.sora.group;
|
||||
};
|
||||
sops.secrets."${config.hostcfg.hostname}_wg_priv" = { };
|
||||
sops.secrets."${config.hostcfg.hostname}_wg_pub" = { };
|
||||
};
|
||||
in {
|
||||
sops.defaultSopsFile = ./common.yaml;
|
||||
sops.age.keyFile = keyFilePath;
|
||||
sops.age.generateKey = true;
|
||||
|
||||
sops.secrets.wifi = { };
|
||||
|
||||
sops.secrets."${config.hostcfg.hostname}_ssh_priv" = {
|
||||
mode = "0400";
|
||||
owner = config.users.users.sora.name;
|
||||
group = config.users.users.sora.group;
|
||||
};
|
||||
sops.secrets."${config.hostcfg.hostname}_ssh_pub" = {
|
||||
mode = "0400";
|
||||
owner = config.users.users.sora.name;
|
||||
group = config.users.users.sora.group;
|
||||
};
|
||||
sops.secrets."${config.hostcfg.hostname}_wg_priv" = { };
|
||||
sops.secrets."${config.hostcfg.hostname}_wg_pub" = { };
|
||||
|
||||
environment.systemPackages = with pkgs; [ sops ];
|
||||
environment.sessionVariables.OPS_AGE_KEY_FILE = keyFilePath;
|
||||
inherit (if isCI then { } else sopsSettings) sops;
|
||||
|
||||
}
|
||||
|
@ -3,5 +3,6 @@
|
||||
(final: prev: {
|
||||
openttd-jgrpp = import ./openttd-jgrpp { inherit final prev; };
|
||||
yarn-berry = import ./yarn-berry { inherit final prev; };
|
||||
eww = import ./eww { inherit final prev; };
|
||||
})
|
||||
]
|
||||
|
18
overlays/eww/default.nix
Normal file
18
overlays/eww/default.nix
Normal file
@ -0,0 +1,18 @@
|
||||
{ final, prev, ... }:
|
||||
prev.eww.overrideAttrs (old: rec {
|
||||
pname = "eww";
|
||||
version = "ebe5f349d184e79edc33199d064d9ec5f1e4dd9b";
|
||||
src = prev.fetchFromGitHub {
|
||||
owner = "elkowar";
|
||||
repo = "eww";
|
||||
rev = "${version}";
|
||||
hash = "sha256-WcAWIvIdGE0tcS7WJ6JlbRlUnKvpvut500NozUmJ6jY=";
|
||||
};
|
||||
buildInputs = old.buildInputs ++ [ final.libdbusmenu-gtk3 ];
|
||||
cargoDeps = old.cargoDeps.overrideAttrs (_: {
|
||||
name = "${pname}-vendor.tar.gz";
|
||||
inherit src;
|
||||
outputHash = "sha256-seq5aS+TCLAV3qnKu6fRYdSXC+w7vI4ae+A7dBdpw14=";
|
||||
|
||||
});
|
||||
})
|
29
systems/ci/default.nix
Normal file
29
systems/ci/default.nix
Normal file
@ -0,0 +1,29 @@
|
||||
{ config, inputs, ... }: {
|
||||
imports = [ ./hardware.nix ];
|
||||
|
||||
hostcfg = {
|
||||
hostname = "valinor";
|
||||
username = "sora";
|
||||
make = {
|
||||
gui = true;
|
||||
cli = true;
|
||||
virt = true;
|
||||
power = true;
|
||||
game = true;
|
||||
develop = true;
|
||||
};
|
||||
net = {
|
||||
wlp = {
|
||||
enable = false;
|
||||
nif = "NA";
|
||||
};
|
||||
wg = {
|
||||
enable = false;
|
||||
ip4 = "";
|
||||
ip6 = "";
|
||||
pk = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
21
systems/ci/hardware.nix
Normal file
21
systems/ci/hardware.nix
Normal file
@ -0,0 +1,21 @@
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot.initrd.availableKernelModules =
|
||||
[ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "v4l2loopback" ];
|
||||
boot.extraModulePackages = with config.boot.kernelPackages;
|
||||
[ v4l2loopback.out ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "NA";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
}
|
18
systems/ci/home.nix
Normal file
18
systems/ci/home.nix
Normal file
@ -0,0 +1,18 @@
|
||||
{ config, ... }: {
|
||||
|
||||
config.homecfg = {
|
||||
username = "sora";
|
||||
make = {
|
||||
gui = true;
|
||||
cli = true;
|
||||
game = true;
|
||||
develop = true;
|
||||
power = true;
|
||||
};
|
||||
git = {
|
||||
email = "ci@nonet";
|
||||
username = "CI";
|
||||
key = "";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user