From cfb135e11842ff30f55f928f7fa6d167f24ecc02 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Fri, 19 Feb 2021 21:46:19 +0100 Subject: [PATCH 1/2] base: add main user to media group --- base/users.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/base/users.nix b/base/users.nix index 101a562..9eaf453 100644 --- a/base/users.nix +++ b/base/users.nix @@ -10,7 +10,10 @@ in users.users.alarsyo = { hashedPassword = secrets.shadow-hashed-password-alarsyo; isNormalUser = true; - extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user. + extraGroups = [ + "media" + "wheel" # Enable ‘sudo’ for the user. + ]; shell = pkgs.fish; openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH3rrF3VSWI4n4cpguvlmLAaU3uftuX4AVV/39S/8GO9 alarsyo@thinkpad" From 67523e7e310fc55fa683f3d5c659943d2836b07b Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Fri, 19 Feb 2021 21:54:30 +0100 Subject: [PATCH 2/2] base: move basic Nix configuration --- base/default.nix | 1 + base/nix.nix | 22 ++++++++++++++++++++++ hosts/poseidon/default.nix | 20 -------------------- 3 files changed, 23 insertions(+), 20 deletions(-) create mode 100644 base/nix.nix diff --git a/base/default.nix b/base/default.nix index eca8422..35ec4f2 100644 --- a/base/default.nix +++ b/base/default.nix @@ -1,6 +1,7 @@ { ... }: { imports = [ + ./nix.nix ./users.nix ]; } diff --git a/base/nix.nix b/base/nix.nix new file mode 100644 index 0000000..fe539b1 --- /dev/null +++ b/base/nix.nix @@ -0,0 +1,22 @@ +{ pkgs, ... }: +{ + nix = { + package = pkgs.nixUnstable; + extraOptions = '' + experimental-features = nix-command flakes + ''; + + binaryCaches = [ + "https://alarsyo.cachix.org" + ]; + binaryCachePublicKeys = [ + "alarsyo.cachix.org-1:A6BmcaJek5+ZDWWv3fPteHhPm6U8liS9CbDbmegPfmk=" + ]; + + gc = { + automatic = true; + dates = "03:15"; + options = "--delete-older-than 30d"; + }; + }; +} diff --git a/hosts/poseidon/default.nix b/hosts/poseidon/default.nix index 44e8409..52141ab 100644 --- a/hosts/poseidon/default.nix +++ b/hosts/poseidon/default.nix @@ -121,24 +121,4 @@ in boot.supportedFilesystems = [ "btrfs" ]; - - nix = { - package = pkgs.nixUnstable; - extraOptions = '' - experimental-features = nix-command flakes - ''; - - binaryCaches = [ - "https://alarsyo.cachix.org" - ]; - binaryCachePublicKeys = [ - "alarsyo.cachix.org-1:A6BmcaJek5+ZDWWv3fPteHhPm6U8liS9CbDbmegPfmk=" - ]; - - gc = { - automatic = true; - dates = "03:15"; - options = "--delete-older-than 30d"; - }; - }; }