From 8ffe5ce23fa1548304a3fa25f2bd0e89837f5a0b Mon Sep 17 00:00:00 2001 From: Minijackson Date: Sun, 18 Apr 2021 16:58:23 +0200 Subject: revamp with nix flakes + desktop config --- configuration.nix | 53 +++++++---------------------------------------------- 1 file changed, 7 insertions(+), 46 deletions(-) (limited to 'configuration.nix') diff --git a/configuration.nix b/configuration.nix index 1a5530f..b95c631 100644 --- a/configuration.nix +++ b/configuration.nix @@ -1,28 +1,15 @@ -# Edit this configuration file to define what should be installed on -# your system. Help is available in the configuration.nix(5) man page -# and in the NixOS manual (accessible by running ‘nixos-help’). +inputs: -{ config, pkgs, modulesPath, ... }: +{ config, pkgs, modulesPath, lib, ... }: -{ +let + optionalImport = path: + lib.optional (builtins.pathExists path) path; +in { imports = [ - ./hardware-configuration.nix - ./host-secret.nix - ./common/default.nix + (import ./common/default.nix inputs) ]; - # Set your time zone. - time.timeZone = "Europe/Paris"; - - # Select internationalisation properties. - i18n.defaultLocale = "en_US.UTF-8"; - # console = { - # font = "Lat2-Terminus16"; - # keyMap = "us"; - # }; - - # List packages installed in system profile. To search, run: - # $ nix search wget environment.systemPackages = with pkgs; [ wget vim tmux @@ -36,37 +23,11 @@ shellcheck ]; - # 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; - passwordAuthentication = false; - }; - - # Define a user account. Don't forget to set a password with ‘passwd’. users.extraUsers.minijackson = { isNormalUser = true; extraGroups = [ "users" "wheel" ]; openssh.authorizedKeys.keys = ["ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCmyjB5yuU8GK3ZVFznELVEwXN7zzjQJcPYZ89YCGTANjPHpHxZv5R9/kgjTtIKrqqHdTvfr8V8sao9Nr7PhtcV9UywrFn+kplyGf9WDl2oDF9eZprX3beR9zwDj/YIcFRx3wXk4JK/ioZJjcVZ3+xWPixiFplvHIyMsTjKfgRplntHpvoyLM8vURjLOCdPr6SRPReVXuSR2DRlVO7q7y+4FwA1FKAndg9YACoM1g2bEJ6eGyCPp2kFde+GvMv1y6FlBS1OFddGmBpUJzJ4mQ4ebqDVFsKQMx1xCkiz0l7tfVpXqXToHF+baTESEKbC4654PunD99BC0J4otHKrerdmX0HdTgHKtAnslSwRD5NZVAojk/CR3DiSQYFSO9OhFVjHNQsc1zpoKPtJYMe1ax3pcvc+XLCrKLUdHH8x9rVGefZXwIyLrrGrB7fVlyIyX7j04dNALQZiuFOKCInaYypVLHLy0k+buhQlVqKCS6N1xP5O6JiWUKXFYYyoRmSoX9+bfPiwsMrPL+rYXkee0K67BI1NiFAYPmdFFM0jtdFaYuvgEAWw7b9WyWyO/JAdHRwtlqfAqraPBrb4sldvQfLBm8RdORBYMaVbg4EUKMOJjIeAAK+7xWPtg2XeJNnsje/IsWaVXIBx2IAC50uAnIZ/ksw5lyAZP+HyGIHhCAQChQ== minijackson@riseup.net"]; }; - nix = { - autoOptimiseStore = true; - gc = { - automatic = true; - dates = "03:15"; - options = "--delete-older-than 30d"; - }; - }; - system.autoUpgrade.enable = true; } -- cgit v1.2.3