From 313951ef3c85803ce5bdb6f2df32001d87d28b8e Mon Sep 17 00:00:00 2001 From: kB01 Date: Tue, 10 Dec 2024 19:20:45 +0100 Subject: [PATCH 1/7] Added Host Rubtrm --- systems/i686-linux/Rubtrm/default.nix | 89 ++++++++++++++++++++++++++ systems/i686-linux/Rubtrm/hardware.nix | 41 ++++++++++++ 2 files changed, 130 insertions(+) create mode 100644 systems/i686-linux/Rubtrm/default.nix create mode 100644 systems/i686-linux/Rubtrm/hardware.nix diff --git a/systems/i686-linux/Rubtrm/default.nix b/systems/i686-linux/Rubtrm/default.nix new file mode 100644 index 0000000..8740276 --- /dev/null +++ b/systems/i686-linux/Rubtrm/default.nix @@ -0,0 +1,89 @@ +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page, on +# https://search.nixos.org/options and in the NixOS manual (`nixos-help`). + +{ config, lib, pkgs, ... }: + +{ + imports = + [ + ./hardware.nix + ]; + + # Use the GRUB 2 boot loader. + boot.loader.grub.enable = true; + # Define on which hard drive you want to install Grub. + boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only + + networking.hostName = "Rubtrm"; # Define your hostname. + networking.networkmanager.enable = true; + + # Set your time zone. + time.timeZone = "Europe/Amsterdam"; + + # Select internationalisation properties. + i18n.defaultLocale = "en_US.UTF-8"; + console = { + font = "Lat2-Terminus16"; + keyMap = lib.mkForce "de"; + useXkbConfig = true; # use xkb.options in tty. + }; + + # Enable the X11 windowing system. + services.xserver.enable = true; + + # Configure keymap in X11 + services.xserver.xkb.layout = "de"; + # services.xserver.xkb.options = "eurosign:e,caps:escape"; + + # Enable sound. + # hardware.pulseaudio.enable = true; + + # Enable touchpad support (enabled default in most desktopManager). + services.xserver.libinput.enable = true; + + # Define a user account. Don't forget to set a password with ‘passwd’. + users.users.kb = { + isNormalUser = true; + extraGroups = [ "wheel" "networkmanager" ]; + packages = with pkgs; [ + tree + ]; + }; + + # List packages installed in system profile. To search, run: + # $ nix search wget + environment.systemPackages = with pkgs; [ + vim + wget + git + btop + fastfetch + ]; + + # Some programs need SUID wrappers, can be configured further or are + # started in user sessions. + # programs.mtr.enable = true; + # programs.gnupg.agent = { + # enable = true; + # enableSSHSupport = true; + # }; + + # List services that you want to enable: + + # Enable the OpenSSH daemon. + # services.openssh.enable = true; + + # Open ports in the firewall. + # networking.firewall.allowedTCPPorts = [ ... ]; + # networking.firewall.allowedUDPPorts = [ ... ]; + + # Configure Nix + nix.settings.experimental-features = [ "nix-command" "flakes" ]; + + # Do NOT change this value unless you have manually inspected all the changes it would make to your configuration, + # and migrated your data accordingly. + # For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion . + system.stateVersion = "24.05"; # Did you read the comment? +} + diff --git a/systems/i686-linux/Rubtrm/hardware.nix b/systems/i686-linux/Rubtrm/hardware.nix new file mode 100644 index 0000000..0330d4d --- /dev/null +++ b/systems/i686-linux/Rubtrm/hardware.nix @@ -0,0 +1,41 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ata_piix" "usbhid" "usb_storage" "ums_realtek" "sd_mod" ]; + boot.initrd.kernelModules = [ "dm-snapshot" "cryptd" ]; + boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-label/NIXOS_LUKS"; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-label/NIXOS_ROOT"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-label/NIXOS_BOOT"; + fsType = "vfat"; + }; + + swapDevices = [ + { + device = "/.swapfile"; + } + ]; + + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp2s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp5s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "i686-linux"; + networking.enableIntel3945ABGFirmware = true; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + # hardware.enableAllFirmware = true; +} From d2d1dfa9952eb3cdec20490fd15cef7c4d4ff170 Mon Sep 17 00:00:00 2001 From: kB01 Date: Tue, 10 Dec 2024 19:21:11 +0100 Subject: [PATCH 2/7] Updated Flake.lock --- flake.lock | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/flake.lock b/flake.lock index c7ad948..dc0fa95 100644 --- a/flake.lock +++ b/flake.lock @@ -127,11 +127,11 @@ ] }, "locked": { - "lastModified": 1732482255, - "narHash": "sha256-GUffLwzawz5WRVfWaWCg78n/HrBJrOG7QadFY6rtV8A=", + "lastModified": 1733769654, + "narHash": "sha256-aVvYDt8eitZVF6fdOrSoIzYRkQ5Gh6kfRvqkiaDRLL0=", "owner": "nix-community", "repo": "home-manager", - "rev": "a9953635d7f34e7358d5189751110f87e3ac17da", + "rev": "e952e94955dcc6fa2120c1430789fc41363f5237", "type": "github" }, "original": { @@ -168,7 +168,7 @@ "narHash": "sha256-6U0CyPycIBc04hbYy2hBINnVso58n/ZyywY2BD3hu+s=", "rev": "9098ac95768f7006d7e070b88bae76939f6034e6", "type": "tarball", - "url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/9098ac95768f7006d7e070b88bae76939f6034e6.tar.gz?rev=9098ac95768f7006d7e070b88bae76939f6034e6" + "url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/9098ac95768f7006d7e070b88bae76939f6034e6.tar.gz" }, "original": { "type": "tarball", @@ -184,11 +184,11 @@ ] }, "locked": { - "lastModified": 1732585961, - "narHash": "sha256-qZk3i/Kk3JL4roSeXlrD2rqjsowBVzoBkXHIzxBGyPs=", + "lastModified": 1733709556, + "narHash": "sha256-u0ll0DDrKlO7tiLGGtmphv3wFy5ReDuf0USo/OlfROU=", "owner": "Infinidoge", "repo": "nix-minecraft", - "rev": "eb1c9ac4398dcc55d644003548c64964c854fac1", + "rev": "8d11f147df83fe137d3d94f6f3646e3a52bec855", "type": "github" }, "original": { @@ -199,11 +199,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1732483221, - "narHash": "sha256-kF6rDeCshoCgmQz+7uiuPdREVFuzhIorGOoPXMalL2U=", + "lastModified": 1733481457, + "narHash": "sha256-IS3bxa4N1VMSh3/P6vhEAHQZecQ3oAlKCDvzCQSO5Is=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "45348ad6fb8ac0e8415f6e5e96efe47dd7f39405", + "rev": "e563803af3526852b6b1d77107a81908c66a9fcf", "type": "github" }, "original": { @@ -215,11 +215,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1732014248, - "narHash": "sha256-y/MEyuJ5oBWrWAic/14LaIr/u5E0wRVzyYsouYY3W6w=", + "lastModified": 1733759999, + "narHash": "sha256-463SNPWmz46iLzJKRzO3Q2b0Aurff3U1n0nYItxq7jU=", "owner": "nixos", "repo": "nixpkgs", - "rev": "23e89b7da85c3640bbc2173fe04f4bd114342367", + "rev": "a73246e2eef4c6ed172979932bc80e1404ba2d56", "type": "github" }, "original": { @@ -269,11 +269,11 @@ ] }, "locked": { - "lastModified": 1732575825, - "narHash": "sha256-xtt95+c7OUMoqZf4OvA/7AemiH3aVuWHQbErYQoPwFk=", + "lastModified": 1733785344, + "narHash": "sha256-pm4cfEcPXripE36PYCl0A2Tu5ruwHEvTee+HzNk+SQE=", "owner": "Mic92", "repo": "sops-nix", - "rev": "3433ea14fbd9e6671d0ff0dd45ed15ee4c156ffa", + "rev": "a80af8929781b5fe92ddb8ae52e9027fae780d2a", "type": "github" }, "original": { From 408fdc41988c47599ebf0f09bf978acfe3375ce9 Mon Sep 17 00:00:00 2001 From: kB01 Date: Tue, 10 Dec 2024 19:40:11 +0100 Subject: [PATCH 3/7] Removed Snowfall-Lib for actual Builds --- flake.nix | 64 +++++++++++++++++++++++++++++++------------------------ 1 file changed, 36 insertions(+), 28 deletions(-) diff --git a/flake.nix b/flake.nix index ac796bc..951d18d 100644 --- a/flake.nix +++ b/flake.nix @@ -14,37 +14,45 @@ nix-minecraft.inputs.nixpkgs.follows = "nixpkgs"; }; - outputs = inputs: inputs.snowfall-lib.mkFlake { - inherit inputs; - src = ./.; + # outputs = inputs: inputs.snowfall-lib.mkFlake { + # inherit inputs; + # src = ./.; - channels-config.allowUnfree = false; + # channels-config.allowUnfree = false; - nix.gc = { - automatic = true; - options = "--delete-older-than 30d"; + # nix.gc = { + # automatic = true; + # options = "--delete-older-than 30d"; + # }; + # nix.optimise.automatic = true; + + # # Modules for Host HyperC + # systems.hosts.HyperC.modules = with inputs; [ + # ]; + + # # Modules for Host voloxo + # systems.hosts.voloxo.modules = with inputs; [ + # ]; + + # # Modules for Host kb-games-01 + # systems.hosts.kb-games-01.modules = with inputs; [ + # ]; + + # # Modules that get imported to every NixOS system + # systems.modules.nixos = with inputs; [ + # lix-module.nixosModules.default + # ]; + + # outputs-builder = channels: { formatter = channels.nixpkgs.nixfmt-rfc-style; }; + + # }; + + outputs = { self, nixpkgs, ... }@inputs: { + nixosConfigurations."Rubtrm" = nixpkgs.lib.nixosSystem { + system = "i686-linux"; + modules = [ ./systems/i686-linux/Rubtrm/default.nix ]; }; - nix.optimise.automatic = true; - - # Modules for Host HyperC - systems.hosts.HyperC.modules = with inputs; [ - ]; - - # Modules for Host voloxo - systems.hosts.voloxo.modules = with inputs; [ - ]; - - # Modules for Host kb-games-01 - systems.hosts.kb-games-01.modules = with inputs; [ - ]; - - # Modules that get imported to every NixOS system - systems.modules.nixos = with inputs; [ - lix-module.nixosModules.default - ]; - - outputs-builder = channels: { formatter = channels.nixpkgs.nixfmt-rfc-style; }; - }; + } From 2b624e4db39ca9dec614b8d5a173b1430c9a3d19 Mon Sep 17 00:00:00 2001 From: kB01 Date: Tue, 10 Dec 2024 19:46:59 +0100 Subject: [PATCH 4/7] Added Host to README.md --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 22f1f0f..2813215 100644 --- a/README.md +++ b/README.md @@ -92,6 +92,13 @@ Ram: 3GB of Host Build: `nixos-rebuild build-vm --flake .#U3ncSovm` +### [Rubtrm](./systems/i686-linux/Rubtrm) +My Lenovo ideapad S10 4333-A13 + +Cpu: Intel Atom N270 (2 Cores, 1.6GHz) + +Ram: 2GB + ## License [MIT © kB01](../LICENSE) From f9003db1670631cb32abdf7d7e17a7f553973f34 Mon Sep 17 00:00:00 2001 From: kB01 Date: Wed, 11 Dec 2024 23:53:25 +0100 Subject: [PATCH 5/7] Enabled i686 Support in Flake --- flake.nix | 71 ++++++++++++++------------- systems/i686-linux/Rubtrm/default.nix | 14 ++++-- 2 files changed, 47 insertions(+), 38 deletions(-) diff --git a/flake.nix b/flake.nix index 951d18d..b4efe02 100644 --- a/flake.nix +++ b/flake.nix @@ -14,45 +14,46 @@ nix-minecraft.inputs.nixpkgs.follows = "nixpkgs"; }; - # outputs = inputs: inputs.snowfall-lib.mkFlake { - # inherit inputs; - # src = ./.; + outputs = inputs: inputs.snowfall-lib.mkFlake { + inherit inputs; + src = ./.; - # channels-config.allowUnfree = false; + channels-config.allowUnfree = false; + supportedSystems = inputs.snowfall-lib.inputs.flake-utils-plus.lib.defaultSystems ++ ["i686-linux"]; - # nix.gc = { - # automatic = true; - # options = "--delete-older-than 30d"; - # }; - # nix.optimise.automatic = true; - - # # Modules for Host HyperC - # systems.hosts.HyperC.modules = with inputs; [ - # ]; - - # # Modules for Host voloxo - # systems.hosts.voloxo.modules = with inputs; [ - # ]; - - # # Modules for Host kb-games-01 - # systems.hosts.kb-games-01.modules = with inputs; [ - # ]; - - # # Modules that get imported to every NixOS system - # systems.modules.nixos = with inputs; [ - # lix-module.nixosModules.default - # ]; - - # outputs-builder = channels: { formatter = channels.nixpkgs.nixfmt-rfc-style; }; - - # }; - - outputs = { self, nixpkgs, ... }@inputs: { - nixosConfigurations."Rubtrm" = nixpkgs.lib.nixosSystem { - system = "i686-linux"; - modules = [ ./systems/i686-linux/Rubtrm/default.nix ]; + nix.gc = { + automatic = true; + options = "--delete-older-than 30d"; }; + nix.optimise.automatic = true; + + # Modules for Host HyperC + systems.hosts.HyperC.modules = with inputs; [ + ]; + + # Modules for Host voloxo + systems.hosts.voloxo.modules = with inputs; [ + ]; + + # Modules for Host kb-games-01 + systems.hosts.kb-games-01.modules = with inputs; [ + ]; + + # Modules that get imported to every NixOS system + systems.modules.nixos = with inputs; [ + lix-module.nixosModules.default + ]; + + outputs-builder = channels: { formatter = channels.nixpkgs.nixfmt-rfc-style; }; + }; + # outputs = { self, nixpkgs, ... }@inputs: { + # nixosConfigurations."Rubtrm" = nixpkgs.lib.nixosSystem { + # system = "i686-linux"; + # modules = [ ./systems/i686-linux/Rubtrm/default.nix ]; + # }; + # }; + } diff --git a/systems/i686-linux/Rubtrm/default.nix b/systems/i686-linux/Rubtrm/default.nix index 8740276..1a071d9 100644 --- a/systems/i686-linux/Rubtrm/default.nix +++ b/systems/i686-linux/Rubtrm/default.nix @@ -10,6 +10,17 @@ ./hardware.nix ]; + # Configure Nix + nix.settings = { + experimental-features = [ "nix-command" "flakes" ]; + substituters = [ + "https://cache.games01.kb-one.de" + ]; + trusted-public-keys = [ + "cache.games01.kb-one.de:JF++7CgrasYciQeB5jlziqT5BTjaknEk9cMeh4lQf30=" + ]; + }; + # Use the GRUB 2 boot loader. boot.loader.grub.enable = true; # Define on which hard drive you want to install Grub. @@ -78,9 +89,6 @@ # networking.firewall.allowedTCPPorts = [ ... ]; # networking.firewall.allowedUDPPorts = [ ... ]; - # Configure Nix - nix.settings.experimental-features = [ "nix-command" "flakes" ]; - # Do NOT change this value unless you have manually inspected all the changes it would make to your configuration, # and migrated your data accordingly. # For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion . From 4d21ced458f6ba7f847bb047543cafcdd8822e62 Mon Sep 17 00:00:00 2001 From: kB01 Date: Thu, 12 Dec 2024 19:17:01 +0100 Subject: [PATCH 6/7] Added Host Rubtrm to Flake (lix does not build for i686 currently) --- flake.nix | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index b4efe02..2d89e3f 100644 --- a/flake.nix +++ b/flake.nix @@ -29,19 +29,31 @@ # Modules for Host HyperC systems.hosts.HyperC.modules = with inputs; [ + lix-module.nixosModules.default ]; # Modules for Host voloxo systems.hosts.voloxo.modules = with inputs; [ + lix-module.nixosModules.default ]; # Modules for Host kb-games-01 systems.hosts.kb-games-01.modules = with inputs; [ + lix-module.nixosModules.default + ]; + + # Modules for Host LoyAdjo + systems.hosts.LoyAdjo.modules = with inputs; [ + lix-module.nixosModules.default + ]; + + # Modules for Host Rubtrm + systems.hosts.Rubtrm.modules = with inputs; [ + # lix-module.nixosModules.default ]; # Modules that get imported to every NixOS system systems.modules.nixos = with inputs; [ - lix-module.nixosModules.default ]; outputs-builder = channels: { formatter = channels.nixpkgs.nixfmt-rfc-style; }; From 6aea7dc498e326c143a49d7e528ad528430b06c7 Mon Sep 17 00:00:00 2001 From: kB01 Date: Thu, 12 Dec 2024 19:17:35 +0100 Subject: [PATCH 7/7] Updated Binary-Cache Public Key --- systems/i686-linux/Rubtrm/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/systems/i686-linux/Rubtrm/default.nix b/systems/i686-linux/Rubtrm/default.nix index 1a071d9..fbf1958 100644 --- a/systems/i686-linux/Rubtrm/default.nix +++ b/systems/i686-linux/Rubtrm/default.nix @@ -17,7 +17,7 @@ "https://cache.games01.kb-one.de" ]; trusted-public-keys = [ - "cache.games01.kb-one.de:JF++7CgrasYciQeB5jlziqT5BTjaknEk9cMeh4lQf30=" + "cache.game01.kb-one.de:XcqI+uobV7EoTKuRmnzYup/+oSfn8uLwnsiQFp8dk/g=" ]; };