From e7de53b2fe16d499ac5eadc70daef762fe804353 Mon Sep 17 00:00:00 2001 From: Ranomier <> Date: Mon, 13 Jan 2025 03:16:43 +0100 Subject: [PATCH] again random stuff --- flake.nix | 34 +++++++++++++++++++++-- hosts/crocoite/crocoite.nix | 1 + hosts/factorio/factorio.nix | 26 +++++++++++------ hosts/factorio/hardware-configuration.nix | 23 +-------------- modules/accessibility.nix | 5 +++- modules/wm_and_de/default.nix | 2 +- 6 files changed, 56 insertions(+), 35 deletions(-) diff --git a/flake.nix b/flake.nix index 028a561..ecacee4 100644 --- a/flake.nix +++ b/flake.nix @@ -38,6 +38,7 @@ nixpkgs-unstable, nix-flatpak, home-manager, + nixos-generators, ... } @ inputs: let # Supported systems for your flake packages, shell, etc. @@ -70,7 +71,7 @@ overlays = import ./overlays {inherit inputs;}; # Reusable nixos modules you might want to export # These are usually stuff you would upstream into nixpkgs - nixosModules = import ./modules/nixos; + #nixosModules = import ./modules/nixos; # Reusable home-manager modules you might want to export # These are usually stuff you would upstream into home-manager homeManagerModules = import ./modules/home-manager; @@ -78,8 +79,7 @@ # NixOS configuration entrypoint # Available through 'nixos-rebuild --flake .#your-hostname' nixosConfigurations = - host_helper "crocoite" # // (host_helper example); - // host_helper "factorio"; + host_helper "crocoite"; # // (host_helper example); ## Standalone home-manager configuration entrypoint ## Available through 'home-manager --flake .#your-username@your-hostname' @@ -94,5 +94,33 @@ # ]; # }; #}; + + packages.x86_64-linux = { + factorio = nixos-generators.nixosGenerate { + system = "x86_64-linux"; + modules = [ + # you can include your own nixos configuration here, i.e. + #./hosts/factorio/factorio.nix + ]; + + customFormats = { + "myFormat" = { + lib, + modulesPath, + ... + }: { + imports = [ + "${toString modulesPath}/virtualisation/proxmox-lxc.nix" + ]; + boot.loader.grub.enable = lib.mkForce false; + boot.loader.systemd-boot.enable = lib.mkForce false; + formatAttr = "tarball"; + fileExtension = "asd.tar.xz"; + }; + }; + format = "myFormat"; + #format = "vmware"; + }; + }; }; } diff --git a/hosts/crocoite/crocoite.nix b/hosts/crocoite/crocoite.nix index b206c7e..ed33bd9 100644 --- a/hosts/crocoite/crocoite.nix +++ b/hosts/crocoite/crocoite.nix @@ -72,6 +72,7 @@ ../../modules/software ../../modules/software/browser ../../modules/software/nix-helper + ../../modules/software/shells ../../modules/wm_and_de diff --git a/hosts/factorio/factorio.nix b/hosts/factorio/factorio.nix index 057ad1f..138f17d 100644 --- a/hosts/factorio/factorio.nix +++ b/hosts/factorio/factorio.nix @@ -1,4 +1,8 @@ -{pkgs, ...}: { +{ + pkgs, + lib, + ... +}: { # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions # on your system were taken. It‘s perfectly fine and recommended to leave @@ -47,9 +51,9 @@ ../../modules/locale.nix #../../modules/game/server/factorio/factorio.nix - - - + # + # + # { programs.command-not-found.enable = false; @@ -61,10 +65,16 @@ }; documentation.man.enable = false; documentation.nixos.enable = false; + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.ens18.useDHCP = lib.mkDefault true; } ]; - disabledModules = [ - - - ]; + #disabledModules = [ + # + # + #]; } diff --git a/hosts/factorio/hardware-configuration.nix b/hosts/factorio/hardware-configuration.nix index daf8eca..a458278 100644 --- a/hosts/factorio/hardware-configuration.nix +++ b/hosts/factorio/hardware-configuration.nix @@ -8,30 +8,9 @@ modulesPath, ... }: { - imports = [ - (modulesPath + "/profiles/qemu-guest.nix") - ]; - boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod"]; - boot.initrd.kernelModules = []; - boot.kernelModules = []; - boot.extraModulePackages = []; - fileSystems."/" = { - device = "/dev/disk/by-uuid/a6c22dab-a82a-4109-a8d0-b7ed99d56bc7"; - fsType = "ext4"; - }; - - swapDevices = [ - {device = "/dev/disk/by-uuid/ca4eedce-6e52-4593-a188-a48e54074d14";} - ]; - - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking - # (the default) this is the recommended approach. When using systemd-networkd it's - # still possible to use this option, but it's recommended to use it in conjunction - # with explicit per-interface declarations with `networking.interfaces..useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.ens18.useDHCP = lib.mkDefault true; + # maybe instruct nix to just use available swap partition nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; } diff --git a/modules/accessibility.nix b/modules/accessibility.nix index 3347018..b26d138 100644 --- a/modules/accessibility.nix +++ b/modules/accessibility.nix @@ -1,3 +1,6 @@ {...}: { - services.speechd.enable = true; + services = { + speechd.enable = true; + orca.enable = true; + }; } diff --git a/modules/wm_and_de/default.nix b/modules/wm_and_de/default.nix index 1e95e7b..f4baad5 100644 --- a/modules/wm_and_de/default.nix +++ b/modules/wm_and_de/default.nix @@ -1,7 +1,7 @@ {...}: { imports = [ ./hyprland.nix - ./qtile.nix + #./qtile.nix ./components/dbus.nix ]; }