Migrate to nix-fast-build and update inputs
This commit is contained in:
parent
f86077a635
commit
f898ce3eae
8 changed files with 61 additions and 59 deletions
15
.github/actions/attic-cache/action.yml
vendored
15
.github/actions/attic-cache/action.yml
vendored
|
@ -1,15 +0,0 @@
|
||||||
name: "Attic Watch and Push"
|
|
||||||
description: "Composite action pushes results after the job completes. Needs prior attic-cache action to have executed successfully."
|
|
||||||
|
|
||||||
inputs:
|
|
||||||
cache_repository:
|
|
||||||
description: "Cache repository to use with attic"
|
|
||||||
required: true
|
|
||||||
|
|
||||||
runs:
|
|
||||||
using: "composite"
|
|
||||||
steps:
|
|
||||||
- name: Attic Push Results
|
|
||||||
shell: "nix shell nixpkgs#attic-client --command {0}"
|
|
||||||
run: |
|
|
||||||
attic push "${{ inputs.cache_repository }}" "./result" # TODO: Make this smarter
|
|
11
.github/workflows/ci.yml
vendored
11
.github/workflows/ci.yml
vendored
|
@ -27,13 +27,6 @@ jobs:
|
||||||
attic_auth_token: ${{ secrets.ATTIC_AUTH_TOKEN }}
|
attic_auth_token: ${{ secrets.ATTIC_AUTH_TOKEN }}
|
||||||
cache_repository: fabianhauser:dotfiles
|
cache_repository: fabianhauser:dotfiles
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: nix build --max-jobs 12 --cores 12
|
|
||||||
|
|
||||||
- name: Run Checks
|
- name: Run Checks
|
||||||
run: nix flake check
|
shell: nix develop --command bash -c "{0}"
|
||||||
|
run: nix-fast-build --skip-cached --attic-cache fabianhauser:dotfiles
|
||||||
- name: Setup Cache Push
|
|
||||||
uses: ./.github/actions/attic-cache-push
|
|
||||||
with:
|
|
||||||
cache_repository: fabianhauser:dotfiles
|
|
||||||
|
|
32
flake.lock
generated
32
flake.lock
generated
|
@ -72,11 +72,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1739841949,
|
"lastModified": 1740485968,
|
||||||
"narHash": "sha256-lSOXdgW/1zi/SSu7xp71v+55D5Egz8ACv0STkj7fhbs=",
|
"narHash": "sha256-WK+PZHbfDjLyveXAxpnrfagiFgZWaTJglewBWniTn2Y=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "disko",
|
"repo": "disko",
|
||||||
"rev": "15dbf8cebd8e2655a883b74547108e089f051bf0",
|
"rev": "19c1140419c4f1cdf88ad4c1cfb6605597628940",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -217,11 +217,11 @@
|
||||||
"nixpkgs-lib": "nixpkgs-lib"
|
"nixpkgs-lib": "nixpkgs-lib"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1738453229,
|
"lastModified": 1740872218,
|
||||||
"narHash": "sha256-7H9XgNiGLKN1G1CgRh0vUL4AheZSYzPm+zmZ7vxbJdo=",
|
"narHash": "sha256-ZaMw0pdoUKigLpv9HiNDH2Pjnosg7NBYMJlHTIsHEUo=",
|
||||||
"owner": "hercules-ci",
|
"owner": "hercules-ci",
|
||||||
"repo": "flake-parts",
|
"repo": "flake-parts",
|
||||||
"rev": "32ea77a06711b758da0ad9bd6a844c5740a87abd",
|
"rev": "3876f6b87db82f33775b1ef5ea343986105db764",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -326,11 +326,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1740161709,
|
"lastModified": 1740845322,
|
||||||
"narHash": "sha256-QInyU5nXiwGzzCc3qxYHJKFY/YWege8Us7aZZOCFW4Q=",
|
"narHash": "sha256-AXEgFj3C0YJhu9k1OhbRhiA6FnDr81dQZ65U3DhaWpw=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "148a6b55651ac794f5c20bbd76780b4d8fed4334",
|
"rev": "fcac3d6d88302a5e64f6cb8014ac785e08874c8d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -414,14 +414,14 @@
|
||||||
},
|
},
|
||||||
"nixpkgs-lib": {
|
"nixpkgs-lib": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1738452942,
|
"lastModified": 1740872140,
|
||||||
"narHash": "sha256-vJzFZGaCpnmo7I6i416HaBLpC+hvcURh/BQwROcGIp8=",
|
"narHash": "sha256-3wHafybyRfpUCLoE8M+uPVZinImg3xX+Nm6gEfN3G8I=",
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://github.com/NixOS/nixpkgs/archive/072a6db25e947df2f31aab9eccd0ab75d5b2da11.tar.gz"
|
"url": "https://github.com/NixOS/nixpkgs/archive/6d3702243441165a03f699f64416f635220f4f15.tar.gz"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://github.com/NixOS/nixpkgs/archive/072a6db25e947df2f31aab9eccd0ab75d5b2da11.tar.gz"
|
"url": "https://github.com/NixOS/nixpkgs/archive/6d3702243441165a03f699f64416f635220f4f15.tar.gz"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-stable": {
|
"nixpkgs-stable": {
|
||||||
|
@ -442,11 +442,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1739866667,
|
"lastModified": 1740828860,
|
||||||
"narHash": "sha256-EO1ygNKZlsAC9avfcwHkKGMsmipUk1Uc0TbrEZpkn64=",
|
"narHash": "sha256-cjbHI+zUzK5CPsQZqMhE3npTyYFt9tJ3+ohcfaOF/WM=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "73cf49b8ad837ade2de76f87eb53fc85ed5d4680",
|
"rev": "303bd8071377433a2d8f76e684ec773d70c5b642",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
26
flake.nix
26
flake.nix
|
@ -50,7 +50,12 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
inputs@{ flake-parts, nixpkgs, ... }:
|
inputs@{
|
||||||
|
flake-parts,
|
||||||
|
nixpkgs,
|
||||||
|
self,
|
||||||
|
...
|
||||||
|
}:
|
||||||
flake-parts.lib.mkFlake { inherit inputs; } {
|
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||||
imports = map (name: inputs.${name}.flakeModule) [
|
imports = map (name: inputs.${name}.flakeModule) [
|
||||||
"treefmt-nix"
|
"treefmt-nix"
|
||||||
|
@ -60,7 +65,12 @@
|
||||||
"x86_64-linux"
|
"x86_64-linux"
|
||||||
];
|
];
|
||||||
perSystem =
|
perSystem =
|
||||||
{ pkgs, lib, ... }:
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
self',
|
||||||
|
...
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
treefmt = {
|
treefmt = {
|
||||||
programs = {
|
programs = {
|
||||||
|
@ -70,12 +80,24 @@
|
||||||
settings.global.excludes = [ "*.jpg" ];
|
settings.global.excludes = [ "*.jpg" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
checks =
|
||||||
|
with lib;
|
||||||
|
concatMapAttrs
|
||||||
|
(typeName: concatMapAttrs (objectName: value: { "${typeName}-${objectName}" = value; }))
|
||||||
|
{
|
||||||
|
inherit (self') devShells;
|
||||||
|
nixosConfigurations = mapAttrs (
|
||||||
|
_name: value: value.config.system.build.toplevel
|
||||||
|
) self.nixosConfigurations;
|
||||||
|
};
|
||||||
|
|
||||||
devShells.default = pkgs.mkShell {
|
devShells.default = pkgs.mkShell {
|
||||||
name = "nix-config-default-shell";
|
name = "nix-config-default-shell";
|
||||||
packages = lib.attrValues {
|
packages = lib.attrValues {
|
||||||
inherit (pkgs)
|
inherit (pkgs)
|
||||||
nixos-rebuild
|
nixos-rebuild
|
||||||
nixos-facter
|
nixos-facter
|
||||||
|
nix-fast-build
|
||||||
attic-client
|
attic-client
|
||||||
sops
|
sops
|
||||||
ssh-to-age
|
ssh-to-age
|
||||||
|
|
|
@ -8,22 +8,6 @@
|
||||||
];
|
];
|
||||||
facter.reportPath = ./facter.json;
|
facter.reportPath = ./facter.json;
|
||||||
|
|
||||||
virtualisation = {
|
|
||||||
# TODO: This should probably be somewhere else.
|
|
||||||
docker = {
|
|
||||||
enable = true;
|
|
||||||
enableOnBoot = false;
|
|
||||||
};
|
|
||||||
libvirtd.enable = true;
|
|
||||||
spiceUSBRedirection.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
boot.extraModprobeConfig = ''
|
|
||||||
options kvm_intel nested=1
|
|
||||||
options kvm_intel emulate_invalid_guest_state=0
|
|
||||||
options kvm ignore_msrs=1
|
|
||||||
'';
|
|
||||||
|
|
||||||
# Set your time zone.
|
# Set your time zone.
|
||||||
time.timeZone = "Europe/Tallinn";
|
time.timeZone = "Europe/Tallinn";
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
pkgs.sbctl
|
pkgs.sbctl
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
boot.initrd.systemd.enable = true;
|
boot.initrd.systemd.enable = true;
|
||||||
|
|
||||||
|
|
|
@ -9,5 +9,6 @@
|
||||||
./home-manager
|
./home-manager
|
||||||
./printing
|
./printing
|
||||||
./theme
|
./theme
|
||||||
|
./virtualisation
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
18
nixos-modules/virtualisation/default.nix
Normal file
18
nixos-modules/virtualisation/default.nix
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
virtualisation = {
|
||||||
|
# TODO: This should probably be somewhere else.
|
||||||
|
docker = {
|
||||||
|
enable = true;
|
||||||
|
enableOnBoot = false;
|
||||||
|
};
|
||||||
|
libvirtd.enable = true;
|
||||||
|
spiceUSBRedirection.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
boot.extraModprobeConfig = ''
|
||||||
|
options kvm_intel nested=1
|
||||||
|
options kvm_intel emulate_invalid_guest_state=0
|
||||||
|
options kvm ignore_msrs=1
|
||||||
|
'';
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue