From b698ce3485904a83e67044dba4229b0589b92339 Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Sun, 21 Jul 2024 00:42:10 +0200 Subject: [PATCH] little bit more progress --- flake.nix | 5 +- hosts/laptop/default.nix | 2 - hosts/pc/default.nix | 36 ----------- hosts/pc/default.nix.back | 94 ----------------------------- hosts/pc/hardware-configuration.nix | 40 ------------ hosts/server/default.nix | 2 - 6 files changed, 4 insertions(+), 175 deletions(-) delete mode 100644 hosts/laptop/default.nix delete mode 100644 hosts/pc/default.nix delete mode 100644 hosts/pc/default.nix.back delete mode 100644 hosts/pc/hardware-configuration.nix delete mode 100644 hosts/server/default.nix diff --git a/flake.nix b/flake.nix index d746005..b8bd6a5 100644 --- a/flake.nix +++ b/flake.nix @@ -3,6 +3,7 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; home-manager = { url = "github:nix-community/home-manager"; @@ -12,8 +13,10 @@ stylix.url = "github:danth/stylix"; }; - outputs = { self, nixpkgs, ... }@inputs: let + outputs = inputs @ { self, nixpkgs, nixpkgs-unstable, ... }: let inherit (lib.my) mapModules mapModules mapHosts; + + system = "x84_64-linux"; mkPkgs = pkgs: extraOverlays: import pkgs { diff --git a/hosts/laptop/default.nix b/hosts/laptop/default.nix deleted file mode 100644 index 6416a04..0000000 --- a/hosts/laptop/default.nix +++ /dev/null @@ -1,2 +0,0 @@ -{}: -{} diff --git a/hosts/pc/default.nix b/hosts/pc/default.nix deleted file mode 100644 index 7f81450..0000000 --- a/hosts/pc/default.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ config, lib, pkgs, ... }: -{ - imports = [ ./hardware-configuration.nix ]; - - modules = { - themes.active = "everforrest"; - - desktop = { - plasma.enable = true; - - terminal = { - default = "alacritty"; - allacrity.enable = true; - }; - - editors = { - default = "nano"; - nano.enable = true; - }; - - browsers = { - default = "firefox"; - firefox.enable = true; - }; - }; - - shell = { - default = "zsh"; - toolset = { - git.enable = true; - gnupg.enable = true; - }; - }; - }; -} - diff --git a/hosts/pc/default.nix.back b/hosts/pc/default.nix.back deleted file mode 100644 index 2b3a830..0000000 --- a/hosts/pc/default.nix.back +++ /dev/null @@ -1,94 +0,0 @@ -{ config, lib, pkgs, inputs, ... }: -{ - imports = [ - ./hardware-configuration.nix - ../../modules/system/boot.nix - ../../modules/system/networking.nix - ../../modules/system/audio.nix - ../../modules/system/zsa_voyager.nix - - ../../modules/desktop/plasma.nix - - - - - ../../modules/programs/security.nix - ../../modules/programs/theme.nix - ../../modules/programs/shell.nix - ../../modules/programs/gaming.nix - ../../modules/programs/harden.nix - ../../modules/programs/communication.nix - ../../modules/programs/office.nix - inputs.home-manager.nixosModules.default - ]; - - nixpkgs.config = { - allowUnfree = true; - }; - - nix.settings.experimental-features = [ "nix-command" "flakes" ]; - - # Define a user account. Don't forget to set a password with ‘passwd’. - users.users.chris = { - isNormalUser = true; - extraGroups = [ "wheel" "audio" ]; # Enable ‘sudo’ for the user. - packages = with pkgs; []; - }; - - home-manager = { - useGlobalPkgs = true; - useUserPackages = true; - extraSpecialArgs = { inherit inputs; }; - backupFileExtension = "backup"; - users = { - chris.imports = [ ../../users/chris.nix ]; -# root.imports = [ ../../users/root.nix ]; - }; - }; - - environment.systemPackages = with pkgs; [ - neovim - wget -# chromium - thunderbird - zoxide - atuin - btop - dust - bat - tldr - eza - nextcloud-client - ]; - - systemd.services.numLockOnTty = { - wantedBy = [ "multi-user.target" ]; - serviceConfig = { - ExecStart = lib.mkForce (pkgs.writeShellScript "numLockOnTty" '' - for tty in /dev/tty{1..6}; do - ${pkgs.kbd}/bin/setleds -D +num < "$tty"; - done - ''); - }; - }; - - # This option defines the first version of NixOS you have installed on this particular machine, - # and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions. - # - # Most users should NEVER change this value after the initial install, for any reason, - # even if you've upgraded your system to a new NixOS release. - # - # This value does NOT affect the Nixpkgs version your packages and OS are pulled from, - # so changing it will NOT upgrade your system. - # - # This value being lower than the current NixOS release does NOT mean your system is - # out of date, out of support, or vulnerable. - # - # Do NOT change this value unless you have manually inspected all the changes it would make to your configuration, - # and migrated your data accordingly. - # - # For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion . - system.stateVersion = "23.11"; # Did you read the comment? - -} - diff --git a/hosts/pc/hardware-configuration.nix b/hosts/pc/hardware-configuration.nix deleted file mode 100644 index 656bb4c..0000000 --- a/hosts/pc/hardware-configuration.nix +++ /dev/null @@ -1,40 +0,0 @@ -# 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" "usb_storage" "usbhid" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = - { device = "/dev/disk/by-uuid/8c4eaf57-fdb2-4c4c-bcc0-74e85a1c7985"; - fsType = "ext4"; - }; - - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/C842-316A"; - fsType = "vfat"; - options = [ "fmask=0022" "dmask=0022" ]; - }; - - swapDevices = - [ { device = "/dev/disk/by-uuid/0ddf001a-5679-482e-b254-04a1b9094794"; } - ]; - - # 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.enp0s31f6.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; -} diff --git a/hosts/server/default.nix b/hosts/server/default.nix deleted file mode 100644 index 6416a04..0000000 --- a/hosts/server/default.nix +++ /dev/null @@ -1,2 +0,0 @@ -{}: -{}