From c4dcd113c8ebc8683a6872f9b3d9166121f51bf5 Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Tue, 6 Apr 2021 16:08:49 -0400 Subject: [PATCH] fmt --- configuration.nix | 14 ++++++++------ flake.nix | 30 +++++++++++++++++------------- home.nix | 9 +++++---- 3 files changed, 30 insertions(+), 23 deletions(-) diff --git a/configuration.nix b/configuration.nix index 50ef733..dacc189 100644 --- a/configuration.nix +++ b/configuration.nix @@ -2,20 +2,22 @@ { imports = - [ (modulesPath + "/installer/scan/not-detected.nix") + [ + (modulesPath + "/installer/scan/not-detected.nix") ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/e0516457-2611-4fbd-afdd-b96618c15fc9"; + { + device = "/dev/disk/by-uuid/e0516457-2611-4fbd-afdd-b96618c15fc9"; fsType = "ext4"; }; fileSystems."/boot" = - { device = "/dev/disk/by-uuid/5C46-63E4"; + { + device = "/dev/disk/by-uuid/5C46-63E4"; fsType = "vfat"; }; swapDevices = - [ { device = "/dev/disk/by-uuid/0bb9c031-1533-40bb-81ae-f956ba84568d"; } - ]; + [{ device = "/dev/disk/by-uuid/0bb9c031-1533-40bb-81ae-f956ba84568d"; }]; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; # high-resolution display @@ -53,7 +55,7 @@ services.xserver.enable = true; services.xserver.displayManager.gdm.enable = true; services.xserver.desktopManager.gnome3.enable = true; - + users.users.srid = { isNormalUser = true; extraGroups = [ "wheel" "networkmanager" ]; # Enable ‘sudo’ for the user. diff --git a/flake.nix b/flake.nix index a81a92f..03ec8ae 100644 --- a/flake.nix +++ b/flake.nix @@ -7,17 +7,21 @@ }; outputs = { self, home-manager, nixpkgs }: { - nixosConfigurations.x1c7 = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - modules = [ - ./configuration.nix - home-manager.nixosModules.home-manager - { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.users.srid = import ./home.nix; - } - ]; - }; + nixosConfigurations.x1c7 = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + /* ({ pkgs, ... }: { + system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev; + nix.registry.nixpkgs.flake = nixpkgs; + }) */ + ./configuration.nix + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.srid = import ./home.nix; + } + ]; + }; }; -} \ No newline at end of file +} diff --git a/home.nix b/home.nix index 5613cfe..87fb808 100644 --- a/home.nix +++ b/home.nix @@ -1,9 +1,10 @@ { config, pkgs, ... }: -let - nix-thunk = - (import (builtins.fetchTarball "https://github.com/obsidiansystems/nix-thunk/archive/master.tar.gz") {}).command; -in { +let + nix-thunk = + (import (builtins.fetchTarball "https://github.com/obsidiansystems/nix-thunk/archive/master.tar.gz") { }).command; +in +{ # Let Home Manager install and manage itself. programs.home-manager.enable = true;