Compare commits
No commits in common. "595c2828b0115cbb8b2fa0a39889fb1f5dc73163" and "be46e02c611fe5769523d2233af7c69963a38837" have entirely different histories.
595c2828b0
...
be46e02c61
77 changed files with 54 additions and 65 deletions
|
@ -8,22 +8,22 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../../modules/core.nix
|
../../nix-os/core.nix
|
||||||
../../modules/core-desktop.nix
|
../../nix-os/core-desktop.nix
|
||||||
../../modules/nvidia.nix
|
../../nix-os/nvidia.nix
|
||||||
../../modules/docker.nix
|
../../nix-os/docker.nix
|
||||||
../../modules/razer.nix
|
../../nix-os/razer.nix
|
||||||
../../modules/desktopManagers/cosmic.nix
|
../../nix-os/desktopManagers/cosmic.nix
|
||||||
../../modules/displayManagers/cosmic-greeter.nix
|
../../nix-os/displayManagers/cosmic-greeter.nix
|
||||||
../../modules/shell.nix
|
../../nix-os/shell.nix
|
||||||
../../modules/virtualization.nix
|
../../nix-os/virtualization.nix
|
||||||
../../modules/polkit/disable-shutdown.nix
|
../../nix-os/polkit/disable-shutdown.nix
|
||||||
../../modules/locale.nix
|
../../nix-os/locale.nix
|
||||||
../../modules/adb.nix
|
../../nix-os/adb.nix
|
||||||
../../modules/account.nix
|
../../nix-os/account.nix
|
||||||
../../modules/services/nix-binary-cache.nix
|
../../nix-os/services/nix-binary-cache.nix
|
||||||
../../modules/udev.nix
|
../../nix-os/udev.nix
|
||||||
../../modules/gnupg.nix
|
../../nix-os/gnupg.nix
|
||||||
|
|
||||||
"${inputs.nixos-vscode-server}"
|
"${inputs.nixos-vscode-server}"
|
||||||
|
|
|
@ -5,18 +5,18 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../modules/core.nix
|
../nix-os/core.nix
|
||||||
../modules/core-desktop.nix
|
../nix-os/core-desktop.nix
|
||||||
../modules/account.nix
|
../nix-os/account.nix
|
||||||
../modules/adb.nix
|
../nix-os/adb.nix
|
||||||
../modules/locale.nix
|
../nix-os/locale.nix
|
||||||
../modules/shell.nix
|
../nix-os/shell.nix
|
||||||
../modules/gnupg.nix
|
../nix-os/gnupg.nix
|
||||||
../modules/polkit/network.nix
|
../nix-os/polkit/network.nix
|
||||||
|
|
||||||
../modules/desktopManagers/cosmic.nix
|
../nix-os/desktopManagers/cosmic.nix
|
||||||
../modules/displayManagers/cosmic-greeter.nix
|
../nix-os/displayManagers/cosmic-greeter.nix
|
||||||
../modules/udev.nix
|
../nix-os/udev.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
config = {
|
config = {
|
|
@ -3,13 +3,13 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
"${modulesPath}/virtualisation/qemu-vm.nix"
|
"${modulesPath}/virtualisation/qemu-vm.nix"
|
||||||
../modules/account.nix
|
../nix-os/account.nix
|
||||||
../modules/core.nix
|
../nix-os/core.nix
|
||||||
../modules/core-desktop.nix
|
../nix-os/core-desktop.nix
|
||||||
../modules/locale.nix
|
../nix-os/locale.nix
|
||||||
../modules/polkit/disable-shutdown.nix
|
../nix-os/polkit/disable-shutdown.nix
|
||||||
../modules/shell.nix
|
../nix-os/shell.nix
|
||||||
../modules/udev.nix
|
../nix-os/udev.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
config = {
|
config = {
|
|
@ -3,8 +3,8 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./vm-base.nix
|
./vm-base.nix
|
||||||
../modules/desktopManagers/cosmic.nix
|
../nix-os/desktopManagers/cosmic.nix
|
||||||
../modules/displayManagers/cosmic-greeter.nix
|
../nix-os/displayManagers/cosmic-greeter.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
config = {
|
config = {
|
9
hosts/vm-gnome.nix
Normal file
9
hosts/vm-gnome.nix
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./vm-base.nix
|
||||||
|
../nix-os/desktopManagers/gnome.nix
|
||||||
|
../nix-os/displayManagers/gdm.nix
|
||||||
|
];
|
||||||
|
}
|
|
@ -2,7 +2,6 @@
|
||||||
inputs,
|
inputs,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
self,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
@ -65,7 +64,7 @@
|
||||||
package = pkgs.nix-index.override {
|
package = pkgs.nix-index.override {
|
||||||
nix-index-unwrapped = pkgs.nix-index-unwrapped.overrideAttrs (oldAttrs: {
|
nix-index-unwrapped = pkgs.nix-index-unwrapped.overrideAttrs (oldAttrs: {
|
||||||
patches = oldAttrs.patches or [] ++ [
|
patches = oldAttrs.patches or [] ++ [
|
||||||
( builtins.path { path = "${self}/pkgs/by-name/ni/nix-index/cnfOutput.patch"; } )
|
../pkgs/by-name/ni/nix-index/cnfOutput.patch
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
|
|
|
@ -17,7 +17,7 @@ let
|
||||||
'';
|
'';
|
||||||
outputs = [ "out" "share" ];
|
outputs = [ "out" "share" ];
|
||||||
|
|
||||||
wallpaper = builtins.path { path = "${self}/media/wallpaper.png"; };
|
wallpaper = ../../media/wallpaper.png;
|
||||||
corner_radii_theme = "2.0";
|
corner_radii_theme = "2.0";
|
||||||
corner_radii_panel = "2";
|
corner_radii_panel = "2";
|
||||||
};
|
};
|
||||||
|
@ -26,7 +26,7 @@ in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
"${inputs.cosmic-modules}/nixos/cosmic/module.nix"
|
"${inputs.cosmic-modules}/nixos/cosmic/module.nix"
|
||||||
"${self}/nixos/modules/generic/dconf.nix"
|
"${self}/nix-os/generic/dconf.nix"
|
||||||
];
|
];
|
||||||
config = {
|
config = {
|
||||||
services.desktopManager.cosmic.enable = true;
|
services.desktopManager.cosmic.enable = true;
|
|
@ -1,9 +0,0 @@
|
||||||
{ lib, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./vm-base.nix
|
|
||||||
../modules/desktopManagers/gnome.nix
|
|
||||||
../modules/displayManagers/gdm.nix
|
|
||||||
];
|
|
||||||
}
|
|
|
@ -54,17 +54,16 @@ self = {
|
||||||
];
|
];
|
||||||
specialArgs = { inherit self inputs; };
|
specialArgs = { inherit self inputs; };
|
||||||
};
|
};
|
||||||
baseHostsDir = ./nixos/hosts;
|
|
||||||
in
|
in
|
||||||
# mapped attrset of nix file paths to attrSet with initialized NixOS configurations,
|
# mapped attrset of nix file paths to attrSet with initialized NixOS configurations,
|
||||||
# whose names are derived from file names
|
# whose names are derived from file names
|
||||||
lib.pipe baseHostsDir [
|
lib.pipe ./hosts [
|
||||||
builtins.readDir
|
builtins.readDir
|
||||||
# filter out files that are not .nix files, directories with default.nix or starting with . (dot, hidden files)
|
# filter out files that are not .nix files, directories with default.nix or starting with . (dot, hidden files)
|
||||||
( lib.filterAttrs (name: type:
|
( lib.filterAttrs (name: type:
|
||||||
(
|
(
|
||||||
(type == "regular" && lib.hasSuffix ".nix" name)
|
(type == "regular" && lib.hasSuffix ".nix" name)
|
||||||
|| (type == "directory" && builtins.pathExists (baseHostsDir + "/${name}/default.nix"))
|
|| (type == "directory" && builtins.pathExists "${builtins.toString ./.}/hosts/${name}/default.nix")
|
||||||
)
|
)
|
||||||
&& !lib.hasPrefix "." name
|
&& !lib.hasPrefix "." name
|
||||||
))
|
))
|
||||||
|
@ -72,7 +71,7 @@ self = {
|
||||||
# remove .nix extension
|
# remove .nix extension
|
||||||
name = if type == "directory" then name else builtins.substring 0 (builtins.stringLength name - 4) name;
|
name = if type == "directory" then name else builtins.substring 0 (builtins.stringLength name - 4) name;
|
||||||
# initialize NixOS configuration
|
# initialize NixOS configuration
|
||||||
value = mkNixosSystem (baseHostsDir + "/${name}");
|
value = mkNixosSystem ./hosts/${name};
|
||||||
}))
|
}))
|
||||||
builtins.attrValues
|
builtins.attrValues
|
||||||
builtins.listToAttrs
|
builtins.listToAttrs
|
||||||
|
|
|
@ -44,16 +44,7 @@
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
assertNoStorePathPrefix = path:
|
realFileLocation = builtins.toString fileLocation;
|
||||||
assert lib.assertMsg (!lib.hasPrefix builtins.storeDir path) ''
|
|
||||||
The path '${path}' is a store path.
|
|
||||||
|
|
||||||
den-http-get-updater must be evaluated in impure mode,
|
|
||||||
in order to modify target files, and this cannot be done
|
|
||||||
with files in the store.
|
|
||||||
''; path;
|
|
||||||
|
|
||||||
realFileLocation = assertNoStorePathPrefix (builtins.toString fileLocation);
|
|
||||||
|
|
||||||
prefetchList' = lib.map (x:
|
prefetchList' = lib.map (x:
|
||||||
assert builtins.isNull x.prefetchUrlLocation || lib.isAttrs x.prefetchUrlLocation;
|
assert builtins.isNull x.prefetchUrlLocation || lib.isAttrs x.prefetchUrlLocation;
|
||||||
|
@ -67,7 +58,7 @@ let
|
||||||
name = if x.unpack or unpack then "source" else null;
|
name = if x.unpack or unpack then "source" else null;
|
||||||
mark = builtins.hashString "sha256" x.previousHash;
|
mark = builtins.hashString "sha256" x.previousHash;
|
||||||
markRegexEscape = lib.escapeRegex mark;
|
markRegexEscape = lib.escapeRegex mark;
|
||||||
realFileLocation = assertNoStorePathPrefix (builtins.toString x.realFileLocation or fileLocation);
|
realFileLocation = builtins.toString x.fileLocation or fileLocation;
|
||||||
realFileLocationShellEscape = lib.escapeShellArg realFileLocation;
|
realFileLocationShellEscape = lib.escapeShellArg realFileLocation;
|
||||||
prefetchUrlLocationShellEscape = lib.mapAttrs (_: lib.escapeShellArg) x.prefetchUrlLocation;
|
prefetchUrlLocationShellEscape = lib.mapAttrs (_: lib.escapeShellArg) x.prefetchUrlLocation;
|
||||||
previousHashRegexEscape = lib.escapeRegex x.previousHash;
|
previousHashRegexEscape = lib.escapeRegex x.previousHash;
|
||||||
|
|
|
@ -30,7 +30,7 @@ in self.lib.concatMapAttrs (name: value: {
|
||||||
};
|
};
|
||||||
in lib.getAttrFromPath ( [ "config" ] ++ attrpath ) system;
|
in lib.getAttrFromPath ( [ "config" ] ++ attrpath ) system;
|
||||||
in {
|
in {
|
||||||
"NixOS/nvidia" = mkUpdater ./nixos/modules/nvidia.nix [ "hardware" "nvidia" "package" ] {};
|
"NixOS/nvidia" = mkUpdater ./nix-os/nvidia.nix [ "hardware" "nvidia" "package" ] {};
|
||||||
})
|
})
|
||||||
|
|
||||||
# MARK: packages
|
# MARK: packages
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue