mirror of
https://github.com/RGBCube/ncc
synced 2025-07-29 11:07:44 +00:00
Various fixes, idk
This commit is contained in:
parent
362e09ed68
commit
c3b3c4101e
5 changed files with 69 additions and 18 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -14,6 +14,7 @@
|
|||
!machines/asus/system/
|
||||
!machines/asus/xserver/
|
||||
|
||||
!flake.lock
|
||||
!.editorconfig
|
||||
!.gitignore
|
||||
|
||||
|
|
48
flake.lock
generated
Normal file
48
flake.lock
generated
Normal file
|
@ -0,0 +1,48 @@
|
|||
{
|
||||
"nodes": {
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1682977601,
|
||||
"narHash": "sha256-F1Va/Uiw2tVNn27FLqWyBkiqDyIm/eCamw9wA/GK8Fw=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "0e4c33d76006c9080d2f228ba1c2308e3e4d7be6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1683014792,
|
||||
"narHash": "sha256-6Va9iVtmmsw4raBc3QKvQT2KT/NGRWlvUlJj46zN8B8=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "1a411f23ba299db155a5b45d5e145b85a7aafc42",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
36
flake.nix
36
flake.nix
|
@ -34,28 +34,28 @@
|
|||
let
|
||||
lib = nixpkgs.lib;
|
||||
|
||||
importConfiguration = directory: lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inherit lib; # plasma-manager;
|
||||
importConfiguration = directory: {
|
||||
nixosConfigurations.${builtins.baseNameOf directory} = lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inherit lib; # plasma-manager;
|
||||
|
||||
pkgs = import nixpkgs {
|
||||
config.allowUnfree = true;
|
||||
pkgs = import nixpkgs {
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
|
||||
homeManagerConfiguration = attrs:
|
||||
let
|
||||
userName = import (directory + "username.nix");
|
||||
in
|
||||
{
|
||||
home-manager.users.${userName} = attrs;
|
||||
};
|
||||
};
|
||||
|
||||
homeManagerConfiguration = attrs:
|
||||
let
|
||||
userName = import (directory + "user-name.nix");
|
||||
in
|
||||
{
|
||||
home-manager.users.${userName} = attrs;
|
||||
};
|
||||
};
|
||||
|
||||
nixosConfigurations.${basename directory} = {
|
||||
modules = [
|
||||
directory
|
||||
{
|
||||
networking.hostName = basename directory;
|
||||
networking.hostName = builtins.baseNameOf directory;
|
||||
}
|
||||
|
||||
home-manager.nixosModules.home-manager
|
||||
|
@ -67,5 +67,7 @@
|
|||
};
|
||||
};
|
||||
in
|
||||
builtins.foldl lib.recursiveUpdate (builtins.map importConfiguration (builtins.readDir ./machines));
|
||||
builtins.foldl' lib.recursiveUpdate {} (builtins.map importConfiguration [
|
||||
./machines/asus # HACK: Use a function to list the directory.
|
||||
]);
|
||||
}
|
||||
|
|
2
link.sh
Normal file → Executable file
2
link.sh
Normal file → Executable file
|
@ -8,7 +8,7 @@ sudo mkdir /etc/nixos
|
|||
|
||||
echo "* Linking files"
|
||||
sudo ln ./flake.nix /etc/nixos/flake.nix
|
||||
sudo ln ./flake.lock /etc/nixos/flake.nix
|
||||
sudo ln ./flake.lock /etc/nixos/flake.lock
|
||||
|
||||
sudo ln -s ./system-configuration /etc/nixos/
|
||||
sudo ln -s ./home-configuration /etc/nixos/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue