Compare commits

..

2 commits

Author SHA1 Message Date
Antoine Martin fe7bc61d96 flake.lock: Update
Flake lock file updates:

• Updated input 'home-manager':
    'github:nix-community/home-manager/64831f938bd413cefde0b0cf871febc494afaa4f' (2022-05-25)
  → 'github:nix-community/home-manager/70824bb5c790b820b189f62f643f795b1d2ade2e' (2022-06-07)
• Added input 'home-manager/flake-compat':
    'github:edolstra/flake-compat/b4a34015c698c7793d592d66adbab377907a2be8' (2022-04-19)
• Added input 'home-manager/nmd':
    'gitlab:rycee/nmd/9e7a20e6ee3f6751f699f79c0b299390f81f7bcd' (2022-05-23)
• Added input 'home-manager/nmt':
    'gitlab:rycee/nmt/d83601002c99b78c89ea80e5e6ba21addcfe12ae' (2022-03-23)
• Added input 'home-manager/utils':
    'github:numtide/flake-utils/1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1' (2022-05-30)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/83658b28fe638a170a19b8933aa008b30640fbd1' (2022-05-26)
  → 'github:NixOS/nixpkgs/e0169d7a9d324afebf5679551407756c77af8930' (2022-06-08)
• Updated input 'nixpkgs-unstable-small':
    'github:NixOS/nixpkgs/f6c4da49202d79cdab2fdf2bfa3019cde23f007e' (2022-05-29)
  → 'github:NixOS/nixpkgs/a58de450c514aa1bc5a4999f92656ab6b600dc59' (2022-06-10)
2022-06-10 17:31:28 +02:00
Antoine Martin 12b8a7da85 hades: init 2022-06-10 17:31:28 +02:00
3 changed files with 24 additions and 101 deletions

View file

@ -1,84 +0,0 @@
{ config, pkgs, ... }:
{
imports = [
./hardware-configuration.nix
];
services.openssh.enable = true;
users.users.root.openssh.authorizedKeys.keys = [
# Replace with your public key
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH3rrF3VSWI4n4cpguvlmLAaU3uftuX4AVV/39S/8GO9 alarsyo@thinkpad"
];
users.users.root.initialHashedPassword = "";
services.openssh.permitRootLogin = "prohibit-password";
users.users.alarsyo = {
password = "toto";
isNormalUser = true;
extraGroups = [
"media"
"networkmanager"
"video" # for `light` permissions
"docker"
"wheel" # Enable sudo for the user.
];
shell = pkgs.fish;
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH3rrF3VSWI4n4cpguvlmLAaU3uftuX4AVV/39S/8GO9 alarsyo@thinkpad"
];
};
networking.useDHCP = false;
networking.interfaces.enp35s0.ipv4.addresses = [
{
address = "95.217.121.60";
prefixLength = 26;
}
];
networking.interfaces.enp35s0.ipv6.addresses = [
{
address = "2a01:4f9:4a:3649::2";
prefixLength = 64;
}
];
networking.defaultGateway = "95.217.121.1";
networking.defaultGateway6 = { address = "fe80::1"; interface = "enp35s0"; };
networking.nameservers = [ "1.1.1.1" "1.0.0.1" ];
networking.hostName = "hades";
boot.loader.systemd-boot.enable = false;
boot.loader.grub = {
enable = true;
efiSupport = false;
devices = [ "/dev/sda" "/dev/sdb" ];
};
system.stateVersion = "22.05";
environment.systemPackages = with pkgs; [
vim
tmux
git
(pkgs.callPackage "${builtins.fetchTarball "https://github.com/ryantm/agenix/archive/main.tar.gz"}/pkgs/agenix.nix" {})
];
nixpkgs.config.allowUnfree = true;
nix = {
package = pkgs.nixStable;
settings = {
experimental-features = ["nix-command" "flakes"];
trusted-users = ["@wheel"];
substituters = [
"https://alarsyo.cachix.org"
"https://nix-community.cachix.org"
];
trusted-public-keys = [
"alarsyo.cachix.org-1:A6BmcaJek5+ZDWWv3fPteHhPm6U8liS9CbDbmegPfmk="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
};
};
}

View file

@ -21,7 +21,7 @@ in {
boot.loader.grub = { boot.loader.grub = {
enable = true; enable = true;
efiSupport = false; efiSupport = false;
devices = [ "/dev/sda" "/dev/sdb" ]; devices = ["/dev/sda" "/dev/sdb"];
}; };
boot.tmpOnTmpfs = true; boot.tmpOnTmpfs = true;
@ -46,8 +46,11 @@ in {
} }
]; ];
networking.defaultGateway = "95.217.121.1"; networking.defaultGateway = "95.217.121.1";
networking.defaultGateway6 = { address = "fe80::1"; interface = "enp35s0"; }; networking.defaultGateway6 = {
networking.nameservers = [ "1.1.1.1" "1.0.0.1" ]; address = "fe80::1";
interface = "enp35s0";
};
networking.nameservers = ["1.1.1.1" "1.0.0.1"];
my.networking.externalInterface = "enp35s0"; my.networking.externalInterface = "enp35s0";
# List services that you want to enable: # List services that you want to enable:

View file

@ -1,24 +1,28 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{ {
imports = config,
[ (modulesPath + "/installer/scan/not-detected.nix") lib,
]; pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "ahci" "sd_mod" ]; boot.initrd.availableKernelModules = ["ahci" "sd_mod"];
boot.initrd.kernelModules = [ "dm-snapshot" ]; boot.initrd.kernelModules = ["dm-snapshot"];
boot.kernelModules = [ "kvm-amd" ]; boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/2a24010c-14bd-439b-b30b-d0e18db69952"; device = "/dev/disk/by-uuid/2a24010c-14bd-439b-b30b-d0e18db69952";
fsType = "ext4"; fsType = "ext4";
}; };
swapDevices = [ ]; swapDevices = [];
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand"; powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;