move the username variable fully into the flake

This commit is contained in:
Andreas Zweili 2022-01-24 12:18:17 +01:00
parent fb96fb5ec2
commit 260c6cdf74
15 changed files with 17 additions and 54 deletions

View File

@ -23,7 +23,7 @@
}:
let
system = "x86_64-linux";
username = import ./username.nix;
username = "andreas";
overlay-unstable = final: prev: {
unstable = import nixpkgs-unstable {
system = "x86_64-linux";
@ -41,7 +41,7 @@
};
mkComputer = configurationNix: homeManagerRole: extraModules: nixpkgs.lib.nixosSystem {
inherit system pkgs;
specialArgs = { inherit self system inputs; };
specialArgs = { inherit self system inputs username; };
modules = (
[
# System configuration for this host
@ -55,7 +55,7 @@
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.${username}.imports = [
(import homeManagerRole { inherit self pkgs; })
(import homeManagerRole { inherit pkgs username; })
];
}
] ++ extraModules

View File

@ -1,7 +1,4 @@
{ self, ... }:
let
username = import "${self}/username.nix";
in
{ username, ... }:
{
# Home Manager needs a bit of information about you and the
# paths it should manage.

View File

@ -1,7 +1,7 @@
{ self, pkgs, ... }:
{ pkgs, username, ... }:
{
imports = [
(import ./common { inherit self; })
(import ./common { inherit username; })
./software/work-desktop
./software/autorandr
./software/czkawka

View File

@ -1,7 +1,4 @@
{ pkgs, ... }:
let
username = import ../../username.nix;
in
{ pkgs, username, ... }:
{
home.packages = with pkgs; [
vagrant

View File

@ -1,7 +1,4 @@
{ self, pkgs, ... }:
let
username = import "${self}/username.nix";
in
{ pkgs, username, ... }:
{
services.code-server = {
enable = true;

View File

@ -1,7 +1,4 @@
{ self, pkgs, ... }:
let
username = import "${self}/username.nix";
in
{ self, pkgs, username, ... }:
{
imports = [
"${self}/modules/cli"

View File

@ -1,7 +1,4 @@
{ self, pkgs, ... }:
let
username = import "${self}/username.nix";
in
{ pkgs, username, ... }:
{
virtualisation.docker =
{

View File

@ -1,7 +1,4 @@
{ self, pkgs, ... }:
let
username = import "${self}/username.nix";
in
{ pkgs, username, ... }:
{
programs.droidcam.enable = true;
# required for USB connection

View File

@ -1,7 +1,4 @@
{ self, pkgs, ... }:
let
username = import "${self}/username.nix";
in
{ pkgs, username, ... }:
{
environment.systemPackages = with pkgs; [
gnome.eog

View File

@ -1,7 +1,4 @@
{ self, pkgs, ... }:
let
username = import "${self}/username.nix";
in
{ pkgs, username, ... }:
{
services.espanso.enable = true;
home-manager.users.${username} = {

View File

@ -1,7 +1,4 @@
{ self, pkgs, ... }:
let
username = import "${self}/username.nix";
in
{ pkgs, username, ... }:
{
nix.extraOptions = ''
keep-outputs = true

View File

@ -1,7 +1,4 @@
{ self, ... }:
let
username = import "${self}/username.nix";
in
{ username, ... }:
{
services.restic.backups.${username} = {
user = username;

View File

@ -1,7 +1,4 @@
{ self, ... }:
let
username = import "${self}/username.nix";
in
{ username, ... }:
{
programs.steam.enable = true;
hardware.steam-hardware.enable = true;

View File

@ -1,7 +1,4 @@
{ self, pkgs, ... }:
let
username = import "${self}/username.nix";
in
{ pkgs, username, ... }:
{
programs.xonsh = {
enable = true;

View File

@ -1 +0,0 @@
"andreas"