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 }}
|
||||
cache_repository: fabianhauser:dotfiles
|
||||
|
||||
- name: Build
|
||||
run: nix build --max-jobs 12 --cores 12
|
||||
|
||||
- name: Run Checks
|
||||
run: nix flake check
|
||||
|
||||
- name: Setup Cache Push
|
||||
uses: ./.github/actions/attic-cache-push
|
||||
with:
|
||||
cache_repository: fabianhauser:dotfiles
|
||||
shell: nix develop --command bash -c "{0}"
|
||||
run: nix-fast-build --skip-cached --attic-cache fabianhauser:dotfiles
|
||||
|
|
32
flake.lock
generated
32
flake.lock
generated
|
@ -72,11 +72,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1739841949,
|
||||
"narHash": "sha256-lSOXdgW/1zi/SSu7xp71v+55D5Egz8ACv0STkj7fhbs=",
|
||||
"lastModified": 1740485968,
|
||||
"narHash": "sha256-WK+PZHbfDjLyveXAxpnrfagiFgZWaTJglewBWniTn2Y=",
|
||||
"owner": "nix-community",
|
||||
"repo": "disko",
|
||||
"rev": "15dbf8cebd8e2655a883b74547108e089f051bf0",
|
||||
"rev": "19c1140419c4f1cdf88ad4c1cfb6605597628940",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -217,11 +217,11 @@
|
|||
"nixpkgs-lib": "nixpkgs-lib"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1738453229,
|
||||
"narHash": "sha256-7H9XgNiGLKN1G1CgRh0vUL4AheZSYzPm+zmZ7vxbJdo=",
|
||||
"lastModified": 1740872218,
|
||||
"narHash": "sha256-ZaMw0pdoUKigLpv9HiNDH2Pjnosg7NBYMJlHTIsHEUo=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "32ea77a06711b758da0ad9bd6a844c5740a87abd",
|
||||
"rev": "3876f6b87db82f33775b1ef5ea343986105db764",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -326,11 +326,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1740161709,
|
||||
"narHash": "sha256-QInyU5nXiwGzzCc3qxYHJKFY/YWege8Us7aZZOCFW4Q=",
|
||||
"lastModified": 1740845322,
|
||||
"narHash": "sha256-AXEgFj3C0YJhu9k1OhbRhiA6FnDr81dQZ65U3DhaWpw=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "148a6b55651ac794f5c20bbd76780b4d8fed4334",
|
||||
"rev": "fcac3d6d88302a5e64f6cb8014ac785e08874c8d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -414,14 +414,14 @@
|
|||
},
|
||||
"nixpkgs-lib": {
|
||||
"locked": {
|
||||
"lastModified": 1738452942,
|
||||
"narHash": "sha256-vJzFZGaCpnmo7I6i416HaBLpC+hvcURh/BQwROcGIp8=",
|
||||
"lastModified": 1740872140,
|
||||
"narHash": "sha256-3wHafybyRfpUCLoE8M+uPVZinImg3xX+Nm6gEfN3G8I=",
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/072a6db25e947df2f31aab9eccd0ab75d5b2da11.tar.gz"
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/6d3702243441165a03f699f64416f635220f4f15.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/072a6db25e947df2f31aab9eccd0ab75d5b2da11.tar.gz"
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/6d3702243441165a03f699f64416f635220f4f15.tar.gz"
|
||||
}
|
||||
},
|
||||
"nixpkgs-stable": {
|
||||
|
@ -442,11 +442,11 @@
|
|||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1739866667,
|
||||
"narHash": "sha256-EO1ygNKZlsAC9avfcwHkKGMsmipUk1Uc0TbrEZpkn64=",
|
||||
"lastModified": 1740828860,
|
||||
"narHash": "sha256-cjbHI+zUzK5CPsQZqMhE3npTyYFt9tJ3+ohcfaOF/WM=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "73cf49b8ad837ade2de76f87eb53fc85ed5d4680",
|
||||
"rev": "303bd8071377433a2d8f76e684ec773d70c5b642",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
26
flake.nix
26
flake.nix
|
@ -50,7 +50,12 @@
|
|||
};
|
||||
|
||||
outputs =
|
||||
inputs@{ flake-parts, nixpkgs, ... }:
|
||||
inputs@{
|
||||
flake-parts,
|
||||
nixpkgs,
|
||||
self,
|
||||
...
|
||||
}:
|
||||
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
imports = map (name: inputs.${name}.flakeModule) [
|
||||
"treefmt-nix"
|
||||
|
@ -60,7 +65,12 @@
|
|||
"x86_64-linux"
|
||||
];
|
||||
perSystem =
|
||||
{ pkgs, lib, ... }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
self',
|
||||
...
|
||||
}:
|
||||
{
|
||||
treefmt = {
|
||||
programs = {
|
||||
|
@ -70,12 +80,24 @@
|
|||
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 {
|
||||
name = "nix-config-default-shell";
|
||||
packages = lib.attrValues {
|
||||
inherit (pkgs)
|
||||
nixos-rebuild
|
||||
nixos-facter
|
||||
nix-fast-build
|
||||
attic-client
|
||||
sops
|
||||
ssh-to-age
|
||||
|
|
|
@ -8,22 +8,6 @@
|
|||
];
|
||||
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.
|
||||
time.timeZone = "Europe/Tallinn";
|
||||
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
pkgs.sbctl
|
||||
];
|
||||
|
||||
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.initrd.systemd.enable = true;
|
||||
|
||||
|
|
|
@ -9,5 +9,6 @@
|
|||
./home-manager
|
||||
./printing
|
||||
./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