From 744f70fc87b24eee856250932031f4c160401f31 Mon Sep 17 00:00:00 2001 From: tristan Date: Sat, 15 Apr 2023 13:55:16 +0100 Subject: [PATCH] reorganise --- hyprland/hyprpaper.conf | 3 - lib/mkconf.nix | 11 ++-- home.nix => system/global/home.nix | 50 +---------------- {scripts => system/global/scripts}/autostart | 0 {scripts => system/global/scripts}/bwmenu | 0 {scripts => system/global/scripts}/play-pause | 0 {scripts => system/global/scripts}/screenshot | 0 global.nix => system/global/system.nix | 5 ++ .../work/config/hypr.conf | 2 - hardware/work.nix => system/work/hardware.nix | 0 system/work/home.nix | 56 +++++++++++++++++++ system/{work.nix => work/system.nix} | 4 -- .../zenix.nix => system/zenix/hardware.nix | 0 system/{zenix.nix => zenix/system.nix} | 5 +- 14 files changed, 72 insertions(+), 64 deletions(-) delete mode 100644 hyprland/hyprpaper.conf rename home.nix => system/global/home.nix (81%) rename {scripts => system/global/scripts}/autostart (100%) rename {scripts => system/global/scripts}/bwmenu (100%) rename {scripts => system/global/scripts}/play-pause (100%) rename {scripts => system/global/scripts}/screenshot (100%) rename global.nix => system/global/system.nix (97%) rename hyprland/hyprland.conf => system/work/config/hypr.conf (97%) rename hardware/work.nix => system/work/hardware.nix (100%) create mode 100644 system/work/home.nix rename system/{work.nix => work/system.nix} (81%) rename hardware/zenix.nix => system/zenix/hardware.nix (100%) rename system/{zenix.nix => zenix/system.nix} (81%) diff --git a/hyprland/hyprpaper.conf b/hyprland/hyprpaper.conf deleted file mode 100644 index 7803cff..0000000 --- a/hyprland/hyprpaper.conf +++ /dev/null @@ -1,3 +0,0 @@ -# preload = ~/Pictures/backgrounds/demonslayer.jpg -# -# wallpaper = DP-1,contain: ~/Pictures/backgrounds/demonslayer.jpg diff --git a/lib/mkconf.nix b/lib/mkconf.nix index 5619b73..f5ef54d 100644 --- a/lib/mkconf.nix +++ b/lib/mkconf.nix @@ -5,13 +5,16 @@ nixpkgs.lib.nixosSystem rec { modules = [ - ../hardware/${name}.nix - ../system/${name}.nix - ../global.nix + ../system/global/system.nix + ../system/${name}/system.nix + ../system/${name}/hardware.nix home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; - home-manager.users.${user} = import ../home.nix; + home-manager.users.${user}.imports = [ + ../system/global/home.nix + ../system/${name}/home.nix + ]; } ]; } diff --git a/home.nix b/system/global/home.nix similarity index 81% rename from home.nix rename to system/global/home.nix index ab065d8..964030b 100644 --- a/home.nix +++ b/system/global/home.nix @@ -1,8 +1,6 @@ -{ config, pkgs, user, ... }: +{ config, pkgs, user, name, ... }: # https://nix-community.github.io/home-manager/options.html { - # don't change - home.stateVersion = "22.05"; programs.home-manager.enable = true; home.username = "tristan"; @@ -56,16 +54,6 @@ enable = true; }; - programs.git = { - enable = true; - userName = "tristan"; - userEmail = "tristan@tristans.cloud"; - aliases = { - graph = "log --oneline --all --graph"; - amend = "commit --amend --no-edit"; - }; - }; - programs.swaylock.settings = { clock = true; screenshots = true; @@ -207,38 +195,6 @@ services.nextcloud-client.enable = true; services.nextcloud-client.startInBackground = true; - - accounts.email.accounts."tristan@tristans.cloud" = { - notmuch.enable = true; - neomutt.enable = true; - mbsync.enable = true; - mbsync.create = "maildir"; - userName = "tristan@tristans.cloud"; - realName = "Tristan"; - address = "tristan@tristans.cloud"; - primary = true; - passwordCommand = "rbw get privateemail"; - smtp = { - host = "mail.privateemail.com"; - port = 465; - tls.enable = true; - }; - imap = { - host = "mail.privateemail.com"; - port = 993; - tls.enable = true; - }; - }; - - programs.notmuch.enable = true; - programs.neomutt = { - enable = true; - vimKeys = true; - sort = "reverse-date"; - sidebar.enable = true; - }; - programs.mbsync.enable = true; - services.mbsync.enable = true; programs.rbw = { enable = true; @@ -271,10 +227,6 @@ executable = true; recursive = true; }; - home.file.".config/hypr" = { - source = ./hyprland; - recursive = true; - }; home.file.".config/wofi/config".text = '' term=foot ''; diff --git a/scripts/autostart b/system/global/scripts/autostart similarity index 100% rename from scripts/autostart rename to system/global/scripts/autostart diff --git a/scripts/bwmenu b/system/global/scripts/bwmenu similarity index 100% rename from scripts/bwmenu rename to system/global/scripts/bwmenu diff --git a/scripts/play-pause b/system/global/scripts/play-pause similarity index 100% rename from scripts/play-pause rename to system/global/scripts/play-pause diff --git a/scripts/screenshot b/system/global/scripts/screenshot similarity index 100% rename from scripts/screenshot rename to system/global/scripts/screenshot diff --git a/global.nix b/system/global/system.nix similarity index 97% rename from global.nix rename to system/global/system.nix index 50597ef..c971972 100644 --- a/global.nix +++ b/system/global/system.nix @@ -16,6 +16,11 @@ networking.networkmanager.enable = true; time.timeZone = "Europe/London"; + + console = { + font = "Lat2-Terminus16"; + useXkbConfig = true; + }; # use pipewire hardware.pulseaudio.enable = false; diff --git a/hyprland/hyprland.conf b/system/work/config/hypr.conf similarity index 97% rename from hyprland/hyprland.conf rename to system/work/config/hypr.conf index 48215af..2d6e1e3 100644 --- a/hyprland/hyprland.conf +++ b/system/work/config/hypr.conf @@ -1,8 +1,6 @@ exec-once= ~/.local/scripts/autostart monitor=,preferred,auto,1 -monitor=DP-1,1920x1080@144,0x0,1 -monitor=HDMI-A-1,1920x1080@60,1920x0,1 input { kb_file= diff --git a/hardware/work.nix b/system/work/hardware.nix similarity index 100% rename from hardware/work.nix rename to system/work/hardware.nix diff --git a/system/work/home.nix b/system/work/home.nix new file mode 100644 index 0000000..9292a0f --- /dev/null +++ b/system/work/home.nix @@ -0,0 +1,56 @@ +{ config, pkgs, user, name, ... }: +# https://nix-community.github.io/home-manager/options.html +{ + # don't change + home.stateVersion = "22.05"; + + home.packages = with pkgs; [ + ]; + + programs.git = { + enable = true; + userName = "tristan"; + userEmail = "tristan@tristans.cloud"; + aliases = { + graph = "log --oneline --all --graph"; + amend = "commit --amend --no-edit"; + }; + }; + + accounts.email.accounts."tristan@tristans.cloud" = { + notmuch.enable = true; + neomutt.enable = true; + mbsync.enable = true; + mbsync.create = "maildir"; + userName = "tristan@tristans.cloud"; + realName = "Tristan"; + address = "tristan@tristans.cloud"; + primary = true; + passwordCommand = "rbw get privateemail"; + smtp = { + host = "mail.privateemail.com"; + port = 465; + tls.enable = true; + }; + imap = { + host = "mail.privateemail.com"; + port = 993; + tls.enable = true; + }; + }; + + programs.notmuch.enable = true; + programs.neomutt = { + enable = true; + vimKeys = true; + sort = "reverse-date"; + sidebar.enable = true; + }; + programs.mbsync.enable = true; + services.mbsync.enable = true; + + home.file.".config/hypr/hyprland.conf" = { + source = ./config/hypr.conf; + }; + +} diff --git a/system/work.nix b/system/work/system.nix similarity index 81% rename from system/work.nix rename to system/work/system.nix index d775141..6d98bd6 100644 --- a/system/work.nix +++ b/system/work/system.nix @@ -5,10 +5,6 @@ networking.hostName = "FCS-Tristan-Nixbook"; - console = { - font = "Lat2-Terminus16"; - useXkbConfig = true; - }; services.xserver = { layout = "gb"; xkbVariant = "dvorak"; diff --git a/hardware/zenix.nix b/system/zenix/hardware.nix similarity index 100% rename from hardware/zenix.nix rename to system/zenix/hardware.nix diff --git a/system/zenix.nix b/system/zenix/system.nix similarity index 81% rename from system/zenix.nix rename to system/zenix/system.nix index 1e3a19c..b218f69 100644 --- a/system/zenix.nix +++ b/system/zenix/system.nix @@ -5,8 +5,9 @@ networking.hostName = "zenix"; - console = { - font = "Lat2-Terminus16"; + services.xserver = { + layout = "gb"; + xkbOptions = "caps:escape"; }; services.openssh.enable = true;