diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..12f5647 --- /dev/null +++ b/flake.lock @@ -0,0 +1,49 @@ +{ + "nodes": { + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1651007090, + "narHash": "sha256-C/OoQRzTUOWEr1sd3xTKA2GudA1YG1XB3MlL6KfTchg=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "778af87a981eb2bfa3566dff8c3fb510856329ef", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "master", + "repo": "home-manager", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1650920067, + "narHash": "sha256-iV+7zkBZsHiy4epfcyoiW8lRXdjZXq6h8RfNcaua4Fc=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "6a323903ad07de6680169bb0423c5cea9db41d82", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "home-manager": "home-manager", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..b82309c --- /dev/null +++ b/flake.nix @@ -0,0 +1,42 @@ +{ + description = "My system"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + home-manager = { + url = "github:nix-community/home-manager/master"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + }; + + outputs = { self, nixpkgs, home-manager }: + let + # Set the system type globally (changeme) + system = "x86_64-linux"; + + # Gather the Nix packages + pkgs = import nixpkgs { + inherit system; + config.allowUnfree = true; + }; + + # Pull the library functions + lib = nixpkgs.lib; + in { + nixosConfigurations = { + noah = lib.nixosSystem { + inherit system; + modules = [ + ./nixos/configuration.nix + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.noah = { imports = [ ./nixos/home.nix ]; }; + } + ]; + }; + }; + }; +} diff --git a/modules/applications/keybase.nix b/modules/applications/keybase.nix deleted file mode 100644 index ea8fda7..0000000 --- a/modules/applications/keybase.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ config, ... }: { - config = { - services.keybase.enable = true; - services.kbfs.enable = true; - }; -} diff --git a/modules/services/keybase.nix b/modules/services/keybase.nix new file mode 100644 index 0000000..3a04647 --- /dev/null +++ b/modules/services/keybase.nix @@ -0,0 +1,10 @@ +{ config, pkgs, lib, ... }: + +{ + config = { + services.keybase.enable = true; + services.kbfs.enable = true; + + # home.packages = with pkgs lib; [ (mkIf config.gui keybase-gui) ]; + }; +} diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 2e2392c..2aaac6a 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -6,10 +6,11 @@ { imports = [ # Include the results of the hardware scan. - /etc/nixos/hardware-configuration.nix + ./hardware-configuration.nix ../modules/system/timezone.nix ../modules/system/doas.nix ../modules/gaming + ../modules/services/keybase.nix ]; nixpkgs.config.allowUnfree = true; @@ -81,7 +82,8 @@ }; # Required for setting GTK theme (for preferred-color-scheme in browser) - services.dbus.packages = with pkgs; [ pkgs.dconf ]; + services.dbus.packages = with pkgs; [ dconf ]; + programs.dconf.enable = true; # Mouse config services.ratbagd.enable = true; @@ -122,10 +124,10 @@ # $ nix search wget environment.systemPackages = with pkgs; [ fish + git vim wget curl - home-manager xclip # Clipboard pamixer # Audio control dmenu # Launcher diff --git a/nixos/hardware-configuration.nix b/nixos/hardware-configuration.nix new file mode 100644 index 0000000..1b384c9 --- /dev/null +++ b/nixos/hardware-configuration.nix @@ -0,0 +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") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/f0313f58-971a-46e3-9191-909fe5eb7f7e"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/FB26-799C"; + fsType = "vfat"; + }; + + swapDevices = [ ]; + + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/nixos/home.nix b/nixos/home.nix index ab63f5a..aa4dbbd 100644 --- a/nixos/home.nix +++ b/nixos/home.nix @@ -59,7 +59,6 @@ in { glow # Encryption - keybase-gui gnupg pass ]; @@ -315,6 +314,7 @@ in { extraConfig = { core = { editor = "nvim"; }; pager = { branch = "false"; }; + safe = { directory = "${dotfiles}"; }; }; };