diff --git a/devices/server/configuration.nix b/devices/server/configuration.nix index 00898ed..19e84f8 100644 --- a/devices/server/configuration.nix +++ b/devices/server/configuration.nix @@ -4,12 +4,12 @@ ... }: { imports = [ + ./hardware-configuration.nix ]; boot.loader = { grub = { enable = true; - version = 2; devices = ["/dev/sda"]; }; }; @@ -27,11 +27,10 @@ description = "polen"; extraGroups = ["wheel"]; shell = pkgs.zsh; + polen.openssh.authorizedKeys.keys = [ + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC6O2MJqR+P/FwRyVSz1HWYhMtIwh16ozBU71Y2vf0oNDQ6DZ5T8Bvp5/4uSJgS8lOl3qYyNy0e0zJMIyfFVJnu89ycKBEdixA4HqWOUQGiyvn1C4s740jHolOzN1xNB24PDXFz0vHcVb+G5nU/xeKeaq0vrszrkK2zctqXshw94/x3ah0m3fr5CwM4S2RY/VODOdt11fllFEvN8HGE2mQTPn5sJzwtGW20npQ5iJ7ShugPbC4D1G2JU1R7MqkvWEpq9OFVb1prTpJM+i/lcqCn3lBv8XxpKKnD3q+48eeO1geosAsG/kgUWPDildbzcSfytgj7/TCTujx2ow4ZUfS4kWUrNaXM3M99SG61rFN7zLMAv14SOSsgegmX3q0ZAwOieUhCifqIqdfFr5QjEUP11ALofYRC6567X1YrEVXZFFnZSXMKGkBKpTxx0jaTTGnFSd6F49kDlI30cKJnVUgAK5nESissdEFn3UGRSFfxmjZkYvhY5l3LqtbO3kEutJU= polen@polen-xps" + ]; }; - users.users.root.openssh.authorizedKeys.keys = [ - "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC6O2MJqR+P/FwRyVSz1HWYhMtIwh16ozBU71Y2vf0oNDQ6DZ5T8Bvp5/4uSJgS8lOl3qYyNy0e0zJMIyfFVJnu89ycKBEdixA4HqWOUQGiyvn1C4s740jHolOzN1xNB24PDXFz0vHcVb+G5nU/xeKeaq0vrszrkK2zctqXshw94/x3ah0m3fr5CwM4S2RY/VODOdt11fllFEvN8HGE2mQTPn5sJzwtGW20npQ5iJ7ShugPbC4D1G2JU1R7MqkvWEpq9OFVb1prTpJM+i/lcqCn3lBv8XxpKKnD3q+48eeO1geosAsG/kgUWPDildbzcSfytgj7/TCTujx2ow4ZUfS4kWUrNaXM3M99SG61rFN7zLMAv14SOSsgegmX3q0ZAwOieUhCifqIqdfFr5QjEUP11ALofYRC6567X1YrEVXZFFnZSXMKGkBKpTxx0jaTTGnFSd6F49kDlI30cKJnVUgAK5nESissdEFn3UGRSFfxmjZkYvhY5l3LqtbO3kEutJU= polen@polen-xps" - ]; - environment.systemPackages = with pkgs; [ neovim htop-vim @@ -39,6 +38,15 @@ programs.zsh.enable = true; + environment.etc."issue".text = '' + ▐▓█▀▀▀▀▀▀▀▀▀█▓▌░▄▄▄▄▄░ + ▐▓█░░▀░░▀▄░░█▓▌░█▄▄▄█░ + ▐▓█░░▄░░▄▀░░█▓▌░█▄▄▄█░ + ▐▓█▄▄▄▄▄▄▄▄▄█▓▌░█████░ + ░░░░▄▄███▄▄░░░░░█████░ + beep boop + ''; + nixpkgs.config.allowUnfree = true; nix = { settings.experimental-features = ["nix-command" "flakes"]; diff --git a/devices/server/disk-config.nix b/devices/server/disk-config.nix deleted file mode 100644 index aa6c8cc..0000000 --- a/devices/server/disk-config.nix +++ /dev/null @@ -1,44 +0,0 @@ -{lib, ...}: { - disko.devices = { - disk.disk1 = { - device = lib.mkDefault "/dev/sda"; - type = "disk"; - content = { - type = "gpt"; - partitions = { - boot = { - name = "boot"; - size = "1M"; - type = "EF02"; - }; - root = { - name = "root"; - size = "100%"; - content = { - type = "lvm_pv"; - vg = "pool"; - }; - }; - }; - }; - }; - lvm_vg = { - pool = { - type = "lvm_vg"; - lvs = { - root = { - size = "100%FREE"; - content = { - type = "filesystem"; - format = "ext4"; - mountpoint = "/"; - mountOptions = [ - "defaults" - ]; - }; - }; - }; - }; - }; - }; -} diff --git a/devices/server/hardware-configuration.nix b/devices/server/hardware-configuration.nix index c129ae1..a59b1e5 100644 --- a/devices/server/hardware-configuration.nix +++ b/devices/server/hardware-configuration.nix @@ -1,17 +1,30 @@ # Do not modify this file! It was generated by ‘nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, modulesPath, ... }: - { - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; + config, + lib, + pkgs, + modulesPath, + ... +}: { + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; - boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "hpsa" "usb_storage" "usbhid" "sd_mod" ]; - boot.initrd.kernelModules = [ "dm-snapshot" ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; + boot.initrd.availableKernelModules = ["uhci_hcd" "ehci_pci" "hpsa" "usb_storage" "usbhid" "sd_mod"]; + boot.initrd.kernelModules = []; + boot.kernelModules = ["kvm-intel"]; + boot.extraModulePackages = []; + + fileSystems."/" = { + device = "/dev/disk/by-uuid/a4ba3cce-bbdd-470d-9874-71f3aea9ea13"; + fsType = "ext4"; + }; + + swapDevices = [ + {device = "/dev/disk/by-uuid/6fc86a5b-ac4b-41ed-a7c9-56f734f5e711";} + ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's diff --git a/flake.nix b/flake.nix index f9fe91a..1e86ee6 100644 --- a/flake.nix +++ b/flake.nix @@ -6,8 +6,6 @@ nix-darwin.url = "github:LnL7/nix-darwin"; vimix.url = "github:Polensky/vimix"; sops-nix.url = "github:Mic92/sops-nix"; - disko.url = "github:nix-community/disko"; - disko.inputs.nixpkgs.follows = "nixpkgs"; }; outputs = { @@ -40,7 +38,6 @@ modules = [ disko.nixosModules.disko ./devices/server/configuration.nix - ./devices/server/hardware-configuration.nix ./modules ]; };