From d2b67505cecf3cd53ba13fe5a426dddd1faa166d Mon Sep 17 00:00:00 2001 From: tdpeuter Date: Tue, 7 Mar 2023 23:12:34 +0100 Subject: [PATCH] #8 Add unfree software --- nixos/apply-system.sh | 2 +- nixos/apply-users.sh | 2 +- nixos/flake.lock | 18 ++++++- nixos/flake.nix | 14 ++++-- nixos/system/configuration.nix | 31 ++++++++---- nixos/update.sh | 2 +- nixos/users/tdpeuter/home.nix | 91 ++++++++++++++++++++++------------ 7 files changed, 111 insertions(+), 49 deletions(-) diff --git a/nixos/apply-system.sh b/nixos/apply-system.sh index 6a83754..3f37bb3 100755 --- a/nixos/apply-system.sh +++ b/nixos/apply-system.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash pushd ~/projects/sisyphus/nixos sudo nixos-rebuild switch --flake .# popd diff --git a/nixos/apply-users.sh b/nixos/apply-users.sh index f1b3264..5a37b49 100755 --- a/nixos/apply-users.sh +++ b/nixos/apply-users.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash pushd ~/projects/sisyphus/nixos nix build .#homeManagerConfigurations.tdpeuter.activationPackage ./result/activate diff --git a/nixos/flake.lock b/nixos/flake.lock index 72ee0d7..e00a7c4 100644 --- a/nixos/flake.lock +++ b/nixos/flake.lock @@ -37,10 +37,26 @@ "type": "indirect" } }, + "nur": { + "locked": { + "lastModified": 1678221928, + "narHash": "sha256-m1pwayWF9O/pK7iiX4UQBrflvdLtmbDpjwmRMPvlniA=", + "owner": "nix-community", + "repo": "NUR", + "rev": "15e2403d7288984b9e53bf9a92483574f1aafe42", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "NUR", + "type": "github" + } + }, "root": { "inputs": { "home-manager": "home-manager", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs", + "nur": "nur" } }, "utils": { diff --git a/nixos/flake.nix b/nixos/flake.nix index a749af1..bf802be 100644 --- a/nixos/flake.nix +++ b/nixos/flake.nix @@ -2,9 +2,10 @@ description = "System configuration"; inputs = { - nixpkgs.url = "nixpkgs/nixos-22.11"; home-manager.url = "github:nix-community/home-manager/release-22.11"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; + nixpkgs.url = "nixpkgs/nixos-22.11"; + nur.url = "github:nix-community/NUR"; }; outputs = { nixpkgs, home-manager, ... }: @@ -13,14 +14,17 @@ pkgs = import nixpkgs { inherit system; - config = { allowUnfree = true; }; + config.allowUnfree = true; }; lib = nixpkgs.lib; - in { + in rec { homeManagerConfigurations = { tdpeuter = home-manager.lib.homeManagerConfiguration { - pkgs = nixpkgs.legacyPackages.${system}; + pkgs = import nixpkgs { + inherit system; + config.allowUnfree = true; + }; modules = [ ./users/tdpeuter/home.nix { @@ -36,7 +40,7 @@ nixosConfigurations = { Tibo-NixTest = lib.nixosSystem { # Use hostname inherit system; - modules = [ + modules = (builtins.attrValues) ++ [ ./system/configuration.nix ]; }; diff --git a/nixos/system/configuration.nix b/nixos/system/configuration.nix index da793f2..c694d7b 100644 --- a/nixos/system/configuration.nix +++ b/nixos/system/configuration.nix @@ -46,15 +46,6 @@ # useXkbConfig = true; # use xkbOptions in tty. # }; - # Enable the X11 windowing system. - services.xserver.enable = true; - - - # Enable the Plasma 5 Desktop Environment. - services.xserver.displayManager.sddm.enable = true; - services.xserver.desktopManager.plasma5.enable = true; - - # Configure keymap in X11 # services.xserver.layout = "us"; # services.xserver.xkbOptions = { @@ -62,6 +53,28 @@ # "caps:escape" # map caps to escape. # }; + + services.xserver = { + # Enable the X11 windowing system. + enable = true; + + # Enable the Plasma 5 Desktop Environment. + displayManager.sddm.enable = true; + displayManager.defaultSession = "plasmawayland"; + + desktopManager.plasma5 = { + enable = true; + excludePackages = with pkgs.libsForQt5; [ + elisa + okular + plasma-browser-integration + khelpcenter + oxygen + ]; + }; + + }; + # Enable CUPS to print documents. # services.printing.enable = true; diff --git a/nixos/update.sh b/nixos/update.sh index 919cd48..a428bdc 100755 --- a/nixos/update.sh +++ b/nixos/update.sh @@ -1,2 +1,2 @@ -#!/bin/sh +#!/usr/bin/env bash nix flake update diff --git a/nixos/users/tdpeuter/home.nix b/nixos/users/tdpeuter/home.nix index 7c01e8f..7e6051c 100644 --- a/nixos/users/tdpeuter/home.nix +++ b/nixos/users/tdpeuter/home.nix @@ -1,38 +1,67 @@ -{ config, pkgs, ... }: +{ inputs, lib, config, pkgs, ... }: { - # Home Manager needs a bit of information about you and the - # paths it should manage. - home.username = "tdpeuter"; - home.homeDirectory = "/home/tdpeuter"; + imports = [ + ]; - # This value determines the Home Manager release that your - # configuration is compatible with. This helps avoid breakage - # when a new Home Manager release introduces backwards - # incompatible changes. - # - # You can update Home Manager without changing this value. See - # the Home Manager release notes for a list of state version - # changes in each release. - home.stateVersion = "22.11"; - - # Let Home Manager install and manage itself. - programs.home-manager.enable = true; + # Home manager + home = { + # Home Manager needs a bit of information about you and the + # paths it should manage. + username = "tdpeuter"; + homeDirectory = "/home/tdpeuter"; - programs.gpg.enable = true; - services.gpg-agent = { - enable = true; - pinentryFlavor = "qt"; + # This value determines the Home Manager release that your + # configuration is compatible with. This helps avoid breakage + # when a new Home Manager release introduces backwards + # incompatible changes. + # + # You can update Home Manager without changing this value. See + # the Home Manager release notes for a list of state version + # changes in each release. + stateVersion = "22.11"; + + packages = with pkgs; [ + alacritty + duf + git-crypt + gnupg + pinentry_qt + vifm + zellij + zenith + jetbrains.webstorm + ]; + + }; + + programs = { + # Let Home Manager install and manage itself. + home-manager.enable = true; + + git = { + enable = true; + userName = "tdpeuter"; + userEmail = "tibo.depeuter@gmail.com"; + extraConfig = { + core.editor = "vim"; + }; + }; + + gpg.enable = true; + }; + + + services = { + gpg-agent = { + enable = true; + pinentryFlavor = "qt"; + }; + + nextcloud-client = { + enable = true; + startInBackground = true; + }; }; - home.packages = with pkgs; [ - alacritty - duf - git-crypt - gnupg - pinentry_qt - zellij - zenith - ]; - }