gurkan
/
nixos-config
Archived
1
0
Fork 0

At last, read from /proc

This commit is contained in:
Gürkan 2022-07-31 22:45:53 +02:00
parent 4bfe005190
commit a5c885cdd8
2 changed files with 11 additions and 7 deletions

View File

@ -1,6 +1,5 @@
## My Nixos base configuration
One gimmick is to link the corresponding config from machines folder as `special.nix`.
But since it now [can read /proc files](https://github.com/NixOS/nix/pull/3546), I should handle this better, sometime..
One gimmick is to either declare an identifying value from /proc in the `configuration.nix` or link the corresponding config from machines folder as `special.nix`.
Anyway I kept some references (greppable as "@Reference") which you might find interesting.
Also I kept some references (greppable as "@Reference") which you might find interesting.

View File

@ -1,8 +1,13 @@
{ config, pkgs, options, lib, ... }:
{
imports =
[
let
importfile = ( if builtins.readFile "/sys/devices/virtual/dmi/id/product_name" == "XPS 13 9310 2-in-1\n" then
./machines/innodellix.nix
else
# This has to be manually symlinked per host
/etc/nixos/special.nix
];
);
in
{
imports = [ importfile ];
}
# vim: set ts=2 sw=2 tw=0 et :