diff options
Diffstat (limited to 'hosts')
-rw-r--r-- | hosts/default.nix | 42 | ||||
-rw-r--r-- | hosts/home.nix | 7 | ||||
-rw-r--r-- | hosts/phobos/default.nix | 3 | ||||
-rw-r--r-- | hosts/phobos/hardware.nix | 3 | ||||
-rw-r--r-- | hosts/phobos/home.nix | 5 | ||||
-rw-r--r-- | hosts/vm/default.nix | 25 | ||||
-rw-r--r-- | hosts/vm/hardware.nix | 38 | ||||
-rw-r--r-- | hosts/vm/home.nix | 7 |
8 files changed, 100 insertions, 30 deletions
diff --git a/hosts/default.nix b/hosts/default.nix index 83fb4c2..bd6dccb 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -15,26 +15,28 @@ let inherit (nixpkgs.lib); secrets = import ../secrets; + + mkHost = hostname: lib.nixosSystem { + inherit system; + specialArgs = { inherit pkgs inputs user secrets hostname; }; + modules = [ + ./configuration.nix + ./${hostname} + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.extraSpecialArgs = { inherit pkgs user secrets hostname inputs; }; + home-manager.users.${user} = { + imports = [ ./home.nix ] ++ [ (import ./${ hostname }/home.nix) ]; + }; + } + ]; + }; +in +let hosts = [ "baitinq" "vm" ]; #TODO: generate from here. List to set + apply func in { - phobos = - let hostname = "phobos"; - in - lib.nixosSystem { - inherit system; - specialArgs = { inherit pkgs inputs user secrets hostname; }; - modules = [ - ./configuration.nix - ./phobos - home-manager.nixosModules.home-manager - { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.extraSpecialArgs = { inherit pkgs user secrets hostname inputs; }; - home-manager.users.${user} = { - imports = [ ./home.nix ] ++ [ (import ./${ hostname }/home.nix) ]; - }; - } - ]; - }; + baitinq = mkHost "baitinq"; + vm = mkHost "vm"; } diff --git a/hosts/home.nix b/hosts/home.nix index 96ab3c7..d0ec7da 100644 --- a/hosts/home.nix +++ b/hosts/home.nix @@ -25,8 +25,6 @@ in feh custom.smart-wallpaper custom.dwmbar - numlockx - surf pavucontrol light polkit_gnome @@ -34,11 +32,6 @@ in qbittorrent xorg.xev statix - custom.anime-downloader - custom.adl - custom.trackma - kcc - custom.kindlegen ]; }; diff --git a/hosts/phobos/default.nix b/hosts/phobos/default.nix index 9871b91..c10295f 100644 --- a/hosts/phobos/default.nix +++ b/hosts/phobos/default.nix @@ -9,9 +9,6 @@ ./hardware.nix ]; - # Define on which hard drive you want to install Grub. - boot.loader.grub.device = "/dev/sdb"; # or "nodev" for efi only - # Pick only one of the below networking options. networking = { wireless = { diff --git a/hosts/phobos/hardware.nix b/hosts/phobos/hardware.nix index d13c0a1..c984d99 100644 --- a/hosts/phobos/hardware.nix +++ b/hosts/phobos/hardware.nix @@ -21,6 +21,9 @@ in fsType = "ext4"; }; + # Define on which hard drive you want to install Grub. + boot.loader.grub.device = "/dev/sdb"; # or "nodev" for efi only + swapDevices = [ ]; powerManagement.cpuFreqGovernor = powerMode; diff --git a/hosts/phobos/home.nix b/hosts/phobos/home.nix index 2cb65eb..4158316 100644 --- a/hosts/phobos/home.nix +++ b/hosts/phobos/home.nix @@ -5,5 +5,10 @@ jetbrains.idea-community calibre qtcreator + custom.anime-downloader + custom.adl + custom.trackma + kcc + custom.kindlegen ]; } diff --git a/hosts/vm/default.nix b/hosts/vm/default.nix new file mode 100644 index 0000000..cb55ce6 --- /dev/null +++ b/hosts/vm/default.nix @@ -0,0 +1,25 @@ +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page +# and in the NixOS manual (accessible by running ‘nixos-help’). + +{ config, pkgs, lib, secrets, hostname, inputs, user, ... }: { + + imports = [ + # Include the results of the hardware scan. + ./hardware.nix + ]; + + # Pick only one of the below networking options. + networking = { + # networkmanager.enable = true; # Easiest to use and most distros use this by default. + # Configure network proxy if necessary + # proxy.default = "http://user:password@proxy:port/"; + # proxy.noProxy = "127.0.0.1,localhost,internal.domain"; + }; + + environment.systemPackages = with pkgs; + [ + + ]; +} + diff --git a/hosts/vm/hardware.nix b/hosts/vm/hardware.nix new file mode 100644 index 0000000..5f331f1 --- /dev/null +++ b/hosts/vm/hardware.nix @@ -0,0 +1,38 @@ +{ config, lib, pkgs, modulesPath, ... }: +{ + imports = [ ]; + + boot = { + initrd = { + availableKernelModules = + [ "ata_piix" "ohci_pci" "sd_mod" "sr_mod" ]; + kernelModules = [ ]; + }; + kernelModules = [ ]; + extraModulePackages = [ ]; + kernelParams = [ "net.ifnames=0" "biosdevname=0" ]; + }; + + fileSystems."/" = { + device = "/dev/disk/by-label/nixos"; + fsType = "ext4"; + }; + + # Define on which hard drive you want to install Grub. + boot.loader.grub.device = "/dev/sdb"; # or "nodev" for efi only + + swapDevices = [ ]; + + services.xserver = { + # Enable touchpad support (enabled default in most desktopManager). + libinput.enable = true; + }; + + hardware = { + opengl = { + enable = true; + driSupport = true; + }; + }; + virtualisation.virtualbox.guest.enable = true; +} diff --git a/hosts/vm/home.nix b/hosts/vm/home.nix new file mode 100644 index 0000000..7c9ef1e --- /dev/null +++ b/hosts/vm/home.nix @@ -0,0 +1,7 @@ +{ config, lib, pkgs, inputs, user, hostname, secrets, ... }: +{ + home.packages = with pkgs; [ + #jetbrains.idea-community + #qtcreator + ]; +} |