From aa37759efc908d36e0693cc640a920e871dd5798 Mon Sep 17 00:00:00 2001 From: Rouven Seifert Date: Tue, 27 Dec 2022 18:21:33 +0100 Subject: [PATCH] documenting and formatting --- flake.lock | 20 ++----------- flake.nix | 1 + hosts/thinkpad/default.nix | 30 ++++++-------------- hosts/thinkpad/modules/autorandr/default.nix | 1 - shared/sops.nix | 6 ++-- shared/vim.nix | 2 +- users/rouven/modules/default.nix | 1 - users/rouven/modules/git/default.nix | 1 - users/rouven/modules/packages.nix | 7 ++--- 9 files changed, 18 insertions(+), 51 deletions(-) diff --git a/flake.lock b/flake.lock index d8ad5df..298dcaf 100644 --- a/flake.lock +++ b/flake.lock @@ -67,22 +67,6 @@ "type": "github" } }, - "nixpkgs_3": { - "locked": { - "lastModified": 1671877799, - "narHash": "sha256-jjC0NtPOT4huSwyichdrKHVCjuGr1al7Wu6PcHo5XZs=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "8351f271f85dae1ee28269028acde661e60394dd", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "root": { "inputs": { "home-manager": "home-manager", @@ -92,7 +76,9 @@ }, "sops-nix": { "inputs": { - "nixpkgs": "nixpkgs_3", + "nixpkgs": [ + "nixpkgs" + ], "nixpkgs-stable": "nixpkgs-stable" }, "locked": { diff --git a/flake.nix b/flake.nix index 2d96740..1789e4a 100644 --- a/flake.nix +++ b/flake.nix @@ -4,6 +4,7 @@ nixpkgs.url = github:nixos/nixpkgs/nixos-22.11; home-manager.url = github:nix-community/home-manager; sops-nix.url = github:Mic92/sops-nix; + sops-nix.inputs.nixpkgs.follows = "nixpkgs"; }; outputs = { self, nixpkgs, home-manager, sops-nix }: { diff --git a/hosts/thinkpad/default.nix b/hosts/thinkpad/default.nix index b88d3a9..38ed476 100755 --- a/hosts/thinkpad/default.nix +++ b/hosts/thinkpad/default.nix @@ -17,8 +17,7 @@ boot.loader.efi.canTouchEfiVariables = true; networking.hostName = "thinkpad"; - sops.defaultSopsFile = ../../secrets/thinkpad.yaml; - networking.networkmanager.enable = true; + networking.networkmanager.enable = true; networking.firewall = { allowedUDPPorts = [ 51820 ]; # used for wireguard checkReversePath = false; @@ -64,10 +63,8 @@ environment.systemPackages = with pkgs; [ # essentials wget - git gcc htop - tmux dig traceroute killall @@ -76,6 +73,7 @@ maven ]; + # control display backlight programs.light.enable = true; programs.gnupg.agent = { @@ -83,31 +81,21 @@ enableSSHSupport = true; }; - - # List services that you want to enable: services = { - blueman.enable = true; - devmon.enable = true; - pcscd.enable = true; # yubikey and smartcard stuff + blueman.enable = true; # bluetooth + devmon.enable = true; # automount stuff + pcscd.enable = true; # yubikey and smartcard handling printing.enable = true; fprintd.enable = true; # log in using fingerprint - picom.enable = true; - openssh.enable = true; + picom.enable = true; # window transparency + openssh.enable = true; # enabled ssh to have the host keys }; - programs.steam.enable = true; # putting steam in here since home manager weirdly complains about it + programs.steam.enable = true; # putting steam in here cause in home manager it doesn't work virtualisation.libvirtd.enable = true; virtualisation.spiceUSBRedirection.enable = true; - - # This value determines the NixOS release from which the default - # settings for stateful data, like file locations and database versions - # on your system were taken. It‘s perfectly fine and recommended to leave - # 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 = "22.11"; } diff --git a/hosts/thinkpad/modules/autorandr/default.nix b/hosts/thinkpad/modules/autorandr/default.nix index 3f7195d..e131ef6 100644 --- a/hosts/thinkpad/modules/autorandr/default.nix +++ b/hosts/thinkpad/modules/autorandr/default.nix @@ -39,7 +39,6 @@ in mode = "1920x1080"; }; }; - }; }; }; diff --git a/shared/sops.nix b/shared/sops.nix index c9be369..0d5358e 100644 --- a/shared/sops.nix +++ b/shared/sops.nix @@ -1,9 +1,7 @@ -{config, pkgs, ...}: +{ config, pkgs, ... }: { environment.systemPackages = with pkgs; [ sops ]; - - # directory party sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ]; sops.age.generateKey = false; - + sops.defaultSopsFile = ../secrets/${config.networking.hostName}.yaml; } diff --git a/shared/vim.nix b/shared/vim.nix index fda7b0d..8abec0f 100644 --- a/shared/vim.nix +++ b/shared/vim.nix @@ -5,7 +5,7 @@ ((vim_configurable.override { }).customize { name = "vim"; vimrcConfig.packages.myplugins = with pkgs.vimPlugins; { - start = [ vim-nix vim-lastplace ]; + start = [ vim-nix ]; opt = [ ]; }; vimrcConfig.customRC = '' diff --git a/users/rouven/modules/default.nix b/users/rouven/modules/default.nix index 7439847..815ee4e 100644 --- a/users/rouven/modules/default.nix +++ b/users/rouven/modules/default.nix @@ -1,5 +1,4 @@ { config, pkgs, ... }: - { imports = [ diff --git a/users/rouven/modules/git/default.nix b/users/rouven/modules/git/default.nix index 119ea83..99eb876 100644 --- a/users/rouven/modules/git/default.nix +++ b/users/rouven/modules/git/default.nix @@ -10,6 +10,5 @@ init.defaultBranch = "main"; commit.gpgsign = true; }; - }; } diff --git a/users/rouven/modules/packages.nix b/users/rouven/modules/packages.nix index 7467104..0986117 100644 --- a/users/rouven/modules/packages.nix +++ b/users/rouven/modules/packages.nix @@ -9,9 +9,8 @@ vlc # graphics - lxappearance feh - flameshot + flameshot #TODO configure it in nix picom okular gimp @@ -29,11 +28,10 @@ blueman # internet - thunderbird + thunderbird # TODO configure discord google-chrome nextcloud-client - zoom-us # messaging tdesktop @@ -44,7 +42,6 @@ minecraft superTuxKart extremetuxracer - wine # yubikey and password stuff yubikey-manager