Compare commits
3 commits
bcf415bcec
...
1dadc5c66f
Author | SHA1 | Date | |
---|---|---|---|
1dadc5c66f | |||
a23072866f | |||
5cb55e9805 |
5 changed files with 47 additions and 46 deletions
|
@ -1,6 +1,8 @@
|
|||
{ pkgs, config, ... }:
|
||||
{ lib, pkgs, config, ... }:
|
||||
|
||||
{
|
||||
# take overlays from flake
|
||||
nixpkgs.overlays = lib.attrValues config.inputInjection.flake-inputs.self.overlays;
|
||||
# List packages installed in system profile.
|
||||
environment.systemPackages = with pkgs; [
|
||||
wget
|
||||
|
|
48
flake.lock
generated
48
flake.lock
generated
|
@ -74,22 +74,6 @@
|
|||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1701680307,
|
||||
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
|
||||
"path": "/nix/store/pgid9c9xfcrbqx2giry0an0bi0df7s5c-source",
|
||||
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
|
||||
"type": "path"
|
||||
},
|
||||
"original": {
|
||||
"id": "flake-utils",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"flake-utils_2": {
|
||||
"inputs": {
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1681202837,
|
||||
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
|
||||
|
@ -152,7 +136,7 @@
|
|||
"crane": "crane",
|
||||
"flake-compat": "flake-compat",
|
||||
"flake-parts": "flake-parts",
|
||||
"flake-utils": "flake-utils_2",
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"pre-commit-hooks-nix": "pre-commit-hooks-nix",
|
||||
"rust-overlay": "rust-overlay"
|
||||
|
@ -222,11 +206,11 @@
|
|||
},
|
||||
"nixos-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1707092692,
|
||||
"narHash": "sha256-ZbHsm+mGk/izkWtT4xwwqz38fdlwu7nUUKXTOmm4SyE=",
|
||||
"lastModified": 1707546158,
|
||||
"narHash": "sha256-nYYJTpzfPMDxI8mzhQsYjIUX+grorqjKEU9Np6Xwy/0=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "faf912b086576fd1a15fca610166c98d47bc667e",
|
||||
"rev": "d934204a0f8d9198e1e4515dd6fec76a139c87f0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -270,11 +254,11 @@
|
|||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1707238373,
|
||||
"narHash": "sha256-WKxT0yLzWbFZwYi92lI0yWJpYtRaFSWHGX8QXzejapw=",
|
||||
"lastModified": 1707650010,
|
||||
"narHash": "sha256-dOhphIA4MGrH4ElNCy/OlwmN24MsnEqFjRR6+RY7jZw=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "fb0c047e30b69696acc42e669d02452ca1b55755",
|
||||
"rev": "809cca784b9f72a5ad4b991e0e7bcf8890f9c3a6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -332,7 +316,6 @@
|
|||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"home-manager": "home-manager",
|
||||
"lanzaboote": "lanzaboote",
|
||||
"logseq-fix-nixpkgs": "logseq-fix-nixpkgs",
|
||||
|
@ -399,24 +382,9 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_3": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"utils": {
|
||||
"inputs": {
|
||||
"systems": "systems_3"
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1705309234,
|
||||
|
|
20
flake.nix
20
flake.nix
|
@ -26,10 +26,10 @@
|
|||
};
|
||||
|
||||
outputs =
|
||||
{ self, nixpkgs, nur, lanzaboote, flake-utils, home-manager, ... }@inputs:
|
||||
{ self, nixpkgs, nur, lanzaboote, utils, home-manager, ... }@inputs:
|
||||
let
|
||||
# FIXME: allow different systems
|
||||
systems = flake-utils.lib.system;
|
||||
systems = utils.lib.system;
|
||||
# necessary to make the top-level inputs available to system configuration
|
||||
# inspired by https://jade.fyi/blog/flakes-arent-real/
|
||||
inputInjection = {pkgs, lib, ...}: {
|
||||
|
@ -74,10 +74,24 @@
|
|||
};
|
||||
in
|
||||
{
|
||||
overlays.default = import ./packages;
|
||||
nixosConfigurations = {
|
||||
thinknix = mkSystem systems.x86_64-linux [ ./hosts/thinknix inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t440s lanzaboote.nixosModules.lanzaboote ];
|
||||
framenix = mkSystem systems.x86_64-linux [ ./hosts/framenix inputs.nixos-hardware.nixosModules.framework-13-7040-amd lanzaboote.nixosModules.lanzaboote ];
|
||||
};
|
||||
homeConfigurations.spiollinux = mkHomeManager "spiollinux" "spiollinux" systems.x86_64-linux;
|
||||
};
|
||||
} // utils.lib.eachDefaultSystem(system:
|
||||
let
|
||||
nixpkgs = import inputs.nixpkgs {
|
||||
inherit system;
|
||||
overlays = nixpkgs.lib.attrValues self.overlays;
|
||||
};
|
||||
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
devShells.default = pkgs.mkShell {
|
||||
buildInputs = [];
|
||||
};
|
||||
# expose nixpkgs with overlay; TODO: figure out role of config
|
||||
#legacyPackages = nixpkgs;
|
||||
});
|
||||
}
|
||||
|
|
|
@ -38,8 +38,13 @@ in
|
|||
}
|
||||
];
|
||||
|
||||
# temporary workaround for white flickering graphics artefacts
|
||||
boot.kernelParams = [ "amdgpu.sg_display=0" ];
|
||||
boot.kernelParams = [
|
||||
# temporary workaround for white flickering graphics artefacts
|
||||
"amdgpu.sg_display=0"
|
||||
# powersave
|
||||
"amd_pstate=active"
|
||||
"amdgpu.abmlevel=1" # adaptive backlight management
|
||||
];
|
||||
|
||||
boot.loader = {
|
||||
systemd-boot.enable = true;
|
||||
|
|
12
packages/default.nix
Normal file
12
packages/default.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
final: prev: {
|
||||
power-profiles-daemon = prev.power-profiles-daemon.overrideAttrs (old: {
|
||||
patches = [
|
||||
# patch for AMD pstate CPUs
|
||||
(final.fetchpatch {
|
||||
url = "https://gitlab.freedesktop.org/upower/power-profiles-daemon/-/merge_requests/127.patch";
|
||||
sha256 = "sha256-CneqixlpZx9iZ0PM5MFIutsvnqKrLlM7FHOHUA/MK6g=";
|
||||
})
|
||||
];
|
||||
});
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue