diff --git a/info.nix b/info.nix index 8c63c67..9a04f06 100644 --- a/info.nix +++ b/info.nix @@ -2,11 +2,7 @@ hostname = "nixos"; username = "biscuit"; timezone = "America/Chicago"; - - # VPN vpnEnable = true; - - # Unfree Softwares allowUnfree = true; shellAliases = { @@ -15,4 +11,6 @@ hupd = "home-manager switch --flake ~/Nixos/#desktop"; agu = "pkill gjs & ags run ~/Nixos/pkgs/ags/biscuit/app.ts &"; }; + + touchpadSupport = false; } diff --git a/modules/display-manager.nix b/modules/display-manager.nix index d1128d1..ba9d4d1 100644 --- a/modules/display-manager.nix +++ b/modules/display-manager.nix @@ -2,7 +2,7 @@ imports = [ ../system/wayland.nix ../system/sound.nix - ../system/print.nix + ../system/misc.nix ../system/browser.nix ../system/font.nix ../system/theme.nix diff --git a/modules/system.nix b/modules/system.nix index be5fc80..780be19 100644 --- a/modules/system.nix +++ b/modules/system.nix @@ -5,19 +5,7 @@ }: { imports = [ - ../system/bootloader.nix - ../system/firewall.nix - ../system/locale.nix - ../system/network.nix - ../system/term.nix - ../system/development.nix - # ../system/proxy.nix - # ../system/recovery.nix # only supports non-flake conf - ../system/ssh.nix - ../system/timezone.nix - # ../system/touchpad.nix - ../system/users.nix - ../system/tools.nix + ../system/default.nix ] ++ lib.optionals (vpnEnable == true) [ ../system/vpn.nix diff --git a/system/bootloader.nix b/system/bootloader.nix deleted file mode 100644 index 909c54c..0000000 --- a/system/bootloader.nix +++ /dev/null @@ -1,4 +0,0 @@ -{ ... }: { - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; -} diff --git a/system/default.nix b/system/default.nix new file mode 100644 index 0000000..7522a51 --- /dev/null +++ b/system/default.nix @@ -0,0 +1,64 @@ +{ + pkgs, + hostname, + timezone, + touchpadSupport, + ... +}: { + environment.systemPackages = with pkgs; [ + gcc + python3 + cargo + rustc + + btop + tldr + ]; + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + i18n.defaultLocale = "en_US.UTF-8"; + console = { + font = "Lat2-Terminus16"; + useXkbConfig = true; # use xkb.options in tty. + }; + + networking.hostName = "${hostname}"; + networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. + + time.timeZone = "${timezone}"; + + services = { + openssh.enable = true; + libinput.enable = touchpadSupport; + }; + + programs.bash = { + interactiveShellInit = '' + if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]] + then + shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION="" + exec ${pkgs.fish}/bin/fish $LOGIN_OPTION + fi + ''; + }; + + programs = { + fish.enable = true; + zsh.enable = true; + }; + + # networking.firewall.allowedTCPPorts = [ ... ]; + # networking.firewall.allowedUDPPorts = [ ... ]; + # Or disable the firewall altogether. + # networking.firewall.enable = false; + + # networking.proxy.default = "http://user:password@proxy:port/"; + # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; + + # Copy the NixOS configuration file and link it from the resulting system + # (/run/current-system/configuration.nix). This is useful in case you + # accidentally delete configuration.nix. + # ONLY WORKS non-flake + # system.copySystemConfiguration = true; +} diff --git a/system/browser.nix b/system/desktop/browser.nix similarity index 100% rename from system/browser.nix rename to system/desktop/browser.nix diff --git a/system/cursor.nix b/system/desktop/cursor.nix similarity index 100% rename from system/cursor.nix rename to system/desktop/cursor.nix diff --git a/system/font.nix b/system/desktop/font.nix similarity index 100% rename from system/font.nix rename to system/desktop/font.nix diff --git a/system/desktop/misc.nix b/system/desktop/misc.nix new file mode 100644 index 0000000..aff82fd --- /dev/null +++ b/system/desktop/misc.nix @@ -0,0 +1,3 @@ +{...}: { + printing.enable = true; +} diff --git a/system/sound.nix b/system/desktop/sound.nix similarity index 100% rename from system/sound.nix rename to system/desktop/sound.nix diff --git a/system/theme.nix b/system/desktop/theme.nix similarity index 100% rename from system/theme.nix rename to system/desktop/theme.nix diff --git a/system/wayland.nix b/system/desktop/wayland.nix similarity index 100% rename from system/wayland.nix rename to system/desktop/wayland.nix diff --git a/system/development.nix b/system/development.nix deleted file mode 100644 index 590dccd..0000000 --- a/system/development.nix +++ /dev/null @@ -1,8 +0,0 @@ -{pkgs, ...}: { - environment.systemPackages = with pkgs; [ - gcc - python3 - cargo - rustc - ]; -} diff --git a/system/firewall.nix b/system/firewall.nix deleted file mode 100644 index e894e22..0000000 --- a/system/firewall.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ ... }: { - # Open ports in the firewall. - # networking.firewall.allowedTCPPorts = [ ... ]; - # networking.firewall.allowedUDPPorts = [ ... ]; - # Or disable the firewall altogether. - # networking.firewall.enable = false; -} diff --git a/system/locale.nix b/system/locale.nix deleted file mode 100644 index 47d4c0a..0000000 --- a/system/locale.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ ... }: { - i18n.defaultLocale = "en_US.UTF-8"; - console = { - font = "Lat2-Terminus16"; - # keyMap = "us"; - useXkbConfig = true; # use xkb.options in tty. - }; -} - diff --git a/system/network.nix b/system/network.nix deleted file mode 100644 index 4dbbbe5..0000000 --- a/system/network.nix +++ /dev/null @@ -1,6 +0,0 @@ -{pkgs, hostname, ...}: { - networking.hostName = "${hostname}"; - # Pick only one of the below networking options. - # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. - networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. -} diff --git a/system/print.nix b/system/print.nix deleted file mode 100644 index 8af9be3..0000000 --- a/system/print.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ ... }: { - services = { - printing.enable = true; - }; -} diff --git a/system/proxy.nix b/system/proxy.nix deleted file mode 100644 index ad9f246..0000000 --- a/system/proxy.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ ... }: { - # Configure network proxy if necessary - # networking.proxy.default = "http://user:password@proxy:port/"; - # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; -} diff --git a/system/recovery.nix b/system/recovery.nix deleted file mode 100644 index 54715e4..0000000 --- a/system/recovery.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ ... }: { - # Copy the NixOS configuration file and link it from the resulting system - # (/run/current-system/configuration.nix). This is useful in case you - # accidentally delete configuration.nix. - system.copySystemConfiguration = true; -} diff --git a/system/ssh.nix b/system/ssh.nix deleted file mode 100644 index 914b807..0000000 --- a/system/ssh.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ ... }: { - services.openssh.enable = true; -} diff --git a/system/term.nix b/system/term.nix deleted file mode 100644 index 9940eb9..0000000 --- a/system/term.nix +++ /dev/null @@ -1,14 +0,0 @@ -{pkgs, ...}: { - programs.bash = { - interactiveShellInit = '' - if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]] - then - shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION="" - exec ${pkgs.fish}/bin/fish $LOGIN_OPTION - fi - ''; - }; - - programs.zsh.enable = true; - programs.fish.enable = true; -} diff --git a/system/timezone.nix b/system/timezone.nix deleted file mode 100644 index b2aa8aa..0000000 --- a/system/timezone.nix +++ /dev/null @@ -1,3 +0,0 @@ -{timezone, ... }: { - time.timeZone = "${timezone}"; -} diff --git a/system/tools.nix b/system/tools.nix deleted file mode 100644 index 0f6550b..0000000 --- a/system/tools.nix +++ /dev/null @@ -1,6 +0,0 @@ -{pkgs, ...}: { - environment.systemPackages = with pkgs; [ - btop - tldr - ]; -} diff --git a/system/touchpad.nix b/system/touchpad.nix deleted file mode 100644 index 4353925..0000000 --- a/system/touchpad.nix +++ /dev/null @@ -1,4 +0,0 @@ -{ ... }: { - # Enable touchpad support (enabled default in most desktopManager). - services.libinput.enable = true; -}