From 9580f18b5360d732cbd8b6b27db8eb43cb05219c Mon Sep 17 00:00:00 2001 From: Anton Date: Tue, 10 Mar 2026 17:29:26 +0100 Subject: [PATCH] awdawdawd --- .gitignore | 1 - configuration.nix | 29 ++++++++++++---------- flake.lock | 49 ++++++++++++++++++++++++++++++++++++++ flake.nix | 42 ++++++++++++++++++++++++++++++++ hardware-configuration.nix | 43 +++++++++++++++++++++++++++++++++ testfile | 0 6 files changed, 150 insertions(+), 14 deletions(-) create mode 100644 flake.lock create mode 100644 flake.nix create mode 100644 hardware-configuration.nix create mode 100644 testfile diff --git a/.gitignore b/.gitignore index ef6c6c3..749e984 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ .env.nix -hardware-configuration.nix diff --git a/configuration.nix b/configuration.nix index 546c5c8..5eb0a6c 100644 --- a/configuration.nix +++ b/configuration.nix @@ -19,15 +19,20 @@ in imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix - (import (./. + "/${env.hostname}.nix")) - mpkgs.home-manager.module + # (import (./. + "/${env.hostname}.nix")) + # mpkgs.home-manager.module ]; - nixpkgs.config.allowUnfree = true; - nixpkgs.overlays = [ - (import "${fetchTarball "https://github.com/nix-community/fenix/archive/main.tar.gz"}/overlay.nix") + nix.settings.experimental-features = [ + "nix-command" + "flakes" ]; + # nixpkgs.config.allowUnfree = true; + # nixpkgs.overlays = [ + # (import "${fetchTarball "https://github.com/nix-community/fenix/archive/main.tar.gz"}/overlay.nix") + # ]; + environment.systemPackages = with pkgs; [ chromium @@ -153,12 +158,12 @@ in ]; }; - home-manager = { - useUserPackages = true; - useGlobalPkgs = true; - sharedModules = [ ] ++ (mpkgs.home-manager.sharedModules); - users.anton = import ./home.nix; - }; + # home-manager = { + # useUserPackages = true; + # useGlobalPkgs = true; + # sharedModules = [ ] ++ (mpkgs.home-manager.sharedModules); + # users.anton = import ./home.nix; + # }; # programs.home-manager.enable = true; programs.dconf.enable = true; @@ -230,8 +235,6 @@ in LC_TIME = "sv_SE.UTF-8"; }; - nix.settings.extra-experimental-features = [ "nix-command" ]; - # 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 diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..6578ba2 --- /dev/null +++ b/flake.lock @@ -0,0 +1,49 @@ +{ + "nodes": { + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1772985280, + "narHash": "sha256-FdrNykOoY9VStevU4zjSUdvsL9SzJTcXt4omdEDZDLk=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "8f736f007139d7f70752657dff6a401a585d6cbc", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "release-25.11", + "repo": "home-manager", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1772822230, + "narHash": "sha256-yf3iYLGbGVlIthlQIk5/4/EQDZNNEmuqKZkQssMljuw=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "71caefce12ba78d84fe618cf61644dce01cf3a96", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-25.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "home-manager": "home-manager", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..68285b7 --- /dev/null +++ b/flake.nix @@ -0,0 +1,42 @@ +{ + description = "System configuration"; + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11"; + + home-manager.url = "github:nix-community/home-manager/release-25.11"; + home-manager.inputs.nixpkgs.follows = "nixpkgs"; + }; + outputs = + { + self, + nixpkgs, + home-manager, + }@inputs: + let + systems = [ + "aarch64-linux" + "i686-linux" + "x86_64-linux" + "aarch64-darwin" + "x86_64-darwin" + ]; + forAllSystems = nixpkgs.lib.genAttrs systems; + in + { + formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.nixfmt); + + nixosConfigurations.blueplum = nixpkgs.lib.nixosSystem { + specialArgs = { inherit inputs; }; + modules = [ + ./configuration.nix + ./blueplum.nix + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.anton = import ./home.nix; + } + ]; + }; + }; +} diff --git a/hardware-configuration.nix b/hardware-configuration.nix new file mode 100644 index 0000000..a1a9b2e --- /dev/null +++ b/hardware-configuration.nix @@ -0,0 +1,43 @@ +# 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 = [ "xhci_pci" "ahci" "nvme" "usbhid" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/2a269992-8aaa-4600-99b7-9020e8cd8cfc"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/D622-8FDF"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + fileSystems."/home/anton/mnt/sda" = + { device = "/dev/disk/by-uuid/735e9ebf-71f7-49ce-a2d7-5e62a8820f2a"; + fsType = "ext4"; + }; + + swapDevices = [ ]; + + # 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.eno1.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/testfile b/testfile new file mode 100644 index 0000000..e69de29