diff options
| author | Quentin Aristote <quentin@aristote.fr> | 2023-02-19 16:56:48 +0100 |
|---|---|---|
| committer | Quentin Aristote <quentin@aristote.fr> | 2023-02-19 17:01:10 +0100 |
| commit | 25f9b854c0065a3d63278178ef4c8abc99108eba (patch) | |
| tree | 50eb4c1d8e32d65b49905ebfb8ff8411045e30d6 /config | |
| parent | 547870aaafcafe4836557f2fc98768053af26ef2 (diff) | |
| parent | 7532f335a3ed8a898e2df95f06faa38bad2b8e5d (diff) | |
Merge branch 'rollback'
Diffstat (limited to 'config')
| -rw-r--r-- | config/boot.nix | 10 | ||||
| -rw-r--r-- | config/default.nix | 4 | ||||
| -rw-r--r-- | config/environment.nix | 13 | ||||
| -rw-r--r-- | config/hardware-configuration.nix | 27 | ||||
| -rw-r--r-- | config/networking.nix | 23 | ||||
| -rw-r--r-- | config/nix.nix | 12 | ||||
| -rw-r--r-- | config/services/web/searx/searx/engines.nix | 2 | ||||
| -rw-r--r-- | config/store.nix | 21 | ||||
| -rw-r--r-- | config/users.nix | 8 |
9 files changed, 55 insertions, 65 deletions
diff --git a/config/boot.nix b/config/boot.nix index df60fea..910e251 100644 --- a/config/boot.nix +++ b/config/boot.nix @@ -1,12 +1,6 @@ { ... }: { - boot = { - loader.grub = { - enable = true; - version = 2; - enableCryptodisk = true; - device = "/dev/vda"; - }; - }; + personal.boot.grub.enable = true; + boot.loader.grub.device = "/dev/vda"; } diff --git a/config/default.nix b/config/default.nix index 271ee4b..43dff7d 100644 --- a/config/default.nix +++ b/config/default.nix @@ -1,4 +1,4 @@ -{ pkgs, modulesPath, ... }: +{ modulesPath, ... }: { imports = [ @@ -7,8 +7,8 @@ ./boot.nix ./environment.nix ./networking.nix + ./nix.nix ./services - ./store.nix ./users.nix ]; diff --git a/config/environment.nix b/config/environment.nix index e812e43..61f55ff 100644 --- a/config/environment.nix +++ b/config/environment.nix @@ -1,16 +1,11 @@ { pkgs, ... }: { - environment.systemPackages = with pkgs; [ vim gitMinimal ]; + personal.environment = { + enable = true; + locale.enable = true; + }; programs.bash.promptInit = '' PS1="\n\[\033[1;32m\][\[\e]0;\u@$(hostname -f): \w\a\]\u@$(hostname -f):\w]\$\[\033[0m\] " ''; - - i18n.defaultLocale = "en_US.UTF-8"; - console = { - font = "Lat2-Terminus16"; - keyMap = "fr"; - }; - - time.timeZone = "Europe/Paris"; } diff --git a/config/hardware-configuration.nix b/config/hardware-configuration.nix new file mode 100644 index 0000000..1b79e6f --- /dev/null +++ b/config/hardware-configuration.nix @@ -0,0 +1,27 @@ +{ pkgs, lib, modulesPath, ... }: + +{ + imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; + + boot.initrd.availableKernelModules = + [ "ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = { + device = "/dev/disk/by-uuid/2b302948-5608-41c6-b54c-1c0e39ff6a58"; + fsType = "ext4"; + }; + + boot.initrd.luks.devices."root".device = + "/dev/disk/by-uuid/eaec758b-ba22-42ab-8992-e765cec9be55"; + + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/74d78eba-c29a-4724-8fb7-624e0a03faa5"; + fsType = "ext4"; + }; + + swapDevices = [{ device = "/swap"; }]; + +} diff --git a/config/networking.nix b/config/networking.nix index 4716149..172834d 100644 --- a/config/networking.nix +++ b/config/networking.nix @@ -1,6 +1,12 @@ { pkgs, ... }: { + personal.networking = { + enable = true; + firewall.http = true; + ssh.enable = true; + }; + networking = { hostName = "hermes"; domain = "aristote.fr"; @@ -12,22 +18,5 @@ }]; defaultGateway = "93.95.228.1"; nameservers = [ "93.95.224.28" "93.95.224.29" ]; - - firewall = { - enable = true; - allowedTCPPorts = [ 80 443 ]; - }; - }; - - services.openssh = { - enable = true; - settings = { - PermitRootLogin = "no"; - PasswordAuthentication = false; - }; - extraConfig = '' - AcceptEnv PS1 - ''; }; - services.fail2ban.enable = true; } diff --git a/config/nix.nix b/config/nix.nix new file mode 100644 index 0000000..5c9278f --- /dev/null +++ b/config/nix.nix @@ -0,0 +1,12 @@ +{ lib, ... }: + +{ + personal.nix = { + enable = true; + autoUpgrade = true; + gc.enable = true; + flake = "git+file:///etc/nixos/"; + }; + nix.settings.max-jobs = lib.mkDefault 1; + system.autoUpgrade.flags = [ "--update-input" "personal-webpage/data" ]; +} diff --git a/config/services/web/searx/searx/engines.nix b/config/services/web/searx/searx/engines.nix index 259ea74..1c5273a 100644 --- a/config/services/web/searx/searx/engines.nix +++ b/config/services/web/searx/searx/engines.nix @@ -54,7 +54,7 @@ in { # files "btdigg" # images - "openverse" + "ccengine" "bing images" "library of congress" "qwant images" diff --git a/config/store.nix b/config/store.nix deleted file mode 100644 index 8efcd5d..0000000 --- a/config/store.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ lib, ... }: - -{ - nix = { - settings = { - auto-optimise-store = true; - experimental-features = [ "nix-command" "flakes" ]; - }; - gc = { - automatic = true; - dates = "daily"; - options = "--delete-old"; - }; - settings.max-jobs = lib.mkDefault 1; - }; - system.autoUpgrade = { - enable = true; - flake = "git+file:///etc/nixos/"; - flags = [ "--update-input" "nixpkgs" "--commit-lock-file" ]; - }; -} diff --git a/config/users.nix b/config/users.nix index 99a497d..36aacef 100644 --- a/config/users.nix +++ b/config/users.nix @@ -1,11 +1,5 @@ { ... }: { - users.users.qaristote = { - isNormalUser = true; - extraGroups = [ "wheel" ]; - openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK4wGbl3++lqCjLUhoRyABBrVEeNhIXYO4371srkRoyq qaristote@latitude-7490" - ]; - }; + personal.user.enable = true; } |
