From 4bb943ef31e142952ffba4aa5dcacb5d36e55309 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Czy=C5=BC?= Date: Wed, 10 Apr 2024 11:01:21 +0200 Subject: [PATCH] refractor and thor update --- flake.nix | 31 ++++++++++++++++---- thor/configuration.nix | 65 +++++++++++++++++++++++++++++------------- 2 files changed, 70 insertions(+), 26 deletions(-) diff --git a/flake.nix b/flake.nix index 87f5388..48a4593 100644 --- a/flake.nix +++ b/flake.nix @@ -15,16 +15,35 @@ system = "x86_64-linux"; pkgs = nixpkgs.legacyPackages.${system}; pkgs-unstable = nixpkgs-unstable.legacyPackages.${system}; - systemSettings = { - profile = "zion"; # select 'thor' or 'zion' - }; in { nixosConfigurations = { - system = lib.nixosSystem { + zion = lib.nixosSystem { inherit system; modules = [ - (./. + ("/" + systemSettings.profile) - + "/configuration.nix") + zion/configuration.nix + + home-manager.nixosModules.home-manager + { + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + + users.mike = import ./home.nix; + + extraSpecialArgs = { + inherit pkgs-unstable; + }; + }; + } + ]; + specialArgs = { + inherit pkgs-unstable; + }; + }; + thor = lib.nixosSystem { + inherit system; + modules = [ + thor/configuration.nix home-manager.nixosModules.home-manager { diff --git a/thor/configuration.nix b/thor/configuration.nix index dc533df..8d1cdfa 100644 --- a/thor/configuration.nix +++ b/thor/configuration.nix @@ -42,23 +42,29 @@ LC_TIME = "pl_PL.UTF-8"; }; - # Enable the X11 windowing system. - services.xserver.enable = true; + services.xserver = { + enable = true; + layout = "pl"; + xkbVariant = ""; - # Enable the KDE Plasma Desktop Environment. - services.xserver.displayManager.sddm.enable = true; - services.xserver.desktopManager.plasma5.enable = true; + displayManager = { + lightdm = { + enable = true; + }; + }; + desktopManager = { + xfce = { + enable = true; + }; + }; + }; + + # I use zsh btw environment.shells = with pkgs; [ bash zsh ]; users.defaultUserShell = pkgs.zsh; programs.zsh.enable = true; - # Configure keymap in X11 - services.xserver = { - layout = "pl"; - xkbVariant = ""; - }; - # Configure console keymap console.keyMap = "pl2"; @@ -90,15 +96,11 @@ isNormalUser = true; description = "Mike"; extraGroups = [ "networkmanager" "wheel" ]; - packages = [ - pkgs.discord - pkgs.spotify - ]; + packages = []; }; # List packages installed in system profile. To search, run: # $ nix search wget - nix.settings.experimental-features = [ "nix-command" "flakes" ]; environment.systemPackages = (with pkgs; [ vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. @@ -107,22 +109,32 @@ neofetch zsh pavucontrol - home-manager - firefox htop - nerdfonts ntfs3g dosfstools woeusb + python3 + + steam-run + + # cmake + # clang + # gcc + # gtest ]) ++ (with pkgs-unstable; [ - neovim + cmake + gcc + clang + gtest ]); + fonts.packages = with pkgs; [ nerdfonts ]; + # Some programs need SUID wrappers, can be configured further or are # started in user sessions. programs.mtr.enable = true; @@ -150,6 +162,19 @@ # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). system.stateVersion = "23.11"; # Did you read the comment? + nix = { + settings = { + experimental-features = ["nix-command" "flakes"]; + substituters = [ + "https://nix-community.cachix.org" + "https://cache.nixos.org/" + ]; + trusted-public-keys = [ + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + ]; + }; + }; + # Allow unfree packages nixpkgs.config = { allowUnfree = true;