From 0cfd0d22d59385e3f0f16add1d40b9d6a31bbcad Mon Sep 17 00:00:00 2001 From: Florian RICHER Date: Mon, 19 Feb 2024 19:34:50 +0100 Subject: [PATCH] Add perso-desktop --- flake.nix | 11 ++++++ home/default.nix | 12 +++--- hosts/perso-desktop/default.nix | 26 +++++++++++++ .../perso-desktop/hardware-configuration.nix | 38 +++++++++++++++++++ 4 files changed, 81 insertions(+), 6 deletions(-) create mode 100644 hosts/perso-desktop/default.nix create mode 100644 hosts/perso-desktop/hardware-configuration.nix diff --git a/flake.nix b/flake.nix index c35083f..d2b2be9 100644 --- a/flake.nix +++ b/flake.nix @@ -42,6 +42,17 @@ (import ./home/common-home-manager.nix { inherit inputs; }) ]; }; + + perso-desktop = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + + modules = [ + ./hosts/perso-desktop + + home-manager.nixosModules.home-manager + (import ./home/common-home-manager.nix { inherit inputs; }) + ]; + }; }; }; } diff --git a/home/default.nix b/home/default.nix index 75f8635..e1ebc5a 100644 --- a/home/default.nix +++ b/home/default.nix @@ -3,14 +3,14 @@ { imports = [ ./programs/git.nix - ./programs/emacs.nix - ./programs/vscode.nix +# ./programs/emacs.nix +# ./programs/vscode.nix ./programs/mise.nix ./programs/chromium.nix - ./programs/discord.nix - ./programs/skype.nix - ./programs/slack.nix - ./programs/thunderbird.nix +# ./programs/discord.nix +# ./programs/skype.nix +# ./programs/slack.nix +# ./programs/thunderbird.nix ]; home = { diff --git a/hosts/perso-desktop/default.nix b/hosts/perso-desktop/default.nix new file mode 100644 index 0000000..8a0ab36 --- /dev/null +++ b/hosts/perso-desktop/default.nix @@ -0,0 +1,26 @@ +# 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’). + +{ config, pkgs, ... }: + +{ + imports = + [ + ../../modules/system.nix + ../../modules/network.nix + ../../modules/nvidia.nix + ../../modules/plasma.nix + ../../modules/keymaps/us.nix + ../../modules/pipewire.nix + + # Include the results of the hardware scan. + ./hardware-configuration.nix + ]; + + # Bootloader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + networking.hostName = "nixos-desktop-perso"; # Define your hostname. +} diff --git a/hosts/perso-desktop/hardware-configuration.nix b/hosts/perso-desktop/hardware-configuration.nix new file mode 100644 index 0000000..dc49f15 --- /dev/null +++ b/hosts/perso-desktop/hardware-configuration.nix @@ -0,0 +1,38 @@ +# 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") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/9aaaedf7-6b82-48f7-942f-813c5513256e"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/7685-5A20"; + fsType = "vfat"; + }; + + swapDevices = [ ]; + + # 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 + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp8s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp10s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}