diff --git a/configuration.nix b/configuration.nix index 17c8161..a5e2029 100644 --- a/configuration.nix +++ b/configuration.nix @@ -1,7 +1,3 @@ -# 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, pkgs, @@ -10,25 +6,20 @@ { imports = [ - # Include the results of the hardware scan. ./security.nix ./hardware-configuration.nix ./hardware.nix ./bootloader.nix + ./nix.nix + ./users.nix ]; - nix.gc = { - automatic = true; - dates = "weekly"; - options = "--delete-older-than 30d"; - }; - - nixpkgs.config.allowUnfree = true; - - networking.hostName = "niczos"; # Define your hostname. + networking.hostName = "niczos"; networking.networkmanager.enable = true; + time.timeZone = "Europe/Paris"; + i18n.defaultLocale = "en_US.UTF-8"; virtualisation = { @@ -79,41 +70,6 @@ }; }; - users.users.zo = { - isNormalUser = true; - extraGroups = [ - "wheel" - "audio" - "video" - "network" - "docker" - ]; - packages = [ pkgs.home-manager ]; - shell = pkgs.bash; - }; - - users.users.flake = { - isNormalUser = true; - extraGroups = [ - "audio" - "video" - "network" - ]; - shell = pkgs.bash; - }; - - users.users.ella = { - isNormalUser = true; - extraGroups = [ - "audio" - "video" - "network" - ]; - shell = pkgs.bash; - }; - - # List packages installed in system profile. - # You can use https://search.nixos.org/ to find more packages (and options). environment.systemPackages = with pkgs; [ curl wget @@ -133,28 +89,7 @@ font-awesome ]; - # Copy the NixOS configuration file and link it from the resulting system - # (/run/current-system/configuration.nix). This is useful in case you - # accidentally delete configuration.nix. system.copySystemConfiguration = true; - # This option defines the first version of NixOS you have installed on this particular machine, - # and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions. - # - # Most users should NEVER change this value after the initial install, for any reason, - # even if you've upgraded your system to a new NixOS release. - # - # This value does NOT affect the Nixpkgs version your packages and OS are pulled from, - # so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how - # to actually do that. - # - # This value being lower than the current NixOS release does NOT mean your system is - # out of date, out of support, or vulnerable. - # - # 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 = "26.05"; # Did you read the comment? - + system.stateVersion = "26.05"; # Not here to update, here for data models backward compatibility. Don't change. } diff --git a/nix.nix b/nix.nix new file mode 100644 index 0000000..3d543f9 --- /dev/null +++ b/nix.nix @@ -0,0 +1,9 @@ +{ + nix.gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 30d"; + }; + + nixpkgs.config.allowUnfree = true; +} diff --git a/users.nix b/users.nix new file mode 100644 index 0000000..d11e706 --- /dev/null +++ b/users.nix @@ -0,0 +1,34 @@ +{ + users.users.zo = { + isNormalUser = true; + extraGroups = [ + "wheel" + "audio" + "video" + "network" + "docker" + ]; + packages = [ pkgs.home-manager ]; + shell = pkgs.bash; + }; + + users.users.flake = { + isNormalUser = true; + extraGroups = [ + "audio" + "video" + "network" + ]; + shell = pkgs.bash; + }; + + users.users.ella = { + isNormalUser = true; + extraGroups = [ + "audio" + "video" + "network" + ]; + shell = pkgs.bash; + }; +}