From 7d3001035372440d2578b77ca52fda3d4b47836b Mon Sep 17 00:00:00 2001 From: albertvala Date: Fri, 14 Mar 2025 11:19:45 +0100 Subject: [PATCH] pridani configuration.nix --- prezentace.md | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/prezentace.md b/prezentace.md index 7507dff..7da9b5e 100644 --- a/prezentace.md +++ b/prezentace.md @@ -89,8 +89,8 @@ nix flake show github:kamadorueda/alejandra --- ```nix +#flake.nix { - description = "NixOS configuration"; inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; home-manager.url = "github:nix-community/home-manager"; @@ -104,16 +104,16 @@ nix flake show github:kamadorueda/alejandra ... }: { nixosConfigurations = { - laptop = nixpkgs.lib.nixosSystem { + nixos = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ - ./laptop/configuration.nix + ./configuration.nix home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = false; home-manager.useUserPackages = true; home-manager.extraSpecialArgs = {inherit zen-browser;}; - home-manager.users.albert = import ./modules/home.nix; + home-manager.users.nixFreak = import ./home.nix; } ]; }; @@ -125,6 +125,7 @@ nix flake show github:kamadorueda/alejandra --- ```nix +#home.nix { zen-browser, config, @@ -144,6 +145,29 @@ nix flake show github:kamadorueda/alejandra programs.home-manager.enable = true; } ``` +--- +```nix +#configuration.nix +{ + config, + lib, + pkgs, + ... +}: { + imports = [ + # Include the results of the hardware scan. + ./hardware-configuration.nix + ]; + + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + users.users.nixFreak = { + isNormalUser = true; + extraGroups = ["wheel"]; # Enable ‘sudo’ for the user. + }; + system.stateVersion = "25.05"; # Did you read the comment? +} +``` ---