From 9a6998875d48e1f002813b99f2e2bf2c84da0c1a Mon Sep 17 00:00:00 2001 From: Victor Date: Tue, 29 Nov 2022 10:17:10 +0100 Subject: [PATCH] aoife home manager --- flake.nix | 1 - nixos/hosts/thalassa/aoife/configuration.nix | 42 ++---- nixos/hosts/thalassa/aoife/home/default.nix | 135 +++++++++++++++++++ 3 files changed, 144 insertions(+), 34 deletions(-) create mode 100644 nixos/hosts/thalassa/aoife/home/default.nix diff --git a/flake.nix b/flake.nix index 5510b6e..37254b7 100644 --- a/flake.nix +++ b/flake.nix @@ -44,7 +44,6 @@ }; nixos-hardware.url = "github:NixOS/nixos-hardware/master"; - nixos-hardware.inputs.nixpkgs.follows = "nixpkgs"; }; outputs = { self, nixpkgs, vault-secrets, minecraft-servers, colmena diff --git a/nixos/hosts/thalassa/aoife/configuration.nix b/nixos/hosts/thalassa/aoife/configuration.nix index fc5a513..0537796 100644 --- a/nixos/hosts/thalassa/aoife/configuration.nix +++ b/nixos/hosts/thalassa/aoife/configuration.nix @@ -45,6 +45,7 @@ # Enable the GNOME Desktop Environment. services.xserver.displayManager.gdm.enable = true; services.xserver.desktopManager.gnome.enable = true; + programs.dconf.enable = true; # Configure keymap in X11 services.xserver = { @@ -72,47 +73,22 @@ #media-session.enable = true; }; - # Enable touchpad support (enabled default in most desktopManager). - # services.xserver.libinput.enable = true; - # Define a user account. Don't forget to set a password with ‘passwd’. users.users.victor = { isNormalUser = true; - description = "victor"; extraGroups = [ "networkmanager" "wheel" ]; - packages = with pkgs; [ - firefox - # thunderbird - ]; + }; + + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + users.victor = import ./home; + extraSpecialArgs = { inherit inputs; }; }; # Allow unfree packages nixpkgs.config.allowUnfree = true; - # List packages installed in system profile. To search, run: - # $ nix search wget - 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. - # programs.mtr.enable = true; - # programs.gnupg.agent = { - # enable = true; - # enableSSHSupport = true; - # }; - - # List services that you want to enable: - - # Enable the OpenSSH daemon. - # services.openssh.enable = true; - - # Open ports in the firewall. - # networking.firewall.allowedTCPPorts = [ ... ]; - # networking.firewall.allowedUDPPorts = [ ... ]; - # Or disable the firewall altogether. # networking.firewall.enable = false; # This value determines the NixOS release from which the default @@ -121,6 +97,6 @@ # this value at the release version of the first install of this system. # Before changing this value read the documentation for this option # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). - system.stateVersion = "22.11"; # Did you read the comment? + system.stateVersion = "23.05"; # Did you read the comment? } diff --git a/nixos/hosts/thalassa/aoife/home/default.nix b/nixos/hosts/thalassa/aoife/home/default.nix new file mode 100644 index 0000000..c16b0f0 --- /dev/null +++ b/nixos/hosts/thalassa/aoife/home/default.nix @@ -0,0 +1,135 @@ +{ lib, config, pkgs, inputs, ... }: +let + tex = (pkgs.texlive.combine { + inherit (pkgs.texlive) scheme-full; + dnd-5e-latex-template = { pkgs = [ pkgs.v.dnd-5e-latex-template ]; }; + }); +in +{ + programs.home-manager.enable = true; + + home.username = "victor"; + home.homeDirectory = "/home/victor"; + home.stateVersion = "23.05"; + + home.packages = with pkgs; [ + btop + calibre + element-desktop-wayland + fusee-launcher + gcc + gimp + inputs.comma.packages.${pkgs.system}.default + inputs.riff.packages.${pkgs.system}.riff + inputs.webcord.packages.${pkgs.system}.default + mullvad-vpn + neofetch + nixfmt + nixpkgs-review + python3 + rustup + solo2-cli + tex + ]; + + programs.exa = { + enable = true; + enableAliases = true; + }; + + programs.bat.enable = true; + + programs.git = { + enable = true; + package = pkgs.gitAndTools.gitFull; + userName = "Victor"; + userEmail = "victor@xirion.net"; + lfs.enable = true; + delta.enable = true; + extraConfig = { + push.autoSetupRemote = true; + init.defaultBranch = "main"; + }; + }; + + programs.tmux = { + enable = true; + shortcut = "b"; + terminal = "screen-256color"; + clock24 = true; + }; + + programs.firefox = { + enable = true; + }; + + programs.vscode = { + enable = true; + package = pkgs.vscode; + userSettings = { + "ltex.language" = "en-GB"; + "latex-workshop" = { + "linting.chktex.enabled" = true; + "latex.clean.subfolder.enabled" = true; + "latex.outDir" = "%TMPDIR%/%RELATIVE_DOC%"; + }; + # "workbench.colorTheme" = "Catppuccin Frappé"; + "editor.fontFamily" = + "'DejaVuSansMono Nerd Font', 'monospace', monospace"; + "keyboard.dispatch" = "keyCode"; + "rust-analyzer.server.path" = "${pkgs.rust-analyzer}/bin/rust-analyzer"; + "terminal.integrated.defaultProfile.linux" = "zsh"; + "nix.enableLanguageServer" = true; # Enable LSP. + "nix.serverPath" = + "${pkgs.nil}/bin/nil"; # The path to the LSP server executable. + "[nix]" = { "editor.defaultFormatter" = "brettm12345.nixfmt-vscode"; }; + }; + extensions = with pkgs.vscode-extensions; + with pkgs.v.vscode-extensions; [ + brettm12345.nixfmt-vscode + # catppuccin.catppuccin-vsc + codezombiech.gitignore + editorconfig.editorconfig + foxundermoon.shell-format + james-yu.latex-workshop + jnoortheen.nix-ide + matklad.rust-analyzer + mkhl.direnv + ms-vscode-remote.remote-ssh + ms-vscode.cpptools + platformio.platformio-ide + redhat.vscode-yaml + tamasfe.even-better-toml + valentjn.vscode-ltex + vscodevim.vim + xaver.clang-format + ]; + }; + + programs.direnv = { + enable = true; + nix-direnv.enable = true; + }; + + programs.zsh = { + enable = true; + sessionVariables = { DIRENV_LOG_FORMAT = ""; }; + }; + + # xdg.userDirs = + # let home = config.home.homeDirectory; + # in { + # enable = true; + # createDirectories = true; + # desktop = "${home}/.desktop"; + # documents = "${home}/cloud/Documents"; + # download = "${home}/dl"; + # music = "${home}/cloud/Music"; + # pictures = "${home}/cloud/Pictures"; + # publicShare = "${home}/.publicShare"; + # templates = "${home}/.templates"; + # videos = "${home}/cloud/Videos"; + # }; + + services.syncthing.enable = true; +}