From 813e34a49e9e5a67f487e0b528cb1c97177071d0 Mon Sep 17 00:00:00 2001 From: Zonsopkomst Date: Tue, 7 Feb 2023 11:08:47 -0600 Subject: [PATCH] frija testing --- common/TODO/hyperland.nix | 0 common/hyperland.nix | 8 ++ common/networking.nix | 7 ++ common/packages.nix | 8 ++ common/{TODO => }/ssh.nix | 8 ++ common/{TODO => }/unfree.nix | 2 +- common/x11.nix | 13 +++ flake.nix | 31 +++++-- .../frija/{configuration.nix => default.nix} | 82 +++++++++---------- ...me-manager.nix => home-manager.nix.delete} | 0 users/aspire/home-manager.nix | 4 +- 11 files changed, 111 insertions(+), 52 deletions(-) delete mode 100644 common/TODO/hyperland.nix create mode 100644 common/hyperland.nix create mode 100644 common/networking.nix create mode 100644 common/packages.nix rename common/{TODO => }/ssh.nix (57%) rename common/{TODO => }/unfree.nix (94%) create mode 100644 common/x11.nix rename hosts/local/frija/{configuration.nix => default.nix} (77%) rename hosts/local/frija/{home-manager.nix => home-manager.nix.delete} (100%) diff --git a/common/TODO/hyperland.nix b/common/TODO/hyperland.nix deleted file mode 100644 index e69de29..0000000 diff --git a/common/hyperland.nix b/common/hyperland.nix new file mode 100644 index 0000000..7696b50 --- /dev/null +++ b/common/hyperland.nix @@ -0,0 +1,8 @@ + { config, pkgs, ... }: + + { + modules = [ + hyprland.nixosModules.default + {programs.hyprland.enable = true;} + ]; + } \ No newline at end of file diff --git a/common/networking.nix b/common/networking.nix new file mode 100644 index 0000000..9a6b8ea --- /dev/null +++ b/common/networking.nix @@ -0,0 +1,7 @@ +{ config, pkgs, ... }: + +{ + + # Enable networking + networking.networkmanager.enable = true; +} \ No newline at end of file diff --git a/common/packages.nix b/common/packages.nix new file mode 100644 index 0000000..32e1ff0 --- /dev/null +++ b/common/packages.nix @@ -0,0 +1,8 @@ +{ config, pkgs, ... }: + +{ + environment.systemPackages = with pkgs; [ + # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. + # wget + ]; +} \ No newline at end of file diff --git a/common/TODO/ssh.nix b/common/ssh.nix similarity index 57% rename from common/TODO/ssh.nix rename to common/ssh.nix index 47da0da..63b2e35 100644 --- a/common/TODO/ssh.nix +++ b/common/ssh.nix @@ -1,6 +1,14 @@ { config, pkgs, ... }: { + # Some programs need SUID wrappers, can be configured further or are + # started in user sessions. + # programs.mtr.enable = true; + # programs.gnupg.agent = { + # enable = true; + # enableSSHSupport = true; + # }; + # Enable the OpenSSH daemon. # services.openssh.enable = true; diff --git a/common/TODO/unfree.nix b/common/unfree.nix similarity index 94% rename from common/TODO/unfree.nix rename to common/unfree.nix index fe85146..4a0ccfc 100644 --- a/common/TODO/unfree.nix +++ b/common/unfree.nix @@ -1,6 +1,6 @@ { config, pkgs, ... }: -{ +{ # Allow unfree packages nixpkgs.config.allowUnfree = true; } \ No newline at end of file diff --git a/common/x11.nix b/common/x11.nix new file mode 100644 index 0000000..2a7070d --- /dev/null +++ b/common/x11.nix @@ -0,0 +1,13 @@ +{ config, pkgs, ... }: + +{ + # Enable the X11 windowing system. + services.xserver.enable = true; + + # Configure keymap in X11 + services.xserver = { + layout = "us"; + xkbVariant = ""; + }; + +} \ No newline at end of file diff --git a/flake.nix b/flake.nix index 02f7633..9a3e759 100644 --- a/flake.nix +++ b/flake.nix @@ -35,14 +35,29 @@ frija = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ - #TODO see if I can move the imports section from configuration.nix successfully - ./common/amd.nix #comment out amd.nix in configuration file to start - #./common/CUPS.nix - #./common/gnome.nix - #./common/pipewire.nix - #./common/time.nix - #TODO change the configuration.nix to a default.nix file (see discourse bookmark) - ./hosts/local/frija/configuration.nix + ./common/amd.nix + ./common/CUPS.nix + ./common/gnome.nix + ./common/pipewire.nix + ./common/time.nix + #./common/docker.nix + ./common/flakeinit.nix + #./common/flatpak.nix + #./common/gaming.nix + #./common/hyperland.nix + #./common/insecure.nix + ./common/networking.nix + #./common/waydroid.nix + ./common/x11.nix + + # Host Specific + ./hosts/local/frija/default.nix + ./hosts/local/frija/hardware-configuration.nix + ./hosts/local/frija/packages.nix + ./users/aspire/home-manager.nix + + # User Specific + #./users/aspire/syncthing.nix home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; diff --git a/hosts/local/frija/configuration.nix b/hosts/local/frija/default.nix similarity index 77% rename from hosts/local/frija/configuration.nix rename to hosts/local/frija/default.nix index c601518..babd7ee 100644 --- a/hosts/local/frija/configuration.nix +++ b/hosts/local/frija/default.nix @@ -7,17 +7,17 @@ { imports = [ # Include the results of the hardware scan. - ./hardware-configuration.nix - ./packages.nix + #./hardware-configuration.nix + #./packages.nix #../../../common/amd.nix #../../../common/docker.nix - ../../../common/flakeinit.nix + #../../../common/flakeinit.nix #../../../common/flatpak.nix #../../../common/gaming.nix #../../../common/hyperland.nix #../../../common/insecure.nix #../../../common/waydroid.nix - ../../../users/aspire/home-manager.nix + #../../../users/aspire/home-manager.nix #../../../users/aspire/syncthing.nix ]; @@ -47,58 +47,58 @@ # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; # Enable networking - networking.networkmanager.enable = true; + #networking.networkmanager.enable = true; # Set your time zone. - time.timeZone = "America/Chicago"; + #time.timeZone = "America/Chicago"; # Select internationalisation properties. - i18n.defaultLocale = "en_US.UTF-8"; + #i18n.defaultLocale = "en_US.UTF-8"; - i18n.extraLocaleSettings = { - LC_ADDRESS = "en_US.UTF-8"; - LC_IDENTIFICATION = "en_US.UTF-8"; - LC_MEASUREMENT = "en_US.UTF-8"; - LC_MONETARY = "en_US.UTF-8"; - LC_NAME = "en_US.UTF-8"; - LC_NUMERIC = "en_US.UTF-8"; - LC_PAPER = "en_US.UTF-8"; - LC_TELEPHONE = "en_US.UTF-8"; - LC_TIME = "en_US.UTF-8"; - }; + #i18n.extraLocaleSettings = { + #LC_ADDRESS = "en_US.UTF-8"; + #LC_IDENTIFICATION = "en_US.UTF-8"; + #LC_MEASUREMENT = "en_US.UTF-8"; + #LC_MONETARY = "en_US.UTF-8"; + #LC_NAME = "en_US.UTF-8"; + #LC_NUMERIC = "en_US.UTF-8"; + #LC_PAPER = "en_US.UTF-8"; + #LC_TELEPHONE = "en_US.UTF-8"; + #LC_TIME = "en_US.UTF-8"; + #}; # Enable the X11 windowing system. - services.xserver.enable = true; + #services.xserver.enable = true; # Enable the GNOME Desktop Environment. - services.xserver.displayManager.gdm.enable = true; - services.xserver.desktopManager.gnome.enable = true; + #services.xserver.displayManager.gdm.enable = true; + #services.xserver.desktopManager.gnome.enable = true; # Configure keymap in X11 - services.xserver = { - layout = "us"; - xkbVariant = ""; - }; + #services.xserver = { + #layout = "us"; + #xkbVariant = ""; + #}; # Enable CUPS to print documents. - services.printing.enable = true; + #services.printing.enable = true; # Enable sound with pipewire. - sound.enable = true; - hardware.pulseaudio.enable = false; - security.rtkit.enable = true; - services.pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; + #sound.enable = true; + #hardware.pulseaudio.enable = false; + #security.rtkit.enable = true; + #services.pipewire = { + #enable = true; + #alsa.enable = true; + #alsa.support32Bit = true; + #pulse.enable = true; # If you want to use JACK applications, uncomment this #jack.enable = true; # use the example session manager (no others are packaged yet so this is enabled by default, # no need to redefine it in your config for now) #media-session.enable = true; - }; + #}; # Enable touchpad support (enabled default in most desktopManager). # services.xserver.libinput.enable = true; @@ -108,10 +108,8 @@ isNormalUser = true; description = "Aspire"; extraGroups = [ "docker" "networkmanager" "wheel" ]; - packages = with pkgs; [ - # firefox - # thunderbird - ]; + #packages = with pkgs; [ + # ]; }; # Enable automatic login for the user. @@ -123,14 +121,14 @@ systemd.services."autovt@tty1".enable = false; # Allow unfree packages - nixpkgs.config.allowUnfree = true; + #nixpkgs.config.allowUnfree = true; # List packages installed in system profile. To search, run: # $ nix search wget - environment.systemPackages = with pkgs; [ + #environment.systemPackages = with pkgs; [ # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. # wget - ]; + #]; # Some programs need SUID wrappers, can be configured further or are # started in user sessions. diff --git a/hosts/local/frija/home-manager.nix b/hosts/local/frija/home-manager.nix.delete similarity index 100% rename from hosts/local/frija/home-manager.nix rename to hosts/local/frija/home-manager.nix.delete diff --git a/users/aspire/home-manager.nix b/users/aspire/home-manager.nix index 1151b03..9fff62e 100644 --- a/users/aspire/home-manager.nix +++ b/users/aspire/home-manager.nix @@ -10,7 +10,9 @@ home-manager.users.aspire = { pkgs, ... }: { home.packages = with pkgs; [ # Begin packages and options - alacritty + alacritty + # Moved btop from hosts/local/frija/packages.nix to test, if successful, move other packages + btop ]; # Need to enable home.stateVersion for it to work correctly: home.stateVersion = "22.11";